/* ============================================================
   Consent Hub — Admin UI Design System
   ============================================================ */

/* ---- CSS Variables (Dark theme — Magnas.cz brand) ---- */
:root {
  --bg:         #0a0c10;
  --bg2:        #0f1218;
  --bg3:        #161b24;
  --bg4:        #1d2330;
  --border:     #252d3d;
  --border2:    #2e3a50;
  --text:       #e8edf5;
  --text2:      #8a95a8;
  --text3:      #5a6478;
  /* Magnas accent (logo red) */
  --accent:     #c41e3a;
  --accent2:    #e63950;
  --accent-dim: rgba(196,30,58,0.14);
  --green:      #22c55e;
  --green-dim:  rgba(34,197,94,0.12);
  --amber:      #f59e0b;
  --amber-dim:  rgba(245,158,11,0.12);
  --red:        #ef4444;
  --red-dim:    rgba(239,68,68,0.12);
  --purple:     #a78bfa;
  --purple-dim: rgba(167,139,250,0.12);
  --sidebar-w:  240px;
  --topbar-h:   56px;
  --radius:     8px;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', Consolas, monospace;
}

[data-theme="light"] {
  --bg:         #f4f6fa;
  --bg2:        #ffffff;
  --bg3:        #eef1f8;
  --bg4:        #e5e9f2;
  --border:     #d4dae8;
  --border2:    #c1c9db;
  --text:       #111827;
  --text2:      #4b5563;
  --text3:      #9ca3af;
  --accent-dim: rgba(196,30,58,0.1);
  --green-dim:  rgba(34,197,94,0.08);
  --amber-dim:  rgba(245,158,11,0.08);
  --red-dim:    rgba(239,68,68,0.08);
  --purple-dim: rgba(167,139,250,0.08);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: var(--font-body); font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { height: 100%; font-family: inherit; background: var(--bg); color: var(--text); line-height: 1.5; }
.app,
.main,
.content,
.page,
.card,
.card-header,
.card-body { font-family: inherit; }

/* ---- App Layout ---- */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ---- Sidebar ---- */
.sidebar { width: var(--sidebar-w); background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; position: relative; z-index: 20; }
.sidebar-logo { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.logo-icon { width: 28px; height: 28px; background: var(--accent); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; font-family: var(--font-display); color: white; letter-spacing: -1px; }
.logo-icon img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
img.logo-icon-img { width: 28px; height: 28px; border-radius: 7px; object-fit: contain; padding: 2px; }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.3px; color: var(--text); }
.logo-badge { margin-left: auto; font-size: 9px; font-family: var(--font-mono); font-weight: 500; padding: 2px 6px; border-radius: 4px; background: var(--accent-dim); color: var(--accent2); letter-spacing: 0.5px; border: 1px solid rgba(196,30,58,0.25); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-section-label { font-size: 10px; font-weight: 600; font-family: var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--text3); padding: 14px 18px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; margin: 1px 8px; border-radius: var(--radius); cursor: pointer; color: var(--text2); font-size: 13.5px; font-weight: 400; transition: all 0.15s; text-decoration: none; position: relative; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent2); font-weight: 500; }
.nav-item.active::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; background: var(--accent); border-radius: 0 2px 2px 0; }
.nav-icon { width: 16px; height: 16px; opacity: 0.8; flex-shrink: 0; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge { margin-left: auto; font-size: 10px; font-family: var(--font-mono); padding: 1px 6px; border-radius: 10px; background: var(--bg4); color: var(--text2); }
.nav-badge.red { background: var(--red-dim); color: var(--red); }
.sidebar-footer { border-top: 1px solid var(--border); padding: 12px 8px; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; transition: background 0.15s; }
.user-card:hover { background: var(--bg3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: white; flex-shrink: 0; font-family: var(--font-display); }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text3); font-family: var(--font-mono); }

/* ---- Main & Topbar ---- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: var(--topbar-h); background: var(--bg2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 20px; flex-shrink: 0; position: relative; z-index: 10; }
.breadcrumb { display: flex; align-items: center; gap: 6px; }
.breadcrumb-item { font-size: 13px; color: var(--text3); }
.breadcrumb-sep { color: var(--text3); opacity: 0.5; }
.breadcrumb-item.current { color: var(--text); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-btn { width: 32px; height: 32px; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text2); transition: all 0.15s; position: relative; }
.topbar-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--border2); }
.theme-toggle { display: flex; align-items: center; gap: 4px; padding: 3px; background: var(--bg3); border-radius: var(--radius); border: 1px solid var(--border); }
.theme-opt { padding: 3px 8px; border-radius: 5px; font-size: 11px; font-family: var(--font-mono); cursor: pointer; color: var(--text3); transition: all 0.15s; }
.theme-opt.active { background: var(--bg2); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* ---- Content ---- */
.content { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg); }
.page { display: none; animation: fadeIn 0.2s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---- Page Header ---- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.page-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.5px; line-height: 1.2; }
.page-subtitle { font-size: 13px; color: var(--text2); margin-top: 3px; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 500; font-family: var(--font-body); cursor: pointer; transition: all 0.15s; border: 1px solid transparent; white-space: nowrap; }
.btn-primary   { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: #a01930; }
.btn-secondary { background: var(--bg3); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg4); border-color: var(--border2); }
.btn-ghost     { background: transparent; color: var(--text2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-danger    { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-success   { background: var(--green-dim); color: var(--green); border-color: rgba(34,197,94,0.2); }
.btn-success:hover { background: rgba(34,197,94,0.2); }
.btn-sm   { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 7px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Stats Grid ---- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden; transition: border-color 0.2s; }
.stat-card:hover { border-color: var(--border2); }
.stat-card::after { content: ''; position: absolute; top: 0; right: 0; width: 60px; height: 60px; border-radius: 0 0 0 60px; opacity: 0.06; }
.stat-card.blue::after  { background: var(--accent); }
.stat-card.green::after { background: var(--green); }
.stat-card.amber::after { background: var(--amber); }
.stat-card.purple::after{ background: var(--purple); }
.stat-label  { font-size: 11px; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.5px; color: var(--text3); text-transform: uppercase; margin-bottom: 10px; }
.stat-value  { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -1px; line-height: 1; }
.stat-change { margin-top: 8px; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.stat-change.up      { color: var(--green); }
.stat-change.down    { color: var(--red); }
.stat-change.neutral { color: var(--text3); }
.stat-icon { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.stat-icon.blue   { background: var(--accent-dim); color: var(--accent2); }
.stat-icon.green  { background: var(--green-dim);  color: var(--green); }
.stat-icon.amber  { background: var(--amber-dim);  color: var(--amber); }
.stat-icon.purple { background: var(--purple-dim); color: var(--purple); }

/* ---- Cards ---- */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title    { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text); }
.card-subtitle { font-size: 12px; color: var(--text3); margin-top: 2px; }
.card-body  { padding: 20px; }
.card + .card { margin-top: 16px; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg3); padding: 4px; border-radius: var(--radius); width: fit-content; }
.tab { padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text2); transition: all 0.15s; }
.tab.active { background: var(--bg2); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.tab:hover:not(.active) { color: var(--text); }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; padding: 10px 16px; font-size: 11px; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.6px; text-transform: uppercase; color: var(--text3); border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th:first-child { padding-left: 20px; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg3); }
tbody td { padding: 12px 16px; font-size: 13px; font-family: var(--font-body); color: var(--text); vertical-align: middle; }
tbody td:first-child { padding-left: 20px; }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500; font-family: var(--font-mono); white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.badge-green  { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(34,197,94,0.2); }
.badge-green::before  { background: var(--green); }
.badge-amber  { background: var(--amber-dim);  color: var(--amber);  border: 1px solid rgba(245,158,11,0.2); }
.badge-amber::before  { background: var(--amber); }
.badge-red    { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(239,68,68,0.2); }
.badge-red::before    { background: var(--red); }
.badge-blue   { background: var(--accent-dim); color: var(--accent2); border: 1px solid rgba(196,30,58,0.25); }
.badge-blue::before   { background: var(--accent); }
.badge-gray   { background: var(--bg4); color: var(--text3); border: 1px solid var(--border); }
.badge-gray::before   { background: var(--text3); }
.badge-purple { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(167,139,250,0.2); }
.badge-purple::before { background: var(--purple); }

/* ---- Forms ---- */
.form-group  { margin-bottom: 16px; }
.form-label  { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 6px; font-family: var(--font-mono); letter-spacing: 0.3px; }
.form-input  { width: 100%; padding: 8px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 13px; font-family: var(--font-body); transition: all 0.15s; outline: none; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-input::placeholder { color: var(--text3); }
.form-input:disabled { opacity: 0.5; cursor: not-allowed; }
.form-error  { font-size: 11px; color: var(--red); margin-top: 5px; display: flex; align-items: center; gap: 4px; font-family: var(--font-mono); }
.form-hint   { font-size: 11px; color: var(--text3); margin-top: 5px; font-family: var(--font-mono); }
select.form-input { appearance: none; cursor: pointer; }
input[readonly] { cursor: default; }

/* ---- JSON Editor ---- */
.json-editor { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.json-editor-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg3); border-bottom: 1px solid var(--border); }
.json-editor-toolbar span { font-size: 11px; font-family: var(--font-mono); color: var(--text3); }
.json-textarea { width: 100%; min-height: 320px; padding: 14px; background: transparent; border: none; color: var(--green); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; outline: none; resize: vertical; }
.json-validation { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg3); border-top: 1px solid var(--border); }
.json-valid   { color: var(--green); font-size: 12px; font-family: var(--font-mono); display: flex; align-items: center; gap: 6px; }
.json-invalid { color: var(--red);   font-size: 12px; font-family: var(--font-mono); display: flex; align-items: center; gap: 6px; }

/* ---- Validation errors ---- */
.validation-errors { background: var(--red-dim); border: 1px solid rgba(239,68,68,0.2); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; }
.validation-error-title { font-size: 12px; font-weight: 600; color: var(--red); margin-bottom: 8px; font-family: var(--font-mono); }
.validation-error-item  { font-size: 12px; color: var(--text2); padding: 3px 0; font-family: var(--font-mono); }
.validation-error-path  { color: var(--amber); }

/* ---- Config editor: published read-only banner ---- */
.cfg-published-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--accent-dim); border: 1px solid rgba(196,30,58,0.25); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.cfg-published-banner-text { color: var(--text2); font-size: 13px; line-height: 1.5; }

/* ---- Config editor: Form / JSON toggle and form cards ---- */
.cfg-editor-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.cfg-form-editor { display: flex; flex-direction: column; gap: 16px; }
.cfg-form-card .card-body { display: flex; flex-direction: column; gap: 0; }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; width: 480px; max-width: calc(100vw - 40px); box-shadow: 0 25px 60px rgba(0,0,0,0.5); animation: modalIn 0.2s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-header  { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; }
.modal-title    { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text); }
.modal-subtitle { font-size: 12px; color: var(--text3); margin-top: 3px; }
.modal-body    { padding: 20px 24px; }
.modal-footer  { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.modal-close   { background: none; border: none; cursor: pointer; color: var(--text3); padding: 4px; border-radius: 4px; }
.modal-close:hover { color: var(--text); background: var(--bg3); }

/* ---- Drawer ---- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; display: flex; justify-content: flex-end; }
.drawer { width: 440px; background: var(--bg2); border-left: 1px solid var(--border); height: 100%; overflow-y: auto; animation: drawerIn 0.25s ease; }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; }
.drawer-body   { padding: 20px 24px; }

/* ---- Toast ---- */
.toast-stack { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,0.3); min-width: 260px; animation: toastIn 0.25s ease; pointer-events: auto; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--accent); }
.toast-msg     { font-size: 13px; color: var(--text); flex: 1; }

/* ---- Login page ---- */
.login-page { min-height: 100vh; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; overflow: hidden; }
.login-bg   { position: absolute; inset: 0; background: radial-gradient(ellipse 600px 400px at 30% 20%, rgba(196,30,58,0.08) 0%, transparent 70%), radial-gradient(ellipse 500px 300px at 80% 80%, rgba(196,30,58,0.04) 0%, transparent 70%); pointer-events: none; }
.login-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 40px 40px; opacity: 0.4; pointer-events: none; mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 0%, transparent 100%); }
.login-card { width: 380px; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 36px 32px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo     { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-title    { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -0.4px; }
.login-subtitle { font-size: 13px; color: var(--text3); margin-bottom: 28px; }
.login-footer-link { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--text3); }
.login-footer-link a { color: var(--accent2); text-decoration: none; font-weight: 500; }
.login-footer-link a:hover { text-decoration: underline; }

/* ---- Site key field ---- */
.site-key-field { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.site-key-value { flex: 1; padding: 8px 12px; font-family: var(--font-mono); font-size: 12px; color: var(--accent2); background: transparent; border: none; outline: none; cursor: default; }
.site-key-copy  { padding: 8px 12px; background: var(--bg3); border-left: 1px solid var(--border); cursor: pointer; color: var(--text2); font-size: 11px; font-family: var(--font-mono); transition: all 0.15s; }
.site-key-copy:hover { background: var(--bg4); color: var(--text); }

/* ---- Domain chips ---- */
.domain-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.domain-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--bg4); border: 1px solid var(--border); border-radius: 20px; font-size: 12px; font-family: var(--font-mono); color: var(--text2); }
.domain-chip-remove { width: 14px; height: 14px; cursor: pointer; color: var(--text3); display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.15s; }
.domain-chip-remove:hover { color: var(--red); background: var(--red-dim); }

/* ---- Activity feed ---- */
.activity-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot  { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.activity-text { font-size: 13px; color: var(--text); }
.activity-time { font-size: 11px; color: var(--text3); margin-top: 2px; font-family: var(--font-mono); }

/* ---- Audit findings ---- */
.finding-item     { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.finding-item:last-child { border-bottom: none; }
.finding-severity { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.finding-title    { font-size: 13px; font-weight: 500; color: var(--text); }
.finding-desc     { font-size: 12px; color: var(--text3); margin-top: 3px; }

/* ---- Misc ---- */
.two-col   { display: grid; grid-template-columns: 1fr 1fr;     gap: 16px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.empty-state      { text-align: center; padding: 48px 24px; color: var(--text3); }
.empty-state-icon { font-size: 36px; margin-bottom: 12px; opacity: 0.4; }
.empty-state-text { font-size: 14px; }
.divider      { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-text { font-size: 11px; color: var(--text3); font-family: var(--font-mono); }
.search-wrap  { position: relative; }
.search-icon  { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.search-input { padding-left: 34px !important; }
code { font-family: var(--font-mono); font-size: 12px; background: var(--bg4); padding: 1px 5px; border-radius: 4px; color: var(--amber); }
.progress     { height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.sparkline    { display: flex; align-items: flex-end; gap: 3px; height: 32px; }
.spark-bar    { background: var(--accent-dim); border-radius: 2px 2px 0 0; width: 6px; transition: background 0.2s; }
.spark-bar:hover    { background: var(--accent); }
.spark-bar.highlight{ background: var(--accent); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ---- Responsive ---- */
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1100px) { .two-col, .three-col { grid-template-columns: 1fr; } }
@media (max-width: 768px)  { .sidebar { display: none; } .stats-grid { grid-template-columns: 1fr; } }
