/* ==========================================================================
   DataGuard design tokens
   Màu level KHÔNG khai báo ở đây: được sinh từ DG.T (taxonomy) lúc chạy
   thành biến --lv-<id> (xem store.applyLevelColors).
   ========================================================================== */
:root {
  color-scheme: light;
  /* surfaces */
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --text-inv: #ffffff;
  /* brand (teal đậm + indigo phụ) */
  --brand: #0f766e;
  --brand-hover: #115e59;
  --brand-soft: #ccfbf1;
  --brand-text: #0f766e;
  --accent: #4338ca;
  --focus: #2563eb;
  /* sidebar */
  --side-bg: #0b1324;
  --side-bg-2: #0f1a30;
  --side-text: #cbd5e1;
  --side-text-2: #8494ad;
  --side-active: rgba(45, 212, 191, .14);
  --side-active-bar: #2dd4bf;
  /* status */
  --success: #15803d;
  --success-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --info: #1d4ed8;
  --info-soft: #dbeafe;
  /* radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  /* shadow 3 mức */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --sh-2: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .05);
  --sh-3: 0 18px 48px rgba(15, 23, 42, .18), 0 6px 16px rgba(15, 23, 42, .08);
  /* spacing scale 4px */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  /* typography 12/13/14/16/20/28 */
  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-16: 16px; --fs-20: 20px; --fs-28: 28px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* layout */
  --side-w: 248px;
  --side-w-collapsed: 64px;
  --top-h: 56px;
  --drawer-w: 560px;
  /* level badge contrast helpers */
  --mix-text: black;
  --mix-text-amt: 38%;
  --mix-bg-amt: 13%;
  /* chart */
  --chart-grid: #e2e8f0;
  --chart-text: #64748b;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0f1c;
    --surface: #111827;
    --surface-2: #0f172a;
    --surface-3: #1a2336;
    --border: #1f2a3d;
    --border-strong: #334155;
    --text: #e5e7eb;
    --text-2: #a7b1c2;
    --text-3: #8b97ab;
    --brand: #14b8a6;
    --brand-hover: #2dd4bf;
    --brand-soft: rgba(20, 184, 166, .16);
    --brand-text: #5eead4;
    --accent: #818cf8;
    --focus: #60a5fa;
    --side-bg: #070b15;
    --side-bg-2: #0b1222;
    --success: #4ade80; --success-soft: rgba(34, 197, 94, .14);
    --warn: #fbbf24; --warn-soft: rgba(245, 158, 11, .14);
    --danger: #f87171; --danger-soft: rgba(239, 68, 68, .15);
    --info: #60a5fa; --info-soft: rgba(59, 130, 246, .15);
    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 4px 14px rgba(0, 0, 0, .45);
    --sh-3: 0 20px 50px rgba(0, 0, 0, .6);
    --mix-text: white;
    --mix-text-amt: 35%;
    --mix-bg-amt: 20%;
    --chart-grid: #1f2a3d;
    --chart-text: #8b97ab;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f1c;
  --surface: #111827;
  --surface-2: #0f172a;
  --surface-3: #1a2336;
  --border: #1f2a3d;
  --border-strong: #334155;
  --text: #e5e7eb;
  --text-2: #a7b1c2;
  --text-3: #8b97ab;
  --brand: #14b8a6;
  --brand-hover: #2dd4bf;
  --brand-soft: rgba(20, 184, 166, .16);
  --brand-text: #5eead4;
  --accent: #818cf8;
  --focus: #60a5fa;
  --side-bg: #070b15;
  --side-bg-2: #0b1222;
  --success: #4ade80; --success-soft: rgba(34, 197, 94, .14);
  --warn: #fbbf24; --warn-soft: rgba(245, 158, 11, .14);
  --danger: #f87171; --danger-soft: rgba(239, 68, 68, .15);
  --info: #60a5fa; --info-soft: rgba(59, 130, 246, .15);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 4px 14px rgba(0, 0, 0, .45);
  --sh-3: 0 20px 50px rgba(0, 0, 0, .6);
  --mix-text: white;
  --mix-text-amt: 35%;
  --mix-bg-amt: 20%;
  --chart-grid: #1f2a3d;
  --chart-text: #8b97ab;
}
