/* Fonts: self-hosted (C-36, 14 Nov 2026). No Google Fonts / third-party requests. All SIL OFL 1.1, see gauges/fonts/OFL-LICENSES.txt.
   Relative URLs resolve against this stylesheet ({{P}}/static/app.css -> {{P}}/static/gauges/fonts/). Latin subset; other scripts fall back to system fonts. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("gauges/fonts/plex-sans-400.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("gauges/fonts/plex-sans-500.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("gauges/fonts/plex-sans-600.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("gauges/fonts/plex-sans-700.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("gauges/fonts/plex-mono-500.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("gauges/fonts/plex-mono-600.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("gauges/fonts/archivo-var.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Orbitron"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("gauges/fonts/orbitron-var.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: dark;
  --shell: #040405;
  --panel: #0e1013;
  --panel-alt: #121418;
  --ink: #f2f4f7;
  --muted: #a9afb8;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --accent: #ff2a2f;
  --live: #3dff73;
  --temp: #ffc81a;
  --warn: #FF8A3D;
  --glow-a: rgba(212,0,0,0.16);
  --glow-b: rgba(63,224,168,0.07);
  --nav-bg: rgba(255,255,255,0.03);
  --card-shine: rgba(255,255,255,0.07);
  --inset: rgba(255,255,255,0.08);
  --shadow: 0 30px 80px rgba(0,0,0,0.55);
  --grid: rgba(255,255,255,0.015);
  --input-bg: rgba(0,0,0,0.45);
  --soft: rgba(255,255,255,0.03);
  --soft2: rgba(255,255,255,0.04);
  --soft3: rgba(255,255,255,0.06);
  --chip-bg: rgba(0,0,0,0.25);
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mark: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --num: "Orbitron", "IBM Plex Mono", ui-monospace, monospace;   /* squarer display face for readouts (C-36) */
}
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] {
  color-scheme: light;
  --shell: #F4F6FA;
  --panel: #FFFFFF;
  --panel-alt: #EEF1F7;
  --ink: #0B1B33;
  --muted: #4c5c72;
  --line: rgba(11,27,51,0.08);
  --line-strong: rgba(11,27,51,0.16);
  --accent: #C40000;
  --live: #0F9F6E;
  --temp: #B8860B;
  --warn: #C65A1A;
  --glow-a: rgba(11,27,51,0.06);
  --glow-b: rgba(196,0,0,0.05);
  --nav-bg: rgba(11,27,51,0.03);
  --card-shine: rgba(255,255,255,0.95);
  --inset: rgba(255,255,255,0.95);
  --shadow: 0 24px 60px rgba(11,27,51,0.10);
  --grid: rgba(11,27,51,0.035);
  --input-bg: #FFFFFF;
  --soft: rgba(11,27,51,0.03);
  --soft2: rgba(11,27,51,0.04);
  --soft3: rgba(11,27,51,0.06);
  --chip-bg: rgba(11,27,51,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--shell);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.shell {
  min-height: 100%;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 70% -10%, var(--glow-a), transparent 55%),
    radial-gradient(700px 360px at 10% 110%, var(--glow-b), transparent 50%),
    var(--shell);
}
.shell::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .35;
  pointer-events: none;
}


/* —— Theme toggle —— */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 650; letter-spacing: 0.04em; cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); background: var(--soft); }
.theme-toggle .dot {
  width: 7px; height: 7px; border-radius: 99px; background: var(--accent);
  box-shadow: 0 0 10px rgba(212,0,0,0.8);
}

/* —— Sign-in —— */
.signin-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
}
.signin-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: 18px;
  padding: 28px 26px 24px;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02) 40%, rgba(0,0,0,0.35)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 0 1px rgba(212,0,0,0.08);
}
.signin-card::before {
  content: "";
  position: absolute; top: 0; left: 28px; right: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,0,0,0.7), transparent);
}
.brand-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.mark {
  font-family: var(--mark);
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: 14px;
}
.mark-sub {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.14em;
}
.pip {
  width: 8px; height: 8px; border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(212,0,0,0.9);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { box-shadow: 0 0 10px rgba(212,0,0,0.55); opacity: 1; }
  50% { box-shadow: 0 0 18px rgba(212,0,0,1); opacity: 0.85; }
}
.signin-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
}
.signin-sub {
  font-size: 13px; color: var(--muted); margin-top: 8px; margin-bottom: 22px; line-height: 1.45;
}
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; margin-bottom: 7px; text-transform: uppercase;
}
.field input {
  width: 100%; height: 44px; border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  padding: 0 14px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  border-color: rgba(212,0,0,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 3px rgba(212,0,0,0.12);
}
.btn-primary {
  width: 100%; margin-top: 10px; border: none; cursor: pointer;
  background: linear-gradient(180deg, #EE1A1A, #D40000);
  color: #fff; padding: 13px 14px; border-radius: 11px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.05em;
  box-shadow: 0 10px 28px rgba(212,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .12s, filter .12s;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.signin-foot {
  margin-top: 18px; font-size: 11px; color: var(--muted);
  text-align: center; letter-spacing: 0.03em;
}
.err {
  display: none; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,138,61,0.12); border: 1px solid rgba(255,138,61,0.35);
  color: #FFB07A; font-size: 12px;
}
.err.show { display: block; }
.hint {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--soft); border: 1px solid var(--line);
  font-size: 11px; color: var(--muted); line-height: 1.5;
}
.hint code { font-family: var(--mono); color: var(--ink); font-size: 11px; }

/* —— Console layout —— */
.layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 100vh;
  position: relative;
}
.aside {
  position: relative;
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--panel);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.aside .mark { padding: 0 8px; font-size: 13px; }
.aside .mark-sub { padding: 0 8px; margin-bottom: 18px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13px; color: var(--muted); cursor: pointer;
  border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
  background: transparent; width: 100%; text-align: left;
}
.nav-item:hover { color: var(--ink); background: var(--soft); }
.nav-item.active {
  color: var(--ink); font-weight: 650;
  background: var(--soft2);
  border-color: var(--line);
  box-shadow: inset 0 0 0 1px rgba(212,0,0,0.25);
}
.nav-item .dot {
  width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: .35;
}
.nav-item.active .dot { background: var(--accent); opacity: 1; box-shadow: 0 0 8px rgba(212,0,0,0.7); }
.nav-item .soon {
  margin-left: auto; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); opacity: .7;
}
.aside-foot {
  margin-top: auto; padding: 12px 8px 0;
  font-size: 10px; color: var(--muted); line-height: 1.5;
}
.main { padding: 18px 20px 28px; position: relative; display: flex; flex-direction: column; gap: 14px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)), var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.topbar h1 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.topbar p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.link-status {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--muted); letter-spacing: 0.08em;
}
.chip {
  font-size: 12px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--chip-bg);
}
.btn-ghost {
  border: 1px solid var(--line); background: var(--soft);
  padding: 8px 12px; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.btn-ghost:hover { background: var(--soft3); }
.btn-accent {
  border: none; cursor: pointer;
  background: linear-gradient(180deg, #EE1A1A, #D40000);
  color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(212,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-accent.muted-cta {
  background: var(--soft2);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric {
  position: relative; overflow: hidden; border-radius: 14px;
  padding: 14px 14px 12px;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 38%, rgba(0,0,0,0.25) 100%),
    var(--panel-alt);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 28px rgba(0,0,0,0.35);
}
.metric::before {
  content: ""; position: absolute; top: 0; left: 18px; right: 18px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,0,0,0.55), transparent); opacity: .85;
}
.metric::after {
  content: ""; position: absolute; width: 90px; height: 90px; right: -24px; top: -30px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(212,0,0,0.18), transparent 70%);
  pointer-events: none;
}
.metric .lbl {
  font-size: 10px; color: var(--muted); letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 600;
}
.metric .val {
  margin-top: 8px; font-size: 28px; font-weight: 750;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}
.metric .hint { margin-top: 4px; font-size: 11px; color: var(--muted); }

.panel {
  border-radius: 16px; padding: 14px;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    var(--panel-alt);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 18px 40px rgba(0,0,0,0.35);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 4px 12px;
}
.panel-head .t {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.panel-head .s { font-size: 10px; color: var(--muted); }

.route {
  display: grid; grid-template-columns: 4px 72px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 12px 12px 10px; border-radius: 12px; margin-bottom: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)), var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.route:last-child { margin-bottom: 0; }
.rail { width: 4px; align-self: stretch; border-radius: 99px; }
.rail.live { background: linear-gradient(180deg, var(--live), transparent); }
.rail.temp { background: linear-gradient(180deg, var(--temp), transparent); }
.ext-lbl { font-size: 9px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }
.ext-num { font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.route-title { font-size: 13px; font-weight: 650; }
.route-detail { font-size: 11px; color: var(--muted); margin-top: 2px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
}
.badge.live { background: rgba(63,224,168,0.12); color: var(--live); }
.badge.temp { background: rgba(240,193,74,0.12); color: var(--temp); }
.badge .bdot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.route-ops { display: flex; align-items: center; gap: 10px; }
.btn-quiet {
  font-size: 11px; font-weight: 700; color: var(--ink);
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--soft); cursor: pointer;
}
.btn-quiet:hover { background: var(--soft3); }
.btn-quiet:disabled { opacity: .45; cursor: not-allowed; }

.view { display: none; flex-direction: column; gap: 14px; }
.view.active { display: flex; }

.tod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tod-card {
  position: relative; overflow: hidden; border-radius: 14px; padding: 16px;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
}
.tod-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.tod-card .when { font-size: 11px; color: var(--muted); margin-bottom: 12px; font-family: var(--mono); }
.tod-card .flow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px;
}
.pill {
  padding: 5px 10px; border-radius: 8px;
  background: var(--soft2); border: 1px solid var(--line);
}
.pill.albert { border-color: rgba(63,224,168,0.35); color: var(--live); }
.pill.vm { border-color: rgba(240,193,74,0.35); color: var(--temp); }
.arrow { color: var(--muted); font-size: 11px; }

.placeholder {
  border-radius: 16px; padding: 36px 24px; text-align: center;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    var(--panel-alt);
  border: 1px dashed rgba(255,255,255,0.12);
}
.placeholder h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.placeholder p { font-size: 13px; color: var(--muted); max-width: 420px; margin: 0 auto; line-height: 1.5; }

.modal-bg {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-bg.show { display: flex; }
.modal {
  width: 100%; max-width: 420px; border-radius: 16px; padding: 22px;
  background: linear-gradient(165deg, rgba(255,255,255,0.07), var(--panel));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}
.modal h3 { font-size: 16px; margin-bottom: 8px; }
.modal p { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 16px; }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; }

.foot-note {
  font-size: 11px; color: var(--muted); padding: 4px 2px;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .aside { flex-direction: row; flex-wrap: wrap; gap: 6px; border-right: none; border-bottom: 1px solid var(--line); }
  .aside-foot { display: none; }
  .metrics, .tod-grid { grid-template-columns: 1fr; }
}

/* Light theme: dial/panel shine without dark washes */
html[data-theme="light"] .signin-card,
html[data-theme="light"] .metric,
html[data-theme="light"] .panel,
html[data-theme="light"] .tod-card,
html[data-theme="light"] .placeholder,
html[data-theme="light"] .modal,
html[data-theme="light"] .topbar,
html[data-theme="light"] .route {
  box-shadow: inset 0 1px 0 var(--inset), 0 12px 32px rgba(11,27,51,0.08);
}
html[data-theme="light"] .aside {
  background: linear-gradient(180deg, var(--nav-bg), transparent), var(--panel);
}
html[data-theme="light"] .field input {
  background: var(--input-bg);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(11,27,51,0.04);
}
html[data-theme="light"] .shell::before { opacity: .55; }
html[data-theme="light"] .placeholder {
  border-color: rgba(11,27,51,0.14);
}
html[data-theme="light"] .modal-bg {
  background: rgba(11,27,51,0.35);
}



/* —— Owner platform cockpit —— */
.metrics-4 { grid-template-columns: repeat(4, 1fr); }
.owner-banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--soft2); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.45;
}
.owner-pill {
  flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid rgba(212,0,0,0.35); background: rgba(212,0,0,0.08);
}
.owner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tenant-list { display: flex; flex-direction: column; gap: 8px; }
.tenant {
  display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 12px 12px 10px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)), var(--panel);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.tenant-name { font-size: 13px; font-weight: 650; }
.tenant-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.feed { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.feed li {
  display: grid; grid-template-columns: 48px 1fr; gap: 10px;
  padding: 10px 10px; border-radius: 10px;
  background: var(--soft); border: 1px solid var(--line);
  font-size: 12px; line-height: 1.4;
}
.feed-time { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.feed-body { color: var(--ink); }
.feed-body strong { font-weight: 700; }
.alert-panel { border-color: rgba(240,193,74,0.28); }
.alert-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border-radius: 12px;
  background: rgba(240,193,74,0.06); border: 1px solid rgba(240,193,74,0.22);
}
.alert-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--temp);
  background: rgba(240,193,74,0.12); border: 1px solid rgba(240,193,74,0.3);
}
.alert-title { font-size: 13px; font-weight: 650; }
.alert-body { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.approval {
  display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 12px 12px 10px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)), var(--panel);
  border: 1px solid var(--line);
}
.warn-rail { width: 4px; align-self: stretch; border-radius: 99px; background: linear-gradient(180deg, var(--warn), transparent); }
.approval-title { font-size: 13px; font-weight: 650; }
.approval-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.approval-ops { display: flex; gap: 8px; align-items: center; }
.approval-ops .btn-accent { padding: 8px 12px; font-size: 11px; }
.toast-host {
  position: fixed; bottom: 22px; right: 22px; z-index: 80;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: none;
  min-width: 240px; max-width: 360px;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(165deg, rgba(255,255,255,0.08), var(--panel));
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  font-size: 12px; font-weight: 600; color: var(--ink);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .metrics-4, .owner-grid { grid-template-columns: 1fr; }
  .approval { grid-template-columns: 4px 1fr; }
  .approval-ops { grid-column: 2; }
}

html[data-theme="light"] .tenant,
html[data-theme="light"] .approval,
html[data-theme="light"] .toast {
  box-shadow: inset 0 1px 0 var(--inset), 0 12px 32px rgba(11,27,51,0.08);
}
html[data-theme="light"] .owner-pill {
  background: rgba(196,0,0,0.06);
}
html[data-theme="light"] .alert-row {
  background: rgba(184,134,11,0.06);
  border-color: rgba(184,134,11,0.22);
}

/* slice 1: tenant form + live lists */
.tenant-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; padding: 4px 0; }
.field select { width: 100%; height: 44px; border-radius: 11px; border: 1px solid var(--line); background: var(--input-bg); color: var(--ink); padding: 0 12px; font: inherit; outline: none; }
.field select option { background: var(--panel); color: var(--ink); }
.tenant-form-ops { display: flex; align-items: flex-end; margin-bottom: 14px; }
.tenant-form-ops .btn-accent { height: 44px; padding: 0 18px; }
.tenant-meta code, .approval-meta code { font-family: var(--mono); font-size: 0.92em; }
.badge.planned { opacity: .85; }

/* slice 2: door + 2FA */
.tfa-qr svg { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 6px; }
.door-result { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft3); font-size: 13px; line-height: 1.5; }
.door-result strong { font-weight: 700; }
.door-result code { font-family: var(--mono); }
.door-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.door-links a { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.step { display: none; }
.step.show { display: block; }
.err.ok { color: var(--live); }

/* slice 3 */
.tm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .tm-grid { grid-template-columns: 1fr; } }
.sub-h { font-weight: 700; font-size: 13px; margin: 4px 0 8px; }
.muted { color: var(--muted); font-weight: 500; }
.ext-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ext-chip { font-family: var(--mono); font-size: 12px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft3); }
.ext-chip.planned { border-style: dashed; }
.ext-chip.remove_pending, .ext-chip.removed { opacity: .5; text-decoration: line-through; }
.pkg-row { display: grid; grid-template-columns: 1.2fr .6fr .7fr 2.4fr auto; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pkg-row:last-child { border-bottom: 0; }
.pkg-row .field { margin: 0; }
.pkg-feats { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.pkg-feats label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.pkg-ph { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--temp); margin-left: 6px; }
@media (max-width: 900px) { .pkg-row { grid-template-columns: 1fr 1fr; } }
.dg-select { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--input-bg); color: var(--ink); padding: 0 10px; font: inherit; }
.dg-text { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; color: var(--ink); max-height: 360px; overflow: auto; }
.btn-link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 11px; text-decoration: underline; padding: 0 0 0 6px; }

/* slice 4 */
.switch-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft2); font-size: 13px; line-height: 1.45; cursor: pointer; }
.switch-row input { margin-top: 3px; accent-color: var(--live); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; margin: 2px 0 12px; font-family: var(--mono); }
.checks input { accent-color: var(--live); margin-right: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { font-family: var(--mono); word-break: break-all; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding: 6px 0; }
.bars .bar { flex: 1; min-width: 6px; background: linear-gradient(180deg, var(--live), transparent); border-radius: 4px 4px 0 0; position: relative; }
.bars .bar.alt { background: linear-gradient(180deg, var(--accent), transparent); }
.bar-lbls { display: flex; gap: 4px; font-size: 9px; color: var(--muted); font-family: var(--mono); }
.bar-lbls span { flex: 1; text-align: center; overflow: hidden; }
.tag { display: inline-block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); margin-left: 6px; }
.tag.ok { color: var(--live); border-color: var(--live); }
.tag.bad { color: var(--accent); border-color: var(--accent); }
.tag.warn { color: var(--temp); border-color: var(--temp); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl code, .kv code { font-family: var(--mono); }
.blocked { padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px; line-height: 1.5; }
.blocked strong { color: var(--ink); }

/* ===================================================================================================
   DiGiT Premium layer v1.0 (C-36, 14 Nov 2026): "carbon + neon instrument".
   Visual only. Same classes, IDs and JS hooks as before; tokens follow gauges/digit-premium.css (docs/DiGiT-premium-design.md).
   Images give texture only (carbon). Every number on screen still comes from the API.
   Rollback: git revert this commit, or restore app.css from the backup.
   =================================================================================================== */
:root {
  --brand: #e0161b; --brand-hi: #ff2a2f; --brand-lo: #9e0d12;
  --neon-red: #ff3326; --neon-amber: #ffc81a; --neon-green: #3dff73; --neon-cyan: #35e4ff;
  --warm: #f6ead8;
  --glass: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.018) 38%, rgba(0,0,0,.28));
  --glass-fill: rgba(14,16,19,.66);
  --glass-line: rgba(255,255,255,.085);
  --glass-inset: inset 0 1px 0 rgba(255,255,255,.09);
  --glass-shadow: 0 18px 44px rgba(0,0,0,.5);
  --glow-brand: 0 0 14px rgba(224,22,27,.55), 0 0 40px rgba(224,22,27,.22);
  --glow-green: 0 0 10px rgba(61,255,115,.55), 0 0 26px rgba(61,255,115,.22);
  --glow-amber: 0 0 10px rgba(255,200,26,.5), 0 0 26px rgba(255,200,26,.2);
  --glow-red: 0 0 10px rgba(255,51,38,.6), 0 0 26px rgba(255,51,38,.25);
  --focus-ring: 0 0 0 2px #040405, 0 0 0 4px var(--neon-cyan);
  --carbon-opacity: .22;
  --stitch: #c3141a;
  --ease: cubic-bezier(.22,1,.36,1);
  --t1: 120ms; --t2: 220ms;
}
html[data-theme="light"] {
  --brand: #c40000; --brand-hi: #e0161b; --brand-lo: #8f0a0e;
  --neon-red: #d61f14; --neon-amber: #b88600; --neon-green: #0f9f4a; --neon-cyan: #0a7ea4;
  --live: #0d7f3d; --temp: #946c00; --accent: #c40000;
  --warm: #3a2f22;
  --glass: linear-gradient(160deg, rgba(255,255,255,.96), rgba(255,255,255,.78) 45%, rgba(232,237,244,.82));
  --glass-fill: rgba(255,255,255,.74);
  --glass-line: rgba(11,27,51,.1);
  --glass-inset: inset 0 1px 0 rgba(255,255,255,.95);
  --glass-shadow: 0 12px 32px rgba(11,27,51,.09);
  --glow-brand: 0 6px 18px rgba(196,0,0,.22);
  --glow-green: none; --glow-amber: none; --glow-red: none;
  --focus-ring: 0 0 0 2px #fff, 0 0 0 4px var(--neon-cyan);
  --carbon-opacity: .06;
}
[hidden] { display: none !important; }

/* —— Cabin: carbon floor, soft top light, faint red floor glow —— */
body { background: var(--shell); }
.shell {
  isolation: isolate;
  background:
    radial-gradient(1200px 520px at 50% -8%, rgba(120,128,140,.14), transparent 62%),
    radial-gradient(900px 500px at 50% 118%, rgba(224,22,27,.08), transparent 60%),
    linear-gradient(180deg, #0a0b0d, var(--shell));
}
.shell::before {
  z-index: -1;
  background: url("gauges/carbon-tile.webp") 0 0 / 66px auto repeat;
  opacity: var(--carbon-opacity);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), #000 70%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.55), #000 70%);
}
html[data-theme="light"] .shell {
  background:
    radial-gradient(1100px 480px at 50% -10%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(900px 480px at 50% 118%, rgba(196,0,0,.04), transparent 60%),
    linear-gradient(180deg, #f4f6f9, #e9edf2);
}
html[data-theme="light"] .shell::before { opacity: var(--carbon-opacity); }

/* —— Brand mark: neon G and T —— */
.mark { font-family: var(--mark); font-weight: 800; letter-spacing: .22em; }
.mark b { color: var(--brand-hi); text-shadow: var(--glow-brand); font-weight: 800; }
html[data-theme="light"] .mark b { color: var(--brand); text-shadow: none; }
.mark-sub { letter-spacing: .24em; font-size: 10px; }

/* —— Focus: one clear cyan ring everywhere (keyboard users) —— */
:where(button, a, select, input, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus-ring); }
.field input:focus-visible, .field select:focus-visible, .dg-select:focus-visible { border-color: var(--neon-cyan); box-shadow: var(--focus-ring); }

/* —— Glass surfaces —— */
.signin-card, .topbar, .metric, .panel, .tod-card, .modal, .toast, .placeholder {
  background: var(--glass), var(--glass-fill);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
}
.panel, .tod-card { box-shadow: var(--glass-shadow), var(--glass-inset); border-radius: 18px; }
.topbar { box-shadow: 0 10px 30px rgba(0,0,0,.35), var(--glass-inset); border-radius: 16px; padding: 16px 18px; }
.topbar h1 { font-family: var(--mark); font-size: 22px; font-weight: 700; letter-spacing: .005em; }
.topbar p { color: var(--muted); font-size: 12.5px; }
.panel { padding: 16px; }
.panel-head .t { color: var(--warm); font-weight: 600; letter-spacing: .16em; font-size: 10.5px; }
.panel-head .s { color: var(--muted); font-size: 11px; }
.placeholder { border-style: dashed; border-color: var(--line-strong); }

/* —— Console side rail: carbon, red stitched edge, red light bar on the active item —— */
.layout { grid-template-columns: 220px 1fr; }
.aside {
  isolation: isolate;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.62));
  border-right: 1px solid var(--glass-line);
  padding: 24px 14px;
}
.aside::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("gauges/carbon-tile.webp") 0 0 / 66px auto repeat;
  opacity: .55;
}
.aside::after {   /* stitched leather seam */
  content: ""; position: absolute; top: 0; bottom: 0; right: 5px; width: 2px; pointer-events: none;
  background: repeating-linear-gradient(180deg, var(--stitch) 0 9px, transparent 9px 16px);
  opacity: .55;
}
.aside .mark { font-size: 18px; padding: 0 10px; }
.aside .mark-sub { padding: 0 10px; color: var(--muted); }
.nav-item { position: relative; height: 38px; padding: 0 12px; font-size: 13.5px; color: var(--muted);
  transition: background var(--t2) var(--ease), color var(--t2), border-color var(--t2); }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.nav-item.active {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(224,22,27,.2), rgba(224,22,27,0) 85%);
  border-color: rgba(224,22,27,.28);
  box-shadow: none;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: var(--brand-hi); box-shadow: var(--glow-brand);
}
.nav-item .dot { opacity: .45; }
.nav-item.active .dot { background: var(--brand-hi); box-shadow: var(--glow-brand); opacity: 1; }
.aside-foot { color: var(--muted); }
html[data-theme="light"] .aside { background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(240,243,247,.92)); }
html[data-theme="light"] .aside::before { opacity: .06; }
html[data-theme="light"] .nav-item:hover { background: rgba(11,27,51,.04); }
html[data-theme="light"] .nav-item.active { background: linear-gradient(90deg, rgba(196,0,0,.1), rgba(196,0,0,0) 85%); border-color: rgba(196,0,0,.22); }
.main { padding: 22px 26px 32px; min-width: 0; }

/* —— Status chips and lights —— */
.chip { background: rgba(0,0,0,.28); border-color: var(--line-strong); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
html[data-theme="light"] .chip { background: rgba(11,27,51,.04); }
.link-status { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(61,255,115,.28); color: var(--neon-green); background: rgba(61,255,115,.05); }
.link-status .pip { width: 8px; height: 8px; background: var(--neon-green); box-shadow: var(--glow-green); animation: pip-live 2.6s ease-in-out infinite; }
@keyframes pip-live { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
html[data-theme="light"] .link-status { border-color: rgba(15,138,67,.3); color: var(--live); background: rgba(15,138,67,.06); }
html[data-theme="light"] .link-status .pip { background: var(--live); }
.theme-toggle { height: 34px; border-color: var(--line-strong); color: var(--muted); background: rgba(0,0,0,.2); font-weight: 600; }
.theme-toggle .dot { background: var(--brand-hi); box-shadow: var(--glow-brand); }
html[data-theme="light"] .theme-toggle { background: rgba(255,255,255,.7); }

/* —— Buttons —— */
.btn-primary, .btn-accent {
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, var(--brand-hi), var(--brand) 55%, var(--brand-lo));
  box-shadow: var(--glow-brand), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform var(--t1) var(--ease), filter var(--t2), box-shadow var(--t2);
}
.btn-primary { height: 46px; border-radius: 12px; font-size: 14px; letter-spacing: .03em; }
.btn-primary:hover, .btn-accent:hover { filter: brightness(1.08); }
.btn-primary:active, .btn-accent:active { transform: translateY(1px); }
.btn-primary:focus-visible, .btn-accent:focus-visible { box-shadow: var(--focus-ring), var(--glow-brand); }
.btn-accent.muted-cta { background: rgba(255,255,255,.05); border: 1px solid var(--line-strong); box-shadow: var(--glass-inset); color: var(--ink); }
.btn-ghost, .btn-quiet { border-color: var(--line-strong); background: rgba(255,255,255,.025); color: var(--ink);
  transition: background var(--t2), border-color var(--t2), color var(--t2); }
.btn-ghost:hover, .btn-quiet:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.26); }
html[data-theme="light"] .btn-ghost, html[data-theme="light"] .btn-quiet { background: rgba(255,255,255,.8); }
html[data-theme="light"] .btn-ghost:hover, html[data-theme="light"] .btn-quiet:hover { background: #fff; border-color: rgba(11,27,51,.28); }
html[data-theme="light"] .btn-accent.muted-cta { background: rgba(255,255,255,.85); }
.btn-link { color: var(--neon-cyan); }

/* —— Inputs —— */
.field label { color: var(--muted); letter-spacing: .12em; font-size: 10.5px; }
.field input, .field select, .dg-select {
  border-color: var(--line-strong); background: rgba(0,0,0,.45); color: var(--ink);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.4);
}
.field input::placeholder { color: #7d848e; }
.field input:focus, .field select:focus { border-color: rgba(53,228,255,.55); box-shadow: inset 0 2px 6px rgba(0,0,0,.4), 0 0 0 3px rgba(53,228,255,.14); }
html[data-theme="light"] .field input, html[data-theme="light"] .field select, html[data-theme="light"] .dg-select { background: #fff; box-shadow: inset 0 1px 2px rgba(11,27,51,.06); }
html[data-theme="light"] .field input::placeholder { color: #6b7789; }
html[data-theme="light"] .field input:focus, html[data-theme="light"] .field select:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(10,126,164,.14); }
.switch-row, .checks input { accent-color: var(--neon-green); }
html[data-theme="light"] .switch-row input, html[data-theme="light"] .checks input { accent-color: var(--live); }

/* —— KPI cards (neon readouts, Orbitron digits) —— */
.metric { border-radius: 16px; padding: 16px 18px 14px; box-shadow: var(--glass-shadow), var(--glass-inset); }
.metric::before { left: 22px; right: 22px; background: linear-gradient(90deg, transparent, var(--brand-hi), transparent); opacity: .75; }
.metric::after { background: radial-gradient(circle, rgba(224,22,27,.16), transparent 70%); }
.metric .lbl { color: var(--muted); letter-spacing: .16em; }
.metric .val { font-family: var(--num); font-weight: 700; font-size: 30px; letter-spacing: .02em; color: var(--ink);
  text-shadow: 0 0 18px rgba(255,255,255,.14); font-variant-numeric: tabular-nums; }
.metric .hint { background: none; border: 0; padding: 0; margin-top: 6px; font-size: 11.5px; }
html[data-theme="light"] .metric .val { text-shadow: none; }
html[data-theme="light"] .metric::after { background: radial-gradient(circle, rgba(196,0,0,.06), transparent 70%); }
.ext-num { font-family: var(--num); font-weight: 600; letter-spacing: .02em; }

/* —— Rows (routes, tenants, approvals) —— */
.route, .tenant, .approval {
  background: linear-gradient(90deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), rgba(8,9,11,.5);
  border: 1px solid var(--glass-line); box-shadow: var(--glass-inset);
  transition: border-color var(--t2), background var(--t2);
}
.route:hover, .tenant:hover, .approval:hover { border-color: rgba(255,255,255,.16); }
html[data-theme="light"] .route, html[data-theme="light"] .tenant, html[data-theme="light"] .approval { background: rgba(255,255,255,.85); }
.rail.live { background: var(--neon-green); box-shadow: var(--glow-green); }
.rail.temp { background: var(--neon-amber); box-shadow: var(--glow-amber); }
.warn-rail { background: var(--neon-amber); box-shadow: var(--glow-amber); }
.badge.live { background: rgba(61,255,115,.1); color: var(--neon-green); box-shadow: inset 0 0 0 1px rgba(61,255,115,.25); }
.badge.temp { background: rgba(255,200,26,.1); color: var(--neon-amber); box-shadow: inset 0 0 0 1px rgba(255,200,26,.25); }
.badge .bdot { box-shadow: 0 0 6px currentColor; }
html[data-theme="light"] .badge.live { color: var(--live); background: rgba(15,138,67,.08); }
html[data-theme="light"] .badge.temp { color: var(--temp); background: rgba(148,108,0,.08); }
.pill { background: rgba(255,255,255,.04); border-color: var(--line-strong); }
.pill.albert { color: var(--neon-green); border-color: rgba(61,255,115,.35); }
.pill.vm { color: var(--neon-amber); border-color: rgba(255,200,26,.35); }
html[data-theme="light"] .pill.albert { color: var(--live); }
html[data-theme="light"] .pill.vm { color: var(--temp); }
.tag.ok { color: var(--neon-green); border-color: rgba(61,255,115,.5); }
.tag.bad { color: var(--neon-red); border-color: rgba(255,51,38,.55); }
.tag.warn { color: var(--neon-amber); border-color: rgba(255,200,26,.5); }
html[data-theme="light"] .tag.ok { color: var(--live); } html[data-theme="light"] .tag.warn { color: var(--temp); }

/* —— Feeds, tables, banners —— */
.feed li { background: rgba(255,255,255,.025); border-color: var(--glass-line); }
html[data-theme="light"] .feed li { background: rgba(255,255,255,.7); }
.feed-time { color: var(--muted); }
.tbl th { color: var(--muted); letter-spacing: .14em; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }
html[data-theme="light"] .tbl tr:hover td { background: rgba(11,27,51,.025); }
.owner-banner { position: relative; overflow: hidden; background: var(--glass), var(--glass-fill); border-color: var(--glass-line); padding-left: 18px; }
.owner-banner::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--stitch) 0 7px, transparent 7px 12px); opacity: .8; }
.owner-pill { color: var(--brand-hi); border-color: rgba(224,22,27,.4); background: rgba(224,22,27,.1); }
html[data-theme="light"] .owner-pill { color: var(--brand); }
.alert-panel { border-color: rgba(255,200,26,.28); }
.alert-row { background: rgba(255,200,26,.05); border-color: rgba(255,200,26,.22); }
.alert-mark { color: var(--neon-amber); text-shadow: var(--glow-amber); }
html[data-theme="light"] .alert-mark { color: var(--temp); }
.blocked { border-color: var(--line-strong); background: rgba(255,255,255,.02); }
.door-result { background: rgba(255,255,255,.035); border-color: var(--glass-line); }
html[data-theme="light"] .door-result { background: rgba(255,255,255,.8); }
.err { background: rgba(255,51,38,.1); border-color: rgba(255,51,38,.38); color: #ffb3a8; }
html[data-theme="light"] .err { background: rgba(214,31,20,.06); border-color: rgba(214,31,20,.3); color: #a3150c; }
.err.ok { color: var(--neon-green); background: rgba(61,255,115,.07); border-color: rgba(61,255,115,.3); }
html[data-theme="light"] .err.ok { color: var(--live); }
.hint { background: rgba(255,255,255,.025); border-color: var(--glass-line); }
.hint code, .signin-sub code { font-family: var(--mono); color: var(--neon-cyan); }
.foot-note code, .tenant-meta code, .approval-meta code, .kv dd { color: var(--ink); }
.modal-bg { background: rgba(0,0,0,.7); }
.modal { border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.6), var(--glass-inset); }
.modal::before, .signin-card::before { content: ""; position: absolute; top: -1px; left: 36px; right: 36px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-hi), transparent); box-shadow: var(--glow-brand); }
.modal { position: relative; }
.toast { box-shadow: 0 18px 40px rgba(0,0,0,.45), var(--glass-inset); }
.tfa-qr svg { box-shadow: 0 0 0 1px var(--line-strong), 0 10px 30px rgba(0,0,0,.4); }

/* —— Owner: Node health instrument cluster (live values only) —— */
.instrument { position: relative; overflow: hidden; padding-bottom: 0; }
.instrument .panel-head { position: relative; z-index: 2; }
.instrument-shelf { position: absolute; left: -30%; right: -30%; bottom: 14px; height: 70%; transform-origin: 50% 100%;
  transform: perspective(900px) rotateX(56deg); pointer-events: none; z-index: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 4%, rgba(0,0,0,.35) 18%, rgba(0,0,0,.05) 55%, rgba(0,0,0,.5)),
    linear-gradient(115deg, rgba(0,0,0,0) 35%, rgba(255,255,255,.06) 48%, rgba(0,0,0,0) 60%),
    radial-gradient(60% 100% at 50% 40%, rgba(0,0,0,0) 30%, rgba(0,0,0,.6)),
    url("gauges/carbon-tile.webp") center bottom / 60px auto repeat;
  border-top: 1px solid rgba(255,255,255,.16); }
html[data-theme="light"] .instrument-shelf { filter: brightness(1.1); opacity: .9; }
.og-gauges { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding: 4px 12px 26px; justify-items: center; }
.og-g { margin: 0; width: 100%; max-width: 230px; text-align: center; }
.og-g .digit-gauge { max-width: 230px; margin: 0 auto; }
.og-g figcaption { display: inline-block; margin-top: 8px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; line-height: 1.3;
  color: #e6e9ed; background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.1); font-variant-numeric: tabular-nums; }
.digit-gauge .dg-value { font-family: var(--num); font-weight: 700; letter-spacing: 0; }
.digit-gauge .dg-label { font-family: var(--font); }
.stitch { height: 14px; margin: 0 -16px; position: relative; z-index: 1;
  background: repeating-linear-gradient(90deg, var(--stitch) 0 9px, transparent 9px 16px) center 6px / 100% 2px no-repeat, linear-gradient(180deg, #17181b, #0b0c0e);
  box-shadow: 0 -1px 0 rgba(255,255,255,.06); }
@media (max-width: 1100px) { .og-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* —— Door sign-in: glass card on the carbon cabin, 3D carbon floor, lock light, step strip —— */
.signin-wrap { overflow: hidden; isolation: isolate; }
.shell.signin-wrap::before { opacity: calc(var(--carbon-opacity) * .4); }
.door-floor {   /* 3D carbon floor, like the reference dash (decorative, aria-hidden) */
  position: absolute; left: -40%; right: -40%; bottom: 0; height: 52%; z-index: 0; pointer-events: none;
  transform-origin: 50% 100%; transform: perspective(900px) rotateX(58deg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 4%, rgba(0,0,0,.4) 22%, rgba(0,0,0,.1) 60%, rgba(0,0,0,.55)),
    radial-gradient(60% 100% at 50% 30%, rgba(0,0,0,0) 30%, rgba(0,0,0,.7)),
    url("gauges/carbon-tile.webp") center bottom / 60px auto repeat;
  filter: brightness(.7);
}
.door-seam { position: absolute; left: 0; right: 0; bottom: 8px; height: 2px; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--stitch) 0 9px, transparent 9px 16px); opacity: .7; }
.door-halo { position: absolute; width: 760px; height: 760px; left: 50%; top: 46%; transform: translate(-50%, -50%); border-radius: 50%;
  z-index: 0; pointer-events: none; background: radial-gradient(closest-side, rgba(224,22,27,.15), transparent 70%); }
html[data-theme="light"] .door-floor { filter: brightness(1.05); opacity: .3; }
html[data-theme="light"] .door-halo { background: radial-gradient(closest-side, rgba(196,0,0,.06), transparent 70%); }
.signin-wrap > .signin-card { z-index: 1; }
.signin-card { max-width: 410px; padding: 30px 30px 24px; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6), var(--glass-inset); }
html[data-theme="light"] .signin-card { box-shadow: 0 24px 60px rgba(11,27,51,.12), var(--glass-inset); }
.signin-card .mark { font-size: 20px; }
.signin-title { font-family: var(--mark); font-size: 24px; font-weight: 700; letter-spacing: 0; line-height: 1.15; }
.signin-sub { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.signin-foot { border-top: 1px solid var(--glass-line); padding-top: 14px; color: var(--muted); }
/* the status light becomes a lock knob: red = locked, green = door open */
.signin-card .pip {
  position: relative; width: 40px; height: 40px; border-radius: 50%; animation: none; opacity: 1;
  background: radial-gradient(circle at 35% 30%, #4a4f56, #111315 70%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 4px rgba(0,0,0,.35), var(--glow-red);
}
.signin-card .pip::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--neon-red); box-shadow: var(--glow-red), 0 0 0 3px rgba(255,51,38,.18);
  animation: lock-breathe 2.6s ease-in-out infinite;
}
@keyframes lock-breathe { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
.signin-card:has(#stepDone.show) .pip { box-shadow: 0 0 0 4px rgba(0,0,0,.35), var(--glow-green); }
.signin-card:has(#stepDone.show) .pip::after { background: var(--neon-green); box-shadow: var(--glow-green), 0 0 0 3px rgba(61,255,115,.18); }
html[data-theme="light"] .signin-card .pip { box-shadow: 0 0 0 4px rgba(11,27,51,.06), 0 6px 14px rgba(11,27,51,.2); }
.door-steps { display: flex; gap: 8px; margin: 18px 0 6px; }
.door-steps span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); transition: background var(--t2), box-shadow var(--t2); }
html[data-theme="light"] .door-steps span { background: rgba(11,27,51,.1); }
.door-steplbl { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
/* current step = amber, done = green. Driven by the .show class door.js already sets; no JS change */
.signin-card:has(#stepPw.show) .door-steps span:nth-child(1),
.signin-card:has(#stepChange.show) .door-steps span:nth-child(1),
.signin-card:has(#stepTotp.show) .door-steps span:nth-child(2) { background: var(--neon-amber); box-shadow: var(--glow-amber); }
.signin-card:has(#stepTotp.show) .door-steps span:nth-child(1),
.signin-card:has(#stepDone.show) .door-steps span { background: var(--neon-green); box-shadow: var(--glow-green); }

/* —— Scrollbars —— */
* { scrollbar-color: rgba(255,255,255,.18) transparent; }
html[data-theme="light"] * { scrollbar-color: rgba(11,27,51,.22) transparent; }

/* —— Motion: honour reduced motion everywhere —— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .aside::after { display: none; }
  .og-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 14px; }
}

/* ===================================================================================================
   C-37 (14 Nov 2026): Light mode carbon. Shaun: "a mix of the off white and the same grey as the dark-mode weave,
   remove the total pale look". LIGHT ONLY: every rule below is scoped to html[data-theme="light"]; Dark is untouched.
   carbon-tile-light.webp / carbon-light.webp are the same Gemini weave re-toned (shadow #9aa1aa grey -> sheen #f4f5f7 off-white).
   Feed rows without a time span the full row (both themes; layout fix only).
   =================================================================================================== */
html[data-theme="light"] .shell {
  background:
    radial-gradient(1100px 480px at 50% -10%, rgba(255,255,255,.6), transparent 60%),
    linear-gradient(180deg, #e3e6ea, #cfd3d8);
}
html[data-theme="light"] .shell::before,
html[data-theme="light"] .shell.signin-wrap::before {
  background:
    radial-gradient(1200px 520px at 50% -12%, rgba(255,255,255,.55), rgba(255,255,255,0) 62%),
    linear-gradient(180deg, rgba(244,245,247,.28), rgba(244,245,247,0) 45%),
    url("gauges/carbon-tile-light.webp") 0 0 / 66px auto repeat;
  opacity: .92;
  -webkit-mask-image: none; mask-image: none;
}
/* panels stay light and readable on the grey weave */
html[data-theme="light"] .signin-card,
html[data-theme="light"] .metric,
html[data-theme="light"] .panel,
html[data-theme="light"] .tod-card,
html[data-theme="light"] .topbar,
html[data-theme="light"] .modal,
html[data-theme="light"] .placeholder,
html[data-theme="light"] .toast { --glass-fill: rgba(255,255,255,.9); }
html[data-theme="light"] .shell > .muted, html[data-theme="light"] .foot-note { color: #3d4b5f; }
/* side rail: lighter carbon than the floor, so the rail still reads as a separate surface */
html[data-theme="light"] .aside { background: linear-gradient(180deg, rgba(250,251,252,.88), rgba(238,240,244,.92)); }
html[data-theme="light"] .aside::before { background: url("gauges/carbon-tile-light.webp") 0 0 / 66px auto repeat; opacity: .3; }
/* 3D carbon floor (door) and dash shelf under the gauges: light weave with soft daylight shading */
html[data-theme="light"] .door-floor {
  background:
    linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 5%, rgba(11,27,51,.10) 24%, rgba(11,27,51,0) 60%, rgba(11,27,51,.16)),
    radial-gradient(60% 100% at 50% 30%, rgba(11,27,51,0) 35%, rgba(11,27,51,.18)),
    url("gauges/carbon-tile-light.webp") center bottom / 60px auto repeat;
  filter: none; opacity: 1;
}
html[data-theme="light"] .instrument-shelf {
  background:
    linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 4%, rgba(11,27,51,.12) 18%, rgba(11,27,51,0) 55%, rgba(11,27,51,.18)),
    linear-gradient(115deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.22) 48%, rgba(255,255,255,0) 60%),
    radial-gradient(60% 100% at 50% 40%, rgba(11,27,51,0) 30%, rgba(11,27,51,.2)),
    url("gauges/carbon-tile-light.webp") center bottom / 60px auto repeat;
  border-top-color: rgba(255,255,255,.8);
  filter: none; opacity: 1;
}
/* feed rows with no time / status (e.g. "Nothing closed yet.") use the whole row instead of the 48px time column */
.feed li > .feed-body:only-child { grid-column: 1 / -1; }

/* —— C-38 (14 Nov 2026): Albert real calls, Time of day editor, Voices. Tokens only; Dark + Light. —— */
.albert-row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(180px, 250px) 1fr; gap: 18px; align-items: center; padding: 4px 12px 8px; }
.albert-dial { max-width: 250px; }
.albert-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.albert-tiles .metric { padding: 12px 14px 10px; }
.albert-tiles .metric .val { font-size: 26px; }
.albert-honest { position: relative; z-index: 1; padding: 0 12px 18px; }
.albert-tbl td.num, .albert-tbl th.num { text-align: right; font-family: var(--num, var(--mono)); white-space: nowrap; }
@media (max-width: 900px) { .albert-row { grid-template-columns: 1fr; justify-items: center; } .albert-tiles { width: 100%; } }

.tod-open { color: var(--neon-green) !important; text-shadow: var(--glow-green); }
.tod-closed { color: var(--neon-red) !important; text-shadow: var(--glow-red); }
.tod-hours input[type="time"] { height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--input-bg); color: var(--ink); padding: 0 8px; font: inherit; font-family: var(--mono); color-scheme: dark; }
html[data-theme="light"] .tod-hours input[type="time"] { background: #fff; color-scheme: light; }
.tod-hours input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand-hi); }
.tod-hours input:disabled, .tod-dest input:disabled, .tod-dest select:disabled { opacity: .55; }
.tod-quick { margin-top: 10px; font-size: 12px; color: var(--muted); }
.tod-dest { grid-template-columns: 1fr 1fr; }
.tod-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 6px 0 14px; }
.tod-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tod-step { border: 1px solid var(--glass-line); border-radius: 12px; padding: 10px 12px; background: rgba(0,0,0,.18); }
html[data-theme="light"] .tod-step { background: rgba(255,255,255,.6); }
.tod-step-h { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.tod-step-h .tag { margin-left: 0; margin-right: 4px; }
.tod-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; color: var(--ink); background: rgba(0,0,0,.28); border: 1px solid var(--glass-line); border-radius: 10px; padding: 10px 12px; }
html[data-theme="light"] .tod-pre { background: #f6f8fb; }
.tod-hol-add { margin-top: 10px; }

.voice-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .voice-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.voice-card { border: 1px solid var(--glass-line); border-radius: 14px; padding: 12px 14px; background: rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 8px; transition: border-color var(--t2) var(--ease), box-shadow var(--t2) var(--ease); }
html[data-theme="light"] .voice-card { background: rgba(255,255,255,.7); }
.voice-card:hover { border-color: rgba(224,22,27,.45); }
.voice-card.is-current { border-color: rgba(61,255,115,.45); box-shadow: 0 0 0 1px rgba(61,255,115,.18), var(--glow-green); }
html[data-theme="light"] .voice-card.is-current { border-color: var(--live); box-shadow: 0 0 0 1px rgba(13,127,61,.25); }
.voice-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.voice-name { font-weight: 700; font-size: 14px; }
.voice-tags .tag { margin: 0 4px 4px 0; }
.voice-desc { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.voice-ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.voice-ops .btn-ghost, .voice-ops .btn-accent { height: 34px; padding: 0 12px; font-size: 12.5px; }
.voice-ops .dg-select { height: 34px; max-width: 170px; font-size: 12px; }
[data-play].playing { border-color: var(--neon-green); color: var(--neon-green); }
#todHolList li { grid-template-columns: 132px 1fr; }
#todHolList .feed-time { white-space: nowrap; }
#todOpenPath, #todAfterPath { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
