/* RAKAZ · ELMNTX light theme */
:root {
  /* RAKAZ brand (from logo) */
  --navy: #091F5B;         /* primary */
  --navy-2: #06163F;
  --sky: #4FADEA;          /* accent */
  --sky-10: #EAF5FD;
  --sun: #F4C342;          /* highlight */
  --sun-10: #FDF4DA;
  --slate: #7C7C7C;        /* neutral */
  --ink: #16224A;          /* text: deep navy-slate */
  --ink-70: #5A6378;
  --ink-50: #8A92A4;
  --line: #E2E7EF;
  --line-strong: #C8CFDC;
  --canvas: #F3F6FA;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  /* alert red is reserved for status only */
  --red: #E63946;
  --red-10: #FBE4E6;
  --red-ink: #B4232F;
  --ok: #2E7D4F; --ok-10: #E3F2E9;
  --warn: #A86A12; --warn-10: #FBF0DD;
  --crit: #C62834; --crit-10: #FBE4E6;
  --info: #3A5A8C; --info-10: #E8EEF8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(9,31,91,.06), 0 4px 16px rgba(9,31,91,.05);
  --font-ui: 'Poppins', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --font-read: 'Lora', Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--canvas); color: var(--ink); font-family: var(--font-ui); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
p { margin: 0; }
.read { font-family: var(--font-read); font-size: 14.5px; line-height: 1.6; color: var(--ink-70); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.muted { color: var(--ink-70); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 15px; height: 15px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.wordmark { font-weight: 800; font-size: 19px; letter-spacing: .04em; color: var(--ink); line-height: 1; }
.wordmark b { color: var(--red); font-weight: 800; display: inline-block; transform: skewX(-12deg); }
.brand .prod { font-size: 11px; color: var(--ink-70); letter-spacing: .16em; text-transform: uppercase; border-inline-start: 1px solid var(--line-strong); padding-inline-start: 10px; line-height: 1.2; }
.brand .prod strong { display: block; color: var(--ink); font-size: 13px; letter-spacing: .2em; }
.nav { padding: 8px 10px 20px; flex: 1; }
.nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-50); margin: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-70); font-size: 13.5px; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--sky-10); color: var(--ink); font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; inset-inline-start: -10px; top: 7px; bottom: 7px; width: 3px; background: var(--sky); border-radius: 0 3px 3px 0; }
.nav a .badge { margin-inline-start: auto; }
.nav a.locked { opacity: .45; }
.side .foot { padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-70); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .crumbs { font-size: 13px; color: var(--ink-70); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumbs b { color: var(--ink); font-weight: 600; }
.top .sp { flex: 1; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-width: 220px; color: var(--ink-70); cursor: pointer; font-size: 13px; }
.search kbd { margin-inline-start: auto; font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; }
.iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.iconbtn:hover { border-color: var(--line-strong); }
.iconbtn .dot { position: absolute; top: 5px; inset-inline-end: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.session { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px 4px 4px; background: var(--surface); cursor: pointer; }
.avatar { width: 28px; height: 28px; border-radius: 6px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; }
.session .who { font-size: 12px; line-height: 1.2; }
.session .who small { display: block; color: var(--ink-70); font-size: 11px; }
.content { padding: 24px; max-width: 1480px; width: 100%; }
.menutoggle { display: none; }

.livebar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-70); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(46,125,79,.5); animation: pulse 2s infinite; }
.pulse.off { background: var(--warn); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(46,125,79,.45); } 70% { box-shadow: 0 0 0 8px rgba(46,125,79,0); } 100% { box-shadow: 0 0 0 0 rgba(46,125,79,0); } }

/* ---------- page header ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ph .t { flex: 1; min-width: 260px; }
.ph .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-70); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.ph h1::after { content: ''; display: block; width: 48px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--sky) 0 72%, var(--sun) 72% 100%); margin-top: 8px; }
.ph .read { margin-top: 8px; max-width: 80ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-70); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .iconbtn:focus-visible, .nav a:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .switch input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }

/* ---------- cards & grid ---------- */
.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)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card .hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.card .hd h2, .card .hd h3 { flex: 1; }
.card .hd .sub { font-size: 12px; color: var(--ink-70); font-weight: 400; }
.card .bd { padding: 4px 16px 16px; }
.card .bd.flush { padding: 0; }
.mt { margin-top: 16px; }
.mt8 { margin-top: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

/* KPI tile — value, unit, trend, freshness, quality */
.kpi { padding: 14px 16px; }
.kpi .lbl { font-size: 12px; color: var(--ink-70); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 700; margin-top: 4px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 13px; font-weight: 500; color: var(--ink-70); margin-inline-start: 3px; }
.kpi .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 6px; font-size: 11.5px; color: var(--ink-70); }
.kpi.hero { border-top: 3px solid var(--sky); }
.trend.up { color: var(--ok); } .trend.down { color: var(--crit); } .trend.flat { color: var(--ink-70); }
.trend.bad.up { color: var(--crit); } .trend.bad.down { color: var(--ok); }
.fresh { display: inline-flex; align-items: center; gap: 4px; }
.fresh::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.fresh.stale::before { background: var(--warn); }

/* pills / tags */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--info-10); color: var(--info); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }
.pill.ok { background: var(--ok-10); color: var(--ok); }
.pill.warn { background: var(--warn-10); color: var(--warn); }
.pill.crit { background: var(--crit-10); color: var(--crit); }
.pill.ink { background: var(--ink); color: #fff; }
.pill.ink::before { background: #fff; }
.tag { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--ink-70); text-transform: uppercase; white-space: nowrap; }
.tag.new { border-color: var(--sun); color: #7A5600; background: var(--sun-10); }
.badge { font-size: 10.5px; font-weight: 700; background: var(--red); color: #fff; border-radius: 999px; padding: 0 6px; line-height: 17px; }
.prio { display: inline-flex; width: 26px; justify-content: center; font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 0; }
.prio.p1 { background: var(--crit); color: #fff; } .prio.p2 { background: var(--warn-10); color: var(--warn); } .prio.p3 { background: var(--info-10); color: var(--info); } .prio.p4 { background: var(--surface-2); color: var(--ink-70); border: 1px solid var(--line); }

/* tables */
.tblwrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; font-weight: 600; color: var(--ink-70); text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); position: sticky; top: 0; }
tbody tr:hover { background: #FAFAFB; }
tbody tr.click { cursor: pointer; }
tr:last-child td { border-bottom: none; }
td.r, th.r { text-align: end; }

/* forms */
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 10px; width: 100%; }
textarea { min-height: 80px; resize: vertical; }
label.f { display: block; font-size: 12px; font-weight: 500; color: var(--ink-70); margin-bottom: 4px; }
.field + .field { margin-top: 12px; }
.err { color: var(--crit); font-size: 12px; margin-top: 6px; }
.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line-strong); border-radius: 22px; transition: .15s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; inset-inline-start: 3px; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--navy); }
.switch input:checked + span::after { transform: translateX(16px); }
[dir=rtl] .switch input:checked + span::after { transform: translateX(-16px); }
.switch input:disabled + span { opacity: .4; cursor: not-allowed; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12px; cursor: pointer; color: var(--ink-70); }
.chip[aria-pressed=true] { background: var(--navy); color: #fff; border-color: var(--navy); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: none; background: none; padding: 9px 14px; font-size: 13px; color: var(--ink-70); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--navy); font-weight: 600; border-bottom-color: var(--sky); }

/* meters */
.meter { height: 8px; background: var(--canvas); border-radius: 8px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--navy); border-radius: 8px; transition: width .6s; }
.meter > i.red { background: var(--red); } .meter > i.ok { background: var(--ok); } .meter > i.warn { background: var(--warn); }

/* callout */
.callout { border-inline-start: 4px solid var(--sky); background: var(--sky-10); padding: 12px 14px; border-radius: 0 8px 8px 0; font-size: 13px; }
[dir=rtl] .callout { border-radius: 8px 0 0 8px; }
.callout.info { border-color: var(--ink-70); background: var(--surface-2); }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; font-size: 13px; background: var(--warn-10); color: #6b440b; border: 1px solid #efd9b0; margin-bottom: 16px; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.list li:last-child { border-bottom: none; }
.list li .tm { margin-inline-start: auto; color: var(--ink-70); font-size: 11.5px; white-space: nowrap; }
.list li.fresh-in { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--sun-10); } to { background: transparent; } }
.sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.sev.critical { background: var(--crit); } .sev.high { background: var(--red); opacity: .75; } .sev.medium { background: var(--warn); } .sev.low { background: var(--ink-50); }

/* timeline (evidence chain) */
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl li { position: relative; padding: 0 0 16px 24px; }
.tl li::before { content: ''; position: absolute; inset-inline-start: 5px; top: 14px; bottom: -2px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl li .nd { position: absolute; inset-inline-start: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.tl li.done .nd { background: var(--navy); }
.tl li.now .nd { border-color: var(--sky); background: var(--sky); box-shadow: 0 0 0 4px var(--sky-10); }
.tl li.todo .nd { border-color: var(--line-strong); }
.tl li.todo { color: var(--ink-50); }
.tl .h { font-weight: 600; font-size: 13px; }
.tl .d { font-size: 12px; color: var(--ink-70); }
.hash { font-family: var(--font-mono); font-size: 11px; color: var(--ink-50); }

/* lifecycle stepper */
.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.steps span { font-size: 11px; padding: 3px 8px; border-radius: 4px; background: var(--canvas); color: var(--ink-50); }
.steps span.done { background: var(--navy); color: #fff; }
.steps span.now { background: var(--sky); color: #fff; }
.steps span.fail { background: var(--crit-10); color: var(--crit); }

/* maps / svg */
.map { width: 100%; height: auto; display: block; background: #FBFBFB; border-radius: 0 0 var(--radius) var(--radius); }
.map text { font-family: var(--font-ui); }
.zone { transition: fill .4s; cursor: pointer; }
.zone:hover { stroke: var(--ink); stroke-width: 2; }
.blink { animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-70); padding: 10px 16px; border-top: 1px solid var(--line); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }

/* camera wall */
.cams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cam { position: relative; aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; background: linear-gradient(160deg, #3b3c3e, #2a2b2c); color: #fff; font-size: 10.5px; }
.cam .lab { position: absolute; top: 6px; inset-inline-start: 7px; opacity: .85; }
.cam .ts { position: absolute; bottom: 6px; inset-inline-end: 7px; font-family: var(--font-mono); opacity: .8; }
.cam .rec { position: absolute; top: 7px; inset-inline-end: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.4s infinite; }
.cam .box { position: absolute; border: 1.5px solid #f5f5f5; border-radius: 2px; transition: all 1.8s ease-in-out; }
.cam .box.alert { border-color: var(--red); }
.cam .box::after { content: attr(data-l); position: absolute; top: -14px; left: -1px; font-size: 9px; background: rgba(0,0,0,.55); padding: 0 3px; white-space: nowrap; }
.cam .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(to top, rgba(255,255,255,.08), transparent); }
.cam.masked::after { content: 'Restricted · request playback'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(40,40,41,.86); font-size: 11px; }

/* drawer, modal, toast */
.scrim { position: fixed; inset: 0; background: rgba(40,40,41,.35); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 12px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide { width: min(860px, 100%); }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal .mh h2 { flex: 1; }
.modal .mb { padding: 18px 20px; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 12px 12px; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%); background: var(--surface); z-index: 55; box-shadow: -10px 0 40px rgba(0,0,0,.12); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; }
[dir=rtl] .drawer { transform: translateX(-100%); box-shadow: 10px 0 40px rgba(0,0,0,.12); }
.drawer.open { transform: none !important; }
.drawer .dh { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer .dh h2 { flex: 1; }
.drawer .db { flex: 1; overflow-y: auto; padding: 16px; }
.toasts { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); max-width: 380px; display: flex; gap: 10px; align-items: flex-start; animation: slidein .2s ease-out; }
.toast.err { background: var(--crit); }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } }

/* copilot */
.msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 10px 12px; border-radius: 10px; font-size: 13px; max-width: 92%; }
.msg.me { align-self: flex-end; background: var(--navy); color: #fff; }
.msg.ai { background: var(--surface-2); border: 1px solid var(--line); }
.msg .cites { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.msg .cites span { font-size: 10.5px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; background: #fff; }
.proposal { margin-top: 10px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px; background: #fff; }
.composer { display: flex; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); }
.composer input { flex: 1; }
.mic.on { color: var(--sky); border-color: var(--sky); }

/* heat grid */
.heat { display: grid; gap: 3px; }
.heat div { aspect-ratio: 1; border-radius: 3px; font-size: 9px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); }

/* gauge */
.gauge { position: relative; width: 140px; height: 80px; margin: 0 auto; }
.gauge svg { width: 100%; height: 100%; }
.gauge .gv { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 20px; font-weight: 700; }

/* domain cards */
.dom { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dom .ic { width: 38px; height: 38px; border-radius: 9px; background: var(--sky-10); color: var(--navy); display: flex; align-items: center; justify-content: center; }
.dom .ic svg { width: 20px; height: 20px; }
.empty { text-align: center; color: var(--ink-70); padding: 40px 16px; }
.lockcell { color: var(--ink-50); display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }
.fnbtn { justify-content: flex-start; width: 100%; }
.fnbtn.locked { opacity: .5; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--ink-70); } .kv dd { margin: 0; }
.chartbox { position: relative; height: 240px; }
.chartbox.sm { height: 170px; }
.chartbox.lg { height: 300px; }
pre.code { margin: 0; font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; line-height: 1.55; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* print report */
@media print {
  .side, .top, .toasts, .scrim .mf, .scrim .mh button { display: none !important; }
  .scrim { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; width: 100%; max-height: none; }
  body > .app { display: none; }
}

/* responsive */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g6 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } .span3 { grid-column: span 2; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 70; width: 270px; transform: translateX(-100%); transition: transform .2s; inset-inline-start: 0; }
  [dir=rtl] .side { transform: translateX(100%); }
  .side.open { transform: none !important; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .menutoggle { display: inline-flex; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .g6 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .span2, .span3 { grid-column: auto; }
  .content { padding: 16px; }
  .top { padding: 10px 16px; }
  .search { min-width: 0; } .search span, .search kbd { display: none; }
  .session .who { display: none; }
  .cams { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* polish */
#view:focus { outline: none; }
input[type=range], input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
.kpi .meta > * { white-space: nowrap; }
.cams { grid-template-columns: repeat(2, 1fr); }
.cam .lab { background: rgba(0,0,0,.5); padding: 0 5px; border-radius: 3px; z-index: 2; }
.cam .ts { z-index: 2; background: rgba(0,0,0,.35); padding: 0 4px; border-radius: 3px; }
#ccQueue { max-height: 470px; overflow-y: auto; }
a.btn { text-decoration: none; }
.card .hd { flex-wrap: wrap; }
.wordmark { direction: ltr; unicode-bidi: isolate; }
[dir=rtl] .kpi .val { direction: ltr; text-align: right; }
[dir=rtl] .mono, [dir=rtl] .num { unicode-bidi: isolate; }
@media (max-width: 900px) { .livebar #clock { display: none; } }

/* ---------- satellite maps ---------- */
.sat { height: 320px; width: 100%; background: #2a2b2c; border-radius: 0 0 var(--radius) var(--radius); z-index: 0; }
.sat.lg { height: 420px; }
.sat + .legend { border-top: 1px solid var(--line); }
.card .bd.flush > .sat:first-child:not(:last-child) { border-radius: 0; }
.leaflet-container { font-family: var(--font-ui); }
.leaflet-control-attribution { font-size: 10px !important; background: rgba(255,255,255,.8) !important; }
.leaflet-tooltip.satlbl { background: rgba(9,31,91,.88); color: #fff; border: none; border-radius: 4px; box-shadow: none; font-size: 11px; font-weight: 500; padding: 2px 7px; white-space: nowrap; }
.leaflet-tooltip.satlbl::before { display: none; }
.leaflet-tooltip.satlbl.crit { background: rgba(230,57,70,.92); }
.leaflet-tooltip.satlbl.ap { background: transparent; font-weight: 700; padding: 0; }
.leaflet-bar a { color: var(--ink) !important; }

/* ---------- real video tiles ---------- */
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) contrast(1.06) brightness(.95); }
.cam .scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.08) 2px 3px), radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.35) 100%); }
.cam { cursor: zoom-in; }
.cam .box { z-index: 2; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.cam .box.alert { border-width: 2px; }
.cam .credit { position: absolute; bottom: 6px; inset-inline-start: 7px; z-index: 3; width: 15px; height: 15px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font: 600 10px/15px var(--font-ui); text-align: center; text-decoration: none; opacity: .75; }
.cam .credit:hover { opacity: 1; }
.cam.masked video { filter: blur(14px) grayscale(1); transform: scale(1.1); }
.cam.masked { cursor: pointer; }
.cam.masked::after { z-index: 4; }
.cam.nofeed::before { content: 'Feed unavailable'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; color: #ccc; font-size: 11px; }
.cam:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.cams.cams4 { grid-template-columns: repeat(4, 1fr); }
.cam.big { aspect-ratio: 16/9; border-radius: 8px; cursor: default; font-size: 12px; }
.cam.big video { filter: none; }
@media (max-width: 1180px) { .cams.cams4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .sat { height: 280px; } .sat.lg { height: 340px; } }

/* ---------- RAKAZ brand ---------- */
.brand { padding: 16px 18px 12px; flex-direction: column; align-items: flex-start; gap: 4px; }
.brand .logo { display: block; width: 196px; height: auto; }
.brand .by { font-size: 10px; color: var(--ink-50); letter-spacing: .12em; text-transform: uppercase; padding-inline-start: 2px; }
[dir=rtl] .brand .logo { direction: ltr; }
h1, h2 { color: var(--navy); }
.card .hd h2 .sub, .kpi .val small { color: var(--ink-70); }
.btn.dark { background: var(--ink); border-color: var(--ink); }
.pill.ink { background: var(--navy); }
.badge { background: var(--red); }
a { color: var(--navy); }
.report-logo { height: 46px; width: auto; }
.top { background: rgba(255,255,255,.94); }
.side { background: #fff; }
