/* Takamol compliance console — light operations theme */
:root {
  --bg: #f2f4f7;
  --bg-2: #ffffff;
  --bg-3: #f5f7f9;
  --bg-4: #eaeef2;
  --line: #e2e6eb;
  --line-2: #cbd2da;
  --ink: #15191e;
  --ink-2: #4f5b67;
  --ink-3: #8a95a1;
  --amber: #d98a0b;
  --amber-2: #a86806;
  --amber-bg: rgba(217,138,11,.10);
  --red: #d1383d;
  --red-2: #b02c31;
  --green: #1f9d57;
  --green-2: #167a44;
  --blue: #2a78d6;
  --blue-2: #1f5fae;
  --violet: #4a3aa7;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(20,25,30,.04), 0 1px 0 rgba(20,25,30,.02);
  --cam01: #2a78d6; --cam02: #eb6834; --cam03: #1baf7a; --cam04: #eda100; --cam05: #e87ba4; --cam06: #4a3aa7;
  --t-ppe: #d1383d; --t-cleanliness: #d98a0b; --t-panels: #2a78d6;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 13px/1.45 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background-image:
    linear-gradient(rgba(20,25,30,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,25,30,.035) 1px, transparent 1px);
  background-size: 28px 28px;
}
a { color: var(--blue-2); }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(217,138,11,.25); }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.dim { color: var(--ink-2); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: 56px; display: flex; align-items: center; gap: 22px;
  padding: 0 22px; border-bottom: 1px solid var(--line); background: #fff;
  box-shadow: inset 0 3px 0 var(--amber);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand .mark { width: 28px; height: 28px; }
.wordmark { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.wordmark b { font-size: 15px; letter-spacing: .06em; font-weight: 600; }
.wordmark small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a {
  color: var(--ink-2); text-decoration: none; padding: 7px 11px; border-radius: 4px; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); background: var(--bg-3); }
.nav a.active { color: var(--ink); background: var(--bg-4); border-bottom-color: var(--amber); }
.site { margin-left: 8px; display: flex; flex-direction: column; line-height: 1.1; gap: 2px; }
.site-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.site-name { font-weight: 500; }
.clocks { margin-left: auto; display: flex; gap: 22px; }
.clock { display: flex; flex-direction: column; line-height: 1.1; gap: 2px; align-items: flex-end; }
.clock .z { font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.clock .t { font-family: var(--mono); font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: #fff; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.pill.live.on { color: var(--green-2); border-color: rgba(31,157,87,.45); background: rgba(31,157,87,.06); }
.pill.live.on i { background: var(--green); box-shadow: 0 0 0 0 rgba(31,157,87,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,157,87,.5);} 70% { box-shadow: 0 0 0 7px rgba(31,157,87,0);} 100% { box-shadow: 0 0 0 0 rgba(31,157,87,0);} }

/* ---------- status strip ---------- */
.strip {
  height: 32px; display: flex; align-items: center; gap: 24px; padding: 0 22px; border-bottom: 1px solid var(--line);
  background: var(--bg-3); font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden;
}
.strip b { color: var(--ink-2); font-weight: 500; margin-left: 6px; }
.strip-item { display: inline-flex; align-items: center; }
.strip-cams { margin-left: auto; display: inline-flex; gap: 14px; }
.strip-cams a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; }
.led { width: 7px; height: 7px; border-radius: 50%; background: #c3cad2; display: inline-block; margin-right: 7px; flex: none; }
.led.live { background: var(--green); box-shadow: 0 0 6px rgba(31,157,87,.5); }
.led.stale { background: var(--amber); box-shadow: 0 0 6px rgba(217,138,11,.5); }
.led.offline, .led.error { background: var(--red); box-shadow: 0 0 6px rgba(209,56,61,.45); }
.led.busy { background: var(--blue); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- page grid ---------- */
.page { padding: 18px 22px 40px; max-width: 1760px; margin: 0 auto; }
.grid { display: grid; gap: 14px; }
.row { display: flex; gap: 14px; align-items: stretch; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.head { display: flex; align-items: baseline; gap: 14px; margin: 2px 0 14px; }
.head h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.head .sub { color: var(--ink-2); }
.head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- panels ---------- */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-width: 0; box-shadow: var(--shadow); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); min-height: 38px; }
.panel > header h3 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.panel > header .meta { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); display: flex; gap: 10px; align-items: center; }
.panel .body { padding: 16px; }
.panel .body.flush { padding: 0; }
.panel .empty { padding: 24px 16px; text-align: center; color: var(--ink-3); font-size: 12px; }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 12px 18px; min-height: 84px; box-shadow: var(--shadow); }
.tile::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--accent, var(--line-2)); }
.tile .label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.tile .value { font-size: 30px; font-weight: 600; line-height: 1.05; margin-top: 7px; letter-spacing: -.02em; }
.tile .value small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }
.tile .sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.tile.alert { --accent: var(--red); } .tile.alert .value { color: var(--red-2); }
.tile.warn { --accent: var(--amber); }
.tile.ok { --accent: var(--green); }
.tile.info { --accent: var(--blue); }

/* ---------- camera tiles ---------- */
.camgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cam { position: relative; aspect-ratio: 16 / 9; background: #1a1e23; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; display: block; color: inherit; text-decoration: none; box-shadow: var(--shadow); }
.cam img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease, opacity .3s; }
.cam:hover img { transform: scale(1.025); }
.cam:hover { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(217,138,11,.25); }
.cam .top, .cam .bottom { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; gap: 8px; }
.cam .top { top: 0; background: linear-gradient(180deg, rgba(5,7,10,.78), rgba(5,7,10,0)); }
.cam .bottom { bottom: 0; align-items: flex-end; background: linear-gradient(0deg, rgba(5,7,10,.85), rgba(5,7,10,0)); }
.cam .name { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; display: flex; align-items: center; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cam .chips { display: flex; gap: 6px; }
.chip { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 3px; background: rgba(5,7,10,.72); border: 1px solid rgba(255,255,255,.18); color: #fff; display: inline-flex; align-items: center; gap: 5px; }
.chip.viol { border-color: rgba(255,120,124,.8); color: #ffb3b5; }
.chip.viol.serious { background: rgba(209,56,61,.5); }
.chip svg { width: 11px; height: 11px; fill: currentColor; }
.cam .time { font-family: var(--mono); font-size: 12.5px; color: #fff; }
.cam .age { font-family: var(--mono); font-size: 10.5px; color: rgba(255,255,255,.7); }
.cam .zone { font-size: 11px; color: rgba(255,255,255,.7); }
.cam.offline img, .cam.stale img { filter: grayscale(1) brightness(.45); }
.cam .note { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 8px, transparent 8px 16px); }
.cam .note b { display: block; color: #fff; margin-bottom: 4px; }

.cam .tags { position: absolute; left: 10px; top: 34px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 2; max-width: 70%; }
.cam .tags .tag, .cam .hover .tag { background: rgba(5,7,10,.72); border-color: rgba(255,255,255,.22); color: #fff; font-size: 9px; padding: 1px 5px; letter-spacing: .08em; }
.cam .tags .tag.ppe, .cam .hover .tag.ppe { color: #ff9a9e; } .cam .tags .tag.cleanliness, .cam .hover .tag.cleanliness { color: #ffcf7a; } .cam .tags .tag.panels, .cam .hover .tag.panels { color: #9fd0ff; }
.cam .hover { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(0deg, rgba(5,7,10,.95) 0%, rgba(5,7,10,.9) 75%, rgba(5,7,10,0) 100%); color: #fff; transform: translateY(8px); opacity: 0; transition: opacity .18s ease, transform .18s ease; z-index: 3; pointer-events: none; }
.cam:hover .hover, .cam:focus-visible .hover { opacity: 1; transform: none; pointer-events: auto; }
.cam:hover .bottom { opacity: 0; }
.cam .hover h5 { margin: 0 0 2px; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.65); font-weight: 500; }
.cam .hover .hv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 4px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; cursor: pointer; }
.cam .hover .hv:hover .ht { text-decoration: underline; }
.cam .hover .hv .ht { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam .hover .hv .ha { font-family: var(--mono); font-size: 9.5px; color: rgba(255,255,255,.7); white-space: nowrap; }
.cam .hover .hv .ha.over { color: #ff9a9e; }
.cam .hover .more { font-size: 10px; color: rgba(255,255,255,.7); margin-top: 3px; }

/* ---------- lists ---------- */
.panel.fill { flex: 1; min-height: 0; }
.panel.fill > .vlist, .panel.fill > .feed { flex: 1; min-height: 0; overflow: auto; }
.vlist { list-style: none; margin: 0; padding: 0; }
.vlist li { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); align-items: center; cursor: pointer; }
.vlist li:last-child { border-bottom: 0; }
.vlist li:hover { background: var(--bg-3); }
.vlist li.sel { background: var(--amber-bg); box-shadow: inset 3px 0 0 var(--amber); }
.vlist .meta a { color: var(--blue-2); text-decoration: none; }
.vlist .meta a:hover { text-decoration: underline; }
.vlist .thumb { width: 76px; height: 48px; object-fit: cover; border-radius: 3px; background: #dfe3e8; border: 1px solid var(--line-2); }
.vlist .title { font-weight: 500; line-height: 1.3; }
.vlist .meta { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.vlist .age { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.vlist .age.overdue { color: var(--red-2); }
.feed { list-style: none; margin: 0; padding: 0; font-size: 12px; }
.feed li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed time { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding-top: 1px; }
.feed .k { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.feed .cam-ref { color: var(--ink-2); margin-right: 6px; }
.feed li.warn .k { color: var(--amber-2); } .feed li.error .k { color: var(--red-2); }

/* ---------- tags & badges ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; background: #fff; }
.tag.ppe { color: var(--red-2); border-color: rgba(209,56,61,.4); background: rgba(209,56,61,.07); }
.tag.cleanliness { color: var(--amber-2); border-color: rgba(217,138,11,.45); background: rgba(217,138,11,.09); }
.tag.panels { color: var(--blue-2); border-color: rgba(42,120,214,.4); background: rgba(42,120,214,.07); }
.tag.serious { color: var(--red-2); border-color: rgba(209,56,61,.4); }
.tag.open { color: var(--amber-2); border-color: rgba(217,138,11,.45); background: rgba(217,138,11,.09); }
.tag.resolved { color: var(--green-2); border-color: rgba(31,157,87,.4); background: rgba(31,157,87,.07); }
.tag.dismissed { color: var(--ink-3); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 11px; cursor: pointer; line-height: 1.2; white-space: nowrap; box-shadow: var(--shadow); }
.btn:hover { border-color: #aeb8c3; background: var(--bg-3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn.primary:hover { background: #c47c07; }
.btn.danger { color: var(--red-2); border-color: rgba(209,56,61,.45); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.btn.icon { padding: 6px 8px; }
.btn svg { width: 13px; height: 13px; fill: currentColor; }
a.btn, a.btn:hover { text-decoration: none; color: var(--ink); }
a.btn.primary { color: #fff; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.seg button { background: transparent; border: 0; border-right: 1px solid var(--line-2); padding: 6px 11px; color: var(--ink-2); cursor: pointer; font-weight: 500; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--bg-3); }
.seg button.on { background: var(--bg-4); color: var(--ink); }
select, input[type=text], input[type=date], input[type=datetime-local], input[type=number], textarea {
  background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 6px 9px; color: var(--ink); min-height: 32px; box-shadow: var(--shadow);
}
select:focus, input:focus, textarea:focus { outline: 2px solid rgba(217,138,11,.45); outline-offset: 0; }
label.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--ink-2); }
label.check input { accent-color: var(--amber); }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters .lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-right: -4px; }
.filters .grow { flex: 1; }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-3); }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th:first-child, table.data td:first-child { padding-left: 16px; }
table.data th:last-child, table.data td:last-child { padding-right: 16px; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--bg-3); }
table.data tr.sel { background: var(--amber-bg); box-shadow: inset 3px 0 0 var(--amber); }
table.data td.num, table.data th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.data tr.click { cursor: pointer; }

/* ---------- viewer ---------- */
.viewer { position: relative; background: #0d1014; border-radius: var(--radius); border: 1px solid var(--line-2); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.viewer img { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer svg.overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.viewer .osd { position: absolute; left: 12px; top: 10px; font-family: var(--mono); font-size: 12px; color: #fff; background: rgba(5,7,10,.65); padding: 4px 8px; border-radius: 3px; display: flex; gap: 12px; }
.viewer .osd .utc { color: rgba(255,255,255,.7); }
.viewer .badge-ppl { position: absolute; right: 12px; top: 10px; }
.viewer.loading img { opacity: .55; }
.ov-person { fill: none; stroke: #3ddc84; stroke-width: 1.5; }
.ov-person-lbl { font: 10px var(--mono); fill: #fff; }
.ov-viol { fill: none; stroke-width: 2; }
.ov-viol.ppe { stroke: #ff5a60; } .ov-viol.cleanliness { stroke: #ffb020; } .ov-viol.panels { stroke: #4ca6ff; }
.ov-viol-lbl { font: 600 11px var(--mono); }
.ov-lbl-bg { fill: rgba(5,7,10,.8); }
.ov-viol-lbl.ppe { fill: #ff9a9e; } .ov-viol-lbl.cleanliness { fill: #ffcf7a; } .ov-viol-lbl.panels { fill: #9fd0ff; }

/* ---------- scrubber ---------- */
.scrub { padding: 12px 16px 10px; }
.scrub .bar { position: relative; height: 64px; }
.scrub .density { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrub input[type=range] { position: absolute; left: 0; right: 0; bottom: -4px; width: 100%; margin: 0; height: 22px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; z-index: 3; }
.scrub input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line-2); }
.scrub input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 20px; margin-top: -9px; border-radius: 3px; background: var(--amber); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(217,138,11,.6), 0 1px 3px rgba(0,0,0,.25); }
.scrub input[type=range]::-moz-range-track { height: 2px; background: var(--line-2); }
.scrub input[type=range]::-moz-range-thumb { width: 10px; height: 18px; border-radius: 3px; background: var(--amber); border: 2px solid #fff; }
.scrub .cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--amber); opacity: .9; pointer-events: none; z-index: 2; }
.scrub .marks { position: absolute; inset: 0; pointer-events: none; }
.scrub .mk { position: absolute; top: 2px; width: 8px; height: 8px; transform: translateX(-50%) rotate(45deg); background: var(--blue); border: 1px solid #fff; pointer-events: auto; cursor: pointer; }
.scrub .mk.new { background: var(--red); }
.scrub .mk.err { background: #fff; border-color: var(--red); }
.scrub .hours { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--ink-3); margin-top: 14px; }
.scrub .ctl { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.scrub .ctl .pos { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.scrub .ctl .pos b { color: var(--ink); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend i.diamond { transform: rotate(45deg); width: 8px; height: 8px; }
.legend i.line { height: 2px; width: 14px; border-radius: 0; vertical-align: 3px; }

/* ---------- charts ---------- */
.chart { width: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { font: 10px var(--mono); fill: var(--ink-3); }
.chart .bar:hover, .chart .bar.hl { filter: brightness(.85); }
.chart .lbl { font: 10.5px var(--mono); fill: var(--ink-2); }
.chart .band { fill: rgba(217,138,11,.08); }
.chart .band-line { stroke: rgba(217,138,11,.4); stroke-width: 1; }
.small-multiples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.sm { min-width: 0; }
.sm .sm-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.sm .sm-head b { font-weight: 500; }
.sm .sm-head .v { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.heat { display: grid; gap: 2px; font-family: var(--mono); font-size: 10.5px; }
.heat .hc { height: 26px; border-radius: 2px; display: grid; place-items: center; cursor: default; }
.heat .hc:hover { outline: 2px solid var(--ink); outline-offset: -1px; }
.heat .hr, .heat .hh { color: var(--ink-3); display: grid; place-items: center; }
.heat .hr { justify-items: start; padding-left: 4px; }
.heat .hc.empty { background: var(--bg-3); color: var(--ink-3); }
.ramp { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.ramp i { width: 90px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #fdf3e3, #f7cd8c, #e89e34, #a8650a); display: inline-block; }

/* ---------- tooltip ---------- */
.tip { position: fixed; z-index: 100; background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 7px 10px; font-size: 12px; pointer-events: none; box-shadow: 0 8px 24px rgba(20,25,30,.14); max-width: 320px; }
.tip .tv { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.tip .tl { color: var(--ink-2); font-size: 11px; }
.tip .tk { display: inline-block; width: 10px; height: 2px; vertical-align: 3px; margin-right: 6px; }

/* ---------- drawer ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 14px; align-items: start; }
.drawer { position: sticky; top: 104px; max-height: calc(100vh - 120px); overflow: auto; }
.drawer .evidence { position: relative; background: #0d1014; border-bottom: 1px solid var(--line); }
.drawer .evidence img { width: 100%; display: block; }
.drawer .evidence svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.drawer .body { overflow-wrap: anywhere; }
.drawer .dsec { padding: 14px 16px; border-top: 1px solid var(--line); }
.drawer .dsec:first-of-type { border-top: 0; }
.drawer .dsec h4 { margin: 0 0 10px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.drawer .dtitle { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 0 0 10px; }
.kv { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 8px 14px; font-size: 12.5px; }
.kv dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tl { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line-2); }
.tl li { position: relative; padding: 4px 0 10px 12px; font-size: 12px; }
.tl li::before { content: ""; position: absolute; left: -18px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); border: 1px solid #fff; }
.tl li.detected::before { background: var(--red); } .tl li.resolved::before { background: var(--green); } .tl li.persisting::before { background: var(--amber); }
.tl time { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-right: 8px; }
.tl .kind { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-right: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prose { font-size: 12.5px; line-height: 1.55; color: var(--ink); }
.prose p { margin: 0 0 8px; }
pre.rules { white-space: pre-wrap; font: 11.5px/1.5 var(--mono); color: var(--ink-2); margin: 0; }
details.rule { border-top: 1px solid var(--line); }
details.rule summary { cursor: pointer; padding: 10px 16px; font-weight: 500; display: flex; align-items: center; gap: 10px; list-style: none; }
details.rule summary:hover { background: var(--bg-3); }
details.rule summary::-webkit-details-marker { display: none; }
details.rule summary::before { content: "+"; font-family: var(--mono); color: var(--ink-3); width: 12px; }
details.rule[open] summary::before { content: "−"; }
details.rule .body { padding: 0 16px 16px; }


/* ---------- executive overview ---------- */
.banner { display: flex; align-items: stretch; gap: 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px 18px 26px; position: relative; overflow: hidden; }
.banner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent, var(--line-2)); }
.banner.ok { --accent: var(--green); } .banner.warn { --accent: var(--amber); } .banner.alert { --accent: var(--red); } .banner.off { --accent: var(--ink-3); }
.banner .status { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.banner .status-chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.banner .status-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, var(--ink-3)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, var(--ink-3)) 18%, transparent); }
.banner h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.banner .line { color: var(--ink-2); font-size: 13.5px; max-width: 900px; }
.banner .asof { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; text-align: right; padding-left: 24px; border-left: 1px solid var(--line); min-width: 190px; }
.banner .asof .d { font-size: 15px; font-weight: 500; }
.banner .asof .t { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.banner .asof .cams { font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.tiles.exec { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.exec .tile { min-height: 96px; }
.tiles.exec .tile .sub { font-family: var(--sans); font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.alist { list-style: none; margin: 0; padding: 0; }
.alist li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: start; }
.alist li:last-child { border-bottom: 0; }
.alist li:hover { background: var(--bg-3); }
.alist .thumb { width: 84px; height: 54px; object-fit: cover; border-radius: 4px; background: #dfe3e8; border: 1px solid var(--line-2); }
.alist .t { font-weight: 500; line-height: 1.35; }
.alist .w { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.alist .f { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.alist .f .since { font-size: 11.5px; color: var(--ink-3); }
.alist .f .since.overdue { color: var(--red-2); font-weight: 500; }
.alist li.serious { box-shadow: inset 3px 0 0 var(--red); }
.cam .ribbon { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ribbon, transparent); z-index: 2; }
.cam .zone-big { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.cam .zone-big small { font-weight: 400; color: rgba(255,255,255,.75); margin-left: 7px; font-size: 10.5px; }
.cam .updated { font-family: var(--sans); font-size: 10.5px; color: rgba(255,255,255,.8); }
.chart-note { font-size: 12px; color: var(--ink-2); margin: 0 0 10px; }


/* ---------- replay ---------- */
.replay { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 10px 16px; border: 1px solid rgba(42,120,214,.35); background: rgba(42,120,214,.07); border-radius: var(--radius); font-size: 13px; color: var(--ink); }
.replay .rp-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #fff; background: var(--blue); padding: 3px 8px; border-radius: 3px; }
.replay .rp-ctl { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.replay input { min-height: 28px; padding: 3px 8px; }
.pill.replay { color: var(--blue-2); border-color: rgba(42,120,214,.5); background: rgba(42,120,214,.07); }
.pill.replay i { background: var(--blue); }

/* ---------- scope strip ---------- */
.scope { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.scope.foot { margin: 14px 0 0; background: transparent; box-shadow: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 4px 0; }
.scope-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.scope-item { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.scope-when { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.tag.crew { color: var(--ink-2); border-color: var(--line-2); background: var(--bg-3); }
@media (max-width: 1280px) { .scope-when { margin-left: 0; } }

/* ---------- executive overview v3 ---------- */
.hero { display: flex; gap: 28px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 26px 20px 30px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--accent, var(--line-2)); }
.hero.ok { --accent: var(--green); } .hero.warn { --accent: var(--amber); } .hero.alert { --accent: var(--red); }
.hero-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.hero-chip { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.hero-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent, var(--ink-3)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--ink-3)) 16%, transparent); }
.hero h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.hero p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 900px; line-height: 1.5; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px; text-align: right; padding-left: 28px; border-left: 1px solid var(--line); min-width: 220px; }
.hero-side .d { font-size: 17px; font-weight: 500; }
.hero-side .t { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.hero-side .c { font-size: 12.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.big3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.big { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 22px 16px 26px; display: flex; flex-direction: column; gap: 3px; }
.big::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 2px; background: var(--accent, var(--line-2)); }
.big.alert { --accent: var(--red); } .big.warn { --accent: var(--amber); } .big.ok { --accent: var(--green); } .big.info { --accent: var(--blue); }
.big .label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.big .value { font-size: 38px; font-weight: 600; line-height: 1.05; letter-spacing: -.03em; }
.big.alert .value { color: var(--red-2); }
.big .value small { font-size: 15px; font-weight: 500; color: var(--ink-3); margin-left: 10px; letter-spacing: 0; }
.big .note { font-size: 13px; color: var(--ink-2); }
.big .note b { color: var(--ink); } .big .note b.bad { color: var(--red-2); }
.issues { list-style: none; margin: 0; padding: 0; }
.issues li { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; }
.issues li:last-child { border-bottom: 0; }
.issues li:hover { background: var(--bg-3); }
.issues li.serious { box-shadow: inset 4px 0 0 var(--red); }
.issues img { width: 124px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-2); background: #dfe3e8; }
.issues .it { font-size: 15px; font-weight: 600; line-height: 1.3; }
.issues .ia { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.issues .im { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.issues .im b { color: var(--ink); font-weight: 600; }
.issues .im .owner { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.issues li.more { display: block; text-align: center; padding: 12px; }
.pill-red, .pill-grey { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.pill-red { color: #fff; background: var(--red); }
.pill-grey { color: var(--ink-2); background: var(--bg-4); }
.week-line { display: flex; gap: 22px; margin-bottom: 8px; font-size: 14px; color: var(--ink-2); }
.week-line b { font-size: 26px; font-weight: 600; color: var(--ink); margin-right: 6px; letter-spacing: -.02em; }
.week-line .f b { color: var(--amber-2); } .week-line .x b { color: var(--green-2); }
.camgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(150px, 1fr); gap: 12px; padding: 14px; flex: 1; align-content: stretch; }
.camgrid.two .cam { aspect-ratio: auto; min-height: 150px; height: 100%; }
.strip4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.strip4 .z { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-right: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.strip4 .z:last-child { border-right: 0; }
.strip4 .z:hover { background: var(--bg-3); }
.strip4 img { width: 120px; height: 68px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line-2); background: #1a1e23; flex: none; }
.strip4 .z.offline img, .strip4 .z.no_frames img { filter: grayscale(1) brightness(.6); }
.strip4 .zc { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.strip4 .zn { font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.strip4 .zn i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.strip4 .zs { font-size: 12.5px; color: var(--ink-2); }
.strip4 .zt { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .strip4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .big3 { grid-template-columns: 1fr; } }

/* ---------- statistics ---------- */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.day { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow); min-width: 0; }
.day:hover { border-color: var(--line-2); background: var(--bg-3); }
.day.on { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(217,138,11,.18); }
.day.empty { opacity: .6; }
.day .d { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.day .pk { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.day .pk small { font-size: 11px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.day .fl { display: flex; gap: 4px; flex-wrap: wrap; font-size: 10.5px; margin-top: 2px; }
.day .fl i { font-style: normal; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.day .fl .out { background: rgba(209,56,61,.1); color: var(--red-2); }
.day .fl .dev { background: rgba(217,138,11,.12); color: var(--amber-2); }
.day .fl .ok { background: rgba(31,157,87,.1); color: var(--green-2); }
.day .fl .nd { color: var(--ink-3); }

.daycard { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px 6px; }
.dc-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.dc-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.dc-sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.daycard .summary { margin: 0 0 14px; }
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.fig { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px 14px 0; border-right: 1px solid var(--line); margin-right: 18px; position: relative; }
.fig:last-child { border-right: 0; margin-right: 0; }
.fig .label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.fig .value { font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
.fig .value small { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 6px; letter-spacing: 0; }
.fig .sub { font-size: 12px; color: var(--ink-2); }
.fig.alert .value { color: var(--red-2); } .fig.warn .value { color: var(--amber-2); } .fig.ok .value { color: var(--green-2); }
.pres { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 2px; }
.pres > span { height: 20px; border-radius: 2px; background: var(--bg-4); font-family: var(--mono); font-size: 10px; display: grid; place-items: center; color: #fff; }
.pres > span.nd { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.pres > span.in { background: var(--green); } .pres > span.out { background: var(--red); }
.pres-axis { grid-column: 1 / -1; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: var(--ink-3); margin-top: 1px; }

.summary { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 1100px; }
.summary b { color: var(--ink); font-weight: 600; }
.summary b.bad, .bad { color: var(--red-2); font-weight: 600; }
.good { color: var(--green-2); font-weight: 600; }
details.zones summary { cursor: pointer; font-size: 12.5px; color: var(--ink-2); margin-top: 10px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.zones summary::-webkit-details-marker { display: none; }
details.zones summary::before { content: "+"; font-family: var(--mono); color: var(--ink-3); }
details.zones[open] summary::before { content: "−"; }
details.zones summary:hover { color: var(--ink); }

/* ---------- reports ---------- */
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.preset:hover { border-color: #aeb8c3; color: var(--ink); }
.preset.on { background: var(--amber); border-color: var(--amber); color: #fff; }
.dl { display: flex; flex-direction: column; gap: 8px; }
.btn.dlb { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left; white-space: normal; }
.btn.dlb .ic { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; width: 40px; height: 40px; border-radius: 6px; display: grid; place-items: center; background: var(--bg-4); color: var(--ink-2); flex: none; }
.btn.dlb.primary .ic { background: rgba(255,255,255,.22); color: #fff; }
.btn.dlb b { display: block; font-weight: 600; }
.btn.dlb small { display: block; font-size: 11px; color: var(--ink-2); font-weight: 400; margin-top: 1px; }
.btn.dlb.primary small { color: rgba(255,255,255,.85); }
.rpt .rpt-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.rpt h3 { margin: 22px 0 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.rpt .figs { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.rpt .figs.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rpt .fig { padding: 12px 14px; margin: 0; border-right: 1px solid var(--line); }
.rpt .fig .value { font-size: 26px; }
.rpt table.data { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pv-pic { width: 96px; height: 60px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line-2); background: #dfe3e8; display: block; }
@media (max-width: 1280px) { .rpt .figs.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- sign in ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(400px, calc(100vw - 32px)); }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 40px rgba(20,25,30,.10), var(--shadow); padding: 26px 28px 24px; display: flex; flex-direction: column; border-top: 4px solid var(--amber); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.login-brand .mark { width: 30px; height: 30px; }
.login-card h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.login-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 12.5px; }
.login-error { background: rgba(209,56,61,.08); border: 1px solid rgba(209,56,61,.35); color: var(--red-2); border-radius: 4px; padding: 8px 10px; font-size: 12.5px; margin-bottom: 12px; }
.login-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.login-field span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.login-field input { min-height: 38px; font-size: 14px; }
.login-btn { justify-content: center; min-height: 40px; font-size: 14px; }
.login-foot { text-align: center; color: var(--ink-3); font-size: 11.5px; margin: 16px 0 0; }
.who { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.1; gap: 2px; text-decoration: none; color: var(--ink-2); margin-left: 4px; }
.who-name { font-weight: 500; color: var(--ink); font-size: 12.5px; }
.who-out { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.who:hover .who-out { color: var(--red-2); }

/* ---------- progress ---------- */
.prog { height: 6px; background: var(--bg-4); border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--amber); transition: width .4s; }
.prog.done i { background: var(--green); } .prog.failed i { background: var(--red); } .prog.cancelled i { background: var(--ink-3); }

/* ---------- forms ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form .f { display: flex; flex-direction: column; gap: 5px; }
.form .f.wide { grid-column: 1 / -1; }
.form label:not(.check) { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.form .cams { display: flex; gap: 12px; flex-wrap: wrap; }
.hint { font-size: 11.5px; color: var(--ink-3); }
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 120; background: #fff; border: 1px solid var(--line-2); border-left: 3px solid var(--amber); padding: 10px 14px; border-radius: 4px; box-shadow: 0 8px 24px rgba(20,25,30,.16); font-size: 12.5px; max-width: 380px; }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }
.kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; color: var(--ink-2); }

@media (max-width: 1280px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .camgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .drawer { position: static; max-height: none; }
  .site, .strip-cams { display: none; }
}
@media (max-width: 860px) {
  .camgrid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clocks { display: none; }
  .small-multiples { grid-template-columns: 1fr; }
}
