/*
 * Sentinel Console — custom theme
 *
 * DaisyUI 4.x stores color variables as raw oklch(L C H) components WITHOUT
 * the oklch() wrapper. Components reference them as oklch(var(--p)) etc.
 * Using the old DaisyUI 3.x HSL format ("252 92% 83%") is silently ignored
 * because oklch() treats those numbers as (L=252%, C=92%, H=83deg) — invalid.
 *
 * Reference palette (from .claude/Sentinel Console.html SVG):
 *   #12141f  page background
 *   #1e2030  card surface
 *   #191b29  sidebar
 *   #3f424d  border / separator
 *   #595d6c  muted text
 *   #b5abfc  primary lavender
 *   #5cc79a  success mint
 *   #e0736f  error coral
 */

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

  /* Primary — lavender #b5abfc (oklch ≈ 76% 0.18 275) */
  --p:  76%  0.18  275;
  --pc: 14%  0.04  275;

  /* Secondary — keep DaisyUI default purple-pink */
  --s:  74%  0.22  342;
  --sc: 14%  0.04  342;

  /* Accent — teal accent */
  --a:  74%  0.17  184;
  --ac: 14%  0.04  184;

  /* Neutral — #3f424d range */
  --n:  28%  0.02  265;
  --nc: 82%  0.02  265;

  /* Base surfaces — the three background levels */
  --b1: 9.5% 0.02  265;   /* #12141f — page background   */
  --b2: 14%  0.03  265;   /* #1e2030 — card / panel      */
  --b3: 12%  0.025 265;   /* #191b29 — sidebar / inputs  */
  --bc: 82%  0.02  265;   /* body content text           */

  /* Success — mint #5cc79a (oklch ≈ 73% 0.14 162) */
  --su:  73% 0.14  162;
  --suc: 14% 0.03  162;

  /* Warning — amber */
  --wa:  80% 0.15   70;
  --wac: 14% 0.03   70;

  /* Info — sky */
  --in:  70% 0.14  222;
  --inc: 14% 0.03  222;

  /* Error — coral #e0736f (oklch ≈ 62% 0.15 24) */
  --er:  62% 0.15   24;
  --erc: 14% 0.02   24;

  /* Rounded corners — match reference card style */
  --rounded-box:  1rem;
  --rounded-btn:  0.5rem;
  --rounded-badge: 1rem;
}

/* ── Hide overlay on desktop — defensive against CDN specificity races ── */
@media (min-width: 1024px) {
  .drawer-overlay { display: none !important; }
}

/* ── Hide Alpine-cloak elements until Alpine initialises ── */
[x-cloak] { display: none !important; }

/* ── Compact table rows for data-dense views ── */
.table-compact td,
.table-compact th {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* ── Severity badge shortcuts ── */
.badge-severity-critical { @apply badge badge-error;   }
.badge-severity-high     { @apply badge badge-warning; }
.badge-severity-medium   { @apply badge badge-info;    }
.badge-severity-low      { @apply badge badge-ghost;   }

/* ── Monospace for JSON diffs and path displays ── */
.font-mono-sm {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
}
