/* =====================================================================================================================
   freecity_mdt - "Free City" style (2026-11-13, MDT overhaul phase 1, docs/MDT-OVERHAUL-PLAN-2026-11-13.md).
   Hank's spec: a professional law-enforcement platform look - dark charcoal and black, clean white and grey type, subtle
   blue for active navigation and important information, red for emergencies, green for available / success,
   amber for warnings / pending; clean borders, quiet shadows, tight professional spacing; no cheap gradients, no
   oversized buttons. Sits on the CAD layout + Modern rules (html.skin-cad.skin-modern.skin-fc) so every page and
   feature keeps working; only the look changes. Game browser rules kept: no backdrop-filter, no color-mix(), no :has().
   Tokens: the old names (--gold...) stay as the accent so existing pages follow; --accent* are the new names.
   ===================================================================================================================== */
html.skin-fc {
    --ink: #050607;
    --bg: #0b0c0e;
    --panel: #0f1113;
    --raised: #15181b;
    --raised-2: #1b1f23;
    --raised-3: #2a3036;
    --line: rgba(255, 255, 255, 0.075);
    --line-2: rgba(255, 255, 255, 0.13);
    --text: #f1f3f5;
    --muted: #a7afb8;
    --faint: #6d7680;
    --silver: #e3e7eb;
    --silver-2: #ffffff;
    --accent: #3b82f6;
    --accent-2: #7cb0ff;
    --accent-deep: #2563eb;
    --gold: var(--accent);
    --gold-rgb: 59, 130, 246;
    --gold-2: var(--accent-2);
    --gold-deep: var(--accent-deep);
    --gold-soft: rgba(59, 130, 246, 0.12);
    --gold-soft-2: rgba(59, 130, 246, 0.2);
    --gold-line: rgba(59, 130, 246, 0.5);
    --gold-ink: #ffffff;
    --good: #22c55e;
    --good-soft: rgba(34, 197, 94, 0.13);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, 0.14);
    --bad: #ef4444;
    --bad-soft: rgba(239, 68, 68, 0.14);
    --info: #60a5fa;
    --info-soft: rgba(96, 165, 250, 0.13);
    --steel: #232830;
    --steel-2: #343b45;
    --bar: #0d0f11;
    --r-sm: 5px;
    --r: 7px;
    --r-lg: 9px;
    --font: 'Barlow', 'Segoe UI', Tahoma, sans-serif;
    --cond: 'Barlow Condensed', 'Barlow', 'Segoe UI', sans-serif;
    --mono: 'Barlow', 'Segoe UI', Tahoma, sans-serif;
    --sheen: linear-gradient(transparent, transparent);
    --lift: 0 1px 2px rgba(0, 0, 0, 0.45);
}
html.skin-fc body { -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
html.skin-fc :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
html.skin-fc ::-webkit-scrollbar-thumb { background: var(--raised-3); border-radius: 99px; border: 2px solid var(--panel); }

/* ---------------------------------------------------------------- frame */
html.skin-fc .mdt { border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.95); }
html.skin-fc .mdt::before { height: 2px; background: var(--accent); opacity: 1; }

/* ---------------------------------------------------------------- left rail */
html.skin-fc .rail { background: #08090a; border-right: 1px solid var(--line); }
html.skin-fc .rail-mod { border-radius: 7px; margin: 0 0.3rem; color: var(--faint); border: 1px solid transparent; transition: background 0.12s, color 0.12s; }
html.skin-fc .rail-mod span:not(.nav-count) { font: 600 0.6rem var(--font); letter-spacing: 0.06em; text-transform: uppercase; }
html.skin-fc .rail-mod:hover { background: var(--raised); color: var(--text); transform: none; }
html.skin-fc .rail-mod.on { background: var(--raised-2); color: #fff; border-color: var(--line-2); box-shadow: none; }
html.skin-fc .rail-mod.on svg, html.skin-fc .rail-mod.on .ico { color: var(--accent-2); }
html.skin-fc .rail-mod.on::before { left: -0.3rem; top: 18%; bottom: 18%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: none; }
html.skin-fc .rail-avatar { border-radius: 7px; background: var(--raised-3); color: #fff; }

/* ---------------------------------------------------------------- status strip + top bar */
html.skin-fc .cad-strip { background: #08090a; border-bottom: 1px solid var(--line); font: 600 0.72rem var(--font); letter-spacing: 0.08em; }
html.skin-fc .cad-strip > span { border-right: 1px solid var(--line); }
html.skin-fc .cad-strip .cs-sys { background: var(--accent-deep); letter-spacing: 0.14em; }
html.skin-fc .cad-strip .cs-st { border-radius: 4px; padding: 0.04rem 0.5rem; }
html.skin-fc .cad-strip .cs-clock { color: var(--text); font-weight: 700; }
html.skin-fc .mod-name { font: 700 0.68rem var(--font); letter-spacing: 0.18em; color: var(--faint); text-transform: uppercase; }
html.skin-fc .mod-tabs { gap: 0.15rem; }
html.skin-fc .mod-tab { border-radius: 6px; border: 1px solid transparent; background: none; color: var(--muted); font: 600 0.78rem var(--font); letter-spacing: 0.01em; padding: 0.36rem 0.75rem; }
html.skin-fc .mod-tab:hover { background: var(--raised); color: var(--text); }
html.skin-fc .mod-tab.on { background: var(--raised-2); color: #fff; border-color: var(--line-2); box-shadow: inset 0 -2px 0 var(--accent); }
html.skin-fc .top-search { border-radius: 7px; border: 1px solid var(--line-2); background: var(--panel); font-size: 0.8rem; }
html.skin-fc .top-search:hover { border-color: var(--gold-line); }
html.skin-fc .icon-btn, html.skin-fc .close-mdt { border-radius: 7px; }

/* ---------------------------------------------------------------- cards, dashboard tiles */
html.skin-fc .card { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--raised); box-shadow: var(--lift); }
html.skin-fc .card-h { padding: 0.62rem 0.95rem; background: rgba(255, 255, 255, 0.018); border-bottom: 1px solid var(--line); }
html.skin-fc .card-h h2 { font: 700 0.74rem var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver); }
html.skin-fc .card-h .sub { font: 500 0.74rem var(--font); color: var(--faint); text-transform: none; letter-spacing: 0; }
html.skin-fc .hello { border-radius: var(--r-lg); border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--raised); box-shadow: var(--lift); }
html.skin-fc .stat { padding: 0.8rem 0.95rem; }
html.skin-fc .stat-label { font: 600 0.66rem var(--font); letter-spacing: 0.12em; color: var(--faint); text-transform: uppercase; }

/* ---------------------------------------------------------------- tables: dense, quiet dividers, blue hover */
html.skin-fc .table th { padding: 0.5rem 0.85rem; background: #121417; color: var(--faint); font: 700 0.66rem var(--font); letter-spacing: 0.1em; text-transform: uppercase; border-bottom: 1px solid var(--line-2); }
html.skin-fc .table td { padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--line); border-right: 0; }
html.skin-fc .table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.012); }
html.skin-fc .table tr.click:hover td { background: var(--gold-soft); }

/* ---------------------------------------------------------------- chips, buttons, inputs, tabs */
html.skin-fc .chip { border-radius: 4px; padding: 0.1rem 0.5rem; font: 600 0.68rem var(--font); letter-spacing: 0.03em; background: var(--raised-2); border-color: var(--line-2); }
html.skin-fc .chip.good { color: var(--good); background: var(--good-soft); border-color: rgba(34, 197, 94, 0.35); }
html.skin-fc .chip.warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(245, 158, 11, 0.35); }
html.skin-fc .chip.bad { color: var(--bad); background: var(--bad-soft); border-color: rgba(239, 68, 68, 0.4); }
html.skin-fc .btn { border-radius: 6px; padding: 0.44rem 0.9rem; font: 600 0.8rem var(--font); letter-spacing: 0.01em; transition: background 0.12s, border-color 0.12s, filter 0.12s; }
html.skin-fc .btn:hover { transform: none; filter: brightness(1.12); }
html.skin-fc .btn.gold { background: var(--accent); border-color: var(--accent-deep); color: #fff; box-shadow: none; }
html.skin-fc .btn.gold:hover { background: #4b8ff8; filter: none; }
html.skin-fc .btn.danger, html.skin-fc .btn.bad { background: var(--bad); border-color: #b91c1c; color: #fff; }
html.skin-fc .input, html.skin-fc .select, html.skin-fc .search-input, html.skin-fc textarea.input { border-radius: 6px; background: #0c0e10; border: 1px solid var(--line-2); }
html.skin-fc .input:focus, html.skin-fc .select:focus, html.skin-fc .search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
html.skin-fc .searchbar { border-radius: 8px; }
html.skin-fc .tab { border-radius: 6px; border: 1px solid var(--line-2); background: none; font: 600 0.76rem var(--font); }
html.skin-fc .tab.on { background: var(--raised-2); border-color: var(--accent); color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }

/* ---------------------------------------------------------------- dispatch call cards + live panel */
html.skin-fc .callcard { border-radius: 7px; margin-bottom: 0.35rem; border: 1px solid var(--line); background: var(--raised); }
html.skin-fc .callcard:nth-child(even) { background: var(--raised); }
html.skin-fc .callcard:hover { border-color: var(--line-2); background: var(--raised-2); transform: none; }
html.skin-fc .callcard::before { width: 3px; border-radius: 7px 0 0 7px; }
html.skin-fc .callcard .cc-title { font: 700 0.88rem var(--font); }
html.skin-fc .live { background: #090a0c; border-left: 1px solid var(--line); }
html.skin-fc .live-card { border-radius: 8px; border: 1px solid var(--line); background: var(--raised); }
html.skin-fc .ls-btn { border-radius: 6px; background: var(--raised-2); }
html.skin-fc .ls-btn:hover { transform: none; border-color: var(--line-2); }
html.skin-fc .ls-btn.on { box-shadow: 0 0 0 1px currentColor inset; }

/* ---------------------------------------------------------------- overlays */
html.skin-fc .modal { border-radius: 10px; border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.95); }
html.skin-fc .toast { border-radius: 8px; }
html.skin-fc #view.fade, html.skin-fc #view > * { animation: fcIn 0.18s ease both; }
@keyframes fcIn { from { opacity: 0; transform: translateY(3px); } }

/* ---------------------------------------------------------------- the street talk panel follows the skin */
html.skin-fc #npcPanel { background: rgba(13, 15, 17, 0.97); border-radius: 10px; }
html.skin-fc #npcPanel .np-tab.on, html.skin-fc #npcPanel .np-line.me { background: var(--accent-deep); }

/* ---------------------------------------------------------------- dashboard, overhaul phase 2 (2026-11-13) */
.db-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.db-kpi { display: flex; gap: 0.7rem; align-items: center; text-align: left; padding: 0.75rem 0.85rem; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--raised); color: var(--text); cursor: pointer; font: inherit; border-left: 3px solid var(--line-2); }
.db-kpi:hover { background: var(--raised-2); }
.db-kpi > svg { width: 1.3rem; height: 1.3rem; flex: none; color: var(--faint); }
.db-kpi b { display: block; font: 700 1.45rem var(--font); line-height: 1.05; font-variant-numeric: tabular-nums; }
.db-kpi span { display: block; font: 600 0.66rem var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 0.1rem; }
.db-kpi em { display: block; font-style: normal; font-size: 0.72rem; color: var(--faint); }
.db-kpi.good { border-left-color: var(--good); } .db-kpi.good > svg { color: var(--good); }
.db-kpi.warn { border-left-color: var(--warn); } .db-kpi.warn > svg { color: var(--warn); }
.db-kpi.bad { border-left-color: var(--bad); } .db-kpi.bad > svg { color: var(--bad); }
.db-pursuit { display: flex; width: 100%; align-items: center; gap: 0.6rem; margin-top: 0.6rem; padding: 0.6rem 0.85rem; border-radius: var(--r-lg); border: 1px solid rgba(239, 68, 68, 0.5); background: var(--bad-soft); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.db-pursuit svg { width: 1.1rem; height: 1.1rem; color: var(--bad); flex: none; }
.db-pursuit b { color: var(--bad); font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; flex: none; }
.db-pursuit em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 0.8rem; }
.db-chart { position: relative; }
.db-bars { display: flex; align-items: flex-end; height: 120px; gap: 0; border-bottom: 1px solid var(--line-2); }
.db-bar { height: 100%; display: flex; align-items: flex-end; justify-content: center; padding: 0 2px; }
.db-bar i { display: block; width: 100%; max-width: 26px; border-radius: 3px 3px 0 0; opacity: 0.85; }
.db-bar:hover i { opacity: 1; }
.db-ticks { position: relative; height: 1.2rem; }
.db-ticks span { position: absolute; top: 0.25rem; transform: translateX(-50%); font-size: 0.66rem; color: var(--faint); white-space: nowrap; }

/* ---------------------------------------------------------------- record pages, overhaul phase 2b (2026-11-13):
   citizen / vehicle / warrant headers, the facts strip, tabs as an underlined bar, report editor fields, timelines */
.ph-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem 1rem; margin: 0.85rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.ph-facts dt { font: 700 0.62rem var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.15rem; }
.ph-facts dd { margin: 0; font-size: 0.88rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
html.skin-fc .person-head, html.skin-fc .vehicle-head { border-left: 3px solid var(--accent); padding: 1.1rem 1.2rem; align-items: start; }
html.skin-fc .p-name { font: 700 1.75rem/1.1 var(--font); letter-spacing: -0.01em; }
html.skin-fc .ph-meta { font-size: 0.86rem; gap: 0.25rem 0.9rem; }
html.skin-fc .ph-meta .mono { color: var(--silver); font-weight: 700; }
html.skin-fc .person-head .photo, html.skin-fc .vehicle-head .photo { border-radius: 8px; border: 1px solid var(--line-2); }
html.skin-fc .tabs { gap: 0; border-bottom: 1px solid var(--line-2); padding: 0 0.2rem; }
html.skin-fc .tabs .tab { border: 0; border-radius: 0; background: none; padding: 0.6rem 0.85rem 0.65rem; color: var(--muted); font: 600 0.8rem var(--font); letter-spacing: 0.01em; text-transform: none; box-shadow: none; }
html.skin-fc .tabs .tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.025); }
html.skin-fc .tabs .tab.on { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); background: none; }
html.skin-fc .tabs .tab em { background: var(--raised-3); color: var(--silver); font-weight: 700; }
html.skin-fc .tabs .tab.on em { background: var(--accent); color: #fff; }
html.skin-fc .tab-body { padding-top: 0.9rem; }
html.skin-fc .alert { border-radius: 8px; }
html.skin-fc .alert.big { border-left: 4px solid var(--bad); }
html.skin-fc .kv dt { font: 700 0.64rem var(--font); letter-spacing: 0.12em; }
html.skin-fc .field > span, html.skin-fc .fld > span, html.skin-fc label.field > b { font: 700 0.64rem var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
html.skin-fc .report-body, html.skin-fc .report-text { font: 400 0.92rem/1.6 var(--font); }
html.skin-fc .rep-tools { border-radius: 8px; }
html.skin-fc .timeline { border-left: 2px solid var(--line-2); }

/* ---------------------------------------------------------------- record list pages, overhaul phase 3a (2026-11-13):
   Active Calls, Arrests, Citations: KPI strip, filter bar, dense table */
.rl-kpi { cursor: default; }
.rl-kpi span { display: block; font: 600 0.7rem var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-top: 0.15rem; }
.rl-kpi.tone-accent { border-left-color: var(--accent, #3b82f6); }
.rl-kpi.tone-bad { border-left-color: var(--bad); }
.rl-kpi.tone-bad b { color: var(--bad); }
.rl-kpi.tone-warn { border-left-color: var(--warn); }
.rl-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.rl-search { position: relative; flex: 1 1 260px; min-width: 200px; }
.rl-search > svg { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--faint); pointer-events: none; }
.rl-search .input { padding-left: 2.1rem; width: 100%; }
.rl-mine { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.rl-mine input { accent-color: var(--accent, #3b82f6); }
.rl-table td { vertical-align: top; }
.rl-table .link-btn, .rl-table td.num { white-space: nowrap; }
.rl-table tr.gone td { opacity: 0.55; }
.rl-table tr.rl-p1 td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.rl-table .chip svg { width: 0.85rem; height: 0.85rem; margin-right: 0.25rem; vertical-align: -2px; }
html.skin-fc .seg button.on { background: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- record pages, overhaul phase 3b (2026-11-13):
   Fingerprint Database, AI Locals, Training records, evidence storage place */
.rl-note { display: flex; align-items: center; gap: 0.4rem; }
.rl-note svg { width: 0.9rem; height: 0.9rem; }
.ev-loc { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--text); font-weight: 600; }
.ev-loc svg, .call-head .chip svg { width: 0.85rem; height: 0.85rem; margin-right: 0.25rem; vertical-align: -2px; }
.tr-sum { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tr-sum .chip b { margin-left: 0.3rem; }
.tr-bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 0.3rem; max-width: 120px; overflow: hidden; }
.tr-bar i { display: block; height: 100%; background: var(--good); }
.tr-bar i.bad { background: var(--bad); }
.tabs .tab em { font-style: normal; font-size: 0.72rem; padding: 0.05rem 0.4rem; border-radius: 999px; margin-left: 0.3rem; }

/* ---------------------------------------------------------------- overhaul phase 4a (2026-11-13): saved notifications,
   backup requests, the call side panel on the dispatch board. Unscoped: works in every skin. */
.np-h { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.np-h .link-btn { font: 600 0.74rem var(--font); letter-spacing: 0; text-transform: none; }
#noticeList li { align-items: flex-start; }
#noticeList li .nt-body { flex: 1; min-width: 0; }
#noticeList li.np-new { background: rgba(255, 255, 255, 0.03); box-shadow: inset 3px 0 0 var(--accent, #3b82f6); }
#noticeList li.np-new.bad { box-shadow: inset 3px 0 0 var(--bad); }
#noticeList li.np-acked { opacity: 0.6; }
#noticeList li .np-ack { flex: none; align-self: center; padding: 0.2rem 0.5rem; font-size: 0.72rem; }
#noticeList li .np-ack svg { width: 0.85rem; height: 0.85rem; margin-right: 0.2rem; }
.notice-panel { width: 26rem; max-height: 32rem; }

.chip svg { width: 0.85rem; height: 0.85rem; margin-right: 0.25rem; vertical-align: -2px; }
.bk-pulse { animation: bkPulse 1.2s ease-in-out infinite; }
@keyframes bkPulse { 50% { opacity: 0.55; } }
.bk-banner { align-items: center; }
.bk-banner > div:nth-child(2) { flex: 1; }
.bk-banner.bk-c3 { border-color: var(--bad); background: var(--bad-soft); }
.bk-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.main { position: relative; }
.call-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(430px, 46%); z-index: 25; display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line-2); box-shadow: -8px 0 18px rgba(0, 0, 0, 0.35); overflow-y: auto; animation: cdIn 0.14s ease-out; }
@keyframes cdIn { from { transform: translateX(16px); opacity: 0; } }
.call-drawer[hidden] { display: none; }
.cd-head { padding: 0.9rem 1rem 0.8rem; border-bottom: 1px solid var(--line); background: var(--raised); border-left: 4px solid var(--line-2); }
.cd-head.p1 { border-left-color: var(--bad); }
.cd-head.p2 { border-left-color: var(--warn); }
.cd-head.p3 { border-left-color: var(--accent, #3b82f6); }
.cd-head .cc-top { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.cd-x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0.2rem; border-radius: 5px; }
.cd-x:hover { color: var(--text); background: var(--raised-2); }
.cd-x svg { width: 1.1rem; height: 1.1rem; }
.cd-title { font: 700 1.25rem/1.2 var(--font); margin-top: 0.45rem; color: var(--text); }
.cd-meta { margin-top: 0.3rem; font-size: 0.84rem; display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.cd-meta svg { width: 0.95rem; height: 0.95rem; color: var(--faint); }
.cd-pad { padding: 0.85rem 1rem 1.2rem; }
.cd-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.cd-sec { margin-top: 1rem; }
.cd-sec h4 { margin: 0 0 0.5rem; font: 700 0.66rem var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 0.4rem; }
.cd-sec h4 em { font-style: normal; background: var(--raised-3, #2a3036); color: var(--muted); border-radius: 999px; padding: 0 0.4rem; letter-spacing: 0; }
.cd-details { white-space: pre-wrap; font-size: 0.88rem; line-height: 1.5; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 7px; padding: 0.6rem 0.7rem; }
.cd-units { list-style: none; margin: 0; padding: 0; }
.cd-units li { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
.cd-units li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-note { display: flex; gap: 0.4rem; align-items: flex-end; margin-bottom: 0.6rem; }
.cd-note textarea { flex: 1; resize: vertical; min-height: 2.4rem; }
.cd-tl li { font-size: 0.84rem; }
.callcard.on { outline: 2px solid var(--accent, #3b82f6); outline-offset: -2px; }
@media (max-width: 1400px) { .call-drawer { width: min(400px, 60%); } }

.call-drawer .bk-banner { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.6rem; align-items: start; }
.call-drawer .bk-banner b { text-transform: none; letter-spacing: 0; font-size: 0.92rem; }
.call-drawer .bk-btns { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- overhaul phase 4b (2026-11-13): map places, roadblocks,
   traffic stops, EMS/Fire coordination */
.mm-place { position: absolute; left: 0; top: 0; z-index: 1; display: flex; align-items: center; gap: 0.3rem; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; transform-origin: 0 0; }
.mm-place .mm-pl { display: grid; place-items: center; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 5px; font: 800 10px/1 var(--font, sans-serif); color: #fff; background: #4b5563; border: 1px solid rgba(255, 255, 255, 0.55); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.mm-place .mm-tag { opacity: 0; transition: opacity 0.12s; }
.mm-place:hover .mm-tag, .mm-place.on .mm-tag { opacity: 1; }
.mm-place.k-police .mm-pl { background: #2563eb; }
.mm-place.k-sheriff .mm-pl { background: #b7791f; }
.mm-place.k-hospital .mm-pl { background: #dc2626; }
.mm-place.k-fire .mm-pl { background: #ea580c; }
.mm-place.k-prison .mm-pl { background: #52525b; }
.mm-place.lay-checkpoints .mm-pl { width: 22px; height: 12px; margin: -6px 0 0 -11px; border-radius: 3px; font-size: 0; background: repeating-linear-gradient(135deg, #ef4444 0 5px, #f8fafc 5px 10px); border-color: #fff; }
.mm-place.lay-checkpoints .mm-tag { opacity: 1; }
.mm-place.lay-stops .mm-pl { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; font-size: 0; background: #f59e0b; border-color: #111; }
.mm-place.on .mm-pl { outline: 2px solid #fff; outline-offset: 1px; }
.mm-stage.no-places .lay-places, .mm-stage.no-checkpoints .lay-checkpoints, .mm-stage.no-stops .lay-stops { display: none; }
.map-cp-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.map-cp-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-cp-row .cp-bar { width: 18px; height: 9px; border-radius: 2px; background: repeating-linear-gradient(135deg, #ef4444 0 4px, #f8fafc 4px 8px); flex: none; }
.map-side .map-cp-add { margin: 0.5rem 0.8rem; width: calc(100% - 1.6rem); justify-content: center; }

.co-card { border: 1px solid var(--line); border-radius: var(--r-lg, 9px); background: var(--raised); overflow: hidden; }
.co-card + .co-card { margin-top: 0.7rem; }
.co-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.co-head:hover { background: var(--raised-2); }
.co-head b { font-size: 0.98rem; }
.co-head .co-where { color: var(--muted); font-size: 0.82rem; }
.co-head .co-age { margin-left: auto; color: var(--faint); font-size: 0.8rem; }
.co-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.co-col { padding: 0.6rem 0.9rem; min-height: 4.2rem; }
.co-col + .co-col { border-left: 1px solid var(--line); }
.co-col h5 { margin: 0 0 0.4rem; font: 700 0.62rem var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 0.35rem; }
.co-col h5 i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.co-col .unit-chip { display: inline-flex; margin: 0 0.3rem 0.3rem 0; }
.co-need { color: var(--warn); font-size: 0.8rem; font-weight: 600; }
.co-need.bad { color: var(--bad); }
@media (max-width: 1400px) { .co-cols { grid-template-columns: 1fr; } .co-col + .co-col { border-left: 0; border-top: 1px solid var(--line); } }
.mm-place .mm-tag { position: absolute; left: 0.75rem; top: -0.6rem; padding: 0.08rem 0.4rem; border-radius: 0.3rem; background: rgba(7, 8, 10, 0.88); border: 1px solid var(--line-2); color: var(--text); font: 700 0.72rem var(--cond); letter-spacing: 0.04em; white-space: nowrap; pointer-events: none; }
.mm-card .cp-bar { width: 18px; height: 9px; border-radius: 2px; background: repeating-linear-gradient(135deg, #ef4444 0 4px, #f8fafc 4px 8px); flex: none; }
.mmc-pl { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font: 800 10px/1 var(--font); color: #fff; background: #4b5563; flex: none; }
.mmc-pl.k-police { background: #2563eb; } .mmc-pl.k-sheriff { background: #b7791f; } .mmc-pl.k-hospital { background: #dc2626; } .mmc-pl.k-fire { background: #ea580c; } .mmc-pl.k-stop { width: 12px; height: 12px; border-radius: 50%; background: #f59e0b; }

/* ---------------------------------------------------------------- overhaul phase 5 (2026-11-13): department admin */
.da-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.6rem; }
.da-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.2rem; text-align: left; padding: 0.75rem 0.9rem; border-radius: var(--r-lg, 9px); border: 1px solid var(--line); border-top: 3px solid var(--dc); background: var(--raised); color: var(--text); cursor: pointer; font: inherit; }
.da-card:hover { background: var(--raised-2); }
.da-card.on { border-color: var(--dc); box-shadow: inset 0 0 0 1px var(--dc); }
.da-short { font: 800 0.95rem var(--cond); letter-spacing: 0.08em; color: var(--dc); }
.da-label { font-size: 0.8rem; color: var(--muted); line-height: 1.25; }
.da-nums { font-size: 0.78rem; color: var(--faint); margin-top: 0.2rem; }
.da-nums b { color: var(--text); font-size: 0.95rem; }
.da-head { border-left: 4px solid var(--dc); }
.da-title { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
.da-title h2 { margin: 0; font: 700 1.3rem var(--font); }
.da-badge { display: grid; place-items: center; min-width: 3.4rem; height: 3.4rem; padding: 0 0.5rem; border-radius: 10px; background: var(--dc); color: #fff; font: 800 0.9rem var(--cond); letter-spacing: 0.06em; }
.da-links { margin-left: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------- overhaul phase 5 (2026-11-13): tablet and small-laptop
   layouts. 1300 px and below (1280x720 laptops), 1180 px and below (tablets in landscape, small windows). Phones keep
   the html.web rules in style.css (900 px and below). */
@media (max-width: 1300px) {
    html.skin-fc .db-kpis { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
    .ph-facts { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .call-drawer { width: min(380px, 62%); }
    .cad-strip { overflow: hidden; white-space: nowrap; }
}
@media (max-width: 1180px) {
    html.skin-fc .mdt:not(.no-live):not(.live-off) { grid-template-columns: 4.4rem minmax(0, 1fr) 15.5rem; }
    .cad-strip .cs-clock { display: none; }
    .skin-cad .callcard { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; }
    .skin-cad .callcard .cc-title { flex: 1 1 12rem; min-width: 0; }
    .skin-cad .callcard .cc-loc { flex: 1 1 100%; }
    .skin-cad .callcard .cc-btns { margin-left: auto; }
    .dsp-top { flex-wrap: wrap; gap: 0.5rem; }
    .view .grid.cols-2, .view .grid.cols-3, .dsp-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .view .card-b, #rlBody, #acBody, #daBody, #prBody, #npBody, #trBody, #coBody { overflow-x: auto; }
    .rl-table { min-width: 40rem; }
    .da-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .da-links { margin-left: 0; width: 100%; }
    .call-drawer { width: min(360px, 78%); }
    .mod-tabs, #modTabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
    .mod-tabs::-webkit-scrollbar, #modTabs::-webkit-scrollbar { display: none; }
    .mod-tab { flex: 0 0 auto; }
    .rl-search { flex-basis: 100%; }
    .notice-panel { width: min(26rem, 88vw); }
    .filters { display: flex !important; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem; }
    .filters > .field { flex: 1 1 11rem; min-width: 0; }
    .filters > .btn { flex: 0 0 auto; }
    .hello { flex-wrap: wrap; }
    .codes-find { max-width: 100%; flex: 1 1 14rem !important; }
    .skin-cad .callcard .cc-top { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
}

/* the 911 desk's dual mode squeezes the MDT to half the screen: same wrapping as a tablet */
body.ws-dual .skin-cad .callcard, html.skin-cad body.ws-dual .callcard { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; }
body.ws-dual .callcard .cc-top { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
body.ws-dual .callcard .cc-title { flex: 1 1 12rem; min-width: 0; }
body.ws-dual .callcard .cc-loc { flex: 1 1 100%; }
body.ws-dual .callcard .cc-btns { margin-left: auto; }
body.ws-dual .dsp-grid, body.ws-dual .view .grid.cols-2, body.ws-dual .view .grid.cols-3 { grid-template-columns: minmax(0, 1fr) !important; }
body.ws-dual .dsp-top { flex-wrap: wrap; gap: 0.5rem; }
body.ws-dual .view .card-b { overflow-x: auto; }
