/* ============================================================
   EMENC Admin v2 — modern US-enterprise-style dashboard
   Dual theme (dark default, light toggle), Inter-style typography.
   ============================================================ */

:root,
[data-theme="dark"] {
  --bg:           #0a0e1a;
  --bg-2:         #0f1525;
  --surface:      #131a2c;
  --surface-2:    #1a2238;
  --surface-3:    #232c45;
  --border:       #232b42;
  --border-2:     #2d3654;
  --fg:           #e8ecf5;
  --fg-2:         #b4bccf;
  --muted:        #7a849c;
  --primary:      #6366f1;
  --primary-2:    #818cf8;
  --primary-soft: rgba(99,102,241,.12);
  --success:      #10b981;
  --success-soft: rgba(16,185,129,.12);
  --danger:       #ef4444;
  --danger-soft:  rgba(239,68,68,.12);
  --warning:      #f59e0b;
  --warning-soft: rgba(245,158,11,.12);
  --info:         #06b6d4;
  --info-soft:    rgba(6,182,212,.12);
  --shadow-sm:    0 1px 2px rgba(0,0,0,.4);
  --shadow:       0 8px 24px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.25);
  --shadow-lg:    0 24px 48px rgba(0,0,0,.5), 0 8px 16px rgba(0,0,0,.3);
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    14px;
  --side-w:       248px;
  --side-w-mini:  72px;
  --top-h:        60px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg:           #f7f8fb;
  --bg-2:         #ffffff;
  --surface:      #ffffff;
  --surface-2:    #f2f4f8;
  --surface-3:    #e9ecf3;
  --border:       #e6e8ee;
  --border-2:     #d4d8e1;
  --fg:           #1a1f2e;
  --fg-2:         #475067;
  --muted:        #7a849c;
  --primary:      #4f46e5;
  --primary-2:    #6366f1;
  --primary-soft: rgba(79,70,229,.10);
  --shadow-sm:    0 1px 2px rgba(15,23,42,.06);
  --shadow:       0 4px 16px rgba(15,23,42,.08), 0 1px 3px rgba(15,23,42,.05);
  --shadow-lg:    0 24px 48px rgba(15,23,42,.12), 0 8px 16px rgba(15,23,42,.06);
  color-scheme: light;
}

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", "Pretendard", "Poppins", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-2); }
button { font-family: inherit; }
input, select, textarea, button { font-family: inherit; color: inherit; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ----- Login screen ----- */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
  background:
    radial-gradient(ellipse at top left,  rgba(99,102,241,.25), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(6,182,212,.18), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px; padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 14px;
}
.login-card h1 {
  font-size: 22px; margin: 0; text-align: center; font-weight: 700; letter-spacing: -.01em;
}
.login-card .muted { text-align: center; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--fg-2); }
.login-card input {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: border .15s, box-shadow .15s;
}
.login-card input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.login-foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ----- Shell layout ----- */
body.admin { display: flex; min-height: 100vh; background: var(--bg); }

/* Sidebar */
.sidebar {
  width: var(--side-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  transition: width .2s ease;
  z-index: 50;
}
body.sidebar-mini .sidebar { width: var(--side-w-mini); }
body.sidebar-mini .sidebar .brand-text,
body.sidebar-mini .sidebar nav a span:not(.icon),
body.sidebar-mini .side-foot div.user-meta,
body.sidebar-mini .side-foot a span,
body.sidebar-mini .nav-section-label { display: none; }
body.sidebar-mini .sidebar nav a { justify-content: center; padding: 10px; }

.brand {
  padding: 16px 18px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
  height: var(--top-h);
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.brand-text { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand-text small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: .08em; }

.sidebar nav { flex: 1; overflow-y: auto; padding: 14px 10px; }
.nav-section-label {
  padding: 10px 12px 6px; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--fg-2);
  font-size: 13.5px; font-weight: 500;
  margin: 1px 0;
  white-space: nowrap;
  transition: all .12s;
}
.sidebar nav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.sidebar nav a.on {
  background: var(--primary-soft); color: var(--primary-2);
}
.sidebar nav a .icon {
  width: 18px; height: 18px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.sidebar nav a .badge {
  margin-left: auto;
  background: var(--primary); color: #fff;
  border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 600;
}

.side-foot {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.side-foot .avatar {
  width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--info), var(--primary));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 13px;
}
.side-foot .user-meta { font-size: 13px; line-height: 1.3; min-width: 0; }
.side-foot .user-meta strong { display: block; color: var(--fg); }
.side-foot .user-meta small { color: var(--muted); font-size: 11px; }
.side-foot a { color: var(--muted); margin-left: auto; }
.side-foot a:hover { color: var(--fg); }

/* Content */
.content {
  flex: 1;
  margin-left: var(--side-w);
  min-width: 0;
  display: flex; flex-direction: column;
  transition: margin-left .2s;
}
body.sidebar-mini .content { margin-left: var(--side-w-mini); }

/* Topbar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(15,21,37,.85);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--top-h);
  display: flex; align-items: center; gap: 14px;
}
[data-theme="light"] .topbar { background: rgba(255,255,255,.85); }
.topbar-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.topbar-toggle, .topbar-cmd, .topbar-theme, .topbar-notif {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--fg-2);
  border-radius: var(--radius-sm); cursor: pointer; transition: all .12s;
  position: relative;
}
.topbar-toggle:hover, .topbar-cmd:hover, .topbar-theme:hover, .topbar-notif:hover {
  background: var(--surface-2); color: var(--fg);
}
.topbar h1 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.crumbs { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs span.sep { color: var(--border-2); }

.cmd-trigger {
  flex: 0 0 320px; max-width: 320px;
  height: 36px; padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 13px;
  cursor: pointer;
}
.cmd-trigger:hover { background: var(--surface-3); color: var(--fg-2); }
.cmd-trigger kbd {
  margin-left: auto;
  background: var(--bg-2); border: 1px solid var(--border-2);
  padding: 2px 7px; border-radius: 4px;
  font-size: 11px; font-family: ui-monospace, monospace;
  color: var(--muted);
}

.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.topbar-viewsite {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; margin-right: 4px;
  background: var(--primary, #0b3d91); color: #fff;
  border: 0; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: filter .12s, transform .12s;
}
.topbar-viewsite:hover { filter: brightness(1.12); transform: translateY(-1px); text-decoration: none; color: #fff; }
.topbar-viewsite .tv-ico { font-size: 15px; line-height: 1; }
@media (max-width: 640px) { .topbar-viewsite .tv-txt { display: none; } }
.topbar-notif .dot {
  position: absolute; top: 6px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--surface);
}
.user-menu-trigger {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px; background: transparent; border: 0;
  cursor: pointer; border-radius: 999px; color: var(--fg-2);
}
.user-menu-trigger:hover { background: var(--surface-2); }
.user-menu-trigger .avatar { width: 28px; height: 28px; }

/* Page header */
.page-header {
  padding: 24px 28px 8px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.page-header h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; letter-spacing: -.015em; }
.page-header .lead { color: var(--muted); font-size: 13.5px; margin: 0; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.content-inner { padding: 16px 28px 40px; min-height: 200px; }

/* Cards / panels */
.panel, .card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.panel h2 { font-size: 15px; font-weight: 600; margin: 0 0 16px; letter-spacing: -.005em; }
.panel h3 { font-size: 13px; margin: 20px 0 8px; font-weight: 600; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-label {
  font-size: 12px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600; margin-bottom: 6px;
}
.stat-card .stat-num { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.stat-card .stat-delta { font-size: 11.5px; margin-top: 4px; display: inline-flex; gap: 4px; }
.stat-card .stat-delta.up   { color: var(--success); }
.stat-card .stat-delta.down { color: var(--danger); }
.stat-card .stat-icon {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-2);
  font-size: 16px;
}
.stat-card.success .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning-soft); color: var(--warning); }
.stat-card.danger  .stat-icon { background: var(--danger-soft);  color: var(--danger); }
.stat-card.info    .stat-icon { background: var(--info-soft);    color: var(--info); }

/* Buttons */
.btn, .btn-primary, .btn-danger, .btn-ghost, .btn-success {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--fg);
  cursor: pointer; text-decoration: none;
  transition: all .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn.large { padding: 10px 20px; font-size: 14px; }

/* Forms */
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin-bottom: 14px;
}
label.ck { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 400 !important; cursor: pointer; }
.panel label, .form-grid label {
  display: flex; flex-direction: column; gap: 5px;
  font-weight: 500; font-size: 12.5px; color: var(--fg-2);
}
.panel input[type=text], .panel input[type=email], .panel input[type=password],
.panel input[type=url], .panel input[type=number], .panel input[type=date],
.panel input[type=datetime-local], .panel input[type=search],
.panel input[type=file], .panel select, .panel textarea {
  padding: 9px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--fg); transition: all .12s;
}
.panel input:focus, .panel select:focus, .panel textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.panel textarea { resize: vertical; min-height: 90px; font-family: inherit; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select, .filters input { padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--fg); }

/* Tables */
.data { width: 100%; border-collapse: collapse; font-size: 13px; }
.data thead { background: var(--surface-2); }
.data th { padding: 9px 12px; text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.data td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.data tbody tr:hover { background: var(--surface-2); }
.data tbody tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-2);
  font-size: 11px; font-weight: 500;
}
.tag.success { background: var(--success-soft); color: var(--success); }
.tag.warning { background: var(--warning-soft); color: var(--warning); }
.tag.danger  { background: var(--danger-soft);  color: var(--danger); }
.tag.info    { background: var(--info-soft);    color: var(--info); }
.tag.muted   { background: var(--surface-2);    color: var(--muted); }

.ok  { color: var(--success); font-weight: 600; }
.err { color: var(--danger);  font-weight: 600; }
.muted { color: var(--muted); }

/* Alerts / toast */
.alert {
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; display: flex; align-items: center; gap: 8px;
  border: 1px solid;
}
.alert.ok  { background: var(--success-soft); color: var(--success); border-color: rgba(16,185,129,.3); }
.alert.err { background: var(--danger-soft);  color: var(--danger);  border-color: rgba(239,68,68,.3); }
.alert.warn{ background: var(--warning-soft); color: var(--warning); border-color: rgba(245,158,11,.3); }
.alert.info{ background: var(--info-soft);    color: var(--info);    border-color: rgba(6,182,212,.3); }

.toast-container {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  min-width: 280px; max-width: 380px;
  font-size: 13.5px;
  animation: toastIn .25s ease-out;
  border-left: 3px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Command palette */
.cmd-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5,8,18,.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.cmd-overlay.open { display: flex; }
.cmd-panel {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: cmdIn .15s ease-out;
}
@keyframes cmdIn { from { transform: translateY(-12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cmd-input {
  width: 100%; padding: 16px 20px;
  background: transparent; border: 0; border-bottom: 1px solid var(--border);
  font-size: 16px; color: var(--fg); outline: none;
}
.cmd-list {
  max-height: 50vh; overflow-y: auto;
  list-style: none; margin: 0; padding: 6px;
}
.cmd-list li {
  padding: 9px 14px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 13.5px;
  display: flex; align-items: center; gap: 10px;
}
.cmd-list li.on, .cmd-list li:hover { background: var(--surface-2); }
.cmd-list li small { margin-left: auto; color: var(--muted); font-size: 11px; }

/* Charts container */
.chart-card { padding: 20px; }
.chart-card .chart-wrap { position: relative; height: 260px; }

/* Activity feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex; gap: 12px; align-items: flex-start; font-size: 13px;
}
.feed li:last-child { border-bottom: 0; }
.feed .feed-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--fg-2);
}
.feed .feed-body { flex: 1; min-width: 0; }
.feed .feed-time { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; cursor: pointer; inset: 0; background: var(--surface-3); border-radius: 999px; transition: .2s; }
.switch span::before { content: ""; position: absolute; height: 14px; width: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(16px); }

/* Notifications dropdown */
.notif-pane {
  position: absolute; right: 24px; top: var(--top-h);
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 35;
}
.notif-pane.open { display: block; }
.notif-pane .head { padding: 8px 10px; font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.notif-list li { padding: 10px; border-radius: var(--radius-sm); cursor: pointer; }
.notif-list li:hover { background: var(--surface-2); }
.notif-list li.unread { background: var(--primary-soft); }
.notif-list li .t { color: var(--muted); font-size: 11px; margin-top: 2px; }

/* Misc helpers */
.flex-spacer { flex: 1; }
.kpi-row { display: flex; gap: 6px; flex-wrap: wrap; }
.code {
  font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, monospace;
  font-size: 12px; padding: 1px 6px; background: var(--surface-2);
  border-radius: 4px; color: var(--info);
}
.empty {
  text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px;
}
.empty .icon { font-size: 32px; opacity: .4; margin-bottom: 8px; }

/* Attachments */
.attachments { padding: 14px; }
.attachments legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.att-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.att { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.att img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.file-row { margin: 5px 0; }

/* Mobile */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  body.sidebar-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .content { margin-left: 0; }
  body.sidebar-mini .content { margin-left: 0; }
  .cmd-trigger { display: none; }
  .topbar { padding: 0 14px; }
  .page-header { padding: 18px 14px 4px; }
  .content-inner { padding: 12px 14px 28px; }
}
