/* ============================================================================
   DreamClear — Design Tokens
   ----------------------------------------------------------------------------
   Mirror of Documents\DreamClear\tokens.css, which is derived from
   brand-guide.md (the system of record). If the brand colours or type change,
   change them in the guide first, then regenerate both copies.

   Dark is the brand's native mode. Light is a supported variant, approved
   2026-07-18 — same hues, re-lit for a bright room.

   NOTHING in this file references AdminLTE or Bootstrap. Mapping onto those
   lives in dreamclear-theme.css, so a vendor upgrade never touches brand values.
   ============================================================================ */

:root {
  /* ---- Primary: DreamClear brand blue ---- */
  --dc-blue-bright: #4FB6E5;
  --dc-blue:        #0082BA;   /* legacy DreamClear primary */
  --dc-blue-deep:   #005E86;

  /* ---- Accent: Signal Red (CTAs, emphasis only — keep scarce) ---- */
  --dc-red-bright:  #FF6B7F;
  --dc-red:         #FF3B57;
  --dc-red-deep:    #C4102E;

  /* ---- Semantic ---- */
  --dc-success: #28D07E;
  --dc-warning: #FFB020;
  --dc-error:   #FF3B57;
  --dc-info:    #2E7BFF;

  /* ---- Signature gradient (cool -> hot = growth; use sparingly) ---- */
  --dc-violet:     #7B5CFF;
  --dc-brand-grad: linear-gradient(90deg, #2E7BFF 0%, #7B5CFF 50%, #FF3B57 100%);

  /* ---- Typography ---- */
  --dc-font-display: "Space Grotesk", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --dc-font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --dc-font-mono:    "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, Menlo, monospace;

  /* ---- Shape ---- */
  --dc-radius-btn:  10px;
  --dc-radius-card: 16px;
  --dc-focus-ring:  2px solid #0082BA;

  /* ---- Control density (AdminLTE-style operations console) ---- */
  --dc-h-sm: 32px;
  --dc-h-md: 38px;
  --dc-h-lg: 46px;

  /* ---- Shell geometry ---- */
  --dc-sidebar-w:          264px;
  --dc-sidebar-collapsed-w: 68px;
  --dc-topbar-h:            60px;
}

/* ============================================================================
   DARK — the brand's native mode
   ============================================================================ */
[data-bs-theme="dark"] {
  --dc-void:        #080A0F;  /* app background        */
  --dc-surface:     #0F131B;  /* cards, panels         */
  --dc-raised:      #161B26;  /* raised, tooltips, nav */
  --dc-line:        rgba(255, 255, 255, 0.09);
  --dc-line-strong: rgba(255, 255, 255, 0.16);

  --dc-ink:   #F4F7FC;
  --dc-ink-2: #9AA4B2;
  --dc-ink-3: #5E6675;

  --dc-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);

  /* Tint used for "on" / active / selected states. */
  --dc-blue-tint:        rgba(46, 123, 255, 0.16);
  --dc-blue-tint-soft:   rgba(46, 123, 255, 0.08);
  --dc-blue-tint-border: rgba(46, 123, 255, 0.42);
  --dc-red-tint:         rgba(255, 59, 87, 0.12);
  --dc-red-tint-border:  rgba(255, 59, 87, 0.45);
}

/* ============================================================================
   LIGHT — same hues, re-lit. Not a colour inversion.

   Blue and red are darkened slightly for text-on-white contrast; the bright
   variants used on dark backgrounds fail WCAG AA on white.
   ============================================================================ */
[data-bs-theme="light"] {
  --dc-void:        #F2F4F8;  /* app background — never pure white */
  --dc-surface:     #FFFFFF;  /* cards, panels                     */
  --dc-raised:      #FFFFFF;
  --dc-line:        rgba(14, 19, 48, 0.10);
  --dc-line-strong: rgba(14, 19, 48, 0.18);

  --dc-ink:   #0E1330;  /* the brand's on-light ink from the guide */
  --dc-ink-2: #4A5468;
  --dc-ink-3: #78829A;

  /* Contrast-corrected for light surfaces. */
  --dc-blue:   #1A63E0;
  --dc-red:    #D91E3C;

  --dc-shadow: 0 4px 14px rgba(14, 19, 48, 0.09);

  --dc-blue-tint:        rgba(26, 99, 224, 0.10);
  --dc-blue-tint-soft:   rgba(26, 99, 224, 0.05);
  --dc-blue-tint-border: rgba(26, 99, 224, 0.32);
  --dc-red-tint:         rgba(217, 30, 60, 0.08);
  --dc-red-tint-border:  rgba(217, 30, 60, 0.38);
}
