:root {
  color-scheme: dark;
  --bg: oklch(17% 0.036 258);
  --shell: oklch(13% 0.03 258);
  --surface: oklch(22% 0.042 258);
  --surface-raised: oklch(26% 0.05 258);
  --surface-soft: oklch(19% 0.032 258);
  --line: oklch(36% 0.07 258);
  --line-soft: oklch(29% 0.052 258);
  --text: oklch(96% 0.009 248);
  --muted: oklch(75% 0.036 250);
  --faint: oklch(59% 0.048 253);
  --cyan: #29cdf5;
  --cyan-soft: #82e1fa;
  --amber: #ffb020;
  --good: #45d79a;
  --warn: #ffd166;
  --critical: #ff626b;
  --rose: #dc4667;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(1, 8, 22, .24);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid color-mix(in oklch, var(--cyan) 70%, white); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .58; }
a { color: var(--cyan-soft); }
[hidden] { display: none !important; }

.eyebrow, .section-kicker { margin: 0 0 5px; color: var(--cyan-soft); font-size: .72rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.button { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); color: var(--text); padding: 8px 13px; font-weight: 700; transition: transform 160ms cubic-bezier(.22,1,.36,1), background 160ms cubic-bezier(.22,1,.36,1), border-color 160ms cubic-bezier(.22,1,.36,1); }
.button:hover { border-color: var(--cyan); background: color-mix(in oklch, var(--surface-raised) 88%, var(--cyan)); }
.button:active { transform: scale(.98); }
.button.primary { border-color: var(--cyan); background: var(--cyan); color: oklch(18% .05 258); }
.button.primary:hover { background: var(--cyan-soft); }
.button.quiet { background: transparent; color: var(--muted); }
.button.danger { border-color: color-mix(in oklch, var(--critical) 50%, var(--line)); color: oklch(91% .06 20); background: color-mix(in oklch, var(--critical) 12%, var(--surface)); }

.login { min-height: 100vh; display: grid; grid-template-columns: minmax(260px, .9fr) minmax(440px, 1.1fr); background: var(--shell); }
.login-mark { position: relative; overflow: hidden; background: radial-gradient(circle at 30% 48%, oklch(33% .12 231), transparent 34%), linear-gradient(155deg, oklch(18% .04 261), oklch(14% .035 256)); }
.login-mark::before { content: "SONAR"; position: absolute; left: clamp(30px, 7vw, 100px); bottom: 11vh; color: color-mix(in oklch, var(--cyan) 72%, white); font-size: clamp(3rem, 9vw, 8.5rem); font-weight: 850; letter-spacing: -.07em; }
.login-mark span { position: absolute; left: 27%; top: 46%; width: 18vw; min-width: 180px; aspect-ratio: 1; border: 1px solid color-mix(in oklch, var(--cyan) 32%, transparent); border-radius: 50%; transform: translate(-50%, -50%); }
.login-mark span:nth-child(2) { width: 33vw; min-width: 320px; }
.login-mark span:nth-child(3) { width: 50vw; min-width: 520px; }
.login-panel { position: relative; align-self: center; width: min(560px, calc(100% - 64px)); margin: 0 auto; padding: 48px 0; }
.login-panel h1 { max-width: 12ch; margin: 0; font-size: clamp(2.3rem, 5vw, 4.8rem); line-height: .98; letter-spacing: -.055em; }
.login-copy { max-width: 48ch; margin: 24px 0 34px; color: var(--muted); font-size: 1.02rem; }
.login-panel label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.token-row { display: flex; gap: 9px; }
.token-row input { min-width: 0; flex: 1; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); padding: 10px 13px; }
.token-row input:hover { border-color: var(--faint); }
.form-error { min-height: 21px; margin: 10px 0 0; color: oklch(85% .12 22); }
.language-login { position: absolute; right: 0; top: 32px; border: 0; background: transparent; color: var(--cyan-soft); font-weight: 800; }

.app { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 13px; border-right: 1px solid var(--line-soft); background: var(--shell); z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 22px; color: var(--text); text-decoration: none; }
.brand strong { display: block; font-size: 1rem; letter-spacing: .16em; }
.brand small { color: var(--faint); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.brand-wave { position: relative; width: 31px; height: 31px; display: inline-grid; place-items: center; }
.brand-wave i { position: absolute; width: 8px; height: 8px; border: 2px solid var(--cyan); border-radius: 50%; }
.brand-wave i:nth-child(2) { width: 19px; height: 19px; opacity: .65; }
.brand-wave i:nth-child(3) { width: 31px; height: 31px; opacity: .3; }
.nav { display: grid; gap: 5px; }
.nav-button { width: 100%; display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; }
.nav-button:hover { background: var(--surface-soft); color: var(--text); }
.nav-button.is-active { border-color: color-mix(in oklch, var(--cyan) 35%, var(--line)); background: color-mix(in oklch, var(--cyan) 13%, var(--shell)); color: var(--cyan-soft); }
.legend { margin-top: auto; display: grid; gap: 8px; padding: 16px 10px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .78rem; }
.legend p { margin: 0 0 2px; color: var(--faint); font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.legend > span { display: flex; align-items: center; gap: 8px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; }
.patient-dot { background: var(--cyan); }
.employee-dot { background: var(--amber); }
.sidebar-actions { display: flex; gap: 6px; padding: 10px 5px 0; }
.sidebar-actions .button:last-child { flex: 1; }

.workspace { min-width: 0; padding: 24px clamp(18px, 3vw, 44px) 40px; }
.topbar { min-height: 88px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.topbar h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.8rem); line-height: 1.02; letter-spacing: -.035em; }
.subtitle { margin: 7px 0 0; color: var(--muted); }
.topbar-controls { display: flex; align-items: flex-end; gap: 12px; }
.site-label { display: grid; gap: 5px; color: var(--faint); font-size: .7rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.site-label select { min-width: 180px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); padding: 0 34px 0 11px; }
.freshness { min-width: 118px; min-height: 40px; display: grid; align-content: center; color: var(--muted); font-size: .75rem; text-align: right; }
.network-banner, .page-error, .test-note { margin: -6px 0 18px; border: 1px solid; border-radius: 11px; padding: 11px 14px; }
.network-banner { border-color: color-mix(in oklch, var(--critical) 60%, var(--line)); background: oklch(23% .08 22); color: oklch(92% .055 22); }
.page-error { border-color: color-mix(in oklch, var(--critical) 45%, var(--line)); background: color-mix(in oklch, var(--critical) 9%, var(--surface)); color: oklch(91% .06 22); }
.test-note { border-color: color-mix(in oklch, var(--warn) 45%, var(--line)); background: color-mix(in oklch, var(--warn) 8%, var(--surface)); color: oklch(92% .05 83); }
.backend-stale .camera-frame img, .backend-stale .detail-image img, .backend-stale .capture-photo img { filter: saturate(.2) brightness(.55); }
.backend-stale .camera-frame.has-image::after, .backend-stale .detail-image.has-image::after { content: attr(data-stale-label); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(2, 8, 21, .4); color: var(--text); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.view { display: none; }
.view.is-active { display: block; }
.overview-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 310px); gap: 16px; align-items: start; }
.overview-main, .overview-rail, .detail-main, .detail-rail { min-width: 0; display: grid; gap: 16px; }
.section { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.025); overflow: hidden; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 17px 13px; }
.section-heading h2, .detail-heading h2 { margin: 0; font-size: 1.08rem; line-height: 1.2; }
.section-heading p:not(.section-kicker) { max-width: 64ch; margin: 7px 0 0; color: var(--muted); }
.count-label { color: var(--muted); font-size: .78rem; white-space: nowrap; }

.camera-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 10px 10px; }
.camera-card { min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-soft); }
.camera-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: oklch(14% .025 258); }
.camera-frame img { width: 100%; height: 100%; display: block; object-fit: cover; transition: filter 180ms ease-out; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: var(--faint); text-align: center; }
.camera-placeholder b { display: block; color: var(--muted); margin-bottom: 4px; }
.camera-meta { display: grid; gap: 9px; padding: 11px; }
.camera-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.camera-title { min-width: 0; }
.camera-title strong, .camera-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camera-title span { margin-top: 2px; color: var(--faint); font-size: .72rem; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; flex: none; border: 1px solid currentColor; border-radius: 999px; padding: 3px 7px; font-size: .66rem; font-weight: 800; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-online { color: var(--good); }
.status-delayed { color: var(--warn); }
.status-offline { color: var(--critical); }
.camera-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: .72rem; }
.camera-facts b { color: var(--text); }
.camera-reason { margin: 0; color: oklch(84% .07 25); font-size: .75rem; }
.camera-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.camera-actions .button { min-width: 0; padding-inline: 8px; font-size: .76rem; }

.chip { position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 7px)); border-radius: 999px; padding: 2px 6px; background: var(--cyan); color: oklch(18% .05 258); font-size: clamp(.56rem, 1.2vw, .72rem); font-weight: 850; line-height: 1.25; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.chip::after { content: ""; position: absolute; left: 50%; top: 100%; height: 7px; width: 1px; background: currentColor; opacity: .75; }
.chip.employee { background: var(--amber); }
.chip.below { transform: translate(-50%, 8px); }
.chip.below::after { top: auto; bottom: 100%; }
.chip.compact { padding: 1px 4px; font-size: .58rem; }

.analytics-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; margin-top: 16px; }
.occupancy-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 205px; padding: 0 14px 14px; }
.occupancy-zone { min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid color-mix(in oklch, var(--cyan) 22%, var(--line)); border-radius: 10px; padding: 12px; color: var(--text); }
.occupancy-zone strong { font-size: .8rem; }
.occupancy-zone b { font-size: 1.5rem; }
.occupancy-zone small { color: color-mix(in oklch, var(--text) 78%, transparent); }
.occupancy-scale { display: flex; align-items: center; gap: 8px; padding: 0 15px 14px; color: var(--faint); font-size: .68rem; }
.occupancy-scale i { flex: 1; height: 6px; border-radius: 99px; background: linear-gradient(90deg, oklch(24% .05 235), oklch(45% .13 229), var(--cyan)); }
.donut-wrap { min-height: 245px; display: grid; place-items: center; grid-template-columns: minmax(130px, .9fr) 1.1fr; gap: 10px; padding: 8px 14px 18px; }
.donut-wrap svg { width: min(100%, 166px); overflow: visible; }
.donut-legend { display: grid; gap: 8px; width: 100%; }
.donut-legend span { display: grid; grid-template-columns: 8px 1fr auto; gap: 7px; align-items: center; color: var(--muted); font-size: .72rem; }
.donut-legend i { width: 8px; height: 8px; border-radius: 50%; }
.flow-section, .daily-section, .people-section { margin-top: 16px; }
.flow-list { display: flex; gap: 1px; overflow-x: auto; padding: 0 14px 15px; }
.flow-step { position: relative; min-width: 112px; flex: 1; padding: 10px 10px 10px 13px; background: var(--surface-soft); }
.flow-step:first-child { border-radius: 9px 0 0 9px; }
.flow-step:last-child { border-radius: 0 9px 9px 0; }
.flow-step:not(:last-child)::after { content: "›"; position: absolute; right: -5px; top: 50%; z-index: 2; transform: translateY(-50%); color: var(--cyan-soft); font-size: 1.2rem; }
.flow-step span { display: block; color: var(--faint); font-size: .67rem; text-transform: capitalize; }
.flow-step b { display: block; margin-top: 3px; font-size: 1.05rem; }
.chart-legend { display: flex; gap: 17px; padding: 0 17px 4px; color: var(--muted); font-size: .72rem; }
.chart-legend > span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 18px; height: 3px; border-radius: 4px; }
.seen-line { background: #139bc0; }
.noshow-line { background: var(--rose); }
.line-chart { min-height: 220px; padding: 0 10px 12px; }
.line-chart svg { width: 100%; height: auto; display: block; }
.table-scroll { overflow-x: auto; padding: 0 14px 14px; }
table { width: 100%; border-collapse: collapse; font-size: .78rem; }
th { color: var(--faint); font-size: .66rem; font-weight: 750; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
th, td { padding: 9px 7px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.person-id { color: var(--cyan-soft); font-weight: 800; }
.person-id.employee { color: var(--amber); }

.kpi-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); }
.kpi { min-height: 105px; padding: 14px; background: var(--surface); }
.kpi span { display: block; color: var(--faint); font-size: .68rem; }
.kpi b { display: block; margin-top: 8px; font-size: 1.55rem; line-height: 1; letter-spacing: -.03em; }
.alert-count { min-width: 27px; height: 27px; display: grid; place-items: center; border-radius: 99px; background: color-mix(in oklch, var(--critical) 16%, var(--surface)); color: oklch(88% .09 22); font-size: .75rem; font-weight: 800; }
.alert-list { display: grid; }
.alert-item { display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.alert-item:first-child { border-top: 0; }
.severity-mark { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--cyan); }
.alert-item.critical .severity-mark { background: var(--critical); }
.alert-item.warning .severity-mark { background: var(--warn); }
.alert-copy b { display: block; font-size: .78rem; }
.alert-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: .71rem; }
.alert-time { color: var(--faint); font-size: .66rem; white-space: nowrap; }
.alert-item .button { grid-column: 2 / 4; min-height: 32px; padding-block: 5px; font-size: .7rem; }
.empty-state { min-height: 95px; display: grid; place-items: center; padding: 20px; color: var(--faint); text-align: center; }

.page-heading { padding: 4px 0 18px; }
.page-heading h2 { font-size: 1.55rem; }
.capture-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
.capture-result { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 17px; }
.capture-result h2 { margin: 0 0 4px; font-size: 1.15rem; }
.capture-result > p { margin: 0 0 14px; color: var(--muted); }
.capture-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.capture-photo { position: relative; min-width: 0; overflow: hidden; border-radius: 10px; background: var(--surface-soft); }
.capture-photo img { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; }
.capture-photo span { display: block; padding: 8px 10px; color: var(--muted); font-size: .72rem; }
.capture-result-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.capture-error { border-color: color-mix(in oklch, var(--critical) 45%, var(--line)); color: oklch(90% .07 23); }

.detail-heading { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin-bottom: 16px; }
.detail-heading p:not(.section-kicker) { margin: 5px 0 0; color: var(--muted); }
.back-button { background: transparent; }
.analysis-toggle { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .76rem; cursor: pointer; }
.analysis-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.analysis-toggle span { position: relative; width: 39px; height: 22px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-raised); }
.analysis-toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 180ms cubic-bezier(.22,1,.36,1), background 180ms ease-out; }
.analysis-toggle input:checked + span { border-color: var(--cyan); background: color-mix(in oklch, var(--cyan) 20%, var(--surface)); }
.analysis-toggle input:checked + span::after { transform: translateX(17px); background: var(--cyan); }
.analysis-toggle input:focus-visible + span { outline: 3px solid var(--cyan-soft); outline-offset: 3px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 310px); gap: 16px; align-items: start; }
.detail-image { position: relative; min-height: 280px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface-soft); }
.detail-image > img { width: 100%; max-height: 70vh; display: block; object-fit: contain; background: oklch(12% .025 258); }
.detail-overlay-label { position: absolute; left: 12px; bottom: 12px; z-index: 2; border-radius: 7px; background: rgba(3,10,25,.84); padding: 5px 8px; color: var(--muted); font-size: .71rem; }
.detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 2px 0; }
.detail-actions #detailStats { color: var(--muted); }
.detail-actions #detailStats b { color: var(--text); }
.detection-list, .history-list { display: grid; }
.detection-row, .history-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line-soft); }
.detection-row:first-child, .history-row:first-child { border-top: 0; }
.detection-tag { min-width: 47px; border-radius: 99px; padding: 3px 7px; background: var(--cyan); color: oklch(18% .05 258); font-size: .68rem; font-weight: 850; text-align: center; }
.detection-tag.employee { background: var(--amber); }
.detection-row span, .history-row span { color: var(--muted); font-size: .72rem; }
.history-row { grid-template-columns: 1fr auto; }
.history-row b { display: block; font-size: .76rem; }
.history-actions { display: flex; gap: 6px; }
.history-actions .button { min-height: 32px; padding: 5px 8px; font-size: .68rem; }

footer { margin-top: 24px; padding: 16px 4px 0; border-top: 1px solid var(--line-soft); color: var(--faint); font-size: .7rem; }
.bottom-nav { display: none; }

@media (max-width: 1180px) {
  .overview-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .overview-rail, .detail-rail { grid-template-columns: 1fr 1fr; }
  .kpi-section { grid-column: auto; }
  .capture-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 979px) {
  .app { display: block; }
  .sidebar { display: none; }
  .workspace { padding: 18px 14px calc(92px + env(safe-area-inset-bottom)); }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; padding: 7px 7px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--shell); box-shadow: 0 -12px 34px rgba(1,8,22,.3); }
  .bottom-nav button { flex: 1; min-width: 0; min-height: 51px; display: grid; place-items: center; gap: 1px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .67rem; }
  .bottom-nav button span:first-child { font-size: 1.05rem; }
  .bottom-nav button.is-active { background: color-mix(in oklch, var(--cyan) 10%, var(--shell)); color: var(--cyan-soft); }
  .topbar { min-height: 0; }
}

@media (max-width: 700px) {
  .login { grid-template-columns: 1fr; }
  .login-mark { min-height: 32vh; }
  .login-mark::before { left: 24px; bottom: 30px; font-size: clamp(3.8rem, 20vw, 6.5rem); }
  .login-mark span { left: 78%; top: 28%; }
  .login-panel { width: calc(100% - 36px); padding: 32px 0 44px; }
  .login-panel h1 { font-size: clamp(2rem, 10vw, 3.2rem); }
  .login-copy { margin: 17px 0 25px; }
  .language-login { top: 18px; }
  .topbar { display: grid; gap: 13px; margin-bottom: 17px; }
  .topbar-controls { width: 100%; align-items: end; }
  .site-label { min-width: 0; flex: 1; }
  .site-label select { width: 100%; min-width: 0; }
  .freshness { min-width: 92px; }
  .camera-grid, .capture-grid { grid-template-columns: 1fr; }
  .analytics-grid, .overview-rail, .detail-rail { grid-template-columns: 1fr; }
  .camera-frame { aspect-ratio: 16 / 9; }
  .donut-wrap { grid-template-columns: 145px 1fr; }
  .detail-heading { grid-template-columns: auto 1fr; align-items: start; }
  .analysis-toggle { grid-column: 1 / 3; justify-self: end; }
  .detail-image { min-height: 210px; }
  .capture-photos { grid-template-columns: 1fr; }
  .capture-result-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 430px) {
  .workspace { padding-inline: 10px; }
  .topbar h1 { font-size: 1.7rem; }
  .topbar-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .camera-actions { grid-template-columns: 1fr 1.18fr; }
  .camera-actions .button { font-size: .71rem; }
  .occupancy-map { grid-template-columns: 1fr 1fr; }
  .occupancy-zone { min-height: 82px; padding: 9px; }
  .donut-wrap { grid-template-columns: 122px minmax(0, 1fr); padding-inline: 9px; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
