/* NodeCadence — ops console design system (dark default + light, from web/mockups/ops) */

/* Fonts: Red Hat Display / Text / Mono (OFL, vendor/fonts/OFL.txt). Self-hosted: the CSP allows fonts from 'self' only. */
@font-face{ font-family:"Red Hat Display"; src:url("/vendor/fonts/red-hat-display.woff2") format("woff2"); font-weight:300 900; font-display:swap; }
@font-face{ font-family:"Red Hat Text"; src:url("/vendor/fonts/red-hat-text.woff2") format("woff2"); font-weight:300 700; font-display:swap; }
@font-face{ font-family:"Red Hat Mono"; src:url("/vendor/fonts/red-hat-mono.woff2") format("woff2"); font-weight:300 700; font-display:swap; }

/* Theme tokens. Dark ops console is the default; light applies when the viewer picks it
   (theme.js sets data-theme on <html> before first paint).
   --brand (red) is chrome only: mark, primary action, active nav, focus. --accent stays the
   "online / good" green so status never turns red. --coral / --sev-* mean "bad". */
:root{
  color-scheme:dark;
  --bg-canvas:#060708; --bg-surface:#101216; --bg-surface-2:#171a1f; --bg-input:#0b0d10; --bg-hover:rgba(255,255,255,0.045);
  --border-subtle:rgba(255,255,255,0.07); --border-default:rgba(255,255,255,0.12); --border-strong:rgba(255,255,255,0.22);
  --text-primary:#eef0f2; --text-secondary:#a9b0b8; --text-tertiary:#6f7781; --text-disabled:#464c54;

  --accent-300:#7eecc0; --accent-400:#3ecf8e; --accent-500:#2fbf82; --accent-600:#22a06b; --accent-700:#187a52;
  --accent-ink:#04210f; --accent-line:rgba(62,207,142,0.35); --accent-glow:rgba(62,207,142,0.3); --accent-wash:rgba(62,207,142,0.12);
  --coral-400:#ff7b74; --coral-500:#ff5a52; --coral-ink:#1a0605; --coral-line:rgba(255,90,82,0.4); --coral-glow:rgba(255,90,82,0.35); --coral-wash:rgba(255,90,82,0.12);
  --amber-400:#f7c64a; --amber-500:#f5b301; --amber-line:rgba(245,179,1,0.4); --amber-glow:rgba(245,179,1,0.3); --amber-wash:rgba(245,179,1,0.12);
  --info-400:#6cb4f5; --info-wash:rgba(108,180,245,0.12);
  --sev-critical:#ff2d55; --sev-high:#ff5a52; --sev-medium:#f5b301; --sev-low:#6cb4f5; --sev-info:#8b939c;
  --sev-critical-wash:rgba(255,45,85,0.15); --sev-high-wash:rgba(255,90,82,0.14);

  --brand:#ee0000; --brand-hi:#ff3030; --brand-ink:#ffffff; --brand-dim:rgba(238,0,0,0.16); --brand-glow:rgba(238,0,0,0.45);

  --map-bg:#0b0d10; --map-tile-filter:invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.5);
  --toast-bg:rgba(28,31,36,0.82); --toast-text:#eef0f2;
  --switch-off:rgba(0,0,0,0.45); --switch-knob-off:#e7e9ec;

  /* glass + surfaces */
  --glass:linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.035) 55%, rgba(255,255,255,0.05));
  --glass-edge:inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.07), 0 1px 2px rgba(0,0,0,0.5), 0 8px 22px -8px rgba(0,0,0,0.6);
  --glass-blur:blur(16px) saturate(170%);
  --glass-bar:linear-gradient(180deg, rgba(30,33,38,0.72), rgba(14,16,19,0.72));
  --sheen:rgba(255,255,255,0.16); --spec:rgba(255,255,255,0.22); --spot:rgba(255,255,255,0.055);
  --well:rgba(0,0,0,0.35); --well-edge:inset 0 1px 2px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.07);
  --tile:linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  --tile-edge:inset 0 1px 0 rgba(255,255,255,0.1), inset 0 0 0 1px rgba(255,255,255,0.04), 0 12px 30px -16px rgba(0,0,0,0.8);
  --ambient:radial-gradient(900px 520px at 8% -6%, rgba(238,0,0,0.15), transparent 70%), radial-gradient(700px 500px at 100% 18%, rgba(70,110,160,0.10), transparent 70%), radial-gradient(600px 400px at 40% 110%, rgba(238,0,0,0.05), transparent 70%);
  --dots:rgba(255,255,255,0.08); --grain:0.07;
  --term-bg:#030404; --term-text:#c8f7dc; --blk-empty:rgba(255,255,255,0.13);

  --radius-sm:10px; --radius-md:14px; --radius-lg:18px; --radius-pill:999px;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow-md:0 12px 32px rgba(0,0,0,.45); --shadow-modal:0 30px 80px rgba(0,0,0,.65); --scrim:rgba(0,0,0,0.55);

  --font-display:"Red Hat Display", ui-sans-serif, system-ui, sans-serif;
  --font-sans:"Red Hat Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono:"Red Hat Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  --sidebar-w:232px;
}
:root[data-theme="light"]{
  color-scheme:light;
  --bg-canvas:#eef0f3; --bg-surface:#ffffff; --bg-surface-2:#e7eaee; --bg-input:#f7f8fa; --bg-hover:rgba(16,20,24,0.04);
  --border-subtle:rgba(16,20,24,0.08); --border-default:rgba(16,20,24,0.14); --border-strong:rgba(16,20,24,0.26);
  --text-primary:#111418; --text-secondary:#4a525c; --text-tertiary:#69717b; --text-disabled:#a3aab3;
  --accent-300:#0b6b49; --accent-400:#0f8a5f; --accent-500:#13995f; --accent-600:#0f8a5f; --accent-700:#0b6b49;
  --accent-ink:#ffffff; --accent-line:rgba(15,138,95,0.35); --accent-glow:rgba(15,138,95,0.22); --accent-wash:rgba(15,138,95,0.10);
  --coral-400:#c9190b; --coral-500:#d7261b; --coral-ink:#ffffff; --coral-line:rgba(201,25,11,0.35); --coral-glow:rgba(201,25,11,0.2); --coral-wash:rgba(201,25,11,0.08);
  --amber-400:#8a5d00; --amber-500:#c58c00; --amber-line:rgba(197,140,0,0.4); --amber-glow:rgba(197,140,0,0.25); --amber-wash:rgba(197,140,0,0.12);
  --info-400:#1f5f9e; --info-wash:rgba(31,95,158,0.10);
  --sev-critical:#c4002e; --sev-high:#d7261b; --sev-medium:#c58c00; --sev-low:#1f5f9e; --sev-info:#69717b;
  --sev-critical-wash:rgba(196,0,46,0.10); --sev-high-wash:rgba(215,38,27,0.10);
  --brand:#ee0000; --brand-hi:#c80000; --brand-ink:#ffffff; --brand-dim:rgba(238,0,0,0.10); --brand-glow:rgba(238,0,0,0.3);
  --map-bg:#e7eaee; --map-tile-filter:none;
  --toast-bg:rgba(17,20,24,0.88); --toast-text:#f4f6f8;
  --switch-off:rgba(16,20,24,0.12); --switch-knob-off:#ffffff;
  --glass:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.72));
  --glass-edge:inset 0 1px 0 #ffffff, inset 0 0 0 1px rgba(16,20,24,0.10), 0 1px 2px rgba(16,20,24,0.08), 0 6px 16px -8px rgba(16,20,24,0.2);
  --glass-bar:linear-gradient(180deg, rgba(255,255,255,0.82), rgba(246,247,249,0.78));
  --sheen:rgba(255,255,255,0.6); --spec:rgba(255,255,255,0.7); --spot:rgba(16,20,24,0.035);
  --well:rgba(16,20,24,0.05); --well-edge:inset 0 1px 2px rgba(16,20,24,0.12), inset 0 0 0 1px rgba(16,20,24,0.06);
  --tile:linear-gradient(180deg, #ffffff, rgba(255,255,255,0.85));
  --tile-edge:inset 0 0 0 1px rgba(16,20,24,0.07), 0 1px 2px rgba(16,20,24,0.05), 0 12px 28px -18px rgba(16,20,24,0.3);
  --ambient:radial-gradient(900px 520px at 8% -6%, rgba(238,0,0,0.07), transparent 70%), radial-gradient(700px 500px at 100% 18%, rgba(70,110,160,0.07), transparent 70%);
  --dots:rgba(16,20,24,0.07); --grain:0.035;
  --blk-empty:rgba(16,20,24,0.14);
  --shadow-sm:0 1px 0 rgba(16,20,24,0.04); --shadow-md:0 8px 22px rgba(16,20,24,0.08); --shadow-modal:0 24px 64px rgba(16,20,24,0.22); --scrim:rgba(16,20,24,0.45);
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg-canvas);
  color:var(--text-primary);
  font-family:var(--font-sans);
  font-size:14px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
h1,h2,h3,h4,p,ul,ol{ margin:0; }
ul,ol{ padding:0; list-style:none; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
input,select{ font-family:inherit; }
svg{ display:block; }

.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ---------- typography helpers ---------- */
.eyebrow{
  font-size:11px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--text-tertiary);
}
.eyebrow.accent{ color:var(--accent-400); }
.eyebrow.amber{ color:var(--amber-400); }
h1.page-title{
  font-size:26px;
  font-weight:650;
  letter-spacing:-0.012em;
  color:var(--text-primary);
  margin-top:4px;
}
.lede{ color:var(--text-secondary); font-size:14.5px; margin-top:6px; max-width:560px; }
.mono{ font-family:var(--font-mono); }

/* ---------- brand mark ---------- */
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{
  width:32px; height:32px; border-radius:9px;
  background:var(--bg-surface-2);
  border:1px solid var(--border-default);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.brand-mark svg{ width:20px; height:16px; }
.brand-word{ font-size:15px; font-weight:650; letter-spacing:-0.01em; color:var(--text-primary); }
.brand-word b{ font-weight:650; }

/* ---------- app shell / sidebar ---------- */
.app-shell{ display:flex; min-height:100vh; }

.sidebar{
  width:var(--sidebar-w);
  flex-shrink:0;
  background:var(--bg-surface);
  border-right:1px solid var(--border-subtle);
  display:flex;
  flex-direction:column;
  padding:22px 16px;
  position:fixed;
  top:0; bottom:0; left:0;
  z-index:40;
  transition:transform .25s ease;
}
.sidebar .brand{ padding:4px 8px 22px; }

.acct-switcher{ position:relative; margin-bottom:18px; }
.acct-switcher summary{
  list-style:none; display:flex; align-items:center; gap:10px;
  padding:9px 10px; border-radius:var(--radius-sm);
  border:1px solid var(--border-default);
  background:var(--bg-surface-2);
  font-size:13px; font-weight:600;
  color:var(--text-primary);
}
.acct-switcher summary::-webkit-details-marker{ display:none; }
.acct-switcher summary::after{
  content:"⌄"; margin-left:auto; color:var(--text-tertiary); font-size:13px;
}
.acct-dot{ width:8px; height:8px; border-radius:50%; background:var(--accent-500); flex-shrink:0; }
.acct-menu{
  position:absolute; top:calc(100% + 6px); left:0; right:0;
  background:var(--bg-surface-2); border:1px solid var(--border-default);
  border-radius:var(--radius-sm); padding:6px; box-shadow:var(--shadow-md);
  z-index:50;
}
.acct-menu a{
  display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px;
  font-size:13px; color:var(--text-secondary);
}
.acct-menu a:hover{ background:var(--bg-surface); color:var(--text-primary); }
.acct-menu a.current{ color:var(--text-primary); }
.acct-menu a.current::after{ content:"✓"; margin-left:auto; color:var(--accent-400); }
.acct-menu hr{ border:none; border-top:1px solid var(--border-subtle); margin:6px 2px; }

.nav{ display:flex; flex-direction:column; gap:2px; flex:1; }
.nav a{
  display:flex; align-items:center; gap:11px;
  padding:9px 10px; border-radius:var(--radius-sm);
  color:var(--text-secondary); font-size:13.5px; font-weight:500;
}
.nav a svg{ width:17px; height:17px; opacity:.85; }
.nav a:hover{ background:var(--bg-surface-2); color:var(--text-primary); }
.nav a.active{ background:var(--accent-wash); color:var(--accent-300); }
.nav a.active svg{ opacity:1; }

.sidebar-footer{ border-top:1px solid var(--border-subtle); padding-top:14px; margin-top:10px; }
.fleet-mini{
  display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text-tertiary);
  padding:0 10px 12px;
}
.fleet-mini .status-dot{ width:6px; height:6px; }

.user-row{ display:flex; align-items:center; gap:10px; padding:6px 10px; border-radius:var(--radius-sm); position:relative; }
.user-row:hover{ background:var(--bg-surface-2); }
.avatar{
  width:30px; height:30px; border-radius:50%;
  background:var(--accent-wash); color:var(--accent-300);
  display:flex; align-items:center; justify-content:center;
  font-weight:650; font-size:12.5px; flex-shrink:0;
  border:1px solid var(--accent-line);
}
.user-row .who{ display:flex; flex-direction:column; min-width:0; }
.user-row .who .name{ font-size:13px; font-weight:600; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-row .who .role{ font-size:11.5px; color:var(--text-tertiary); }
.user-row > a.gear{ margin-left:auto; color:var(--text-tertiary); display:flex; }
.user-row > a.gear svg{ width:16px; height:16px; }

/* ---------- main content ---------- */
.main{
  margin-left:var(--sidebar-w);
  flex:1;
  min-width:0;
  padding:40px 48px 72px;
  max-width:1180px;
}
.mobile-topbar{ display:none; }

.topbar-row{
  display:flex; align-items:flex-start; justify-content:space-between; gap:24px;
  margin-bottom:34px;
}

/* ---------- stat cards ---------- */
.stats-row{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(190px,1fr));
  gap:14px; margin-bottom:36px;
}
.stat-card{
  background:var(--bg-surface); border:1px solid var(--border-subtle);
  border-radius:var(--radius-md); padding:20px 22px; position:relative; overflow:hidden;
}
.stat-card.glow::before{
  content:""; position:absolute; top:-60px; right:-60px; width:180px; height:180px;
  background:radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity:.5; pointer-events:none;
}
.stat-card .stat-value{ font-size:34px; font-weight:650; letter-spacing:-0.02em; margin-top:8px; position:relative; }
.stat-card .stat-value.online{ color:var(--accent-400); }
.stat-card .stat-value.offline{ color:var(--coral-400); }
.stat-card .stat-context{ font-size:12.5px; color:var(--text-tertiary); margin-top:6px; }

/* ---------- panels ---------- */
.panel{
  background:var(--bg-surface); border:1px solid var(--border-subtle);
  border-radius:var(--radius-md); padding:22px 24px; margin-bottom:22px;
}
.panel-header{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:16px; gap:16px; }
.panel-header h2{ font-size:15px; font-weight:650; color:var(--text-primary); }
.panel-header .hint{ font-size:12.5px; color:var(--text-tertiary); }
.panel-row{
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:13px 0; border-top:1px solid var(--border-subtle);
}
.panel-row:first-of-type{ border-top:none; padding-top:2px; }
.panel-row .label{ font-size:13.5px; color:var(--text-secondary); }
.panel-row .value{ font-size:13.5px; color:var(--text-primary); text-align:right; }

/* ---------- filter pills / tabs ---------- */
.pill-row{ display:flex; gap:8px; flex-wrap:wrap; }
.pill-btn{
  padding:6px 14px; border-radius:var(--radius-pill); border:1px solid var(--border-default);
  background:transparent; color:var(--text-secondary); font-size:12.5px; font-weight:600;
}
.pill-btn:hover{ color:var(--text-primary); border-color:var(--border-strong); }
.pill-btn.active{ background:var(--bg-surface-2); border-color:var(--accent-line); color:var(--accent-300); }

/* ---------- table ---------- */
.table-wrap{ overflow-x:auto; }
table.dc-table{ width:100%; border-collapse:separate; border-spacing:0; }
table.dc-table thead th{
  text-align:left; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--text-tertiary); padding:0 16px 10px; border-bottom:1px solid var(--border-subtle);
  white-space:nowrap;
}
table.dc-table tbody td{
  padding:14px 16px; border-bottom:1px solid var(--border-subtle); font-size:13.5px; vertical-align:middle;
}
table.dc-table tbody tr:last-child td{ border-bottom:none; }
table.dc-table tbody tr{ transition:background .12s ease; }
table.dc-table tbody tr:hover{ background:var(--bg-surface-2); }
table.dc-table tbody tr.linkrow{ cursor:pointer; }
.cell-device{ display:flex; flex-direction:column; gap:2px; }
.cell-device .name{ font-weight:600; color:var(--text-primary); }
.cell-device .sub{ font-size:12px; color:var(--text-tertiary); }
.cell-muted{ color:var(--text-tertiary); }

/* ---------- status ---------- */
.status{ display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:600; }
.status-dot{
  width:8px; height:8px; border-radius:50%; position:relative; flex-shrink:0;
}
.status-dot.online{ background:var(--accent-500); box-shadow:0 0 0 0 var(--accent-glow); }
.status-dot.offline{ background:var(--coral-500); }
.status-dot.pending{ background:var(--amber-500); }
.status-dot.unknown{ background:var(--text-disabled); }
.status-dot.pulse::after{
  content:""; position:absolute; inset:-3px; border-radius:50%;
  border:1.5px solid currentColor; opacity:0; animation:pulse-ring 2.4s ease-out infinite;
}
.status-dot.online.pulse::after{ color:var(--accent-500); }
@keyframes pulse-ring{
  0%{ transform:scale(.6); opacity:.55; }
  70%{ transform:scale(2.1); opacity:0; }
  100%{ opacity:0; }
}
.status.online{ color:var(--accent-400); }
.status.offline{ color:var(--coral-400); }
.status.pending{ color:var(--amber-400); }
.status.unknown{ color:var(--text-tertiary); }

.badge{
  display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:650;
  padding:3px 9px; border-radius:var(--radius-pill); letter-spacing:.01em;
  border:1px solid; white-space:nowrap;
}
.badge.inherited{ color:var(--text-secondary); border-color:var(--border-default); background:transparent; }
.badge.overridden{ color:var(--amber-400); border-color:var(--amber-line); background:var(--amber-wash); }
.badge.ok{ color:var(--accent-400); border-color:var(--accent-line); background:var(--accent-wash); }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 18px; border-radius:var(--radius-sm); font-size:13.5px; font-weight:650;
  border:1px solid transparent; transition:background .12s ease, border-color .12s ease, color .12s ease, transform .05s ease;
  white-space:nowrap;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--accent-500); color:var(--accent-ink); }
.btn-primary:hover{ background:var(--accent-600); }
.btn-secondary{ background:transparent; border-color:var(--border-default); color:var(--text-primary); }
.btn-secondary:hover{ border-color:var(--border-strong); background:var(--bg-surface-2); }
.btn-ghost{ background:transparent; color:var(--text-secondary); padding:10px 12px; }
.btn-ghost:hover{ color:var(--text-primary); }
.btn-danger{ background:transparent; border-color:var(--coral-line); color:var(--coral-400); }
.btn-danger:hover{ background:var(--coral-wash); border-color:var(--coral-500); }
.btn-danger.solid{ background:var(--coral-500); border-color:var(--coral-500); color:var(--coral-ink); }
.btn-danger.solid:hover{ background:var(--coral-400); }
.btn-sm{ padding:7px 13px; font-size:12.5px; }
.btn-full{ width:100%; }
.btn[disabled]{ opacity:.45; cursor:not-allowed; }
.btn svg{ width:15px; height:15px; }

.icon-btn{
  width:32px; height:32px; border-radius:var(--radius-sm); display:inline-flex; align-items:center; justify-content:center;
  color:var(--text-tertiary); border:1px solid transparent; background:transparent;
}
.icon-btn:hover{ color:var(--text-primary); background:var(--bg-surface-2); border-color:var(--border-subtle); }
.icon-btn svg{ width:17px; height:17px; }

/* ---------- forms ---------- */
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:12px; font-weight:650; letter-spacing:.03em; color:var(--text-secondary); margin-bottom:7px; }
.field .hint{ font-size:12px; color:var(--text-tertiary); margin-top:6px; }
.input, select.input{
  width:100%; background:var(--bg-input); border:1px solid var(--border-default);
  border-radius:var(--radius-sm); padding:11px 13px; font-size:14px; color:var(--text-primary);
  outline:none; transition:border-color .12s ease, box-shadow .12s ease;
}
.input::placeholder{ color:var(--text-disabled); }
.input:focus, select.input:focus{ border-color:var(--accent-600); box-shadow:0 0 0 3px var(--accent-wash); }
.input-group{ position:relative; display:flex; align-items:center; }
.input-group .input{ padding-right:68px; }
.input-group .input-action{
  position:absolute; right:6px; font-size:11.5px; font-weight:650; color:var(--text-tertiary);
  background:transparent; border:none; padding:6px 8px; border-radius:6px;
}
.input-group .input-action:hover{ color:var(--text-primary); background:var(--bg-surface-2); }
.checkbox-row{ display:flex; align-items:flex-start; gap:10px; font-size:13px; color:var(--text-secondary); }
.checkbox-row input[type="checkbox"]{
  width:16px; height:16px; margin-top:1px; accent-color:var(--accent-500); flex-shrink:0;
}
select.input{ appearance:none; background-image:linear-gradient(45deg, transparent 50%, var(--text-tertiary) 50%), linear-gradient(135deg, var(--text-tertiary) 50%, transparent 50%); background-position:calc(100% - 18px) center, calc(100% - 13px) center; background-size:5px 5px, 5px 5px; background-repeat:no-repeat; }

/* ---------- callouts ---------- */
.callout{
  display:flex; gap:12px; padding:14px 16px; border-radius:var(--radius-md);
  border:1px solid var(--border-subtle); border-left:3px solid var(--border-default); background:var(--bg-surface-2); margin-bottom:18px;
}
.callout svg{ width:17px; height:17px; flex-shrink:0; margin-top:1px; }
.callout .body{ font-size:13px; color:var(--text-secondary); }
.callout .body strong{ color:var(--text-primary); }
.callout.amber{ border-left-color:var(--amber-500); background:var(--amber-wash); }
.callout.amber svg{ color:var(--amber-400); }
.callout.accent{ border-left-color:var(--accent-500); background:var(--accent-wash); }
.callout.accent svg{ color:var(--accent-400); }
.callout.coral{ border-left-color:var(--coral-500); background:var(--coral-wash); }
.callout.coral svg{ color:var(--coral-400); }

/* ---------- auth / public shells ---------- */
.auth-shell{
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:32px; position:relative; overflow:hidden;
}
.auth-shell::before{
  content:""; position:absolute; top:-220px; left:50%; transform:translateX(-50%);
  width:720px; height:520px; background:radial-gradient(ellipse at center, var(--accent-glow), transparent 68%);
  opacity:.22; pointer-events:none;
}
.auth-card{
  position:relative; width:100%; max-width:420px; background:var(--bg-surface);
  border:1px solid var(--border-subtle); border-radius:var(--radius-lg); padding:38px 36px;
  box-shadow:var(--shadow-md);
}
.auth-card.wide{ max-width:660px; }
.auth-card .brand{ margin-bottom:28px; }
.auth-card h1{ font-size:21px; font-weight:650; letter-spacing:-0.01em; }
.auth-card .sub{ font-size:13.5px; color:var(--text-secondary); margin-top:6px; margin-bottom:26px; }
.auth-foot{ margin-top:22px; padding-top:18px; border-top:1px solid var(--border-subtle); text-align:center; font-size:13px; color:var(--text-tertiary); }
.auth-foot a{ color:var(--accent-400); font-weight:600; }
.auth-foot a:hover{ color:var(--accent-300); }
.tiny-print{ text-align:center; font-size:11.5px; color:var(--text-disabled); margin-top:20px; }

/* ---------- seed / recovery word grid ---------- */
.seed-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin:22px 0; }
.seed-tile{
  display:flex; align-items:center; gap:8px; background:var(--bg-input); border:1px solid var(--border-default);
  border-radius:var(--radius-sm); padding:9px 11px; font-family:var(--font-mono); font-size:13.5px;
}
.seed-tile .idx{ color:var(--text-disabled); font-size:11px; min-width:14px; }
.recover-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:9px; margin:20px 0; }
.recover-grid .input{ font-family:var(--font-mono); text-align:center; padding:9px 6px; font-size:13px; }

/* ---------- handoff code display ---------- */
.handoff-card{
  text-align:center; padding:28px 24px; background:var(--bg-surface-2); border:1px solid var(--border-default);
  border-radius:var(--radius-md); margin:20px 0;
}
.handoff-code{
  font-family:var(--font-mono); font-size:27px; font-weight:600; letter-spacing:.08em; color:var(--text-primary);
}
.handoff-link{
  margin-top:12px; font-family:var(--font-mono); font-size:13px; color:var(--accent-300); word-break:break-all;
}
.handoff-actions{ display:flex; gap:10px; justify-content:center; margin-top:18px; flex-wrap:wrap; }
.handoff-meta{ display:flex; align-items:center; justify-content:center; gap:10px; margin-top:16px; font-size:12.5px; color:var(--text-tertiary); }
.handoff-timer{ font-family:var(--font-mono); color:var(--amber-400); font-weight:650; }

/* ---------- modal ---------- */
.modal-overlay{
  position:fixed; inset:0; background:var(--scrim); backdrop-filter:blur(2px);
  display:none; align-items:center; justify-content:center; z-index:100; padding:24px;
}
.modal-overlay.open{ display:flex; }
.modal-box{
  width:100%; max-width:420px; background:var(--bg-surface); border:1px solid var(--border-default);
  border-radius:var(--radius-lg); padding:26px 26px 22px; box-shadow:var(--shadow-modal);
}
.modal-box h3{ font-size:16px; font-weight:650; margin-bottom:8px; }
.modal-box p{ font-size:13.5px; color:var(--text-secondary); margin-bottom:20px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; }

/* ---------- toast ---------- */
.toast{
  position:fixed; bottom:24px; right:24px; background:var(--bg-surface-2); border:1px solid var(--border-default);
  border-radius:var(--radius-sm); padding:12px 16px; font-size:13px; color:var(--text-primary);
  box-shadow:var(--shadow-md); display:flex; align-items:center; gap:10px;
  transform:translateY(12px); opacity:0; pointer-events:none; transition:transform .2s ease, opacity .2s ease;
  z-index:200;
}
.toast.show{ transform:translateY(0); opacity:1; }
.toast svg{ width:15px; height:15px; color:var(--accent-400); flex-shrink:0; }

/* ---------- activity list ---------- */
.activity-list{ display:flex; flex-direction:column; }
.activity-row{ display:flex; gap:14px; padding:14px 0; border-top:1px solid var(--border-subtle); }
.activity-row:first-child{ border-top:none; padding-top:2px; }
.activity-icon{
  width:30px; height:30px; border-radius:50%; background:var(--bg-surface-2); border:1px solid var(--border-subtle);
  display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px;
}
.activity-icon svg{ width:14px; height:14px; color:var(--text-tertiary); }
.activity-icon.online svg{ color:var(--accent-400); }
.activity-icon.offline svg{ color:var(--coral-400); }
.activity-icon.pending svg{ color:var(--amber-400); }
.activity-body{ flex:1; min-width:0; }
.activity-body .desc{ font-size:13.5px; color:var(--text-primary); }
.activity-body .desc b{ font-weight:650; }
.activity-body .meta{ font-size:12px; color:var(--text-tertiary); margin-top:3px; }
.activity-time{ font-size:12px; color:var(--text-tertiary); white-space:nowrap; margin-top:1px; }

/* ---------- mockup nav (review convenience, not part of product) ---------- */
.mockup-nav{ position:fixed; bottom:16px; right:16px; z-index:300; }
.mockup-nav summary{
  list-style:none; font-family:var(--font-mono); font-size:11px; color:var(--text-disabled);
  border:1px dashed var(--border-default); border-radius:var(--radius-pill); padding:6px 12px;
  background:var(--bg-canvas);
}
.mockup-nav summary::-webkit-details-marker{ display:none; }
.mockup-nav[open] summary{ color:var(--text-tertiary); }
.mockup-nav .mn-panel{
  position:absolute; bottom:calc(100% + 8px); right:0; width:220px; background:var(--bg-surface-2);
  border:1px solid var(--border-default); border-radius:var(--radius-md); padding:10px; box-shadow:var(--shadow-md);
  display:grid; grid-template-columns:1fr 1fr; gap:4px;
}
.mockup-nav .mn-panel a{
  font-size:12px; color:var(--text-secondary); padding:6px 8px; border-radius:6px; font-family:var(--font-sans);
}
.mockup-nav .mn-panel a:hover{ background:var(--bg-surface); color:var(--accent-300); }
.mockup-nav .mn-panel a.current{ color:var(--accent-400); }

/* ---------- demo state switcher (pairing page only) ---------- */
.demo-switch{
  position:fixed; top:14px; left:50%; transform:translateX(-50%); z-index:300;
  display:flex; gap:6px; background:var(--bg-canvas); border:1px dashed var(--border-default);
  border-radius:var(--radius-pill); padding:5px; font-family:var(--font-mono);
}
.demo-switch button{
  background:transparent; border:none; color:var(--text-disabled); font-size:11px; padding:5px 11px;
  border-radius:var(--radius-pill);
}
.demo-switch button.active{ background:var(--bg-surface-2); color:var(--accent-300); }

/* ---------- mobile ---------- */
.menu-toggle{ display:none; }
@media (max-width: 960px){
  .sidebar{ transform:translateX(-100%); box-shadow:var(--shadow-modal); }
  .sidebar.open{ transform:none; }
  .main{ margin-left:0; padding:88px 20px 56px; }
  .mobile-topbar{
    display:flex; align-items:center; justify-content:space-between;
    position:fixed; top:0; left:0; right:0; height:60px; padding:0 18px;
    background:var(--bg-surface); border-bottom:1px solid var(--border-subtle); z-index:45;
  }
  .menu-toggle{
    display:flex; width:34px; height:34px; align-items:center; justify-content:center;
    border-radius:8px; border:1px solid var(--border-default); color:var(--text-primary); background:transparent;
  }
  .sidebar-scrim{ display:none; position:fixed; inset:0; background:var(--scrim); z-index:39; }
  .sidebar-scrim.show{ display:block; }
  .stats-row{ grid-template-columns:1fr 1fr; }
  .seed-grid, .recover-grid{ grid-template-columns:repeat(2, 1fr); }
}

/* ---- live app additions ---- */
[hidden]{ display:none !important; }
.form-error{ margin-bottom:16px; }
.whoami{ display:grid; gap:10px; margin:18px 0 22px; }
.whoami .row{ display:flex; justify-content:space-between; gap:12px; font-size:14px; }
.whoami .row .k{ color:var(--text-secondary); }
.whoami .row .v{ color:var(--text-primary); text-align:right; overflow-wrap:anywhere; }
.panel-row .hint{ font-size:12.5px; color:var(--text-tertiary); margin-top:3px; }
.panel-row .value.mono{ overflow-wrap:anywhere; }
pre.cmd{ margin:10px 0; padding:10px 12px; background:var(--bg-surface-2); border-radius:8px; color:var(--text-primary); font-size:12.5px; white-space:pre-wrap; word-break:break-all; }
.acct-label{ font-size:13px; font-weight:600; color:var(--text-primary); padding:8px 10px; margin-bottom:14px; }
#acct-select{ margin-bottom:14px; }
.user-row .logout{ margin-left:auto; background:none; border:0; color:var(--text-tertiary); cursor:pointer; font-size:12px; padding:4px 6px; border-radius:6px; }
.user-row .logout:hover{ color:var(--text-primary); background:var(--bg-surface-2); }
.empty-state{ text-align:center; padding:36px 12px; color:var(--text-secondary); }
.empty-state h3{ color:var(--text-primary); margin:0 0 6px; font-size:16px; }
.empty-state p{ margin:0 0 16px; font-size:13.5px; }
.danger-panel{ border-color:var(--coral-line); }
.danger-panel h2{ color:var(--coral-400); }
.danger-panel .panel-row{ gap:16px; }
.callout .body a{ color:var(--accent-400); text-decoration:underline; text-underline-offset:2px; }
.spinner{ width:18px; height:18px; border-radius:50%; border:2px solid var(--accent-wash); border-top-color:var(--accent-500); animation:nc-spin .8s linear infinite; flex-shrink:0; }
@keyframes nc-spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .spinner{ animation-duration:2.4s; } }
.setup-steps{ list-style:none; margin:16px 0 18px; padding:0; display:grid; gap:12px; }
.setup-steps li{ display:flex; align-items:center; gap:10px; font-size:14px; color:var(--text-tertiary); }
.setup-steps li::before{ content:""; width:18px; height:18px; border-radius:50%; border:2px solid var(--border-strong); box-sizing:border-box; flex-shrink:0; }
.setup-steps li.active{ color:var(--text-primary); }
.setup-steps li.active::before{ border-color:var(--accent-wash); border-top-color:var(--accent-500); animation:nc-spin .8s linear infinite; }
.setup-steps li.done{ color:var(--text-secondary); }
.setup-steps li.done::before{ border:0; background:var(--accent-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3L15 6' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.cmd-box{ margin:6px 0 10px; }
.cmd-box pre.cmd{ margin:0 0 10px; font-size:13px; }
.hint-line{ font-size:13px; color:var(--text-secondary); margin:0 0 6px; }
.health-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:10px; margin-bottom:6px; }
.htile{ background:var(--bg-surface-2); border-radius:10px; padding:12px 14px; }
.htile .k{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-tertiary); }
.htile .v{ font-size:20px; font-weight:600; color:var(--text-primary); margin-top:4px; font-variant-numeric:tabular-nums; }
.htile .s{ font-size:12px; color:var(--text-tertiary); margin-top:2px; overflow-wrap:anywhere; }
.htile.warn .v{ color:var(--amber-400); }
.htile.bad .v{ color:var(--coral-400); }
.bar{ height:6px; border-radius:3px; background:var(--bg-surface-2); overflow:hidden; margin-top:6px; min-width:120px; }
.bar > span{ display:block; height:100%; background:var(--accent-500); border-radius:3px; }
.bar.warn > span{ background:var(--amber-500); }
.bar.bad > span{ background:var(--coral-500); }
.disk-cell{ flex:1; max-width:260px; text-align:right; }
.disk-cell .t{ font-size:13px; color:var(--text-primary); }
.stale{ opacity:.55; }
.cfg-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:14px 0; border-top:1px solid var(--border-subtle); }
.cfg-row:first-child{ border-top:0; }
.cfg-row .meta{ flex:1; min-width:0; }
.cfg-row .name{ font-size:14px; font-weight:600; color:var(--text-primary); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.cfg-row .help{ font-size:12.5px; color:var(--text-tertiary); margin-top:4px; }
.cfg-row .ctl{ display:flex; align-items:center; gap:8px; flex-shrink:0; }
.cfg-row .ctl input[type=number]{ width:96px; text-align:right; }
.cfg-row .unit{ font-size:12.5px; color:var(--text-tertiary); }
.cfg-row .reset{ background:none; border:0; color:var(--text-tertiary); font-size:12px; cursor:pointer; text-decoration:underline; padding:0; }
.cfg-row.dirty .name::after{ content:"unsaved"; font-size:11px; font-weight:500; color:var(--amber-400); }
.switch{ position:relative; width:40px; height:22px; flex-shrink:0; }
.switch input{ position:absolute; inset:0; opacity:0; margin:0; cursor:pointer; }
.switch span{ position:absolute; inset:0; border-radius:11px; background:var(--switch-off); border:1px solid var(--border-subtle); transition:background .15s; pointer-events:none; }
.switch span::after{ content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:var(--switch-knob-off); box-shadow:0 1px 2px rgba(0,0,0,.2); transition:transform .15s; }
.switch input:checked + span{ background:var(--accent-600, var(--accent-500)); }
.switch input:checked + span::after{ transform:translateX(18px); background:var(--accent-ink); }
.switch input:focus-visible + span{ outline:2px solid var(--accent-500); outline-offset:2px; }
.config-actions{ display:flex; gap:8px; margin-top:12px; }
@media (max-width:560px){ .cfg-row{ flex-direction:column; } .disk-cell{ max-width:none; } }
/* ---- maps (T5) ---- */
.map{ height:300px; border-radius:10px; overflow:hidden; contain:paint; isolation:isolate; margin-bottom:14px; background:var(--map-bg); border:1px solid var(--border-subtle); }
.map.fleet{ height:340px; }
.leaflet-container{ background:var(--map-bg); font:inherit; }
.leaflet-tile-pane{ filter:var(--map-tile-filter); }
.leaflet-control-attribution{ background:var(--bg-surface) !important; opacity:.85; color:var(--text-tertiary) !important; font-size:10.5px; }
.leaflet-control-attribution a{ color:var(--text-secondary) !important; }
.leaflet-bar a{ background:var(--bg-surface) !important; color:var(--text-primary) !important; border-color:var(--border-subtle) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip{ background:var(--bg-surface); color:var(--text-primary); }
.leaflet-popup-content a{ color:var(--accent-400); }

/* ============================================================
   SOC console (dashboard + device): dense, scannable, severity-first.
   ============================================================ */
.main.console{ max-width:none; padding:28px 32px 72px; }
.console-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.console-head h1{ font-size:20px; font-weight:650; margin:2px 0 0; letter-spacing:-.01em; }
.console-head .meta{ font-size:12.5px; color:var(--text-tertiary); margin-top:4px; }
.console-head .tools{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.search{ position:relative; }
.search input{ width:280px; max-width:100%; padding-left:30px; height:34px; font-size:13px; }
.search svg{ position:absolute; left:10px; top:50%; transform:translateY(-50%); width:14px; height:14px; color:var(--text-tertiary); pointer-events:none; }

.kpis{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.kpi{ background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:12px; padding:14px 16px; cursor:default; }
.kpi.clickable{ cursor:pointer; }
.kpi.clickable:hover{ border-color:var(--border-default); }
.kpi .k{ font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-tertiary); }
.kpi .v{ font-size:24px; font-weight:650; margin-top:2px; font-variant-numeric:tabular-nums; }
.kpi .s{ font-size:11.5px; color:var(--text-tertiary); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kpi.good .v{ color:var(--accent-400); } .kpi.bad .v{ color:var(--sev-critical); } .kpi.warn .v{ color:var(--sev-medium); }

.grid-2{ display:grid; grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr); gap:14px; margin-bottom:14px; align-items:start; }
.card{ background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:12px; overflow:hidden; }
.card-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 16px; border-bottom:1px solid var(--border-subtle); }
.card-head h2{ font-size:12px; letter-spacing:.07em; text-transform:uppercase; color:var(--text-secondary); margin:0; font-weight:650; }
.card-head .hint{ font-size:11.5px; color:var(--text-tertiary); }
.card-body{ padding:12px 14px; }
.card-foot{ padding:8px 14px; border-top:1px solid var(--border-subtle); display:flex; justify-content:center; }
.empty{ padding:22px 14px; text-align:center; color:var(--text-tertiary); font-size:13px; }

/* severity */
.sev{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:650; letter-spacing:.05em; text-transform:uppercase; white-space:nowrap; }
.sev::before{ content:""; width:8px; height:8px; border-radius:2px; background:currentColor; }
.sev.critical{ color:var(--sev-critical); } .sev.high{ color:var(--sev-high); } .sev.medium{ color:var(--sev-medium); } .sev.low{ color:var(--sev-low); } .sev.info{ color:var(--sev-info); }
.sev-count{ display:inline-flex; min-width:20px; height:18px; padding:0 6px; border-radius:9px; font-size:11px; font-weight:700; align-items:center; justify-content:center; background:var(--bg-surface-2); color:var(--text-secondary); }
.sev-count.critical{ background:var(--sev-critical-wash); color:var(--sev-critical); } .sev-count.high{ background:var(--sev-high-wash); color:var(--sev-high); } .sev-count.medium{ background:var(--amber-wash); color:var(--sev-medium); }

/* dense tables */
.dtable-wrap{ overflow-x:auto; }
table.dtable{ width:100%; border-collapse:collapse; font-size:13px; }
.dtable th{ text-align:left; font-size:10.5px; letter-spacing:.07em; text-transform:uppercase; color:var(--text-tertiary); font-weight:650; padding:8px 12px; border-bottom:1px solid var(--border-subtle); white-space:nowrap; background:var(--bg-surface); position:sticky; top:0; }
.dtable th.sortable{ cursor:pointer; user-select:none; } .dtable th.sortable:hover{ color:var(--text-secondary); }
.dtable th.sorted::after{ content:" ↓"; } .dtable th.sorted.asc::after{ content:" ↑"; }
.dtable td{ padding:10px 14px; border-bottom:1px solid var(--border-subtle); vertical-align:middle; white-space:nowrap; }
.dtable tr:last-child td{ border-bottom:0; }
.dtable tbody tr.link{ cursor:pointer; } .dtable tbody tr.link:hover td{ background:var(--bg-surface-2); }
.dtable .name{ color:var(--text-primary); font-weight:600; } .dtable .sub{ display:block; font-size:11.5px; color:var(--text-tertiary); margin-top:1px; }
.dtable .muted{ color:var(--text-tertiary); } .dtable .mono{ font-family:var(--font-mono); font-size:12px; }
.dtable td.wrap{ white-space:normal; }
.mbar{ display:inline-flex; align-items:center; gap:6px; font-variant-numeric:tabular-nums; font-size:12px; color:var(--text-secondary); }
.mbar i{ display:inline-block; width:38px; height:5px; border-radius:3px; background:var(--bg-surface-2); overflow:hidden; position:relative; }
.mbar i b{ position:absolute; inset:0 auto 0 0; background:var(--accent-500); }
.mbar.warn i b{ background:var(--sev-medium); } .mbar.bad i b{ background:var(--sev-critical); }

/* activity feed */
.feed{ list-style:none; margin:0; padding:0; }
.feed li{ display:grid; grid-template-columns:14px 1fr auto; gap:10px; padding:8px 14px; border-bottom:1px solid var(--border-subtle); font-size:12.5px; align-items:start; }
.feed li:last-child{ border-bottom:0; }
.feed .dot{ width:8px; height:8px; border-radius:50%; margin-top:5px; background:var(--sev-info); }
.feed .dot.online{ background:var(--accent-500); } .feed .dot.offline{ background:var(--sev-critical); } .feed .dot.inventory{ background:var(--sev-medium); border-radius:2px; }
.feed .what{ color:var(--text-primary); } .feed .what a{ color:var(--text-primary); font-weight:600; }
.feed .detail{ color:var(--text-tertiary); margin-top:1px; word-break:break-word; }
.feed .when{ color:var(--text-tertiary); white-space:nowrap; font-variant-numeric:tabular-nums; }
.feed .old{ opacity:.6; text-decoration:line-through; }

.filters{ display:flex; gap:6px; flex-wrap:wrap; }
.chip{ border:1px solid var(--border-subtle); background:transparent; color:var(--text-secondary); border-radius:999px; font-size:12px; padding:4px 10px; cursor:pointer; }
.chip:hover{ border-color:var(--border-default); } .chip.on{ background:var(--accent-wash); border-color:var(--accent-700); color:var(--accent-300); }

/* device header */
.dev-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; padding:16px 18px; background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:12px; margin-bottom:16px; }
.dev-head .crumb{ font-size:12px; color:var(--text-tertiary); } .dev-head .crumb a{ color:var(--text-tertiary); } .dev-head .crumb a:hover{ color:var(--text-secondary); }
.dev-head h1{ font-size:20px; font-weight:650; margin:3px 0 6px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.dev-meta{ display:flex; flex-wrap:wrap; gap:4px 18px; font-size:12.5px; color:var(--text-secondary); }
.dev-meta span b{ font-weight:500; color:var(--text-tertiary); margin-right:5px; }
.dev-meta .mono{ font-family:var(--font-mono); font-size:12px; }
.dev-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.findings{ display:grid; gap:0; }
.finding{ display:grid; grid-template-columns:80px 1fr; gap:10px; align-items:start; padding:10px 16px; border-bottom:1px solid var(--border-subtle); font-size:13px; }
.finding.link{ cursor:pointer; }
.finding.link:hover{ background:var(--bg-surface-2); }
.finding:last-child{ border-bottom:0; }
.finding .t{ color:var(--text-primary); font-weight:550; } .finding .d{ color:var(--text-tertiary); font-size:12px; margin-top:1px; }
.finding .x{ color:var(--text-tertiary); font-size:12px; white-space:nowrap; }
.findings-ok{ padding:12px 14px; font-size:13px; color:var(--accent-400); display:flex; gap:8px; align-items:center; }

.tabs{ display:flex; gap:2px; border-bottom:1px solid var(--border-subtle); margin:4px 0 14px; overflow-x:auto; }
.tabs a{ padding:9px 14px; font-size:13px; color:var(--text-secondary); border-bottom:2px solid transparent; white-space:nowrap; }
.tabs a:hover{ color:var(--text-primary); }
.tabs a.on{ color:var(--text-primary); border-bottom-color:var(--accent-500); }
.tabs a .sev-count{ margin-left:6px; }

.kv{ display:grid; grid-template-columns:minmax(120px,170px) 1fr; font-size:13px; }
.kv > div{ padding:7px 14px; border-bottom:1px solid var(--border-subtle); }
.kv > div:nth-last-child(-n+2){ border-bottom:0; }
.kv .k{ color:var(--text-tertiary); }
.kv .v{ color:var(--text-primary); word-break:break-word; }
.kv .v.mono{ font-family:var(--font-mono); font-size:12px; }
.health-grid.compact{ grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); padding:12px 14px 4px; margin:0; }
.card .map{ margin:0; border-radius:0; border:0; height:240px; }
.card #config-form{ padding:4px 14px 14px; }
.card #disk-rows{ padding:0 14px; }
.danger-zone .panel-row{ padding:10px 14px; gap:16px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border-subtle); }
.danger-zone .panel-row:last-child{ border-bottom:0; }
.danger-zone .label{ color:var(--text-primary); font-weight:600; font-size:13.5px; }

@media (max-width:1180px){ .kpis{ grid-template-columns:repeat(3, minmax(0,1fr)); } .grid-2{ grid-template-columns:1fr; } }
@media (max-width:640px){ .kpis{ grid-template-columns:repeat(2, minmax(0,1fr)); } .main.console{ padding:16px 14px 48px; } .finding{ grid-template-columns:1fr; gap:4px; } .search input{ width:100%; } .kv{ grid-template-columns:1fr; } .kv .k{ padding-bottom:0; border-bottom:0 !important; } }
.grid-2 > .card > .feed{ max-height:460px; overflow-y:auto; }
#recent-feed{ max-height:none; }

/* ---- structure pass ---- */
.kpis.four{ grid-template-columns:repeat(4, minmax(0,1fr)); }
.kpis.summary .v{ font-size:17px; margin-top:4px; }
.kpi .v.good{ color:var(--accent-400); } .kpi .v.bad{ color:var(--sev-critical); } .kpi .v.warn{ color:var(--sev-medium); }
.grid-2.even{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.dev-sub{ font-size:13.5px; color:var(--text-secondary); }
.dev-sub .sep{ color:var(--text-disabled); margin:0 7px; }
.meters{ padding:6px 14px 10px; }
.meter{ display:grid; grid-template-columns:110px 1fr 130px; gap:12px; align-items:center; padding:7px 0; border-bottom:1px solid var(--border-subtle); font-size:13px; }
.meter:last-child{ border-bottom:0; }
.meter .l{ color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.meter .track{ height:6px; border-radius:3px; background:var(--bg-surface-2); overflow:hidden; }
.meter .track b{ display:block; height:100%; background:var(--accent-500); border-radius:3px; }
.meter.warn .track b{ background:var(--sev-medium); } .meter.bad .track b{ background:var(--sev-critical); }
.meter .r{ text-align:right; font-variant-numeric:tabular-nums; color:var(--text-primary); white-space:nowrap; }
.meter .r small{ color:var(--text-tertiary); font-size:11.5px; margin-left:6px; }
.meter.text .r{ grid-column:2 / 4; text-align:left; }
.group-h{ font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--text-tertiary); padding:12px 14px 4px; font-weight:650; }
.group-h:first-child{ padding-top:8px; }
.seg{ display:inline-flex; border:1px solid var(--border-subtle); border-radius:8px; overflow:hidden; }
.seg button{ background:transparent; border:0; color:var(--text-secondary); font-size:12px; padding:5px 12px; cursor:pointer; }
.seg button.on{ background:var(--bg-surface-2); color:var(--text-primary); }
#fleet-map-panel .map{ height:420px; }
.health-cell{ display:inline-flex; flex-direction:column; gap:2px; font-size:12px; }
.health-cell .lbl{ color:var(--text-tertiary); font-size:11px; }
@media (max-width:1180px){ .kpis.four{ grid-template-columns:repeat(2, minmax(0,1fr)); } .grid-2.even{ grid-template-columns:1fr; } }
@media (max-width:640px){ .meter{ grid-template-columns:90px 1fr 90px; } }
.finding pre.cmd{ margin:6px 0 0; font-size:12px; }
.finding-actions{ display:flex; gap:6px; margin-top:4px; }
.finding-actions .btn-sm{ padding:3px 8px; font-size:11px; }

/* T9 phones */
.qr{ display:block; margin:6px auto 12px; width:220px; height:220px; image-rendering:pixelated; background:#fff; padding:8px; border-radius:8px; border:1px solid var(--border-subtle); }
.kind-choice{ display:flex; gap:8px; flex-wrap:wrap; }
.kind-choice label{ display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid var(--border-subtle); border-radius:8px; cursor:pointer; font-size:13.5px; color:var(--text-secondary); }
.kind-choice label:has(input:checked){ border-color:var(--accent-500); color:var(--text-primary); }

/* ---- layout pass: section order + small screens ---- */
#devices-card{ margin-bottom:14px; }
.card-head{ flex-wrap:wrap; }
.seg{ flex-shrink:0; }
.stack{ display:grid; gap:14px; min-width:0; }
.dev-head > div:first-child{ min-width:0; flex:1 1 320px; }
.dev-tags{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:10px; }
.dev-tags:empty{ display:none; }

/* device table: wrap the long text columns, drop low-value columns as space runs out */
#devices-card .dtable td.c-sys, #devices-card .dtable td.c-place, #devices-card .dtable td.c-sev{ white-space:normal; min-width:150px; }
@media (max-width:1560px){ #devices-card .c-agent{ display:none; } }
@media (max-width:1280px){ #devices-card .c-sys{ display:none; } }
@media (max-width:1100px){ #devices-card .c-health{ display:none; } }

@media (max-width:640px){
  /* the fixed top bar is 60px tall; the console padding rule above dropped that offset */
  .main.console{ padding-top:76px; }
  .console-head .tools, .console-head .search{ width:100%; }
  .console-head .search{ flex:1; }
  /* device table becomes one card per device: name + status, findings + last seen, location */
  #devices-card .dtable thead{ display:none; }
  #devices-card .dtable tbody tr{ display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"name status" "sev seen" "place place"; gap:4px 12px; padding:12px 14px; border-bottom:1px solid var(--border-subtle); }
  #devices-card .dtable tbody tr:last-child{ border-bottom:0; }
  #devices-card .dtable td{ display:block; padding:0; border:0; min-width:0; white-space:normal; }
  #devices-card .dtable td.c-name{ grid-area:name; } #devices-card .dtable td.c-status{ grid-area:status; justify-self:end; }
  #devices-card .dtable td.c-sev{ grid-area:sev; } #devices-card .dtable td.c-seen{ grid-area:seen; justify-self:end; align-self:end; font-size:12px; }
  #devices-card .dtable td.c-place{ grid-area:place; font-size:12px; color:var(--text-secondary); }
  #devices-card .dtable td.c-place .sub{ display:inline; margin-left:6px; }
  #devices-card .dtable td.c-sys, #devices-card .dtable td.c-health, #devices-card .dtable td.c-agent{ display:none; }
  /* meters: put the detail under the value instead of pushing past the edge */
  .meter{ grid-template-columns:84px minmax(0,1fr) auto; gap:10px; }
  .meter .r small{ display:block; margin-left:0; text-align:right; }
  .meter.text .r{ white-space:normal; }
  .tabs a{ padding:9px 10px; }
  .dev-actions{ width:100%; }
  .kv .v{ overflow-wrap:anywhere; }
}

/* ============================================================
   Design pass (web/mockups): light-first surfaces, green accent, quieter type.
   Works in both themes: everything below reads tokens only.
   ============================================================ */
::selection{ background:var(--accent-wash); }
:focus-visible{ outline:2px solid var(--accent-500); outline-offset:2px; }
.eyebrow{ font-size:11px; font-weight:650; letter-spacing:.08em; color:var(--text-tertiary); }
h1.page-title{ font-size:26px; font-weight:640; letter-spacing:-0.03em; }
.lede{ font-size:14px; max-width:62ch; }

/* sidebar */
.sidebar{ width:var(--sidebar-w); background:var(--bg-surface); border-right:1px solid var(--border-subtle); padding:18px 12px 14px; }
.sidebar .brand{ padding:2px 8px 16px; }
.brand-mark{ width:28px; height:28px; border-radius:7px; background:var(--bg-surface-2); border:1px solid var(--border-default); }
.brand-mark svg{ width:18px; height:13px; color:var(--accent-500); }
.brand-word{ font-size:14.5px; font-weight:650; letter-spacing:-0.02em; }
.acct-label{ display:flex; align-items:center; gap:8px; margin:0 4px 14px; padding:8px 10px; border:1px solid var(--border-subtle); background:var(--bg-canvas); border-radius:var(--radius-sm); font-size:12.5px; font-weight:620; }
.acct-label::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--accent-500); flex-shrink:0; }
#acct-select{ margin:0 4px 14px; width:calc(100% - 8px); height:36px; padding:0 30px 0 10px; font-size:12.5px; font-weight:620; }
.nav{ gap:2px; }
.nav a{ height:34px; padding:0 10px; border-radius:7px; color:var(--text-secondary); font-size:13.5px; font-weight:540; gap:10px; }
.nav a svg{ width:16px; height:16px; opacity:.8; }
.nav a:hover{ background:var(--bg-hover); color:var(--text-primary); }
.nav a.active{ background:var(--accent-wash); color:var(--text-primary); box-shadow:inset 2px 0 0 var(--accent-500); }
.nav .count{ margin-left:auto; min-width:18px; height:18px; padding:0 5px; border-radius:99px; background:var(--coral-500); color:var(--coral-ink); font-size:11px; font-weight:720; display:grid; place-items:center; }
.sidebar-footer{ border-top:1px solid var(--border-subtle); padding-top:12px; }
.fleet-mini{ font-size:12px; padding:0 8px 10px; }
.fleet-mini .status-dot{ width:7px; height:7px; }
.user-row{ padding:6px 8px; gap:8px; }
.user-row:hover{ background:transparent; }
.avatar{ width:28px; height:28px; background:var(--bg-surface-2); color:var(--text-primary); border:1px solid var(--border-default); font-size:12px; }
.user-row .who .name{ font-size:12.5px; } .user-row .who .role{ font-size:11.5px; }
.theme-btn{ display:flex; align-items:center; gap:8px; width:100%; height:32px; margin:0 0 8px; padding:0 8px; border:1px solid var(--border-subtle); background:transparent; color:var(--text-secondary); border-radius:7px; font-size:12.5px; font-weight:560; }
.theme-btn:hover{ background:var(--bg-hover); color:var(--text-primary); }
.theme-btn svg{ width:15px; height:15px; }
.theme-btn .kbd{ margin-left:auto; }
.theme-float{ position:fixed; top:14px; right:14px; z-index:60; width:auto; background:var(--bg-surface); }

/* page header */
.main{ padding:28px 32px 72px; }
.main.console{ padding:28px 32px 72px; }
.topbar-row{ margin-bottom:22px; }
.console-head{ align-items:flex-end; gap:18px; margin-bottom:20px; }
.console-head h1{ font-size:26px; font-weight:640; letter-spacing:-0.03em; margin-top:2px; }
.console-head .meta{ font-size:14px; color:var(--text-secondary); margin-top:4px; }
.kbd{ font-family:var(--font-mono); font-size:11px; border:1px solid var(--border-default); border-bottom-width:2px; border-radius:4px; padding:0 5px; color:var(--text-secondary); line-height:16px; }
.search .kbd{ position:absolute; right:8px; top:50%; transform:translateY(-50%); pointer-events:none; }
.search input{ width:300px; padding-right:58px; }

/* surfaces */
.card, .kpi, .panel{ background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); }
.panel{ padding:18px 20px; margin-bottom:14px; }
.panel-header{ margin-bottom:12px; }
.panel-header h2{ font-size:14px; font-weight:640; }
.card-head{ padding:10px 14px; }
.card-head h2{ font-size:13.5px; letter-spacing:0; text-transform:none; color:var(--text-primary); font-weight:640; }
.card-head .hint{ font-size:12.5px; }
.kpi{ padding:12px 14px; }
.kpi .k{ font-size:12.5px; letter-spacing:0; text-transform:none; color:var(--text-tertiary); }
.kpi .v{ font-size:26px; font-weight:640; letter-spacing:-0.03em; margin:2px 0; }
.kpi .s{ font-size:12px; }
.kpi.clickable:hover{ border-color:var(--border-default); box-shadow:var(--shadow-md); }
.kpis.summary .v{ font-size:20px; }

/* controls */
.btn{ height:34px; padding:0 13px; border-radius:var(--radius-sm); font-size:13.5px; font-weight:600; gap:7px; }
.btn-sm{ height:28px; padding:0 10px; font-size:12.5px; }
.btn-ghost{ padding:0 10px; }
.btn-secondary{ background:var(--bg-surface); border-color:var(--border-default); }
.btn-secondary:hover{ background:var(--bg-hover); border-color:var(--border-strong); }
.finding-actions .btn-sm{ height:24px; padding:0 8px; font-size:11.5px; }
.input, select.input{ background:var(--bg-input); border-color:var(--border-default); border-radius:var(--radius-sm); padding:8px 10px; font-size:13.5px; }
.input:focus, select.input:focus{ border-color:var(--accent-500); box-shadow:0 0 0 3px var(--accent-wash); }
.field label{ font-size:12.5px; letter-spacing:0; font-weight:600; }
.chip{ height:26px; padding:0 10px; font-size:12.5px; border-color:var(--border-subtle); color:var(--text-secondary); }
.chip.on{ background:var(--bg-surface-2); border-color:var(--border-default); color:var(--text-primary); }
.seg{ padding:2px; background:var(--bg-input); border:1px solid var(--border-subtle); border-radius:8px; gap:2px; }
.seg button{ height:26px; padding:0 11px; border-radius:6px; font-size:12.5px; }
.seg button.on{ background:var(--bg-surface); color:var(--text-primary); box-shadow:0 0 0 1px var(--border-subtle), var(--shadow-sm); }
.tabs a{ padding:8px 12px 10px; font-size:13.5px; }
.tabs a.on{ border-bottom-color:var(--accent-500); }

/* status pill */
.status{ height:24px; padding:0 9px; border:1px solid var(--border-default); border-radius:99px; font-size:12px; font-weight:620; gap:6px; background:var(--bg-surface); }
.status-dot{ width:7px; height:7px; }
.status-dot.online{ box-shadow:0 0 0 3px var(--accent-wash); }
.status.online{ color:var(--accent-400); } .status.offline{ color:var(--coral-400); } .status.pending{ color:var(--amber-400); }
.status-dot.offline{ background:var(--coral-500); } .status-dot.pending{ background:var(--amber-500); }

/* severity in the mockup's quieter style */
.sev{ font-family:var(--font-mono); font-size:11px; letter-spacing:0; text-transform:lowercase; font-weight:600; }
.sev::before{ width:7px; height:7px; border-radius:2px; }

/* attention banner */
.attn{ display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; padding:10px 14px; margin-bottom:16px; border-radius:var(--radius-md); background:var(--amber-wash); border:1px solid var(--amber-line); font-size:13px; }
.attn strong{ font-weight:640; }
.attn a{ color:var(--text-primary); border-bottom:1px solid var(--border-strong); }
.attn a:hover{ border-bottom-color:var(--text-primary); }
.attn.ok{ background:var(--accent-wash); border-color:var(--accent-line); }

/* fleet cards */
#devices-card.cards-view{ background:transparent; border-color:transparent; box-shadow:none; overflow:visible; }
#devices-card.cards-view > .card-head{ background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); margin-bottom:12px; }
.fleet-cards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px; }
.dcard{ display:flex; flex-direction:column; gap:10px; min-height:140px; padding:14px; background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); color:inherit; cursor:pointer; position:relative; }
.dcard:hover{ border-color:var(--border-default); box-shadow:var(--shadow-md); }
.dcard:focus-visible{ outline:2px solid var(--accent-500); outline-offset:2px; }
.dcard.hot{ box-shadow:inset 3px 0 0 var(--sev-critical), var(--shadow-sm); }
.dcard.warm{ box-shadow:inset 3px 0 0 var(--sev-medium), var(--shadow-sm); }
.dcard-top{ display:grid; grid-template-columns:12px minmax(0,1fr); gap:10px; align-items:start; }
.dcard-top .status-dot{ margin-top:6px; }
.dcard-name{ font-weight:640; font-size:14.5px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; overflow-wrap:anywhere; }
.dcard-meta{ color:var(--text-tertiary); font-size:12.5px; margin-top:2px; overflow-wrap:anywhere; }
.tag{ font-size:10.5px; letter-spacing:.04em; text-transform:uppercase; color:var(--text-secondary); border:1px solid var(--border-default); border-radius:99px; padding:0 6px; font-weight:620; line-height:16px; }
.dcard-meters{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; }
.dcard-meters em{ display:block; font-style:normal; font-size:11px; color:var(--text-tertiary); font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mtrack{ height:4px; background:var(--bg-surface-2); border-radius:99px; margin-top:4px; overflow:hidden; }
.mtrack i{ display:block; height:100%; background:var(--accent-500); border-radius:99px; }
.mtrack i.warn{ background:var(--sev-medium); } .mtrack i.bad{ background:var(--sev-critical); }
.dcard-line{ font-size:12.5px; color:var(--text-secondary); overflow-wrap:anywhere; }
.dcard-foot{ margin-top:auto; display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:12px; color:var(--text-tertiary); }
.dcard-foot .seen{ font-family:var(--font-mono); font-size:12px; color:var(--text-secondary); font-variant-numeric:tabular-nums; }
.dcard-foot .sev{ max-width:70%; overflow:hidden; text-overflow:ellipsis; }

/* activity rows (dashboard panel + Activity page) */
.alist{ list-style:none; margin:0; padding:0; }
.alist li{ display:grid; grid-template-columns:118px minmax(0,1fr); gap:12px; padding:10px 14px; border-top:1px solid var(--border-subtle); font-size:13.5px; }
.alist li:first-child{ border-top:0; }
.alist time{ font-family:var(--font-mono); font-size:11.5px; color:var(--text-tertiary); padding-top:2px; white-space:nowrap; }
.alist .what{ color:var(--text-primary); }
.alist .what a{ font-weight:620; }
.alist .what a:hover{ text-decoration:underline; text-underline-offset:3px; }
.alist .detail{ color:var(--text-tertiary); font-size:12.5px; margin-top:1px; overflow-wrap:anywhere; }
.alist .dot{ display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:7px; vertical-align:1px; background:var(--sev-info); }
.alist .dot.online{ background:var(--accent-500); } .alist .dot.offline{ background:var(--sev-critical); }
.alist .dot.inventory{ background:var(--sev-medium); border-radius:2px; }

/* device page */
.dev-head{ background:transparent; border:0; box-shadow:none; padding:0; margin-bottom:16px; }
.dev-head .crumb{ font-size:12.5px; margin-bottom:4px; }
.dev-head h1{ font-size:26px; font-weight:640; letter-spacing:-0.03em; margin:2px 0 6px; }
.dev-sub{ font-size:14px; }
.kpis.summary .kpi .k{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
.findings-ok{ color:var(--accent-400); padding:14px; }

/* auth */
.auth-shell::before{ display:none; }
.auth-card{ border-radius:var(--radius-lg); padding:26px 24px; box-shadow:var(--shadow-sm); }
.auth-card h1{ font-size:22px; font-weight:640; letter-spacing:-0.02em; }
.auth-card .brand{ margin-bottom:18px; }
.auth-foot a{ color:var(--text-primary); border-bottom:1px solid var(--border-default); font-weight:560; }
.auth-foot a:hover{ color:var(--accent-400); }

/* toast: dark chip, bottom centre */
.toast{ left:50%; right:auto; bottom:18px; transform:translate(-50%, 12px); background:var(--toast-bg); color:var(--toast-text); border:0; border-radius:8px; padding:9px 14px; font-weight:600; }
.toast.show{ transform:translate(-50%, 0); }
.toast svg{ color:var(--accent-400); }

@media (max-width:960px){
  .mobile-topbar{ background:var(--bg-surface); border-bottom:1px solid var(--border-subtle); }
  .menu-toggle{ border-color:var(--border-default); color:var(--text-primary); }
  .main, .main.console{ padding:76px 14px 56px; }
  .search input{ width:100%; }
  .console-head .tools{ width:100%; }
  .console-head .search{ flex:1; }
}
@media (max-width:640px){
  .fleet-cards{ grid-template-columns:1fr; }
  .alist li{ grid-template-columns:1fr; gap:2px; }
  .attn{ flex-direction:column; align-items:flex-start; }
}

/* add device: type picker as choice cards */
.kind-choice{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.kind-choice label{ padding:11px 12px; border:1px solid var(--border-default); border-radius:10px; color:var(--text-secondary); background:var(--bg-surface); }
.kind-choice label:has(input:checked){ border-color:var(--accent-500); color:var(--text-primary); background:var(--accent-wash); }
.kind-choice input{ accent-color:var(--accent-500); }
@media (max-width:640px){ .kind-choice{ grid-template-columns:1fr; } }

/* ============================================================
   Ops console layer (web/mockups/ops). Reads tokens only, so both themes work.
   - Sections are unboxed: hairlines and spacing, not bordered cards.
   - Glass is for things you touch (controls) and things that float (strip, modal, toast).
   - Severity is a notched, labelled tag; brand red never means "bad".
   ============================================================ */
body{ background:var(--ambient), var(--bg-canvas); background-attachment:fixed; font-family:var(--font-sans); font-size:13.5px; }
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(var(--dots) 1px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-mask-image:linear-gradient(180deg, #000 0, transparent 70%); mask-image:linear-gradient(180deg, #000 0, transparent 70%);
}
body::after{
  content:""; position:fixed; inset:0; z-index:9999; pointer-events:none; opacity:var(--grain); mix-blend-mode:overlay;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection{ background:var(--brand-glow); color:#fff; }
:focus-visible{ outline:2px solid var(--brand-hi); outline-offset:2px; }
.mono, code, pre{ font-family:var(--font-mono); }
@media (prefers-reduced-motion: reduce){ *, *::before, *::after{ animation:none !important; transition:none !important; } }

/* type */
.eyebrow{ font-family:var(--font-mono); font-size:11px; font-weight:600; letter-spacing:.16em; text-transform:uppercase; color:var(--brand-hi); }
.console-head h1, .dev-head h1, h1.page-title{ font-family:var(--font-display); font-weight:800; letter-spacing:-0.03em; }
.console-head h1{ font-size:38px; line-height:1; margin-top:10px; }
.dev-head h1{ font-size:40px; line-height:1.05; gap:14px; }
#dev-name{ font-family:var(--font-display); }
h1.page-title{ font-size:30px; }
.console-head .meta, .dev-sub{ font-size:13.5px; color:var(--text-secondary); margin-top:8px; }
.auth-card h1, .modal-box h3, .empty-state h3{ font-family:var(--font-display); font-weight:800; letter-spacing:-0.02em; }

/* brand */
.brand-mark{ width:30px; height:30px; border-radius:9px; border:0; background:linear-gradient(180deg, #ff3b3b, #c80000); box-shadow:inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(0,0,0,.3), 0 0 18px var(--brand-glow); }
.brand-mark svg{ color:#fff; }
.brand-word{ font-family:var(--font-display); font-weight:800; font-size:15.5px; }

/* ---------- glass controls ---------- */
.btn{
  position:relative; isolation:isolate; overflow:hidden; height:36px; padding:0 16px; border:0; border-radius:var(--radius-pill);
  background:var(--glass); box-shadow:var(--glass-edge); -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  color:var(--text-primary); font-weight:600; transition:transform .12s, box-shadow .2s, background .2s;
}
.btn::before{ content:""; position:absolute; inset:0; z-index:-1; opacity:0; transition:opacity .2s; background:radial-gradient(90px circle at var(--mx, 50%) var(--my, 0%), var(--spec), transparent 60%); }
.btn::after{ content:""; position:absolute; left:10%; right:10%; top:1px; height:45%; z-index:-1; border-radius:999px; background:linear-gradient(180deg, var(--sheen), transparent); }
.btn:hover::before{ opacity:1; }
.btn:active{ transform:scale(.97); }
.btn-sm{ height:30px; padding:0 12px; font-size:12.5px; }
.btn-primary{ background:linear-gradient(180deg, rgba(255,70,70,.94), rgba(205,0,0,.92)); color:var(--brand-ink); box-shadow:inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(80,0,0,.6), 0 0 0 1px rgba(255,60,60,.4), 0 6px 20px -4px var(--brand-glow); }
.btn-primary:hover{ background:linear-gradient(180deg, rgba(255,85,85,.96), rgba(220,0,0,.94)); }
.btn-primary::after{ background:linear-gradient(180deg, rgba(255,255,255,.28), transparent); }
.btn-secondary, .btn-secondary:hover{ background:var(--glass); border:0; }
.btn-ghost{ background:transparent; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; color:var(--text-secondary); }
.btn-ghost::after{ display:none; }
.btn-ghost:hover{ color:var(--text-primary); background:var(--bg-hover); }
.btn-danger{ background:var(--glass); color:var(--coral-400); box-shadow:var(--glass-edge), inset 0 0 0 1px var(--coral-line); }
.btn-danger:hover{ background:var(--coral-wash); }
.btn-danger.solid{ background:linear-gradient(180deg, var(--coral-400), var(--coral-500)); color:var(--coral-ink); }
.btn[disabled]{ opacity:.45; }
.btn[disabled]:active{ transform:none; }
.icon-btn{ border-radius:var(--radius-pill); }

.input, select.input{ background-color:var(--well); border:0; border-radius:var(--radius-sm); box-shadow:var(--well-edge); color:var(--text-primary); }
.input:focus, select.input:focus{ border:0; box-shadow:var(--well-edge), 0 0 0 1px var(--brand), 0 0 0 4px var(--brand-dim); }
select.input option{ background:var(--bg-surface); color:var(--text-primary); }
.kbd{ font-family:var(--font-mono); border:0; border-radius:6px; padding:1px 7px; background:var(--glass); box-shadow:inset 0 1px 0 var(--sheen), inset 0 0 0 1px var(--border-subtle); }
.field label{ font-family:var(--font-mono); font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--text-tertiary); }
.checkbox-row input[type="checkbox"]{ accent-color:var(--brand); }
.kind-choice input{ accent-color:var(--brand); }

/* terminal-style search: "$" prompt, block caret colour */
.search svg{ display:none; }
.search::before{ content:"$"; position:absolute; left:16px; top:50%; transform:translateY(-50%); z-index:1; font:600 13px/1 var(--font-mono); color:var(--brand-hi); pointer-events:none; }
.search input{ height:38px; padding-left:32px; border-radius:var(--radius-pill); font-family:var(--font-mono); font-size:12.5px; caret-color:var(--term-text); width:340px; }
.search .kbd{ right:10px; }

/* glass segmented tracks: filters, view toggle, tabs */
.filters, .seg, .tabs{ display:inline-flex; gap:2px; padding:3px; border:0; border-radius:var(--radius-pill); background:var(--well); box-shadow:var(--well-edge); flex-wrap:wrap; }
.chip, .seg button{ height:28px; padding:0 12px; border:0; border-radius:var(--radius-pill); background:none; color:var(--text-tertiary); font-weight:600; font-size:12.5px; transition:color .15s, background .2s, box-shadow .2s; }
.chip:hover, .seg button:hover{ color:var(--text-primary); border:0; }
.chip.on, .seg button.on{ background:var(--glass); box-shadow:var(--glass-edge); color:var(--text-primary); border:0; }
.seg button{ font-family:var(--font-mono); font-size:10.5px; letter-spacing:.12em; text-transform:uppercase; }
.tabs{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; max-width:100%; margin:6px 0 20px; padding:4px; }
.tabs a{ display:flex; align-items:center; height:32px; padding:0 15px; border:0; border-radius:var(--radius-pill); font-family:var(--font-mono); font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--text-tertiary); }
.tabs a:hover{ color:var(--text-primary); }
.tabs a.on{ color:var(--text-primary); background:var(--glass); box-shadow:var(--glass-edge); border:0; }
.tabs a.on::before{ content:""; width:5px; height:5px; margin-right:8px; background:var(--brand); box-shadow:0 0 6px var(--brand); }

/* iOS-style switch */
.switch{ width:46px; height:26px; }
.switch span{ border:0; border-radius:999px; background:var(--switch-off); box-shadow:var(--well-edge); }
.switch span::after{ top:3px; left:3px; width:20px; height:20px; background:linear-gradient(180deg, #fff, #d4d7dc); box-shadow:0 2px 6px rgba(0,0,0,.45); transition:transform .22s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + span{ background:linear-gradient(180deg, #ff3b3b, #c80000); box-shadow:inset 0 1px 0 rgba(255,255,255,.3), 0 0 14px var(--brand-glow); }
.switch input:checked + span::after{ transform:translateX(20px); background:linear-gradient(180deg, #fff, #d4d7dc); }
.switch input:focus-visible + span{ outline-color:var(--brand-hi); }

/* ---------- status, severity, tags ---------- */
.status{ height:24px; padding:0 11px; border:0; border-radius:var(--radius-pill); background:var(--bg-hover); box-shadow:inset 0 0 0 1px var(--border-default); font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
.status.online{ background:var(--accent-wash); box-shadow:inset 0 0 0 1px var(--accent-line); }
.status.offline{ background:var(--coral-wash); box-shadow:inset 0 0 0 1px var(--coral-line); }
.status.pending{ background:var(--amber-wash); box-shadow:inset 0 0 0 1px var(--amber-line); }
.status-dot.online{ box-shadow:0 0 0 3px var(--accent-wash), 0 0 10px var(--accent-glow); }
.status-dot.offline{ box-shadow:0 0 0 3px var(--coral-wash), 0 0 10px var(--coral-glow); animation:nc-blink 1.6s steps(2, start) infinite; }
@keyframes nc-blink{ to{ opacity:.35; } }

.sev{
  display:inline-flex; align-items:center; justify-content:center; min-width:46px; height:20px; padding:0 8px 0 11px;
  clip-path:polygon(6px 0, 100% 0, 100% 100%, 6px 100%, 0 50%);
  font:700 10.5px/1 var(--font-mono); letter-spacing:.1em; text-transform:uppercase;
  color:var(--text-secondary); background:var(--bg-hover);
}
.sev::before{ display:none; }
.sev.critical{ color:#fff; background:var(--sev-critical); }
.sev.high{ color:#1a0605; background:var(--sev-high); }
.sev.medium{ color:#1c1400; background:var(--sev-medium); }
.sev.low{ color:var(--sev-low); background:var(--info-wash); }
.sev.info{ color:var(--sev-info); background:var(--bg-hover); }
:root[data-theme="light"] .sev.high, :root[data-theme="light"] .sev.medium{ color:#fff; }
.sev-count{ font-family:var(--font-mono); border-radius:var(--radius-pill); }
.tabs a .sev-count{ background:var(--sev-high); color:#1a0605; }
.tag{ border:0; border-radius:5px; padding:0 7px; line-height:19px; font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:0; text-transform:none; color:var(--text-secondary); background:var(--bg-hover); }
.tag::before{ content:"#"; color:var(--text-tertiary); margin-right:1px; }

/* ---------- chrome ---------- */
.sidebar{ background:transparent; border-right:1px solid var(--border-subtle); padding:18px 12px 14px; }
.sidebar .brand{ padding:6px 8px 20px; }
.acct-label{ border:0; background:var(--well); box-shadow:var(--well-edge); border-radius:var(--radius-sm); font-family:var(--font-mono); font-size:12px; }
.acct-label::before{ background:var(--accent-500); box-shadow:0 0 8px var(--accent-glow); }
#acct-select{ font-family:var(--font-mono); }
.nav a{ height:38px; padding:0 12px; border-radius:12px; font-weight:600; transition:background .15s, color .15s; }
.nav a:hover{ background:var(--bg-hover); }
.nav a.active{ background:var(--glass); box-shadow:var(--glass-edge); color:var(--text-primary); }
.nav a.active svg{ color:var(--brand-hi); opacity:1; filter:drop-shadow(0 0 6px var(--brand-glow)); }
.nav .count{ background:var(--coral-500); color:var(--coral-ink); box-shadow:0 0 10px var(--coral-glow); font-family:var(--font-mono); }
.sidebar-footer{ border-top:1px solid var(--border-subtle); }
.fleet-mini{ font-family:var(--font-mono); font-size:11.5px; }
.theme-btn{ height:34px; border:0; border-radius:var(--radius-pill); background:var(--glass); box-shadow:var(--glass-edge); color:var(--text-secondary); padding:0 14px; }
.theme-btn:hover{ color:var(--text-primary); background:var(--glass); }
.avatar{ border:0; background:var(--glass); box-shadow:inset 0 1px 0 var(--sheen), inset 0 0 0 1px var(--border-default); font-family:var(--font-display); font-weight:800; }
.user-row .logout{ font-family:var(--font-mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase; border-radius:var(--radius-pill); padding:5px 10px; }
.user-row .logout:hover{ color:var(--brand-hi); background:var(--brand-dim); }

/* floating status strip */
.ops-strip{
  position:sticky; top:10px; z-index:30; display:flex; align-items:stretch; height:50px; margin:0 0 22px; border-radius:16px;
  background:var(--glass-bar); -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur);
  box-shadow:var(--glass-edge), 0 18px 40px -18px rgba(0,0,0,.6);
}
.ops-cell{ position:relative; display:flex; flex-direction:column; justify-content:center; gap:4px; padding:0 18px; white-space:nowrap; min-width:0; }
.ops-cell + .ops-cell::before{ content:""; position:absolute; left:0; top:13px; bottom:13px; width:1px; background:var(--border-default); }
.ops-spacer + .ops-cell::before{ display:none; }
.ops-cell i{ font:600 9.5px/1 var(--font-mono); letter-spacing:.16em; text-transform:uppercase; color:var(--text-tertiary); font-style:normal; }
.ops-cell b{ font:600 12.5px/1 var(--font-mono); overflow:hidden; text-overflow:ellipsis; }
.ops-spacer{ flex:1; }
.posture{ letter-spacing:.12em; text-transform:uppercase; }
.posture.elevated{ color:var(--coral-500); text-shadow:0 0 12px var(--coral-glow); }
.posture.guarded{ color:var(--amber-500); }
.posture.nominal{ color:var(--accent-400); }

.main, .main.console{ padding:10px 32px 72px; }
.main:not(.console){ max-width:1240px; }

/* ---------- sections: unboxed ---------- */
.card, .panel{ background:transparent; border:0; box-shadow:none; border-radius:0; overflow:visible; }
.panel{ padding:0 0 6px; margin-bottom:28px; }
.card-head, .panel-header{ padding:0 4px 10px; border-bottom:1px solid var(--border-default); min-height:38px; }
.card-head h2, .panel-header h2{ display:flex; align-items:center; gap:10px; font:700 12px/1 var(--font-mono); letter-spacing:.16em; text-transform:uppercase; color:var(--text-primary); }
.card-head h2::before, .panel-header h2::before{ content:""; width:6px; height:6px; flex:none; background:var(--brand); box-shadow:0 0 8px var(--brand); }
.card-head .hint, .panel-header .hint{ font-family:var(--font-mono); font-size:11.5px; }
a.hint:hover{ color:var(--brand-hi); }
.card-foot{ border-top:1px dashed var(--border-subtle); }
.grid-2, .grid-2.even{ gap:36px; margin-bottom:30px; }
#devices-card{ margin-bottom:34px; }
#devices-card.cards-view > .card-head{ background:transparent; border:0; border-bottom:1px solid var(--border-default); border-radius:0; box-shadow:none; margin-bottom:16px; }
.panel-row{ border-top:1px dashed var(--border-subtle); }
.danger-panel, .danger-zone{ border:0; }
.danger-zone .card-head h2::before, .danger-panel h2::before{ background:var(--coral-500); box-shadow:0 0 8px var(--coral-500); }
.empty, .findings-ok{ font-family:var(--font-mono); font-size:12.5px; }
.empty::before{ content:"// "; color:var(--brand); }
.findings-ok::before{ content:"//"; color:var(--accent-400); }

/* callouts + attention banner: lit glass slabs */
.callout{ border:0; border-radius:var(--radius-md); background:var(--tile); box-shadow:var(--tile-edge), inset 3px 0 0 var(--border-strong); }
.callout.amber{ background:radial-gradient(400px 120px at 0% 50%, var(--amber-wash), transparent 70%), var(--tile); box-shadow:var(--tile-edge), inset 3px 0 0 var(--amber-500); }
.callout.coral{ background:radial-gradient(400px 120px at 0% 50%, var(--coral-wash), transparent 70%), var(--tile); box-shadow:var(--tile-edge), inset 3px 0 0 var(--coral-500); }
.callout.accent{ background:radial-gradient(400px 120px at 0% 50%, var(--accent-wash), transparent 70%), var(--tile); box-shadow:var(--tile-edge), inset 3px 0 0 var(--accent-500); }
.callout .body a, .auth-foot a{ color:var(--brand-hi); }
.attn{
  gap:8px 10px; padding:14px 18px; margin-bottom:24px; border:0; border-radius:var(--radius-lg);
  background:radial-gradient(460px 140px at 0% 50%, var(--coral-wash), transparent 70%), var(--tile);
  -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur); box-shadow:var(--tile-edge);
}
.attn strong{ font:700 11px/1 var(--font-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--coral-500); margin-right:6px; }
.attn a{ display:inline-flex; align-items:center; padding:5px 12px; border:0; border-radius:var(--radius-pill); background:var(--well); box-shadow:var(--well-edge); font-size:12.5px; transition:box-shadow .15s; }
.attn a:hover{ box-shadow:var(--well-edge), 0 0 0 1px var(--border-strong); }

/* ---------- KPIs: an instrument strip, not cards ---------- */
.kpis, .kpis.four{ gap:0; margin-bottom:30px; }
.kpi, .kpi.clickable{ position:relative; background:transparent; border:0; box-shadow:none; border-radius:0; padding:4px 24px 6px; }
.kpi:first-child{ padding-left:4px; }
.kpi + .kpi::before{ content:""; position:absolute; left:0; top:6px; bottom:6px; width:1px; background:linear-gradient(180deg, transparent, var(--border-default) 20%, var(--border-default) 80%, transparent); }
.kpi.clickable:hover{ background:radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 70%); box-shadow:none; }
.kpi .k, .kpis.summary .kpi .k{ font:600 10.5px/1 var(--font-mono); letter-spacing:.14em; text-transform:uppercase; color:var(--text-tertiary); }
.kpi .v{ margin:12px 0 8px; font:800 44px/.95 var(--font-display); letter-spacing:-0.04em; font-variant-numeric:tabular-nums; }
.kpis.summary .v{ font-size:28px; letter-spacing:-0.02em; }
.kpi .s{ font-size:12px; color:var(--text-tertiary); }
.kpi .v.bad, .kpi.bad .v{ color:var(--coral-500); text-shadow:0 0 28px var(--coral-glow); }
.kpi .v.good, .kpi.good .v{ color:var(--accent-400); }
.kpi .v.warn, .kpi.warn .v{ color:var(--amber-500); }

/* ---------- fleet cards: frosted tiles, no borders ---------- */
.fleet-cards{ gap:14px; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); }
.dcard{ border:0; border-radius:var(--radius-lg); padding:16px; gap:12px; background:var(--tile); box-shadow:var(--tile-edge); overflow:hidden; transition:transform .15s; }
.dcard::before{ content:""; position:absolute; inset:0; pointer-events:none; opacity:0; transition:opacity .2s; background:radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 65%); }
.dcard:hover{ border:0; box-shadow:var(--tile-edge), 0 0 0 1px var(--border-default); transform:translateY(-1px); }
.dcard:hover::before{ opacity:1; }
.dcard.hot{ background:radial-gradient(260px 120px at 100% 0%, var(--coral-wash), transparent 70%), var(--tile); box-shadow:var(--tile-edge); }
.dcard.hot::after, .dcard.warm::after{ content:""; position:absolute; left:0; top:16px; height:28px; width:2px; border-radius:2px; background:var(--coral-500); box-shadow:0 0 10px var(--coral-500); }
.dcard.warm{ box-shadow:var(--tile-edge); }
.dcard.warm::after{ background:var(--amber-500); box-shadow:0 0 10px var(--amber-glow); }
.dcard-name{ font-family:var(--font-mono); font-weight:700; font-size:14.5px; }
.dcard-meta{ font-size:12px; }
.dcard-meters{ display:grid; grid-template-columns:1fr; gap:3px; padding:10px 12px; border-radius:10px; background:var(--well); }
.dcard-line{ font-family:var(--font-mono); font-size:12px; }
.dcard-foot .seen{ font-family:var(--font-mono); }

/* htop-style block meter */
.m{ display:grid; grid-template-columns:34px auto minmax(34px, 1fr); gap:8px; align-items:center; }
.m em{ font:600 9.5px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--text-tertiary); font-style:normal; }
.m b{ font:600 11px/1 var(--font-mono); color:var(--text-secondary); }
.blk{ font:400 10px/1 var(--font-mono); letter-spacing:-0.5px; color:var(--blk-empty); white-space:pre; }
.blk i{ font-style:normal; color:var(--accent-400); }
.m.warn .blk i, .m.warn b{ color:var(--amber-500); }
.m.bad .blk i, .m.bad b{ color:var(--coral-500); }
.m.bad .blk i{ text-shadow:0 0 8px var(--coral-glow); }

/* ---------- tables ---------- */
.dtable th{ background:transparent; font:600 10px/1 var(--font-mono); letter-spacing:.16em; padding:12px 12px 10px; border-bottom:1px solid var(--border-subtle); }
.dtable th.sortable:hover{ color:var(--text-primary); }
.dtable th.sorted{ color:var(--brand-hi); }
.dtable td{ border-bottom:1px dashed var(--border-subtle); }
.dtable tbody tr.link{ position:relative; }
.dtable tbody tr.link:hover td{ background:var(--bg-hover); }
.dtable .name{ font-family:var(--font-mono); font-weight:700; }
.mbar i{ height:6px; border-radius:2px; background:var(--well); }
.mbar i b{ background:var(--accent-500); border-radius:2px; }
.mbar.bad i b{ box-shadow:0 0 8px var(--coral-glow); }

/* ---------- findings ---------- */
.finding{ position:relative; padding:12px 4px; border-bottom:1px dashed var(--border-subtle); }
.finding.link::before{ content:""; position:absolute; inset:0; pointer-events:none; opacity:0; transition:opacity .2s; background:radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 65%); }
.finding.link:hover{ background:transparent; }
.finding.link:hover::before{ opacity:1; }
.finding .t{ font-weight:600; }

/* ---------- event logs ---------- */
.alist li, .feed li{ border-top:1px dashed var(--border-subtle); padding:10px 4px; }
.alist time, .feed .when{ font-family:var(--font-mono); }
.alist .dot, .feed .dot{ width:auto; height:auto; margin:0 8px 0 0; background:none !important; border-radius:0; font:700 10px/1 var(--font-mono); letter-spacing:.08em; vertical-align:1px; color:var(--text-tertiary); }
.alist .dot::before, .feed .dot::before{ content:"[EVT]"; }
.alist .dot.online::before, .feed .dot.online::before{ content:"[UP]"; }
.alist .dot.offline::before, .feed .dot.offline::before{ content:"[DOWN]"; }
.alist .dot.inventory::before, .feed .dot.inventory::before{ content:"[INVENT]"; }
.alist .dot.online, .feed .dot.online{ color:var(--accent-400); }
.alist .dot.offline, .feed .dot.offline{ color:var(--coral-500); }
.alist .dot.inventory, .feed .dot.inventory{ color:var(--info-400); }
.alist .what a:hover{ color:var(--brand-hi); text-decoration:none; }
.activity-icon{ border:0; background:var(--well); box-shadow:var(--well-edge); }

/* ---------- device page ---------- */
.dev-head{ margin-bottom:22px; padding-bottom:18px; border-bottom:1px solid var(--border-default); }
.dev-head .crumb{ font:600 11.5px/1 var(--font-mono); letter-spacing:.1em; text-transform:uppercase; margin-bottom:10px; }
.dev-head .crumb a:hover{ color:var(--brand-hi); }
.dev-head h1 .status, .dev-head h1 .sev{ align-self:center; }
.dev-actions{ gap:8px; }
.meters{ padding:8px 4px 10px; }
.meter{ grid-template-columns:120px 1fr 150px; border-bottom:1px dashed var(--border-subtle); padding:9px 0; }
.meter .l{ font-family:var(--font-mono); font-size:12px; }
.meter .track{ height:8px; border-radius:2px; background:var(--well); position:relative; }
.meter .track b{ border-radius:2px; background:var(--accent-500); }
.meter .track::after{ content:""; position:absolute; inset:0; background:repeating-linear-gradient(90deg, transparent 0 4px, var(--bg-canvas) 4px 6px); opacity:.85; }
.meter.warn .track b{ background:var(--amber-500); }
.meter.bad .track b{ background:var(--coral-500); box-shadow:0 0 12px var(--coral-500); }
.meter .r{ font-family:var(--font-mono); font-size:12.5px; }
.meter.bad .r{ color:var(--coral-500); } .meter.warn .r{ color:var(--amber-500); }
.htile{ background:var(--tile); box-shadow:var(--tile-edge); border-radius:var(--radius-md); }
.htile .k{ font-family:var(--font-mono); }
.htile .v{ font-family:var(--font-display); font-weight:800; }
.kv > div{ padding:8px 4px; border-bottom:1px dashed var(--border-subtle); }
.kv .k{ font:600 10.5px/1.7 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; }
.group-h{ font-family:var(--font-mono); letter-spacing:.16em; color:var(--brand-hi); padding-left:4px; }
.card .map, .map{ border-radius:var(--radius-md); border:0; box-shadow:var(--tile-edge); }
.cfg-row{ border-top:1px dashed var(--border-subtle); }
.cfg-row .name{ font-weight:700; }
.cfg-row.dirty .name::after{ font-family:var(--font-mono); }
.card #config-form, .card #disk-rows{ padding-left:4px; padding-right:4px; }
.leaflet-bar a{ background:var(--bg-surface) !important; }

/* terminals: commands and pairing codes stay dark in both themes */
pre.cmd{ background:var(--term-bg); color:var(--term-text); border:0; border-radius:12px; box-shadow:inset 0 0 0 1px var(--border-default); }
.handoff-card{ border:0; border-radius:var(--radius-lg); background:var(--tile); box-shadow:var(--tile-edge); }
.handoff-code{ display:inline-block; padding:14px 22px; border-radius:14px; background:var(--term-bg); color:var(--term-text); text-shadow:0 0 12px rgba(200,247,220,.4); box-shadow:inset 0 0 0 1px rgba(200,247,220,.15), 0 0 40px -10px var(--accent-glow); }
.handoff-link{ color:var(--brand-hi); }
.seed-tile, .recover-grid .input{ border:0; background:var(--well); box-shadow:var(--well-edge); }
.qr{ border:0; box-shadow:var(--tile-edge); }
.kind-choice label{ border:0; border-radius:var(--radius-md); background:var(--tile); box-shadow:var(--tile-edge); }
.kind-choice label:has(input:checked){ background:var(--tile); box-shadow:var(--tile-edge), 0 0 0 1px var(--brand), 0 0 18px -4px var(--brand-glow); }
.spinner{ border-color:var(--brand-dim); border-top-color:var(--brand); }
.setup-steps li.active::before{ border-color:var(--brand-dim); border-top-color:var(--brand); }

/* ---------- floating layers ---------- */
.modal-overlay{ -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.modal-box{ border:0; border-radius:20px; background:var(--glass-bar); -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur); box-shadow:var(--glass-edge), var(--shadow-modal); }
.toast{ border:0; border-radius:var(--radius-pill); padding:11px 18px; background:var(--toast-bg); color:var(--toast-text); -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur); box-shadow:var(--glass-edge), 0 0 0 1px rgba(238,0,0,.25); font-family:var(--font-mono); font-size:12.5px; font-weight:500; }
.toast svg{ color:var(--brand-hi); }
.theme-float{ background:var(--glass); }

/* auth pages: one frosted card on the lit background */
.auth-card{ border:0; border-radius:22px; background:var(--glass-bar); -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur); box-shadow:var(--glass-edge), var(--shadow-modal); }
.auth-foot{ border-top:1px dashed var(--border-subtle); }

/* ---------- responsive ---------- */
@media (max-width:1180px){
  .kpis.four{ row-gap:22px; }
  .kpis.four .kpi:nth-child(3){ padding-left:4px; }
  .kpis.four .kpi:nth-child(3)::before{ display:none; }
}
@media (max-width:960px){
  .ops-strip{ display:none; }
  .mobile-topbar{ background:var(--glass-bar); -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur); border:0; box-shadow:var(--glass-edge); }
  .menu-toggle{ border:0; border-radius:var(--radius-pill); background:var(--glass); box-shadow:var(--glass-edge); }
  .sidebar{ background:var(--glass-bar); -webkit-backdrop-filter:var(--glass-blur); backdrop-filter:var(--glass-blur); }
  .main, .main.console{ padding:80px 16px 56px; }
  .search input{ width:100%; }
  .console-head h1{ font-size:30px; }
  .dev-head h1{ font-size:30px; }
}
@media (max-width:640px){
  .main.console{ padding-top:80px; }
  .kpi, .kpi.clickable{ padding:4px 12px 6px; }
  .kpi:nth-child(odd){ padding-left:4px; }
  .kpi .v{ font-size:34px; }
  .kpis.summary .v{ font-size:22px; }
  .filters{ border-radius:16px; }
  .tabs{ border-radius:16px; }
  .meter{ grid-template-columns:84px minmax(0,1fr) auto; }
  #devices-card .dtable tbody tr{ border-bottom:1px dashed var(--border-subtle); }
}
