/* a2pulse theme: the exact look of the a2pulse Smart City Platform console, for use in any a2pulse application.
   Dark theme (default): a deep purple evening sky with navy glass panels and gold accents.
   Light theme (<body class="light">): a peach-to-lavender sky with white glass panels and navy accents.
   The sky is fixed to "dusk" (set <body data-sky="dusk">, or leave it out: dusk is the default below).
   Panels are lit glass: translucent, blurred, with a top highlight and a two-layer shadow.
   One type family (Mukta) carries Latin and Devanagari alike. Fonts: ../fonts (SIL Open Font Licence).
   Copied from the platform's stylesheet (v2.7.4); app-specific rules (map, video wall, alarms) are kept and harmless. */
@font-face { font-family: "Mukta"; font-weight: 400; src: url(../fonts/mukta-regular.woff) format("woff"); font-display: swap; }
@font-face { font-family: "Mukta"; font-weight: 500; src: url(../fonts/mukta-medium.woff) format("woff"); font-display: swap; }
@font-face { font-family: "Mukta"; font-weight: 600; src: url(../fonts/mukta-semibold.woff) format("woff"); font-display: swap; }
@font-face { font-family: "Mukta"; font-weight: 700; src: url(../fonts/mukta-bold.woff) format("woff"); font-display: swap; }
@font-face { font-family: "Mukta"; font-weight: 800; src: url(../fonts/mukta-extrabold.woff) format("woff"); font-display: swap; }

:root {
  /* night sky (base) */
  --sky-1: #0B1530; --sky-2: #16264F; --sky-glow: rgba(110, 140, 255, .18); --sky-glow2: rgba(233, 196, 106, .08);
  --bg: #0B1530; --bg2: rgba(13, 24, 54, .72);
  --panel: rgba(28, 46, 92, .55); --panel2: rgba(40, 62, 118, .55); --panel-solid: #172a57;
  --line: rgba(169, 182, 214, .16); --line2: rgba(169, 182, 214, .28);
  --hi: rgba(255, 255, 255, .10);                     /* the lit top edge of glass */
  --text: #EEF3FF; --muted: #A9B6D6; --faint: #7484AA;
  --gold: #E9C46A; --gold-soft: #F6DE9C; --navy: #1A3A7A; --accent: var(--gold);
  --mint: #4ADE9B; --amber: #F5B544; --coral: #FF6B7A; --sky: #6FB7FF; --violet: #A78BFA;
  --crit: #FF6B7A; --high: #F5934A; --med: #F5C451; --low: #6FC8DD; --info: #A9B6D6; --ok: #4ADE9B; --off: #8190B3;
  --shadow: 0 1px 2px rgba(3, 8, 24, .35), 0 18px 40px -16px rgba(3, 8, 24, .65);
  --shadow-lift: 0 2px 4px rgba(3, 8, 24, .35), 0 28px 56px -18px rgba(3, 8, 24, .8);
  --font: "Mukta", "Nirmala UI", system-ui, sans-serif;
  --mono: var(--font);
  --side: 268px; --top: 64px; --radius: 16px; --r-sm: 10px;
  --blur: blur(16px) saturate(140%);
  color-scheme: dark;
}
body[data-sky="dawn"] { --sky-1: #121a3d; --sky-2: #3b2a5c; --sky-glow: rgba(255, 150, 140, .22); --sky-glow2: rgba(233, 196, 106, .16); }
body[data-sky="day"]  { --sky-1: #0e2152; --sky-2: #1d4486; --sky-glow: rgba(111, 183, 255, .26); --sky-glow2: rgba(233, 196, 106, .10); }
body[data-sky="dusk"] { --sky-1: #160f36; --sky-2: #46285e; --sky-glow: rgba(245, 160, 90, .24); --sky-glow2: rgba(167, 139, 250, .16); }

body.light {
  --sky-1: #dcebff; --sky-2: #f4f8ff; --sky-glow: rgba(111, 183, 255, .35); --sky-glow2: rgba(233, 196, 106, .22);
  --bg: #eef4ff; --bg2: rgba(255, 255, 255, .7);
  --panel: rgba(255, 255, 255, .72); --panel2: rgba(255, 255, 255, .9); --panel-solid: #ffffff;
  --line: rgba(26, 58, 122, .12); --line2: rgba(26, 58, 122, .22); --hi: rgba(255, 255, 255, .9);
  --text: #12224A; --muted: #4F5F86; --faint: #8090B2;
  --gold: #B8860B; --gold-soft: #8A6508; --accent: #1A3A7A;
  --mint: #12A36A; --amber: #C77C0A; --coral: #E0435A; --sky: #2D7FE0;
  --crit: #E0435A; --high: #D9682A; --med: #B98A0A; --low: #1E8FAA; --ok: #12A36A; --off: #7A88A8;
  --shadow: 0 1px 2px rgba(26, 58, 122, .08), 0 18px 40px -18px rgba(26, 58, 122, .35);
  --shadow-lift: 0 2px 4px rgba(26, 58, 122, .1), 0 28px 56px -20px rgba(26, 58, 122, .45);
  color-scheme: light;
}
body.light[data-sky="dawn"] { --sky-1: #ffe3dc; --sky-2: #f3f1ff; }
body.light[data-sky="dusk"] { --sky-1: #ffe2c4; --sky-2: #efe6ff; }
body.light[data-sky="night"] { --sky-1: #d9e0f7; --sky-2: #eef1fb; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 620px at 82% -8%, var(--sky-glow), transparent 62%),
    radial-gradient(900px 520px at 6% 108%, var(--sky-glow2), transparent 60%),
    linear-gradient(170deg, var(--sky-2) 0%, var(--sky-1) 58%) fixed;
  background-color: var(--sky-1);
  background-attachment: fixed;
}
body[lang="mr"] { font-size: 15.5px; }
/* letter-spacing breaks Devanagari conjuncts */
body[lang="mr"] *:not(.brand b):not(.fhead b):not(.drishti):not(.a2p-tag) { letter-spacing: 0 !important; }
a { color: var(--gold-soft); }
body.light a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.mono, .num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.hidden { display: none !important; }
::selection { background: rgba(233, 196, 106, .35); }
* { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

/* glass surfaces share one recipe */
.card, .stat, .dom, .top, .side, .modal, .drawer, .toast, .mappanel, .pop, .w, .hero {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: var(--top) minmax(0, 1fr); height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 0; background: var(--bg2); border-bottom: 1px solid var(--line); position: relative; z-index: 30; box-shadow: inset 0 -1px 0 var(--hi); }
.brand { width: auto; min-width: var(--side); height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 12px; flex: 0 0 auto; }
.brand img.wm { height: 48px; width: auto; display: block; border-radius: 8px; box-shadow: 0 0 0 1px rgba(233, 196, 106, .25), 0 4px 12px rgba(0, 0, 0, .3); }
body.light .brand img.wm { box-shadow: 0 2px 8px rgba(26, 58, 122, .25); }
.brand .prod { border-left: 1px solid var(--line2); padding-left: 10px; line-height: 1.1; min-width: 0; }
.brand .prod b { display: block; color: var(--text); letter-spacing: .16em; font-size: 15px; font-weight: 800; }
.brand .prod span { color: var(--gold); font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.top .site { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.top .site b { color: var(--text); font-weight: 600; }
.top .clock { color: var(--gold); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.top .spacer { flex: 1; }
.top > * { flex-shrink: 0; } .top > .ticker, .top > .spacer { flex-shrink: 1; }
.iconbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
  .top { gap: 6px; padding-right: 8px; }
  .brand { padding: 0 8px; gap: 6px; } .brand img.wm { height: 36px; }
  #simBtn { display: none !important; }
  .mappanel.section { display: none; } .layers { max-height: 60%; overflow: auto; }
  .top .seg button { padding: 6px 7px; font-size: 12px; }
  .userchip { padding: 3px; } .userchip > div:last-child { display: none; }
  .iconbtn { width: 34px; height: 34px; }
}
.ticker { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--muted); font-size: 13.5px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker span { display: inline-block; padding-left: 100%; animation: tick 45s linear infinite; }
.ticker b.crit { color: var(--crit); } .ticker b.high { color: var(--high); }
@keyframes tick { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker span { animation: none; padding-left: 0; } }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; box-shadow: inset 0 1px 0 var(--hi); transition: border-color .15s, transform .15s; }
.iconbtn:hover { border-color: var(--gold); }
.iconbtn:active { transform: translateY(1px); }
.iconbtn .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--crit); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--sky-1); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); padding: 2px; gap: 2px; box-shadow: inset 0 1px 0 var(--hi); }
.seg button { border: 0; background: none; padding: 5px 11px; cursor: pointer; color: var(--muted); border-radius: 9px; }
.seg button.on { background: var(--gold); color: #1b1606; font-weight: 700; box-shadow: 0 2px 8px -2px rgba(233, 196, 106, .6); }
body.light .seg button.on { background: var(--navy); color: #fff; box-shadow: none; }
.userchip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 22px; cursor: pointer; background: var(--panel); white-space: nowrap; box-shadow: inset 0 1px 0 var(--hi); }
.userchip .av { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 45%, #9a7420 100%); color: #2a1f05; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.userchip small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.1; }

.side { background: var(--bg2); border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 10px 24px; }
.nav-sec { padding: 14px 10px 4px; font-size: 12px; font-weight: 600; color: var(--faint); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 1px 0; color: var(--muted); text-decoration: none; border-radius: 10px; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(233, 196, 106, .2), rgba(233, 196, 106, .04)); box-shadow: inset 2px 0 0 var(--gold), inset 0 1px 0 var(--hi); font-weight: 600; }
body.light .nav a.on { background: linear-gradient(90deg, rgba(26, 58, 122, .12), rgba(26, 58, 122, .02)); box-shadow: inset 2px 0 0 var(--navy); }
.nav a .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06), 0 0 10px currentColor; }
.nav a .cnt { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--crit); color: #fff; border-radius: 9px; padding: 0 7px; }
.nav a .cnt.warn { background: var(--med); color: #241b04; }
.nav svg { width: 17px; height: 17px; flex: 0 0 auto; }

.main { overflow: auto; position: relative; min-width: 0; }
.page { padding: 22px 26px 48px; max-width: 1760px; }
.page.full { padding: 0; max-width: none; height: 100%; }
.ph { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ph h1 { margin: 0; font-size: 26px; font-weight: 700; line-height: 1.15; text-wrap: balance; }
.ph .sub { color: var(--muted); font-size: 14px; }
.ph .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- components */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; box-shadow: inset 0 1px 0 var(--hi), var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 15px; color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card h3 .r { margin-left: auto; font-weight: 400; font-size: 13.5px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--r-sm); border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--text); text-decoration: none; box-shadow: inset 0 1px 0 var(--hi); transition: border-color .15s, transform .1s; }
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #f3d68a, var(--gold)); border-color: #d9b24e; color: #241b04; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px -6px rgba(233, 196, 106, .7); }
body.light .btn.primary { background: linear-gradient(180deg, #2a55a8, var(--navy)); border-color: var(--navy); color: #fff; box-shadow: 0 6px 16px -8px rgba(26, 58, 122, .7); }
.btn.danger { border-color: var(--crit); color: var(--crit); }
.btn.sm { padding: 3px 9px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input.in, select.in, textarea.in { background: rgba(5, 12, 32, .35); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 7px 11px; min-width: 0; }
body.light input.in, body.light select.in, body.light textarea.in { background: #fff; }
select.in option { background: var(--panel-solid); }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(233, 196, 106, .18); }
textarea.in { width: 100%; min-height: 70px; resize: vertical; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--faint); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.sev-critical { color: var(--crit); background: rgba(255, 107, 122, .14); border-color: rgba(255, 107, 122, .38); }
.sev-high { color: var(--high); background: rgba(245, 147, 74, .14); border-color: rgba(245, 147, 74, .38); }
.sev-medium { color: var(--med); background: rgba(245, 196, 81, .14); border-color: rgba(245, 196, 81, .38); }
.sev-low { color: var(--low); background: rgba(111, 200, 221, .14); border-color: rgba(111, 200, 221, .38); }
.sev-info { color: var(--info); background: rgba(169, 182, 214, .12); }
.st-raised, .st-new { color: var(--crit); background: rgba(255, 107, 122, .12); }
.st-acknowledged, .st-assigned, .st-accepted { color: var(--med); background: rgba(245, 196, 81, .12); }
.st-dispatched, .st-in_progress, .st-en_route, .st-on_site { color: var(--low); background: rgba(111, 200, 221, .12); }
.st-resolved, .st-completed { color: var(--ok); background: rgba(74, 222, 155, .12); }
.st-closed, .st-dismissed, .st-rejected { color: var(--off); background: rgba(129, 144, 179, .14); }
.dev-online { color: var(--ok); } .dev-offline { color: var(--off); } .dev-fault { color: var(--crit); } .dev-maintenance { color: var(--med); } .dev-unknown { color: var(--faint); }
.prio-P1 { color: var(--crit); } .prio-P2 { color: var(--high); } .prio-P3 { color: var(--med); } .prio-P4 { color: var(--low); }
.mode-crisis { color: #fff; background: var(--crit); } .mode-anticipation { color: #2a1f05; background: var(--med); } .mode-simulation { color: #fff; background: #7a5cc2; } .mode-recovery { color: #06281a; background: var(--ok); } .mode-incident { color: var(--text); background: var(--panel2); }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 8px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
table.t td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: rgba(255, 255, 255, .04); }
body.light table.t tr.click:hover td { background: rgba(26, 58, 122, .04); }
table.t tr.sel td { background: rgba(233, 196, 106, .1); }
table.t td.n { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow: auto; max-height: 70vh; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.kpi { display: grid; gap: 2px; }
.kpi .v { font-size: 30px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi .u { font-size: 14px; color: var(--muted); margin-left: 3px; font-weight: 500; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { position: relative; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: inset 0 1px 0 var(--hi), var(--shadow); transition: transform .18s, box-shadow .18s; }
.stat::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--line2); }
.stat.crit::after { background: var(--crit); } .stat.high::after { background: var(--high); } .stat.ok::after { background: var(--ok); } .stat.gold::after { background: var(--gold); }
a.stat:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--hi), var(--shadow-lift); }

.dom-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dom { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; display: grid; gap: 8px; box-shadow: inset 3px 0 0 var(--c, var(--line2)), inset 0 1px 0 var(--hi), var(--shadow); }
.dom:hover { border-color: var(--gold); }
.dom header { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dom header .al { margin-left: auto; }
.dom .kv { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; }
.dom .kv span:nth-child(odd) { color: var(--muted); }
.dom .kv span:nth-child(even) { text-align: right; font-weight: 600; }
.bar { height: 7px; border-radius: 4px; background: rgba(169, 182, 214, .16); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }

.toast-wrap { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-radius: 14px; padding: 11px 14px; box-shadow: inset 4px 0 0 var(--gold), var(--shadow-lift); cursor: pointer; animation: slidein .22s ease-out; }
.toast.crit, .toast.err { box-shadow: inset 4px 0 0 var(--crit), var(--shadow-lift); } .toast.high { box-shadow: inset 4px 0 0 var(--high), var(--shadow-lift); }
.toast b { display: block; margin-bottom: 2px; }
@keyframes slidein { from { transform: translateY(10px) scale(.98); opacity: 0; } }

.modal-bg { position: fixed; inset: 0; background: rgba(5, 10, 30, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 20px; width: min(720px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: inset 0 1px 0 var(--hi), var(--shadow-lift); animation: rise .2s ease-out; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal, .toast { animation: none; } }
.modal.wide { width: min(1100px, 100%); }
.modal header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal header h2 { margin: 0; font-size: 18px; font-weight: 700; }
.modal header .x { margin-left: auto; }
.modal .body { padding: 18px; overflow: auto; }
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.drawer { position: fixed; top: calc(var(--top) + 8px); right: 8px; bottom: 8px; width: min(560px, calc(100vw - 16px)); background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 20px; box-shadow: var(--shadow-lift); z-index: 60; display: flex; flex-direction: column; animation: drawin .22s ease-out; }
@keyframes drawin { from { transform: translateX(24px); opacity: 0; } }
.drawer header { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.drawer header h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.drawer .body { padding: 16px 18px; overflow: auto; flex: 1; }
.kvl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; margin: 0 0 12px; }
.kvl dt { color: var(--muted); } .kvl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sop { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sop li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.sop li.done { opacity: .75; } .sop li.done .tx { text-decoration: line-through; text-decoration-color: var(--faint); }
.sop li .meta { grid-column: 2; font-size: 12px; color: var(--faint); }
.sop li .req { color: var(--crit); font-size: 11.5px; margin-left: 4px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line2); display: grid; gap: 8px; }
.timeline li { position: relative; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line2); border: 2px solid var(--panel-solid); }
.timeline li.state::before { background: var(--gold); } .timeline li.escalation::before, .timeline li.sla::before { background: var(--crit); } .timeline li.task::before { background: var(--low); }
.timeline time { color: var(--faint); font-size: 12.5px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; overflow-x: auto; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: fit-content; max-width: 100%; }
.tabs button { background: none; border: 0; padding: 6px 14px; cursor: pointer; color: var(--muted); white-space: nowrap; border-radius: 11px; }
.tabs button.on { color: var(--text); background: var(--panel2); box-shadow: inset 0 1px 0 var(--hi), 0 2px 8px -2px rgba(0, 0, 0, .35); font-weight: 600; }
.chart { position: relative; height: 240px; } .chart.tall { height: 320px; } .chart.short { height: 160px; }
.tree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed var(--line2); }
.tree > ul { padding-left: 0; border-left: 0; }
.tree li { margin: 4px 0; }
.tree .node { display: inline-flex; gap: 8px; align-items: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); cursor: pointer; flex-wrap: wrap; }
.tree .node:hover { border-color: var(--gold); }

/* ---------------------------------------------------------------- dashboard: hero + department widgets */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 26px 30px; margin-bottom: 20px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02) 60%), var(--panel); box-shadow: inset 0 1px 0 var(--hi), var(--shadow); }
.hero .greet { font-size: clamp(26px, 3vw, 38px); font-weight: 800; line-height: 1.05; margin: 0; text-wrap: balance; }
.hero .when { color: var(--muted); font-size: 15px; margin-top: 6px; }
.hero .say { margin: 14px 0 0; font-size: 16.5px; max-width: 60ch; }
.hero .chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero .chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); text-decoration: none; font-size: 14px; box-shadow: inset 0 1px 0 var(--hi); }
.hero .chip b { font-size: 16px; font-weight: 800; }
.hero .chip i { width: 22px; height: 22px; border-radius: 50%; display: inline-block; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .85), var(--c, var(--gold)) 50%, color-mix(in srgb, var(--c, var(--gold)) 60%, #000) 100%); }
.hero .chip:hover { border-color: var(--gold); }
.orb { position: relative; width: 196px; height: 196px; flex: 0 0 auto; }
.orb svg { width: 100%; height: 100%; overflow: visible; }
.orb .core { position: absolute; inset: 30px; border-radius: 50%; display: grid; place-items: center; text-align: center; color: #0b1530;
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, var(--oc, var(--mint)) 38%, color-mix(in srgb, var(--oc, var(--mint)) 55%, #06102a) 100%);
  box-shadow: inset -10px -14px 26px rgba(0, 0, 0, .28), inset 6px 8px 16px rgba(255, 255, 255, .35), 0 18px 40px -10px color-mix(in srgb, var(--oc, var(--mint)) 70%, transparent); }
.orb .core b { display: block; font-size: 40px; font-weight: 800; line-height: .9; }
.orb .core span { font-size: 12.5px; font-weight: 600; max-width: 11ch; line-height: 1.15; display: block; }
.orb .halo { animation: halo 6s ease-in-out infinite; transform-origin: center; }
@keyframes halo { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .orb .halo { animation: none; } }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding: 20px; } .orb { width: 150px; height: 150px; margin: 0 auto; } .orb .core { inset: 22px; } .orb .core b { font-size: 30px; } }

.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.w { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 236px; padding: 18px; border-radius: 22px; border: 1px solid var(--line); color: var(--text); text-decoration: none; cursor: pointer;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 55%), var(--panel);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; transform: perspective(900px) translateZ(0); }
.w:hover, .w:focus-visible { transform: perspective(900px) translateY(-4px) rotateX(2deg); box-shadow: inset 0 1px 0 var(--hi), var(--shadow-lift); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
@media (prefers-reduced-motion: reduce) { .w, .w:hover { transition: none; transform: none; } }
.w header { display: flex; align-items: center; gap: 12px; }
.w .medal { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), inset 0 -3px 6px rgba(0, 0, 0, .25), 0 8px 18px -8px var(--c); }
.w .medal svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.w h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.15; }
.w header small { display: block; color: var(--muted); font-size: 13px; }
.w .state { margin-left: auto; align-self: flex-start; }
.w .viz { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; min-height: 112px; }
.w .viz.full { grid-template-columns: minmax(0, 1fr); }
.w .facts { display: grid; gap: 8px; }
.w .fact { display: grid; gap: 0; }
.w .fact b { font-size: 24px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.w .fact b small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.w .fact span { color: var(--muted); font-size: 13px; }
.w .facts.two { grid-template-columns: 1fr 1fr; }
.w footer { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.w footer .go { margin-left: auto; color: var(--text); font-weight: 600; white-space: nowrap; flex: 0 0 auto; }
.w footer .msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w .spark { height: 40px; width: 100%; display: block; }
.w.alert { border-color: rgba(255, 107, 122, .55); }
.w.alert::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1px rgba(255, 107, 122, .5), 0 0 28px -6px rgba(255, 107, 122, .6); animation: alertglow 2.4s ease-in-out infinite; }
@keyframes alertglow { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .w.alert::before { animation: none; } }
.gauge text { fill: var(--text); font-family: var(--font); }
.tankrow { display: flex; gap: 10px; align-items: flex-end; height: 104px; }
.tank { position: relative; width: 30px; height: 100%; border-radius: 9px 9px 7px 7px; border: 1px solid var(--line2); background: rgba(5, 12, 32, .3); overflow: hidden; box-shadow: inset 0 1px 0 var(--hi); }
body.light .tank { background: rgba(26, 58, 122, .05); }
.tank i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #8fd3ff, #2e8fe8); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45); }
.tank.low i { background: linear-gradient(180deg, #ffb0b8, var(--coral)); }
.lamps { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.lamps i { aspect-ratio: 1; border-radius: 50%; background: rgba(169, 182, 214, .2); }
.lamps i.on { background: radial-gradient(circle at 35% 30%, #fff8d6, var(--gold)); box-shadow: 0 0 8px rgba(233, 196, 106, .7); }
.lamps i.bad { background: var(--coral); }
.stackbar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: rgba(169, 182, 214, .16); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.stackbar i { display: block; height: 100%; }
.legend-row { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.legend-row i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.calm { font-size: 26px; font-weight: 800; color: var(--mint); line-height: 1.05; }
.sec-title { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 12px; }
.sec-title h2 { margin: 0; font-size: 19px; font-weight: 700; }
.sec-title span { color: var(--muted); font-size: 14px; }

/* department page */
.dhero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dhero .medal { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), inset 0 -4px 8px rgba(0, 0, 0, .25), 0 12px 24px -10px var(--c); }
.dhero .medal svg { width: 30px; height: 30px; }
.dhero h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; }
.dhero .sub { color: var(--muted); }
.dhero .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- map view */
.mapview { position: relative; height: calc(100vh - var(--top)); display: grid; grid-template-rows: auto minmax(0, 1fr); }
.mapbar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--bg2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mapbar .search { flex: 1 1 280px; display: flex; align-items: center; gap: 6px; background: rgba(5, 12, 32, .35); border: 1px solid var(--line2); border-radius: var(--r-sm); padding: 0 10px; }
body.light .mapbar .search { background: #fff; }
.mapbar .search input { border: 0; background: none; padding: 7px 0; flex: 1; min-width: 0; outline: none; }
.mapwrap { position: relative; overflow: hidden; background: #0c1a3a; }
body.light .mapwrap { background: #dfe7ee; }
.map { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.map:active { cursor: grabbing; }
.map .tiles, .map .ms, .map svg, .map .pops { position: absolute; inset: 0; }
.map .tiles img { position: absolute; user-select: none; -webkit-user-drag: none; }
.map .ms img { position: absolute; left: 0; top: 0; pointer-events: none; }
.map svg { overflow: visible; }
.map .plot { stroke: rgba(255, 255, 255, .55); stroke-width: .8; vector-effect: non-scaling-stroke; fill-opacity: .82; cursor: pointer; }
.map .plot:hover { fill-opacity: 1; stroke: #fff; stroke-width: 1.6; }
.map .boundary { fill: none; stroke: #9be15d; stroke-width: 3; vector-effect: non-scaling-stroke; }
.map .road { fill: none; stroke: #c9a46a; stroke-width: 5; vector-effect: non-scaling-stroke; stroke-linecap: round; opacity: .8; }
.map .roadbed { fill: #23384d; stroke: none; }
body.light .map .roadbed { fill: #f7f9fb; }
.map .roadgrid { fill: none; stroke: rgba(230, 238, 247, .16); stroke-width: 6; vector-effect: non-scaling-stroke; }
.map text.plotno { fill: #0b2540; font-size: 11px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; paint-order: stroke; stroke: rgba(255, 255, 255, .55); stroke-width: 2px; }
.map text.roadname { fill: #e9d3a8; font-size: 12px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: #0c2033; stroke-width: 3px; }
.map .mk { cursor: pointer; }
.map .mk circle.bg { stroke: #fff; stroke-width: 1.5; }
.map .mk.off circle.bg { fill: #6b7f93 !important; }
.map .mk.alarm circle.ring { fill: none; stroke: var(--crit); stroke-width: 3; animation: pulse 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(2.2); } }
@media (prefers-reduced-motion: reduce) { .map .mk.alarm circle.ring { animation: none; } }
.map .mk text { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.map .env circle { fill-opacity: .55; stroke-width: 2; }
.map .env text.val { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: rgba(0, 0, 0, .55); stroke-width: 2.5px; }
.map .veh path { stroke: #fff; stroke-width: 1; }
.map .alarmpin { cursor: pointer; }

.mappanel { position: absolute; background: var(--bg2); border: 1px solid var(--line2); border-radius: 16px; box-shadow: inset 0 1px 0 var(--hi), var(--shadow-lift); z-index: 5; }
body.light .mappanel { background: rgba(255, 255, 255, .86); }
.layers { left: 12px; top: 12px; width: 256px; max-height: calc(100% - 80px); overflow: auto; }
.layers h4, .listpanel h4, .legend h4, .section h4 { margin: 0; padding: 10px 14px; font-size: 13.5px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 6px; }
.layers label { display: flex; align-items: center; gap: 8px; padding: 6px 14px; cursor: pointer; font-size: 14px; }
.layers label:hover { background: rgba(255, 255, 255, .05); }
.layers label .c { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.layers .sub { padding: 0 12px 6px 34px; display: flex; flex-wrap: wrap; gap: 4px; }
.layers .sub button { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line2); background: none; cursor: pointer; color: var(--muted); }
.layers .sub button.on { background: var(--gold); color: #241b04; border-color: var(--gold); }
.listpanel { right: 12px; top: 12px; width: 330px; max-height: calc(100% - 24px); display: flex; flex-direction: column; }
.listpanel .scroll { max-height: none; flex: 1; }
.legend { right: 354px; top: 12px; width: 220px; }
.legend ul { list-style: none; margin: 0; padding: 8px 14px; display: grid; gap: 4px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.section { left: 12px; bottom: 12px; width: 300px; }
.section .body { padding: 8px 14px; font-size: 13px; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; }
.mapctl { position: absolute; right: 354px; bottom: 22px; display: grid; gap: 6px; z-index: 5; }
.mapctl button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel-solid); cursor: pointer; font-size: 18px; box-shadow: var(--shadow); }
.mapctl button.on { background: var(--gold); color: #241b04; }
.scalebar { position: absolute; left: 320px; bottom: 14px; font-size: 11px; color: var(--muted); z-index: 4; }
.scalebar i { display: block; height: 4px; border: 1px solid var(--muted); border-top: 0; margin-top: 2px; }
.attrib { position: absolute; right: 56px; bottom: 4px; font-size: 10.5px; color: var(--faint); z-index: 4; }

/* floating info and camera popups on the map */
.pop { position: absolute; z-index: 20; background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 14px; box-shadow: var(--shadow-lift); min-width: 240px; max-width: min(360px, calc(100vw - 24px)); transform: translate(-50%, calc(-100% - 16px)); }
.pop::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--line2); }
.pop header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: linear-gradient(180deg, #2c4f94, #213e7a); color: #fff; border-radius: 14px 14px 0 0; font-weight: 600; font-size: 14px; cursor: move; }
.pop header .x { margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.pop .body { padding: 8px 12px; font-size: 13px; }
.pop .kvl { margin: 0; grid-template-columns: max-content 1fr; font-size: 13px; }
.pop .kvl dd { color: var(--gold-soft); font-weight: 600; }
.pop .acts { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.pop.cam { width: min(380px, calc(100vw - 24px)); max-width: min(380px, calc(100vw - 24px)); }
.pop.cam .vid { position: relative; background: #000; aspect-ratio: 16 / 9; }
.pop.cam .vid video, .pop.cam .vid img, .pop.cam .vid iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.vidbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #1d3566; }
.vidbar button { width: 26px; height: 22px; border-radius: 6px; border: 0; background: #2f5ea8; color: #fff; cursor: pointer; font-size: 12px; display: grid; place-items: center; }
.vidbar button.rec { background: #c0392b; }
.vidbar .live { margin-left: auto; color: #fff; font-size: 11.5px; display: flex; align-items: center; gap: 4px; }
.vidbar .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--crit); }
.vidbar .live.demo::before { background: var(--med); }
.vidmsg { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd6e2; font-size: 13px; text-align: center; padding: 14px; background: #0a1430; }

/* MapLibre city map */
.gl { position: absolute; inset: 0; }
.maplibregl-map { font: inherit !important; }
.maplibregl-popup-content { background: var(--panel-solid) !important; color: var(--text); border-radius: 14px !important; padding: 0 !important; box-shadow: var(--shadow-lift) !important; border: 1px solid var(--line2); overflow: hidden; min-width: 240px; }
.maplibregl-popup-tip { border-top-color: var(--panel-solid) !important; border-bottom-color: var(--panel-solid) !important; }
.maplibregl-popup-close-button { color: #fff; font-size: 18px; right: 4px; top: 2px; z-index: 2; }
.maplibregl-popup-content .pophd { padding: 9px 30px 9px 12px; background: linear-gradient(180deg, #2c4f94, #213e7a); color: #fff; font-weight: 600; }
.maplibregl-popup-content .popbd { padding: 10px 12px; font-size: 13px; }
.maplibregl-ctrl-group { background: var(--panel-solid) !important; border-radius: 12px !important; border: 1px solid var(--line2); box-shadow: var(--shadow) !important; overflow: hidden; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
body:not(.light) .maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4); }
.maplibregl-ctrl-attrib { font-size: 10.5px; }
.maplibregl-ctrl-scale { background: var(--panel-solid) !important; color: var(--muted) !important; border-color: var(--muted) !important; border-radius: 0 0 4px 4px; font-size: 11px !important; }
.maplibregl-popup-content .cam { width: min(380px, calc(100vw - 40px)); }
.maplibregl-popup-content .cam .vid { position: relative; background: #000; aspect-ratio: 16 / 9; }
.maplibregl-popup-content .cam .vid video, .maplibregl-popup-content .cam .vid img, .maplibregl-popup-content .cam .vid iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.maplibregl-popup-content .popbd .kvl { font-size: 13px; margin-bottom: 10px; }
.mapwrap .layers { z-index: 6; } .mapwrap .listpanel { z-index: 6; }
.mapwrap .legend { right: auto; left: 280px; top: auto; bottom: 34px; }
@media (max-width: 980px) { .mapwrap .legend { display: none; } }
.camthumb { width: 220px; border-radius: 12px; overflow: hidden; background: #000; border: 2px solid #fff; box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .7); cursor: pointer; transform: translateY(-8px); }
.camthumb .vid { position: relative; aspect-ratio: 16 / 9; }
.camthumb .vid video, .camthumb .vid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camthumb .nm { font-size: 12px; padding: 3px 8px; background: #1d3566; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.camthumb .nm::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--crit); flex: 0 0 auto; }
.mapnote { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6; padding: 8px 14px; border-radius: 999px; background: var(--panel-solid); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 13.5px; max-width: calc(100% - 24px); }

/* video wall */
.wall { display: grid; gap: 10px; height: calc(100vh - var(--top) - 120px); min-height: 420px; }
.wall.g2 { grid-template-rows: repeat(2, minmax(0, 1fr)); } .wall.g3 { grid-template-rows: repeat(3, minmax(0, 1fr)); } .wall.g4 { grid-template-rows: repeat(4, minmax(0, 1fr)); }
.wall .tile { min-height: 0; } .wall .tile .vid { aspect-ratio: auto; flex: 1; min-height: 0; }
.wall:fullscreen { height: 100vh; padding: 8px; background: #000; }
@media (max-width: 760px) { .wall { height: auto; } .wall.g3, .wall.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wall[class] { grid-template-rows: none; } .wall .tile .vid { aspect-ratio: 16 / 9; } }
.wall.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wall.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wall.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { background: #000; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.tile .vid { position: relative; aspect-ratio: 16 / 9; }
.tile .vid video, .tile .vid img, .tile .vid iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.tile .vidbar { background: var(--panel-solid); }
.tile .vidbar .nm { color: var(--text); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .vidbar .st { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }

/* camera status (from the automatic stream check) */
.probe { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.probe::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.probe.online::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .probe.offline::before { background: var(--off); }
.probe.fault::before { background: var(--crit); } .probe.checking::before { background: var(--med); animation: halo 1s infinite; }
.probe .why { color: var(--muted); }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login .brandside { color: #fff; padding: 48px 56px; display: flex; flex-direction: column; gap: 26px; position: relative; overflow: hidden;
  background: radial-gradient(900px 500px at 85% 0%, rgba(111, 183, 255, .35), transparent 60%), radial-gradient(700px 420px at 0% 100%, rgba(233, 196, 106, .22), transparent 60%), linear-gradient(165deg, #1d4486, #0B1530 70%); }
.login .brandside .arch { position: absolute; right: -40px; bottom: -30px; height: 78%; opacity: .14; }
.login .brandside .wm { width: 170px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(246, 222, 156, .3), 0 18px 40px -12px rgba(0, 0, 0, .6); }
.login .brandside h1 { font-size: 40px; line-height: 1.08; margin: 0; font-weight: 800; text-wrap: balance; max-width: 18ch; }
.login .brandside h1 span { color: var(--gold-soft); }
.login .brandside p { max-width: 56ch; color: #d6e2fb; margin: 0; font-size: 16px; }
.login .brandside .drishti { font-size: 14px; letter-spacing: .3em; color: #F6DE9C; font-weight: 700; }
.login .brandside .drishti .dv { letter-spacing: 0; font-size: 15px; }
:lang(mr) .ph h1, [lang="mr"] .card h3 { letter-spacing: 0; }
.login .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.login .chips span { border: 1px solid rgba(246, 222, 156, .45); color: #f6e8c0; background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.login .brandside .foot { margin-top: auto; font-size: 12.5px; color: #b4c4e6; }
.login .formside { display: grid; place-items: center; padding: 32px 20px; }
.login form { width: min(410px, 100%); background: var(--panel); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: inset 0 1px 0 var(--hi), var(--shadow-lift); }
.login form h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.login .err { background: rgba(255, 107, 122, .12); border: 1px solid rgba(255, 107, 122, .4); color: #ffc2c9; border-radius: 12px; padding: 8px 12px; margin: 10px 0; font-size: 14px; }
body.light .login .err { color: #a11; }
.login input.in { width: 100%; padding: 10px 12px; }
.login .btn.primary { width: 100%; justify-content: center; padding: 11px; font-size: 16px; margin-top: 6px; }
.login .lang { display: flex; justify-content: flex-end; margin-bottom: 10px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .brandside { padding: 28px 20px; } .login .brandside h1 { font-size: 28px; } }

/* responsive shell */
@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); z-index: 50; transform: translateX(-100%); transition: transform .2s; background: var(--panel-solid); }
  .shell.nav-open .side { transform: none; }
  .brand { width: auto; }
  .brand .prod { display: none; }
  .ticker, .top .site { display: none; }
  .legend, .listpanel { display: none; }
  .mapctl { right: 12px; }
  .layers { width: 210px; }
  .page { padding: 16px 16px 40px; }
}
@media (min-width: 981px) { .menu-btn { display: none !important; } }
@media print { .side, .top, .actions, .toast-wrap { display: none !important; } .shell { display: block; } body { background: #fff; color: #000; } }

/* aligning the AURIC plan picture on the map */
.alignbar { left: 50%; bottom: 40px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); padding: 12px 14px; z-index: 9; }
.alignbar input[type="range"] { flex: 1; accent-color: var(--gold); }
.alignh { width: 18px; height: 18px; border-radius: 50%; background: #E9C46A; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.5); cursor: grab; }
.alignh.move { width: 26px; height: 26px; background: #2F6FD6; }
/* camera player inside the device drawer */
.drawer .vid { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px 12px 0 0; overflow: hidden; }
.drawer .vid video, .drawer .vid img, .drawer .vid iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.drawer .vidbar { border-radius: 0 0 12px 12px; }
/* two-factor enrolment QR code: always fit its white box */
#qr svg { display: block; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- department cards v2 (illustrated, static) */
.wgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; }
.w2 { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--panel-solid); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(3, 8, 24, .3), 0 14px 30px -18px rgba(3, 8, 24, .7); transition: border-color .15s, box-shadow .15s; }
.w2:hover, .w2:focus-visible { border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 18px 36px -18px rgba(3, 8, 24, .8); }
.w2.is-crit { border-color: rgba(255, 107, 122, .7); }
.w2-art { position: relative; height: 128px; flex: 0 0 auto; }
.w2-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.w2-icon { position: absolute; left: 16px; bottom: -22px; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--panel-solid);
  color: var(--c); box-shadow: 0 0 0 4px var(--panel-solid), 0 6px 14px -4px rgba(0, 0, 0, .45); z-index: 1; }
.w2-icon svg { width: 26px; height: 26px; }
.w2-state { position: absolute; right: 12px; top: 12px; }
.w2-state .pill { background: rgba(8, 16, 40, .78); border-color: transparent; }
body.light .w2-state .pill { background: rgba(255, 255, 255, .92); }
.w2-body { padding: 28px 18px 14px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.w2-head h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.15; }
.w2-head span { color: var(--muted); font-size: 13px; }
.w2 .viz { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; min-height: 104px; }
.w2 .viz.full { grid-template-columns: minmax(0, 1fr); }
.w2 .facts { display: grid; gap: 8px; }
.w2 .fact { display: grid; }
.w2 .fact b { font-size: 22px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.w2 .fact b small { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.w2 .fact span { color: var(--muted); font-size: 12.5px; }
.w2 .facts.two { grid-template-columns: 1fr 1fr; }
.w2 .calm { font-size: 24px; }
.w2-trend { margin-top: auto; padding: 10px 12px 8px; border-radius: 14px; background: color-mix(in srgb, var(--c) 9%, transparent); }
.w2-trend .bars24 { width: 100%; height: 46px; display: block; }
.w2-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.w2-axis span:nth-child(2) { color: var(--text); font-weight: 600; }
.w2-foot { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); background: rgba(0, 0, 0, .08); }
body.light .w2-foot { background: rgba(26, 58, 122, .03); }
.w2-foot .msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w2-foot .msg.sev-critical { color: var(--crit); } .w2-foot .msg.sev-high { color: var(--high); }
.w2-foot .go { margin-left: auto; color: var(--text); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.w2-foot .go svg { width: 16px; height: 16px; }
/* calm, static surfaces: no glow pulses */
.orb .halo, .w.alert::before { animation: none !important; }
.orb .core { box-shadow: inset -8px -10px 20px rgba(0, 0, 0, .22), 0 10px 24px -12px rgba(0, 0, 0, .5); }
.nav a .dot { box-shadow: none; }

/* the header shows the role only; the person's name stays in the account menu */
.userchip #userName { display: none; }
.userchip small { font-size: 13px; color: var(--text); }

/* ---------------------------------------------------------------- dashboard v2.1 layout (sky palette) */
/* dashboard heading */
.dash-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-head h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.dash-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.dash-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* headline figures */
.kgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
@media (max-width: 1100px) { .kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kgrid { grid-template-columns: 1fr; } }
.kcard { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s; }
.kcard:hover { border-color: rgba(233, 196, 106, .45); }
.kcard.is-bad { border-color: rgba(248, 113, 113, .45); }
.kc-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; }
.kc-top i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(233, 196, 106, .12); color: var(--gold); }
.kc-top i svg { width: 18px; height: 18px; }
.kcard > b { font-size: 34px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kc-sub { font-size: 13px; color: var(--muted); }
.dl { font-weight: 600; } .dl.up { color: var(--ok); } .dl.down { color: var(--crit); } .dl.flat { color: var(--muted); font-weight: 500; }
.dl span { color: var(--muted); font-weight: 400; }

/* bento of charts */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.bento .span-2 { grid-column: span 2; } .bento .span-3 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .bento { grid-template-columns: 1fr; } .bento .span-2, .bento .span-3 { grid-column: auto; } }
.bcard { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.bcard > header { display: flex; align-items: flex-start; gap: 12px; }
.bcard > header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.bcard > header span { color: var(--muted); font-size: 13px; }
.bcard > header > :last-child:not(div) { margin-left: auto; }
.bcard .seg { margin-left: auto; }
.bcard .big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bcard .big b { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bcard .big .dl { font-size: 13px; }
.bcard .chart { height: 250px; }
.lnk { color: var(--gold); text-decoration: none; font-size: 13.5px; font-weight: 600; margin-left: auto; }
.donut { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; }
.donut-c { position: relative; height: 170px; }
.donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-mid b { font-size: 28px; font-weight: 800; line-height: 1; } .donut-mid span { color: var(--muted); font-size: 12.5px; }
.legend2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; }
.legend2 li { display: flex; align-items: center; gap: 8px; cursor: pointer; } .legend2 li:hover span { color: var(--text); }
.legend2 i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.legend2 span { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend2 b { margin-left: auto; font-variant-numeric: tabular-nums; }
@media (max-width: 1300px) { .donut { grid-template-columns: 1fr; } .donut-c { max-width: 190px; margin: 0 auto; width: 100%; } }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.activity li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 12px; cursor: pointer; }
.activity li:hover { background: var(--panel2); }
.activity .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); color: var(--gold); border: 1px solid var(--line); }
.activity .av svg { width: 18px; height: 18px; }
.activity .av.sev-critical, .activity .av.sev-high { color: var(--crit); background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); }
.activity .av::before { display: none; }
.activity b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity div > span { color: var(--muted); font-size: 12.5px; }
.activity .when { text-align: right; display: grid; font-size: 12.5px; color: var(--muted); }
.activity .sv { font-weight: 700; }
.sev-t-critical { color: var(--crit); } .sev-t-high { color: var(--high); } .sev-t-medium { color: var(--med); } .sev-t-low { color: var(--low); }
.inc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .inc-wrap { grid-template-columns: 1fr; } }
table.board th { background: transparent; position: static; }
table.board td.n.has { color: var(--gold); font-weight: 800; }
.perf { display: grid; gap: 10px; }
.perf > div { padding: 12px 14px; border-radius: 14px; background: var(--panel2); display: grid; }
.perf span { color: var(--muted); font-size: 12.5px; } .perf b { font-size: 20px; font-weight: 800; }

/* department cards */
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dcard { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s; }
.dcard:hover, .dcard:focus-visible { border-color: rgba(233, 196, 106, .5); }
.dcard.is-crit { border-color: rgba(248, 113, 113, .6); }
.dc-art { height: 92px; position: relative; }
.dc-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dc-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px 0; }
.dc-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(233, 196, 106, .12); color: var(--gold); flex: 0 0 auto; }
.dc-icon svg { width: 22px; height: 22px; }
.dc-head h3 { margin: 0; font-size: 16.5px; font-weight: 700; line-height: 1.2; }
.dc-head span { color: var(--muted); font-size: 12.5px; }
.dc-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.dcard .viz { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; min-height: 100px; }
.dcard .viz.full { grid-template-columns: minmax(0, 1fr); }
.dcard .facts { display: grid; gap: 8px; } .dcard .facts.two { grid-template-columns: 1fr 1fr; }
.dcard .fact { display: grid; }
.dcard .fact b { font-size: 21px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dcard .fact b small { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.dcard .fact span { color: var(--muted); font-size: 12.5px; }
.dc-trend { margin-top: auto; padding: 10px 12px 8px; border-radius: 14px; background: var(--panel2); }
.dc-trend .bars24 { width: 100%; height: 42px; display: block; }
.dc-axis { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.dc-axis span:nth-child(2) { color: var(--text); font-weight: 600; }
.dc-foot { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.dc-foot .msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-foot .msg.sev-critical { color: var(--crit); } .dc-foot .msg.sev-high { color: var(--high); }
.dc-foot .go { margin-left: auto; color: var(--gold); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.dc-foot .go svg { width: 16px; height: 16px; }

.dcard .dc-icon { color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .22); }
.dcard:hover, .dcard:focus-visible { border-color: color-mix(in srgb, var(--c) 65%, transparent); }
.dc-trend { background: color-mix(in srgb, var(--c) 9%, transparent); }
.kcard, .bcard, .dcard { -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: inset 0 1px 0 var(--hi), var(--shadow); }

/* video wall sizes and player messages */
.wall.g1 { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.wall.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); }
@media (max-width: 760px) { .wall.g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wall .tile { cursor: zoom-in; }
.vidmsg small { display: block; margin-top: 6px; opacity: .7; font-size: 12px; }
.vidmsg.over { background: rgba(10, 20, 48, .82); }
.probe .codec { margin-left: 8px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(74, 222, 155, .14); color: var(--ok); }
.probe .codec.warn { background: rgba(245, 181, 68, .16); color: var(--amber); }

/* guided SOP in the alarm view */
.sopbox { margin: 4px 0 16px; padding: 14px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); }
.sopbox > header { display: flex; align-items: flex-start; gap: 10px; }
.sopbox > header h3 { margin: 0; font-size: 15px; } .sopbox > header span { color: var(--muted); font-size: 12.5px; }
.sop-count { margin-left: auto; text-align: right; display: grid; } .sop-count b { font-size: 20px; } .sop-count span { font-size: 12px; color: var(--muted); }
.sop-bar { height: 6px; border-radius: 4px; background: rgba(169, 182, 214, .18); margin: 10px 0 12px; overflow: hidden; }
.sop-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--ok)); border-radius: 4px; }
.sopsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sopsteps li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.sopsteps li.now { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(233, 196, 106, .35); }
.sopsteps li.done { opacity: .78; }
.sopsteps .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(169, 182, 214, .16); }
.sopsteps li.now .num { background: var(--gold); color: #241b04; } .sopsteps li.done .num { background: var(--ok); color: #06281a; }
.sopsteps .tx { font-size: 14px; } .sopsteps li.done .tx { text-decoration: line-through; text-decoration-color: var(--faint); }
.sopsteps .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.sopsteps .tag { font-size: 11.5px; padding: 0 8px; border-radius: 999px; background: rgba(169, 182, 214, .14); color: var(--muted); }
.sopsteps .tag.req { color: var(--crit); background: rgba(255, 107, 122, .12); } .sopsteps .tag.now { color: #241b04; background: var(--gold); font-weight: 700; }
.sopsteps .meta { font-size: 12px; color: var(--faint); margin-top: 4px; }
.sop-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.sopsteps textarea { margin-top: 8px; min-height: 52px; }

/* alerting */
#soundBtn .off { display: none; } #soundBtn.muted-off .on { display: none; } #soundBtn.muted-off .off { display: inline; } #soundBtn.muted-off { color: var(--faint); }
.critbar { position: fixed; bottom: 16px; left: calc(var(--side) + 16px); width: min(620px, calc(100vw - var(--side) - 430px)); z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px; background: rgba(120, 20, 40, .92); color: #fff; border: 1px solid rgba(255, 107, 122, .7); box-shadow: var(--shadow-lift); font-size: 14px; }
.critbar .muted { color: #ffd6dc; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.critbar .btn { margin-left: auto; }
.critbar .dotp { width: 10px; height: 10px; border-radius: 50%; background: #ff6b7a; flex: 0 0 auto; }
@media (max-width: 1200px) { .critbar { left: 12px; right: 12px; width: auto; bottom: auto; top: calc(var(--top) + 8px); } }

/* ---------------------------------------------------------------- operator console (queue · workspace · timeline)
   Same visual language as the dashboard: lit glass panels, gold accents, department colours on medals and scene art. */
.oc { display: flex; flex-direction: column; height: 100%; padding: 18px 22px 14px; gap: 12px; min-height: 0; }
.oc-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.oc-head h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; } .oc-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.oc-boxes { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.oc-box { display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  cursor: pointer; font: inherit; font-size: 13px; text-align: left; box-shadow: inset 0 1px 0 var(--hi), var(--shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); transition: border-color .15s; }
.oc-box > i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(233, 196, 106, .12); color: var(--gold); }
.oc-box > i svg { width: 18px; height: 18px; }
.oc-box .tx { display: grid; line-height: 1.1; } .oc-box b { font-size: 22px; color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.oc-box:hover { border-color: rgba(233, 196, 106, .45); }
.oc-box.on { border-color: var(--gold); color: var(--text); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px rgba(233, 196, 106, .35), 0 10px 26px -12px rgba(233, 196, 106, .55); }
.oc-box.hot > i { background: rgba(255, 107, 122, .16); color: var(--crit); } .oc-box.hot b { color: var(--crit); }
.oc-box.forme.hot > i { background: var(--gold); color: #241b04; } .oc-box.forme.hot b { color: var(--gold); }
.oc-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.oc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  cursor: pointer; font: inherit; font-size: 13px; white-space: nowrap; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.oc-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--gold)); box-shadow: 0 0 8px var(--c, var(--gold)); }
.oc-chip b { color: var(--text); } .oc-chip em { font-style: normal; color: var(--crit); font-size: 12px; font-weight: 600; }
.oc-chip.on { border-color: var(--c, var(--gold)); color: var(--text); background: color-mix(in srgb, var(--c, var(--gold)) 16%, var(--panel)); }
.oc-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(310px, 370px) minmax(0, 1fr) minmax(280px, 340px); gap: 16px; }
.oc-qwrap, .oc-work, .oc-rail { min-height: 0; overflow-y: auto; border-radius: 20px; background: var(--panel); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); scrollbar-width: thin; }
.oc-queue { display: grid; gap: 8px; padding: 10px; }
.oc-item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 11px; padding: 11px 12px; border-radius: 16px; cursor: pointer; outline: none;
  background: var(--panel2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi); transition: border-color .15s, transform .1s; }
.oc-item > .oc-medal { grid-row: 1 / span 3; align-self: start; }
.oc-item > div { grid-column: 2; }
.oc-item:hover, .oc-item:focus-visible { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.oc-item.on { border-color: var(--gold); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px rgba(233, 196, 106, .4), 0 12px 28px -14px rgba(233, 196, 106, .6); }
.oc-item.s-critical.new { border-color: rgba(255, 107, 122, .55); box-shadow: inset 0 1px 0 var(--hi), 0 0 22px -6px rgba(255, 107, 122, .55); }
.oc-item.s-high.new { border-color: rgba(245, 147, 74, .5); }
.oc-item .l1 { display: flex; gap: 8px; align-items: baseline; } .oc-item .l1 b { font-size: 14.5px; font-weight: 700; line-height: 1.25; flex: 1; min-width: 0; }
.oc-item .l1 time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.oc-item .l2 { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-item .l3 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 22px; margin-top: 3px; }
.oc-item.s-critical .l1 b::before, .oc-item.s-high .l1 b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin: 0 7px 2px 0; vertical-align: middle; }
.oc-item.s-critical .l1 b::before { background: var(--crit); box-shadow: 0 0 8px var(--crit); } .oc-item.s-high .l1 b::before { background: var(--high); box-shadow: 0 0 8px var(--high); }
.oc-medal { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: 0 0 auto;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 45%, color-mix(in srgb, var(--c) 55%, #000));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .22); }
.oc-medal svg { width: 20px; height: 20px; } .oc-medal.lg { width: 54px; height: 54px; border-radius: 16px; } .oc-medal.lg svg { width: 28px; height: 28px; }
.oc-sla { font-size: 12px; padding: 1px 9px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.oc-sla.due { background: rgba(233, 196, 106, .16); color: var(--gold); } .oc-sla.late { background: rgba(255, 107, 122, .18); color: var(--crit); animation: ocPulse 1.6s ease-in-out infinite; }
.oc-sla.wait { background: rgba(111, 183, 255, .15); color: var(--sky); } .oc-sla.esc { background: rgba(255, 107, 122, .14); color: var(--crit); }
@keyframes ocPulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .oc-sla.late { animation: none; } }
.oc-own { font-size: 12px; color: var(--muted); } .oc-own::before { content: "● "; color: var(--faint); } .oc-own.me { color: var(--text); } .oc-own.me::before { color: var(--gold); }
.oc-mini { margin-left: auto; width: 56px; height: 5px; border-radius: 3px; background: rgba(169, 182, 214, .18); overflow: hidden; } .oc-mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--ok)); }
.oc-empty { display: grid; gap: 4px; text-align: center; padding: 40px 16px; color: var(--muted); } .oc-empty b { color: var(--text); font-size: 16px; }

/* workspace: department scene banner (as on the dashboard cards), title, actions */
.oc-banner { position: relative; height: 96px; margin: -18px -20px 14px; border-radius: 20px 20px 0 0; overflow: hidden; display: flex; align-items: flex-end; gap: 12px; padding: 0 20px 12px;
  background: color-mix(in srgb, var(--c) 10%, transparent); border-bottom: 1px solid var(--line); }
.oc-banner .art { position: absolute; inset: 0; } .oc-banner .art > svg { width: 100%; height: 100%; display: block; }
.oc-banner > .oc-medal, .oc-banner .who { position: relative; }
.oc-banner .who { display: grid; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); } .oc-banner .who b { font-size: 16px; color: #fff; } .oc-banner .who span { font-size: 12.5px; color: rgba(255, 255, 255, .85); }
.oc-work { padding: 18px 20px 24px; }
.oc-title .pills { display: flex; gap: 6px; flex-wrap: wrap; }
.oc-title h2 { margin: 6px 0 2px; font-size: 21px; line-height: 1.2; } .oc-title h2 .id { color: var(--faint); font-weight: 500; margin-right: 8px; }
.oc-title .meta { color: var(--muted); font-size: 13px; } .oc-title .meta a { color: var(--text); }
.oc-title .meta .own { color: var(--text); font-weight: 600; } .oc-title .meta .own.me { color: var(--gold); }
.oc-title .desc { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.oc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 10px; }
.btn.ok { border-color: var(--ok); color: var(--ok); }
.oc-hint { font-size: 13px; color: var(--gold); margin-bottom: 8px; }
.oc-evidence { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.oc-cam, .oc-map { border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); aspect-ratio: 16 / 9; position: relative; }
.oc-cam .tile { border: 0; border-radius: 0; height: 100%; box-shadow: none; } .oc-cam .tile .vid { aspect-ratio: auto; flex: 1; min-height: 0; }
.oc-mapel { position: absolute; inset: 0; }
.oc-none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
.oc-bigcam .tile .vid { aspect-ratio: 16 / 9; }

.oc-sop { padding: 16px; border-radius: 18px; background: var(--panel2); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi); }
.oc-sop > header { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.oc-sop > header h3 { margin: 0; font-size: 15px; } .oc-sop > header .muted { font-size: 12.5px; }
.oc-sopstat { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: baseline; }
.oc-sopstat b { color: var(--text); font-variant-numeric: tabular-nums; } .oc-sopstat .late { color: var(--crit); font-weight: 600; }
.oc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.oc-steps li { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.oc-steps li.now { border-color: var(--gold); background: var(--panel2); box-shadow: 0 0 0 1px rgba(233, 196, 106, .3); }
.oc-steps li.done .tx { color: var(--muted); } .oc-steps li.skipped { opacity: .55; } .oc-steps li.skipped .tx { text-decoration: line-through; }
.oc-steps .sh { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.oc-steps .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: rgba(169, 182, 214, .16); color: var(--muted); }
.oc-steps li.now .num { background: linear-gradient(150deg, #fff3c4, var(--gold) 45%, #9a7420); color: #241b04; box-shadow: 0 0 14px rgba(233, 196, 106, .55); } .oc-steps li.done .num { background: var(--ok); color: #06281a; } .oc-steps li.skipped .num { background: rgba(169, 182, 214, .2); }
.oc-steps .tx { font-size: 14px; line-height: 1.4; padding-top: 2px; } .oc-steps .tx .no { color: var(--faint); }
.oc-steps .tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 240px; }
.oc-steps .tag { font-size: 11.5px; padding: 0 8px; border-radius: 999px; background: rgba(169, 182, 214, .14); color: var(--muted); white-space: nowrap; }
.oc-steps .tag.req { color: var(--crit); background: rgba(255, 107, 122, .12); } .oc-steps .tag.now { color: #241b04; background: var(--gold); font-weight: 700; }
.oc-steps .tag.late { color: #fff; background: var(--crit); } .oc-steps .tag.ty { color: var(--text); }
.oc-steps .meta { font-size: 12.5px; color: var(--muted); margin: 4px 0 0 38px; } .oc-steps .meta .by { color: var(--faint); }
.oc-steps .lnk { background: none; border: 0; color: var(--sky); cursor: pointer; font: inherit; font-size: 12.5px; padding: 0 0 0 8px; }
.oc-steps .sa { margin: 4px 0 0 38px; } .oc-steps .sa .lnk { padding: 0; }
.oc-steps .sf { margin: 10px 0 2px 38px; display: grid; gap: 8px; }
.oc-steps .sf .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .oc-steps .sf .row .in { flex: 1; min-width: 180px; }
.oc-steps .lbl, .fwd .lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.picks { display: flex; gap: 6px; flex-wrap: wrap; }
.pick { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font: inherit; font-size: 13px; color: var(--text); }
.pick small { color: var(--faint); } .pick.on { border-color: var(--gold); } .pick input { accent-color: var(--gold); }
.yn { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px 10px; align-items: center; max-width: 520px; }
.yn .btn { min-width: 92px; justify-content: center; font-weight: 700; } .yn small { color: var(--faint); font-size: 12px; }
.btn.yes { border-color: var(--ok); color: var(--ok); } .btn.no { border-color: var(--line2); }
.resp { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; margin-bottom: 8px; }
.rcard, .fcard { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; align-items: center; }
.rcard input, .fcard input { grid-row: span 2; accent-color: var(--gold); } .rcard small, .fcard small { color: var(--muted); font-size: 12px; grid-column: 2; }
.rcard.on, .rcard:has(input:checked), .fcard:has(input:checked) { border-color: var(--gold); background: var(--panel2); }
.fwd { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; margin: 8px 0 12px; } .fwd .lbl { grid-column: 1 / -1; margin-top: 6px; }
.fcard { grid-template-columns: auto auto 1fr; } .fcard small { grid-column: 3; } .fcard input { grid-row: span 2; }
.fcard .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--off); grid-row: span 2; } .fcard .dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); } .fcard .dot.desk { background: var(--sky); }

.oc-rail { padding: 12px 14px 20px; display: grid; gap: 16px; align-content: start; }
.oc-rail h3 { margin: 0 0 10px; font-size: 15px; color: var(--text); font-weight: 700; }
.oc-comment { display: flex; gap: 6px; align-items: flex-end; margin-bottom: 10px; } .oc-comment .in { min-height: 40px; }
.oc-log { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; gap: 8px; }
.oc-log li { position: relative; font-size: 13px; line-height: 1.4; display: grid; }
.oc-log li::before { content: ""; position: absolute; left: -17px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--line2); }
.oc-log li.k-forward::before, .oc-log li.k-take::before { background: var(--sky); } .oc-log li.k-escalate::before { background: var(--crit); }
.oc-log li.k-dispatch::before, .oc-log li.k-task::before { background: var(--gold); } .oc-log li.k-sop::before { background: var(--ok); } .oc-log li.k-note::before { background: var(--violet); }
.oc-log li.k-raise::before { background: var(--crit); }
.oc-log time { font-size: 11.5px; color: var(--faint); }
.oc-task { padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 6px; font-size: 13px; }
.oc-task > div { display: flex; justify-content: space-between; gap: 6px; align-items: center; } .oc-task p { margin: 4px 0; }
.oc-sim { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.oc-sim li { display: grid; grid-template-columns: 18px 1fr; gap: 0 6px; font-size: 13px; } .oc-sim small { grid-column: 2; color: var(--faint); } .oc-sim a { color: var(--text); }
@media (max-width: 1380px) { .oc-grid { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); } .oc-rail { grid-column: 1 / -1; max-height: none; } .oc { height: auto; } .oc-qwrap { max-height: 70vh; } }
@media (max-width: 900px) { .oc-grid { grid-template-columns: 1fr; } .oc-evidence { grid-template-columns: 1fr; } .oc-boxes { margin-left: 0; } }

body[data-route="console"] .critbar { display: none; }   /* the console shows these in its own queue */
button.lnk { background: none; border: 0; cursor: pointer; padding: 2px 0; font: inherit; font-size: 13px; color: var(--sky); margin-left: 0; }
.sopedit { padding: 10px; display: grid; gap: 6px; } .sopedit .row { gap: 8px; align-items: center; flex-wrap: wrap; } .sopedit .lbl { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.sopx { display: grid; gap: 6px; padding: 8px; border-radius: 10px; background: rgba(169, 182, 214, .07); }
.oc-banner .who { background: rgba(12, 16, 44, .62); padding: 6px 12px; border-radius: 12px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); text-shadow: none; }
.oc-banner > .oc-medal { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .22), 0 6px 16px rgba(0, 0, 0, .35); }
.appframe { display: flex; flex-direction: column; height: 100%; } .appframe > header { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.appframe iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* System health: servers */
.hosts-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hosts-head h3 { margin: 0 6px 0 0; }
.hosts-head .spacer { flex: 1; }
.hosts-t td { vertical-align: top; }
.hosts-t tr.grp td { font-size: 12px; font-weight: 700; color: var(--gold); padding-top: 14px; border-bottom: 1px solid rgba(169, 182, 214, .18); }
.hosts-t tr.hs-down td:first-child b { color: var(--crit); }
.hm { display: grid; grid-template-columns: minmax(90px, 140px) auto; align-items: center; gap: 8px; font-size: 12.5px; white-space: nowrap; }
.hm.ok .bar i { background: var(--ok); } .hm.high .bar i { background: var(--high); } .hm.crit .bar i { background: var(--crit); }
.hdisk { display: grid; grid-template-columns: 70px auto; gap: 6px; align-items: center; margin-bottom: 4px; font-size: 12px; }
.tscroll { overflow-x: auto; }

/* Lite rendering: PCs without graphics acceleration (Remote Desktop sessions, VMs, old GPUs). Same colours, no blur. */
body.lite { --blur: none; --panel: rgba(28, 46, 92, .92); --panel2: rgba(40, 62, 118, .92); }
body.lite.light { --panel: rgba(255, 255, 255, .96); --panel2: #fff; }
body.lite .modal-bg, body.lite .oc-banner .who { -webkit-backdrop-filter: none; backdrop-filter: none; }
body.lite *, body.lite *::before { animation-duration: 0s !important; transition: none !important; }
.hosts-over { margin-top: 18px; padding-top: 6px; border-top: 1px solid rgba(169, 182, 214, .16); }
.hchart { position: relative; height: 220px; }
.hlab { font-size: 12.5px; margin: 4px 0 6px; }
.hosts-t tr.click { cursor: pointer; } .hosts-t tr.click:hover td { background: rgba(169, 182, 214, .06); }
.tcrit { color: var(--crit); font-weight: 700; } .thigh { color: var(--high); }
.antile { display: flex; flex-direction: column; gap: 8px; min-height: 170px; }
.antile .spacer { flex: 1; }
/* several cameras on one pole */
.camthumb .nm .nmt { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.camthumb .polen { background: #E9C46A; color: #241b04; border-radius: 8px; padding: 0 6px; font-size: 11px; }
.maplibregl-popup-content .cam.pole { width: auto; } /* the single-camera width must not clip the pole grid */
.polegrid { display: grid; gap: 6px; padding: 6px; width: min(760px, calc(100vw - 60px)); }
.polegrid .tile .vidbar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
@media (max-width: 700px) { .polegrid.n2, .polegrid.n3, .polegrid.n4 { grid-template-columns: 1fr; } }
.polegrid.n2 { grid-template-columns: 1fr 1fr; } .polegrid.n3, .polegrid.n4 { grid-template-columns: 1fr 1fr; }
.polegrid .tile { border-radius: 8px; overflow: hidden; background: #000; }
.polegrid .tile .vid { aspect-ratio: 16 / 9; position: relative; }

.drillcrumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13.5px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold); cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------------- System Health: component health history (2.7.0) ---------------- */
.hh-wrap { margin-bottom: 16px; }
.hh-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 18px 20px; }
.hh-b-ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 9%, var(--panel)); }
.hh-b-warn { border-color: color-mix(in srgb, var(--amber) 50%, transparent); background: color-mix(in srgb, var(--amber) 9%, var(--panel)); }
.hh-b-fail { border-color: color-mix(in srgb, var(--crit) 50%, transparent); background: color-mix(in srgb, var(--crit) 9%, var(--panel)); }
.hh-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.hh-ico svg { width: 28px; height: 28px; }
.hh-b-ok .hh-ico { color: var(--ok); } .hh-b-warn .hh-ico { color: var(--amber); } .hh-b-fail .hh-ico { color: var(--crit); }
.hh-bt { flex: 1; min-width: 220px; }
.hh-title { font-size: 21px; font-weight: 700; }
.hh-tiles { display: flex; gap: 10px; }
.hh-tile { min-width: 78px; padding: 8px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); text-align: center; }
.hh-tile b { display: block; font-size: 22px; line-height: 1.1; }
.hh-tile span { font-size: 12.5px; color: var(--muted); }
.hh-live { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.hh-card { padding: 18px 20px; }
.hh-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hh-head h3 { margin: 0; }
.hh-head .spacer { flex: 1; }
.hh-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 4px; font-size: 13px; align-items: center; }
.hh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hh-sq { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.hh-group { margin: 16px 0 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.hh-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) 82px minmax(240px, 3fr) 76px; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hh-name { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.hh-name > div { min-width: 0; }
.hh-name .faint { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hh-now { font-weight: 700; font-size: 13.5px; }
.hh-strip { display: flex; gap: 2px; height: 30px; align-items: stretch; }
.hh-bar { flex: 1 1 0; min-width: 2px; border-radius: 2px; cursor: crosshair; transition: transform .08s; }
.hh-bar:hover { transform: scaleY(1.18); }
.hh-pct { text-align: right; line-height: 1.15; }
.hh-pct b { display: block; font-size: 15px; }
.hh-pct span { font-size: 12px; }
.hh-axis { display: grid; grid-template-columns: minmax(180px, 1.3fr) 82px minmax(240px, 3fr) 76px; gap: 14px; font-size: 12px; padding-top: 6px; }
.hh-axis span:first-child { grid-column: 3; } .hh-axis span:last-child { grid-column: 3; justify-self: end; grid-row: 1; }
.hh-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; margin-top: 6px; }
.hh-live .hh-dot, .hh-tip .hh-dot { margin: 0 6px 0 0; }
.hh-ok { background: var(--ok); } .hh-warn { background: var(--amber); } .hh-fail { background: var(--crit); }
.hh-none { background: var(--line2); opacity: .55; }
.hh-c-ok { color: var(--ok); } .hh-c-warn { color: var(--amber); } .hh-c-fail { color: var(--crit); }
.hh-tip { position: fixed; z-index: 9999; display: none; pointer-events: none; min-width: 240px; max-width: 360px; padding: 10px 14px; border-radius: 12px;
  background: var(--panel-solid); color: var(--text); border: 1px solid var(--line2); box-shadow: var(--shadow-lift); font-size: 13px; }
.hh-tip-h { font-weight: 700; margin-bottom: 6px; }
.hh-tip dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 16px; margin: 0; }
.hh-tip dt { color: var(--muted); }
.hh-tip dd { margin: 0; text-align: right; font-weight: 600; display: flex; align-items: center; justify-content: flex-end; }
@media (max-width: 760px) {
  .hh-row { grid-template-columns: 1fr auto; }
  .hh-strip { grid-column: 1 / -1; }
  .hh-pct { grid-column: 2; grid-row: 1; }
  .hh-now { display: none; }
  .hh-axis { display: flex; justify-content: space-between; }
}

/* ---------------- licence banner (2.7.3) ---------------- */
.licbar { position: fixed; top: var(--top); left: var(--side); right: 0; z-index: 35; display: flex; align-items: center; gap: 14px;
  padding: 9px 20px; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.shell:has(.licbar:not(.hidden)) .main { padding-top: 46px; }
.licbar.warn { background: color-mix(in srgb, var(--amber) 16%, var(--panel)); color: var(--text); }
.licbar.crit { background: color-mix(in srgb, var(--crit) 20%, var(--panel)); color: var(--text); }
.licbar a { margin-left: auto; color: inherit; text-decoration: underline; white-space: nowrap; }
.licbar.hidden { display: none; }

/* a2pulse brand lockup (top bar and sign-in): colour mark + wordmark drawn in the theme's text colour + tagline */
.a2p { display: flex; align-items: center; gap: 8px; }
.a2p .a2p-mark { height: 40px; width: auto; display: block; flex: 0 0 auto; }
.a2p .a2p-txt { display: flex; flex-direction: column; gap: 3px; line-height: 1; min-width: 0; }
.brand .prod.a2p span { margin-top: 0; }
.a2p .a2p-word, .brand .prod.a2p .a2p-word { display: block; height: 17px; width: auto; aspect-ratio: 489 / 133; background: var(--text);
  -webkit-mask: url(../img/a2pulse-word.png) no-repeat left center / contain; mask: url(../img/a2pulse-word.png) no-repeat left center / contain; }
.a2p .a2p-tag, .brand .prod.a2p .a2p-tag { display: block; font-size: 6.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); white-space: nowrap; }
.brand .prod.a2p #prodSub { display: block; color: var(--gold); font-size: 11px; font-weight: 600; margin-top: 1px; white-space: nowrap; }
.side-copy { margin: 16px 6px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.45; color: var(--faint); }
.login .brandside .a2p { gap: 14px; }
.login .brandside .a2p .a2p-mark { height: 64px; }
.login .brandside .a2p .a2p-word { height: 30px; background: #fff; }
.login .brandside .a2p .a2p-tag { font-size: 10.5px; color: #d6e2fb; letter-spacing: .16em; }
.login .brandside .copy { font-size: 11.5px; color: #9fb2da; margin-top: -14px; }
@media (max-width: 760px) { .a2p .a2p-mark { height: 32px; } .a2p .a2p-word { height: 14px; } .brand .prod.a2p .a2p-tag { display: none; } }


/* ---------------------------------------------------------------- a2pulse theme defaults
   Dusk is the platform's one sky for every user and hour. These rules apply it when <body> has no data-sky. */
body:not([data-sky]) { --sky-1: #160f36; --sky-2: #46285e; --sky-glow: rgba(245, 160, 90, .24); --sky-glow2: rgba(167, 139, 250, .16); }
body.light:not([data-sky]) { --sky-1: #ffe2c4; --sky-2: #efe6ff; --sky-glow: rgba(111, 183, 255, .35); --sky-glow2: rgba(233, 196, 106, .22); }
