/* Galaxy tokens — the approved file from the design system export.
   Inter is self-hosted below so the app has no runtime dependency on Google Fonts. */
@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;
  src:url('/fonts/inter-var.woff2') format('woff2');}

/* ============================================================
   NEBULA DASHBOARD v2 — internal operations suite
   Lightly branded, heavily functional. Inter only. Light default.

   LOCKED values are marked [L] — do not redesign.
   INVENTED values state their contrast ratio against the surface
   they sit on (WCAG 2.1). Text values clear 4.5:1.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Radii [L] */
  --r-input: 6px;    /* inputs, badges, buttons */
  --r-card: 12px;    /* cards */
  --r-panel: 16px;   /* panels */
  --r-lg: 20px;      /* large cards, module tiles */
  --r-pill: 999px;   /* status dots, pills */

  /* Spacing — 4px base */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:20px;
  --s6:24px; --s7:32px; --s8:40px; --s9:48px;

  /* Chrome geometry */
  --topbar-h: 72px;      /* module bar */
  --subbar-h: 44px;      /* page context bar */
  --rail-w: 216px;       /* left rail — ONLY on multi-page modules */

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 130ms;
}

/* ============================================================
   LIGHT THEME — DEFAULT
   ============================================================ */
[data-theme="light"] {
  /* Surfaces [L] */
  --bg-base:       #F7F8F6;
  --bg-card:       #FFFFFF;
  --bg-hover:      #E8EAE6;
  --bg-input:      #FFFFFF;
  --border:        #E0E3DD;
  --border-strong: #C4C8C0;

  /* INVENTED surfaces */
  --bg-sidebar:  #FFFFFF;   /* rail sits on card plane, divided by border */
  --bg-subtle:   #F1F3EF;   /* table header, recessed strips */
  --bg-zebra:    #FAFBF9;   /* alternate table row */
  --bg-selected: #E7F0F7;   /* selected row — accent-tinted, 1.09:1 vs card (non-text) */

  /* Text [L] — ratios vs --bg-card #FFFFFF */
  --text-primary:   #3B3C37;  /* 11.13:1 */
  --text-secondary: #5A5B54;  /*  6.86:1 */
  --text-muted:     #6B6C66;  /*  5.30:1 */
  --text-label:     #6B6C66;  /*  5.30:1 on card · 4.75:1 on --bg-subtle (table headers) */
  --text-inverse:   #FFFFFF;  /* on accent fills — 5.93:1 vs #0369A1 */

  /* Accent [L] */
  --accent:       #0369A1;  /* 5.93:1 on card · 5.57:1 on base */
  --accent-hover: #075985;  /* 7.56:1 on card */
  /* INVENTED accent support */
  --accent-wash:   rgba(3,105,161,0.07);
  --accent-wash-2: rgba(3,105,161,0.13);
  --accent-border: #A8CBE0;  /* 1.94:1 — non-text, borders only */
  --focus-ring:    #0369A1;

  /* Status [L] — ratios vs --bg-card #FFFFFF */
  --ok:      #2E7D4F;  /* 5.04:1 */
  --warning: #8A5A0B;  /* 5.92:1 */
  --error:   #B3392B;  /* 5.94:1 */
  --info:    #1F5F8B;  /* 6.84:1 */
  /* INVENTED status tints — backgrounds only, never text */
  --ok-wash:      #EDF5EF;  --ok-edge:      #BBD7C5;
  --warning-wash: #F8EFDE;  --warning-edge: #E5D0A6;
  --error-wash:   #FAE8E5;  --error-edge:   #E9BFB8;
  --info-wash:    #E5EFF6;  --info-edge:    #B6CEDF;

  /* INVENTED elevation — soft, warm-neutral; rounded cards need it */
  --sh-sm: 0 1px 2px rgba(59,60,55,0.06);
  --sh-md: 0 2px 4px rgba(59,60,55,0.05), 0 8px 20px rgba(59,60,55,0.07);
  --sh-lg: 0 8px 16px rgba(59,60,55,0.07), 0 24px 56px rgba(59,60,55,0.12);
  --track: #E0E3DD;
}

/* ============================================================
   DARK THEME
   ============================================================ */
[data-theme="dark"] {
  /* Surfaces [L] */
  --bg-base:       #2B2C28;
  --bg-sidebar:    #262723;
  --bg-card:       #3B3C37;
  --bg-hover:      #45463F;
  --bg-input:      #32332E;
  --border:        #4A4B44;
  --border-strong: #5A5C53;

  /* INVENTED surfaces */
  --bg-subtle:   #32332E;
  --bg-zebra:    #3E3F3A;
  --bg-selected: #3A4650;  /* accent-tinted selected row (non-text) */

  /* Text [L] — ratios vs --bg-card #3B3C37 */
  --text-primary:   #F7F8F6;  /* 10.44:1 */
  --text-secondary: #E8EAE6;  /*  9.19:1 */
  --text-muted:     #A8AAA2;  /*  4.73:1 */
  --text-label:     #B4B7AD;  /*  5.47:1 */
  --text-inverse:   #2B2C28;  /* on accent fills — 5.19:1 vs #38BDF8 */

  /* Accent [L] */
  --accent:       #38BDF8;  /* 5.19:1 on card */
  --accent-hover: #7DD3FC;  /* 6.67:1 on card */
  /* INVENTED accent support */
  --accent-wash:   rgba(56,189,248,0.12);
  --accent-wash-2: rgba(56,189,248,0.20);
  --accent-border: rgba(56,189,248,0.45);
  --focus-ring:    #7DD3FC;

  /* Status [L] — ratios vs --bg-card #3B3C37 */
  --ok:      #6FBF73;  /* 4.97:1 */
  --warning: #E0A83E;  /* 5.21:1 */
  --error:   #F2907F;  /* 4.81:1 */
  --info:    #7FB4D9;  /* 5.00:1 */
  /* INVENTED status tints */
  --ok-wash:      #354233; --ok-edge:      rgba(111,191,115,0.42);
  --warning-wash: #463F2B; --warning-edge: rgba(224,168,62,0.42);
  --error-wash:   #493B35; --error-edge:   rgba(242,144,127,0.42);
  --info-wash:    #384043; --info-edge:    rgba(127,180,217,0.42);

  /* INVENTED elevation */
  --sh-sm: 0 1px 2px rgba(0,0,0,0.30);
  --sh-md: 0 2px 4px rgba(0,0,0,0.24), 0 8px 20px rgba(0,0,0,0.34);
  --sh-lg: 0 8px 16px rgba(0,0,0,0.30), 0 24px 56px rgba(0,0,0,0.46);
  --track: #4A4B44;
}
