/* Unlock The Upside — dashboard theme overrides.
 *
 * DaisyUI 4 themes are keyed by `data-theme` on <html>. All our templates use
 * `data-theme="dark"`. DaisyUI 4 internally consumes theme color variables as
 * `oklch(var(--p))` — so we MUST supply OKLCH (L C H) values, not HSL. Earlier
 * attempts at HSL produced near-black buttons because the HSL numbers got
 * mis-interpreted as oklch lightness/chroma/hue.
 *
 * The `html[data-theme=dark]` selector (with the leading `html`) outranks
 * DaisyUI's bare `[data-theme=dark]` by one element-selector point, so this
 * file's overrides win regardless of stylesheet load order.
 *
 * Palette source (hex → approx oklch):
 *   #15151f  body bg            → 0.16  0.02   275
 *   #1f1f2c  borders            → 0.21  0.025  275
 *   #25252f  cards / navbar     → 0.26  0.022  275
 *   #e6e8ee  primary text       → 0.93  0.005  260
 *   #7EA7FA  brand blue (logo)  → 0.74  0.12   249
 *   #0e0e16  on-primary (dark)  → 0.13  0.02   275
 */

html[data-theme="dark"] {
  color-scheme: dark;

  /* Surfaces */
  --b1: 0.26  0.022 275;   /* base-100  — cards, navbar (elevated) */
  --b2: 0.21  0.025 275;   /* base-200  — borders, dividers */
  --b3: 0.16  0.02  275;   /* base-300  — body background */
  --bc: 0.93  0.005 260;   /* base-content — primary text, near-white */

  /* Brand primary — the wordmark blue */
  --p:  0.74  0.12  249;
  --pc: 0.13  0.02  275;

  /* Accent + info inherit primary so charts / chips / focus reads as brand */
  --a:  0.74  0.12  249;
  --ac: 0.13  0.02  275;
  --in: 0.74  0.12  249;
  --inc: 0.13 0.02  275;

  /* Secondary — slightly desaturated brand blue for second-tier emphasis */
  --s:  0.66  0.08  249;
  --sc: 0.13  0.02  275;

  /* Neutral surface (toasts, muted backgrounds) */
  --n:  0.30  0.015 275;
  --nc: 0.93  0.005 260;

  /* Status colors — semantic, NOT brand-tied, so alerts stay parsable */
  --su: 0.65  0.18  155;
  --suc: 0.16 0.04  155;
  --wa: 0.78  0.16   85;
  --wac: 0.20 0.05   85;
  --er: 0.65  0.22   25;
  --erc: 0.20 0.05   25;

  /* Border radius — matches the wordmark's 20px tile on auth pages */
  --rounded-box: 0.75rem;
  --rounded-btn: 0.5rem;
  --rounded-badge: 1.9rem;
}

/* Form input placeholders default to nearly invisible in dark themes. */
html[data-theme="dark"] .input::placeholder,
html[data-theme="dark"] .textarea::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: oklch(var(--bc) / 0.55);
}

/* Card shadow + soft 1-pixel ring so cards feel grounded on the dark body. */
html[data-theme="dark"] .card.shadow-xl {
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.04) inset,
    0 10px 30px oklch(0.05 0 0 / 0.7),
    0 0 0 1px oklch(0.4 0.015 275 / 0.5);
}
