/* ============================================================
   DISPATCH CONSOLE — design system
   SendGrid verzendplatform (intern)
   Aesthetic: warm-dark control room / signal monitoring
   No build step. Plain CSS. Custom properties everywhere.
   ============================================================ */

/* ---- Fonts (Google Fonts) ----
   Display : Bricolage Grotesque  (characterful headlines)
   Body    : IBM Plex Sans        (engineering, legible)
   Data    : IBM Plex Mono        (metrics, ids, console feel)
   loaded via <link> in layout for performance */

:root {
  /* ============================================================
     FUNCTIONELE KLEUR-TOKENS — pas hier de waarden aan om de
     hele applicatie van kleur te veranderen.
     Standaard = Light theme. Dark theme staat in [data-theme="dark"].
     ============================================================ */

  /* --- accent / actie (gedeeld tussen light & dark) --- */
  --primary-blue: #1E6091;
  --primary-blue-hover: #164E75;
  --primary-blue-light: #E6F0FA;

  /* --- statuskleuren (gedeeld) --- */
  --status-success-bg: #D4EDDA;
  --status-success-text: #155724;
  --status-inactive-bg: #E2E3E5;
  --status-inactive-text: #383D41;

  /* --- Light theme: oppervlakken & tekst --- */
  --bg-main: #F8F9FA;       /* hoofdachtergrond */
  --bg-sidebar: #FFFFFF;    /* zijbalk */
  --bg-card: #FFFFFF;       /* kaarten/containers */
  --border-color: #E9ECEF;  /* scheidingslijnen + grid */
  --text-main: #212529;     /* titels / belangrijkste tekst */
  --text-muted: #6C757D;    /* secundaire tekst / labels */

  /* --- afgeleide thema-hulptokens --- */
  --surface-raised: #F1F3F5;     /* hover / verhoogd vlak */
  --surface-inset: #FFFFFF;      /* invoervelden */
  --border-strong: #D5DBE1;      /* nadrukkelijke rand */
  --text-secondary: #495057;     /* tussen main en muted */
  --text-faint: #ADB5BD;         /* zwak / disabled */
  --topbar-bg: rgba(255,255,255,0.82);
  --nav-active-bg: var(--primary-blue-light);
  --nav-active-text: var(--primary-blue);
  --accent-glow: rgba(30,96,145,0.12);
  --accent-bright: #2A7AB5;      /* iets lichter blauw voor links/hover */

  /* achtergrond-vignette: licht brandpunt (rechtsonder) → donkere rand. Groot contrast. */
  --bg-center: #FFFFFF;
  --bg-edge: #C2CDDA;

  /* ============================================================
     LEGACY-ALIASSEN → nieuwe tokens.
     Bestaande component-CSS gebruikt deze namen; via var() volgen
     ze automatisch de actieve (light/dark) thema-waarden.
     ============================================================ */
  --bg-0: var(--bg-main);
  --bg-1: var(--bg-card);
  --bg-2: var(--surface-raised);
  --bg-3: var(--surface-inset);
  --line: var(--border-color);
  --line-bright: var(--border-strong);
  --ink-0: var(--text-main);
  --ink-1: var(--text-secondary);
  --ink-2: var(--text-muted);
  --ink-3: var(--text-faint);
  --signal: var(--primary-blue);
  --signal-bright: var(--accent-bright);
  --signal-dim: var(--primary-blue-hover);
  --signal-glow: var(--accent-glow);
  --ok: var(--status-success-text);
  --ok-bg: var(--status-success-bg);
  --warn: #8a6d00;
  --warn-bg: #FFF3CD;
  --danger: #b02a37;
  --danger-bg: #F8D7DA;
  --info: #0C5460;
  --info-bg: #D1ECF1;

  /* --- type (ongewijzigd) --- */
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;

  /* --- geometry --- */
  --radius: 6px;
  --radius-lg: 10px;
  --sidebar-w: 248px;
  --topbar-h: 60px;

  /* --- shadows: subtiel in light --- */
  --shadow-1: 0 1px 2px rgba(16,24,40,0.06);
  --shadow-2: 0 6px 24px rgba(16,24,40,0.08);
  --shadow-pop: 0 12px 40px rgba(16,24,40,0.14);

  color-scheme: light;
}

/* ============================================================
   DARK THEME — diep nachtblauw/leisteen i.p.v. puur zwart.
   Alleen oppervlak-, tekst- en hulptokens worden overschreven;
   accent- en statuskleuren blijven gedeeld.
   ============================================================ */
[data-theme="dark"] {
  --bg-main: #0F172A;       /* diep nachtblauw */
  --bg-sidebar: #1E293B;    /* iets lichtere zijbalk */
  --bg-card: #1E293B;       /* kaarten 'zweven' op de achtergrond */
  --border-color: #334155;  /* goed zichtbare rand/grid */
  --text-main: #F8FAFC;     /* helder off-white */
  --text-muted: #94A3B8;    /* zacht grijsblauw */

  --surface-raised: #273449;
  --surface-inset: #18233A;
  --border-strong: #3E4C61;
  --text-secondary: #CBD5E1;
  --text-faint: #64748B;
  --topbar-bg: rgba(15,23,42,0.82);
  --nav-active-bg: rgba(30,96,145,0.28);
  --nav-active-text: #F8FAFC;
  --accent-glow: rgba(56,130,190,0.18);
  --accent-bright: #4F95C9;

  --bg-center: #2C4067;
  --bg-edge: #05070D;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.40);
  --shadow-2: 0 8px 30px rgba(0,0,0,0.45);
  --shadow-pop: 0 12px 40px rgba(0,0,0,0.55);

  color-scheme: dark;
}

/* ---------------- reset ---------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  /* atmosphere: radial vignette met brandpunt rechtsonder, richting het midden */
  background: radial-gradient(ellipse 130% 115% at 82% 84%, var(--bg-center), var(--bg-edge)) fixed;
}
body::before {
  /* fine grain overlay */
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--signal); text-decoration: none; }
a:hover { color: var(--signal-bright); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--signal-glow); color: var(--ink-0); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-bright) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 10px; border: 2px solid var(--bg-0); }

/* ---------------- typography ---------------- */
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-0); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-2);
}
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.tnum { font-variant-numeric: tabular-nums; }

/* ================================================================
   APP SHELL  (sidebar + topbar + main)
   ================================================================ */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; position: relative; z-index: 1; }

/* ---- sidebar ---- */
.sidebar {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar-h); padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px; flex: none;
  background: radial-gradient(circle at 30% 30%, var(--signal-bright), var(--signal-dim));
  box-shadow: 0 0 0 1px rgba(30,96,145,0.45), 0 0 18px var(--signal-glow);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.35) 50%, transparent 60%);
  border-radius: inherit;
}
.brand-name { font-family: var(--font-display); font-weight: 800; color: var(--ink-0); font-size: 16px; letter-spacing: -0.02em; line-height: 1; }
.brand-sub { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--signal); }

.nav { padding: 16px 12px; overflow-y: auto; flex: 1; }
.nav-group { margin-bottom: 22px; }
.nav-group > .eyebrow { padding: 0 12px 8px; display: block; }
.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius);
  color: var(--ink-1); font-weight: 500; font-size: 13.5px;
  position: relative; transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--bg-2); color: var(--ink-0); }
.nav-link.active { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 600; }
.nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px;
  background: var(--signal); border-radius: 0 3px 3px 0; box-shadow: 0 0 12px var(--signal);
}
.nav-link svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-link .badge-count {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  background: var(--danger-bg); color: var(--danger);
  padding: 1px 7px; border-radius: 10px;
}
.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
.sidebar-foot .dot-live { color: var(--ok); }

/* ---- topbar ---- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); border-bottom: 1px solid var(--line);
  background: var(--topbar-bg); backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.topbar .crumbs b { color: var(--ink-0); font-weight: 600; }
.topbar .crumbs .sep { color: var(--ink-3); }
.topbar .spacer { flex: 1; }
.userchip { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.userchip .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--bg-3), var(--line-bright));
  border: 1px solid var(--line-bright);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: var(--ink-0); font-size: 13px;
}

.content { padding: 28px; max-width: 1320px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .titles h1 { margin-bottom: 4px; }
.page-head .titles p { color: var(--ink-2); font-size: 13.5px; }
.page-actions { display: flex; gap: 10px; align-items: center; }

/* ================================================================
   PANELS / CARDS
   ================================================================ */
.panel {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 14px; }
.panel-body { padding: 18px; }
.panel-pad { padding: 18px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px){ .grid-4 { grid-template-columns: repeat(2,1fr);} .grid-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width: 720px){ .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; } }

/* ---- metric / stat cards ---- */
.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
}
.stat::after {
  content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
  background: radial-gradient(circle, var(--signal-glow), transparent 70%); pointer-events: none;
}
.stat .eyebrow { margin-bottom: 12px; }
.stat-value { font-family: var(--font-display); font-weight: 800; color: var(--ink-0); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .stat-value { font-family: var(--font-display); font-weight: 800; font-size: 34px; color: var(--ink-0); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .stat-value .unit { font-size: 15px; color: var(--ink-2); font-weight: 600; margin-left: 4px; }
.stat .stat-meta { margin-top: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat .trend-up { color: var(--ok); } .stat .trend-down { color: var(--danger); }

/* ================================================================
   STATUS PILLS / BADGES
   ================================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.03em; text-transform: uppercase;
  padding: 3px 9px 3px 7px; border-radius: 20px;
  border: 1px solid transparent; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pill-ok { color: var(--ok); background: var(--ok-bg); border-color: rgba(88,201,138,0.25); }
.pill-warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(232,177,58,0.25); }
.pill-danger { color: var(--danger); background: var(--danger-bg); border-color: rgba(240,88,79,0.25); }
.pill-info { color: var(--info); background: var(--info-bg); border-color: rgba(90,169,214,0.25); }
.pill-muted { color: var(--status-inactive-text); background: var(--status-inactive-bg); border-color: transparent; }
.pill-signal { color: var(--signal); background: var(--signal-glow); border-color: rgba(30,96,145,0.3); }
.pill .dot.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.3;} }

.tag { display:inline-block; font-family: var(--font-mono); font-size: 11px; color: var(--ink-1); background: var(--bg-3); border:1px solid var(--line); border-radius: 4px; padding: 1px 7px; }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); }
table.tbl { width: 100%; border-collapse: collapse; background: var(--bg-1); }
table.tbl thead th {
  text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 500; padding: 11px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-0); position: sticky; top: 0; white-space: nowrap;
}
table.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink-1); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--bg-2); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td .primary { color: var(--ink-0); font-weight: 600; }
table.tbl td.num, table.tbl th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.row-link { cursor: pointer; }

.empty {
  text-align: center; padding: 60px 24px; color: var(--ink-2);
}
.empty .empty-mark { font-size: 30px; margin-bottom: 12px; opacity: .5; }
.empty h3 { color: var(--ink-1); margin-bottom: 6px; }

/* ================================================================
   FORMS
   ================================================================ */
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-1); margin-bottom: 7px; }
.field .hint { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.field .hint.err { color: var(--danger); }
.input, .select, textarea.input {
  width: 100%; font-family: var(--font-body); font-size: 14px; color: var(--ink-0);
  background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; transition: border-color .15s, box-shadow .15s; outline: none;
}
.input::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--signal-dim); box-shadow: 0 0 0 3px var(--signal-glow); }
.input.mono { font-family: var(--font-mono); }
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238d8073' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
textarea.input { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width:620px){ .field-row { grid-template-columns: 1fr; } }
.input-affix { display:flex; align-items:center; }
.input-affix .affix { font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); background: var(--bg-2); border:1px solid var(--line); border-right:none; padding: 10px 11px; border-radius: var(--radius) 0 0 var(--radius); white-space:nowrap; }
.input-affix .input { border-radius: 0 var(--radius) var(--radius) 0; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--signal); width: 16px; height: 16px; }
.check .ctext { font-size: 13.5px; color: var(--ink-1); }
.check .ctext b { color: var(--ink-0); display:block; }

/* toggle */
.field > label.toggle, .toggle { display:flex; align-items:center; gap:10px; cursor:pointer; }
.toggle input { display:none; }
.toggle .track { flex:none; width: 40px; height: 22px; border-radius: 20px; background: var(--bg-3); border:1px solid var(--line-bright); position: relative; transition: background .2s; }
.toggle .track::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background: var(--ink-2); transition: transform .2s, background .2s; }
.toggle input:checked + .track { background: var(--ok-bg); border-color: var(--ok); }
.toggle input:checked + .track::after { transform: translateX(18px); background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.toggle .ctext { font-size: 13.5px; color: var(--ink-1); }
.toggle .ctext b { color: var(--ink-0); display: block; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 13.5px;
  padding: 9px 16px; border-radius: var(--radius); border: 1px solid var(--line-bright);
  background: var(--bg-2); color: var(--ink-0); transition: all .15s; white-space: nowrap;
}
.btn:hover { background: var(--bg-3); border-color: var(--ink-3); color: var(--ink-0); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--primary-blue); color: #FFFFFF;
  border-color: var(--primary-blue); box-shadow: 0 2px 14px var(--accent-glow);
}
.btn-primary:hover { background: var(--primary-blue-hover); border-color: var(--primary-blue-hover); color: #FFFFFF; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-1); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger { background: var(--danger-bg); border-color: rgba(240,88,79,0.4); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); filter: brightness(0.97); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* theme toggle (light/dark) */
.theme-toggle {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: var(--radius); border: 1px solid var(--line-bright);
  background: var(--bg-2); color: var(--ink-1); cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--ink-0); border-color: var(--ink-3); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }

/* ================================================================
   ALERTS / FLASH
   ================================================================ */
.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-2); margin-bottom: 18px; font-size: 13.5px;
}
.alert .ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.alert-ok { border-color: rgba(88,201,138,0.3); background: var(--ok-bg); color: var(--ok); }
.alert-err { border-color: rgba(240,88,79,0.3); background: var(--danger-bg); color: var(--danger); }
.alert-warn { border-color: rgba(232,177,58,0.3); background: var(--warn-bg); color: var(--warn); }
.alert-info { border-color: rgba(90,169,214,0.3); background: var(--info-bg); color: var(--info); }
.alert b { display:block; color: var(--ink-0); }
.alert-ok b, .alert-err b, .alert-warn b, .alert-info b { color: inherit; }

/* ================================================================
   PROGRESS BAR (campaign send progress)
   ================================================================ */
.progress { height: 8px; border-radius: 8px; background: var(--bg-3); overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--signal-dim), var(--signal-bright)); box-shadow: 0 0 12px var(--signal-glow); transition: width .4s; }
.progress.split { display:flex; }
.progress.split > .seg-sent { background: linear-gradient(90deg, var(--ok), #7fe0aa); }
.progress.split > .seg-fail { background: var(--danger); }
.progress.split > .seg-review { background: var(--warn); }
.legend { display:flex; gap:16px; flex-wrap:wrap; margin-top:10px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.legend span { display:inline-flex; align-items:center; gap:6px; }
.legend .sw { width:9px; height:9px; border-radius:2px; }

/* ================================================================
   WIZARD STEPS
   ================================================================ */
.steps { display:flex; align-items:center; gap:0; margin-bottom: 26px; }
.step { display:flex; align-items:center; gap:10px; color: var(--ink-3); }
.step .num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-bright); display:grid; place-items:center; font-family: var(--font-mono); font-size: 12px; background: var(--bg-2); }
.step.active .num { background: var(--signal); color:#FFFFFF; border-color: var(--signal); box-shadow: 0 0 14px var(--signal-glow); }
.step.done .num { background: var(--ok-bg); color: var(--ok); border-color: rgba(88,201,138,0.4); }
.step.active .lbl, .step.done .lbl { color: var(--ink-0); }
.step .lbl { font-size: 13px; font-weight: 600; }
.step-line { flex:1; height:1px; background: var(--line); margin: 0 14px; min-width: 20px; }

/* ================================================================
   MISC LAYOUT HELPERS
   ================================================================ */
.row-between { display:flex; align-items:center; justify-content:space-between; gap: 14px; }
.flex { display:flex; } .items-center { align-items:center; } .gap-8 { gap:8px; } .gap-12 { gap:12px; } .gap-16{gap:16px;}
.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }
.mt-0{margin-top:0}.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.mb-0{margin-bottom:0}.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; }
.divider { height:1px; background: var(--line); margin: 18px 0; border:none; }
.kv { display:grid; grid-template-columns: 150px 1fr; gap: 10px 16px; }
.kv dt { color: var(--ink-2); font-size: 13px; }
.kv dd { color: var(--ink-0); font-size: 13.5px; }
.toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom: 18px; }
.toolbar .search { position:relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search svg { position:absolute; left:11px; top:50%; transform:translateY(-50%); width:15px; height:15px; color: var(--ink-3); }
.toolbar .search .input { padding-left: 34px; }

/* data readout block (console feel) */
.readout { font-family: var(--font-mono); font-size: 12px; color: var(--ink-1); background: var(--bg-0); border:1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; line-height: 1.7; }
.readout .k { color: var(--ink-3); }
.readout .v { color: var(--signal-bright); }

/* ================================================================
   AUTH (login) PAGE
   ================================================================ */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.auth-card { width: 100%; max-width: 400px; }
.auth-brand { display:flex; flex-direction: column; align-items:center; gap: 14px; margin-bottom: 28px; text-align:center; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 11px; }
.auth-brand h1 { font-size: 22px; }
.auth-brand .brand-sub { font-size: 10px; }
.auth-panel { background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-2); }
.auth-foot { text-align:center; margin-top: 20px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }

/* ================================================================
   ENTRY ANIMATION (one orchestrated page-load reveal)
   ================================================================ */
@keyframes rise { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform:none; } }
.reveal { animation: rise .5s both; }
.reveal:nth-child(1){animation-delay:.02s}.reveal:nth-child(2){animation-delay:.07s}
.reveal:nth-child(3){animation-delay:.12s}.reveal:nth-child(4){animation-delay:.17s}
.reveal:nth-child(5){animation-delay:.22s}.reveal:nth-child(6){animation-delay:.27s}
@media (prefers-reduced-motion: reduce){ .reveal{animation:none} *{transition:none!important} }

/* responsive: collapse sidebar to top on small screens */
@media (max-width: 860px){
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items:center; overflow-x:auto; }
  .brand { border-bottom:none; border-right:1px solid var(--line); }
  .nav { display:flex; padding: 8px; gap: 4px; }
  .nav-group { margin:0; display:flex; gap:4px; }
  .nav-group > .eyebrow { display:none; }
  .sidebar-foot { display:none; }
  .nav-link.active::before { display:none; }
}