/* PremierMDT Web - styled after a real Windows desktop CAD application (light content
   panels, navy chrome, standard system-style form controls) per the actual PremierOne
   Mobile Client reference screenshots - not a dark developer-tool/SaaS-dashboard look.
   Not affiliated with, and does not reproduce any branding/logos/assets from, any real
   commercial CAD/RMS product. */

:root {
  /* ===== Chrome (title bar / command-adjacent accents) - navy, matches every reference
     screenshot's actual chrome color (an original hex, not Motorola's - the earlier
     red-header direction was a guess made before any reference showed the real chrome). */
  --chrome-0: #0d2036;
  --chrome-1: #163656;
  --chrome-2: #204874;
  --chrome-3: #2c5a8c;
  --chrome-border: #0a1928;
  --chrome-text: #eef2f6;
  --chrome-text-dim: #a7b8c9;

  /* ===== Content (the actual working area) - light, like a real Windows desktop app.
     Only the live Dispatch board stays dark (see #calls-table/#units-table below),
     matching a real CAD board's night-driving-readability convention specifically. */
  --bg-void: #e7ebf0;
  --bg-base: #ffffff;
  --bg-panel: #ffffff;
  --bg-panel-alt: #f1f4f7;
  --bg-raised: #e3e8ee;
  --border: #cfd5dd;
  --border-soft: #e1e5ea;
  --text: #1c2733;
  --text-dim: #55606c;
  --text-faint: #838c96;

  --accent: #2f6fb0;
  --accent-dim: #cfe0f2;
  --danger: #b53a2e;
  --danger-dim: #f6dbd7;
  --warn: #b8860b;
  --warn-dim: #f7ecd2;
  --ok: #2e7d4f;
  --ok-dim: #dcefe2;
  --sec-teal: #0e6478;
  --sec-orange: #c9720c;
  --purple: #5b3ea6;
  /* Bumped from a sharp 3px per the real PremierOne Mobile Client reference screenshot -
     its toolbar icons/panels/pills all read as distinctly rounded, not flat/sharp. */
  --radius: 6px;
  --radius-icon: 10px;
  --shadow: 0 8px 24px rgba(10, 20, 30, 0.18);

  /* Live Dispatch board only - stays dark (see the DISPATCH TABLES section for why). */
  --dispatch-bg-0: #12161c;
  --dispatch-bg-1: #181d25;
  --dispatch-bg-2: #222933;
  --dispatch-bg-3: #2c333d;
  --dispatch-text: #e6e8eb;
  --dispatch-text-dim: #8b929c;
  --dispatch-border: #2a2f37;
}

/* ===== In-vehicle DUI screen (ImperialVehicleLaptop) only - see shell.js for the detection.
   Never applies to normal browser/dispatcher-desk use. ===== */

/* The normal light theme is far too bright rendered on a physical in-world screen at night - a
   uniform brightness filter (rather than recoloring every variable) keeps every carefully-tuned
   contrast/hover relationship from the visual-polish rounds exactly intact, just dimmed overall,
   like a real monitor's backlight slider. 0.55 is a first guess - tune this one number if it's
   still too bright or too dark once tested live.

   Targets body specifically, NOT html - #dui-cursor is appended as a sibling of body (see
   shell.js), deliberately outside this filtered subtree, so it stays fully visible (a filter
   also dims its own descendants) and stays correctly viewport-positioned (filter also makes an
   element a containing block for position:fixed descendants, same special case as transform). */
html.in-vehicle-screen body {
  filter: brightness(var(--dui-day-brightness, 0.55));
}

/* In-car DARK THEME (day: ImperialVehicleLaptop Config.DayMode.darkTheme, default on; night: always).
   A real dark palette through the theme variables - NOT a colour inversion. The page mixes light
   surfaces with already-dark ones (navy header, tables), so inverting turned the dark tables into
   pale grey with faint amber text - exactly the washed-out screen seen live 2026-10-05. The game
   also renders the screen glowing, so big white areas bloom into glare; this keeps everything dark
   and lets brightness/contrast (day/night values from the laptop config) do the rest. */
html.in-vehicle-screen.dui-day-dark,
html.in-vehicle-screen.dui-night {
  color-scheme: dark;
  --bg-void: #0f141a;
  --bg-base: #151b23;
  --bg-panel: #19202a;
  --bg-panel-alt: #1e2630;
  --bg-raised: #26303b;
  --border: #33404e;
  --border-soft: #29333e;
  --text: #e4e9ef;
  --text-dim: #aab5c1;
  --text-faint: #7e8995;
  --accent: #6fb2f2;
  --accent-dim: #1f3550;
  --danger-dim: #42201d;
  --warn-dim: #3d3218;
  --ok-dim: #1b3426;
  --grid-row: #151b23;
  --grid-row-alt: #1a212a;
  --grid-text: #e4e9ef;
  --grid-hover: #22324a;
  --grid-pri1-bg: #4b1e1b;
  --grid-pri1-text: #ffb8ae;
  --grid-pri2-bg: #45370f;
  --grid-pri2-text: #ffd67d;
}
html.in-vehicle-screen.dui-day-dark tr.priority-1:hover td,
html.in-vehicle-screen.dui-night tr.priority-1:hover td { background: #5c2622; }
html.in-vehicle-screen.dui-day-dark tr.priority-2:hover td,
html.in-vehicle-screen.dui-night tr.priority-2:hover td { background: #574614; }
/* selected tabs/buttons use the navy chrome colour as TEXT, which vanishes on dark */
html.in-vehicle-screen.dui-day-dark :is(.nav-item, .query-sub-btn, .home-dash-tabs .home-dash-tab, .home-rail-btn).active,
html.in-vehicle-screen.dui-night :is(.nav-item, .query-sub-btn, .home-dash-tabs .home-dash-tab, .home-rail-btn).active { color: #ffffff; }
html.in-vehicle-screen.dui-day-dark .home-rail-btn .rail-icon,
html.in-vehicle-screen.dui-night .home-rail-btn .rail-icon { color: #4fc3d9; }
/* the global "black dropdown text" rule is for the light theme - light text on the dark one */
html.in-vehicle-screen.dui-day-dark select,
html.in-vehicle-screen.dui-night select,
html.in-vehicle-screen.dui-day-dark input,
html.in-vehicle-screen.dui-night input,
html.in-vehicle-screen.dui-day-dark textarea,
html.in-vehicle-screen.dui-night textarea { color: var(--text) !important; background-color: var(--bg-panel-alt); border-color: var(--border); }
html.in-vehicle-screen.dui-day-dark body {
  background: var(--bg-void);
  filter: brightness(var(--dui-day-brightness, 0.9)) contrast(var(--dui-day-contrast, 1));
}

/* In-game NIGHT on the in-car screen (ImperialVehicleLaptop sends the game clock): a full night
   dark theme - deeper, near-black surfaces than the day-dark theme, dark navy chrome and softer
   off-white text (pure white glares in a dark cab). Real colours, no inversion and no contrast
   squash: lowering contrast lifted the blacks to grey, which is what made night look washed out /
   "inverted". Brightness/contrast still come from Config.NightMode (--dui-night-*), defaults 0.9 / 1.
   Body-only targeting, so #dui-cursor (a sibling of body) is untouched. Never applies outside the DUI. */
html.in-vehicle-screen.dui-night {
  --bg-void: #06080b;
  --bg-base: #0a0d12;
  --bg-panel: #0d1117;
  --bg-panel-alt: #121820;
  --bg-raised: #19212b;
  --border: #232d38;
  --border-soft: #1b232c;
  --text: #cfd7e0;
  --text-dim: #8f9caa;
  --text-faint: #66727f;
  --accent: #5ea3e6;
  --accent-dim: #142a42;
  --chrome-0: #070d16;
  --chrome-1: #0c1828;
  --chrome-2: #12233a;
  --chrome-3: #1a3150;
  --chrome-border: #04080e;
  --chrome-text: #d6dee7;
  --chrome-text-dim: #8798aa;
  --grid-row: #0a0d12;
  --grid-row-alt: #0e1218;
  --grid-text: #cfd7e0;
  --grid-hover: #16233a;
  --dispatch-bg-0: #06080b;
  --dispatch-bg-1: #0a0d12;
  --dispatch-bg-2: #121820;
  --dispatch-bg-3: #19212b;
  --dispatch-text: #cfd7e0;
  --dispatch-text-dim: #7f8b98;
  --dispatch-border: #1b232c;
}
html.in-vehicle-screen.dui-night body {
  background: var(--bg-void);
  filter: brightness(var(--dui-night-brightness, 0.9)) contrast(var(--dui-night-contrast, 1));
}

/* In-car dropdowns (shell.js DuiSelect): the native popup doesn't work in a DUI, so selects get a
   chevron + bigger hit area, and open an in-page list instead. */
html.dui-selects select:not([multiple]) {
  -webkit-appearance: none; appearance: none;
  min-height: 34px; padding-right: 30px !important; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 8px;
}
.dui-select-panel {
  position: absolute; z-index: 100000; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; color: #111; border: 1px solid #9aa3ad; border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35); padding: 4px 0; font-size: 15px;
}
.dui-select-opt { padding: 10px 14px; white-space: nowrap; cursor: pointer; border-left: 3px solid transparent; }
.dui-select-opt.active { background: #dce8f7; }
.dui-select-opt.selected { font-weight: 700; border-left-color: #1e5aa8; }
.dui-select-opt.disabled { color: #999; cursor: default; }
.dui-select-group { padding: 8px 12px 4px; font-size: 12px; font-weight: 700; color: #667; text-transform: uppercase; letter-spacing: .04em; }
/* In-car date / time picker (shell.js DuiDate) */
.dui-date-panel { padding: 8px; overflow: visible; font-size: 14px; }
.dui-date-panel .dd-body { display: flex; gap: 12px; flex-wrap: wrap; }
.dui-date-panel button { min-height: 34px; min-width: 34px; border: 1px solid #c7cdd6; background: #f4f6f9; color: inherit; border-radius: 4px; cursor: pointer; font-size: 14px; padding: 0 6px; }
.dui-date-panel button:hover { border-color: #1e5aa8; }
.dui-date-panel button.sel { background: #1e5aa8; border-color: #1e5aa8; color: #fff; font-weight: 700; }
.dui-date-panel .dd-head { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.dui-date-panel .dd-head b { flex: 1; text-align: center; }
.dui-date-panel .dd-dow, .dui-date-panel .dd-grid { display: grid; grid-template-columns: repeat(7, 38px); gap: 3px; }
.dui-date-panel .dd-dow span { text-align: center; font-size: 11px; font-weight: 700; opacity: .7; }
.dui-date-panel .dd-day.today { box-shadow: inset 0 0 0 2px #e3a400; }
.dui-date-panel .dd-time { width: 250px; }
.dui-date-panel .dd-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; opacity: .75; margin: 2px 0 4px; display: flex; align-items: center; gap: 6px; }
.dui-date-panel .dd-lbl button { min-height: 26px; }
.dui-date-panel .dd-cur { font-size: 15px; opacity: 1; margin-right: auto; }
.dui-date-panel .dd-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: 6px; }
.dui-date-panel .dd-mins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.dui-date-panel .dd-foot { display: flex; gap: 6px; align-items: center; width: 100%; border-top: 1px solid #d5dbe3; padding-top: 6px; }
.dui-date-panel .dd-typed { flex: 1; font-size: 12px; opacity: .75; font-family: Consolas, monospace; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dui-date-panel button { background: var(--bg-raised); border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dui-date-panel button.sel { background: var(--accent); border-color: var(--accent); color: #06121f; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dui-date-panel .dd-foot { border-top-color: var(--border); }

#dui-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #000000;
  pointer-events: none;
  z-index: 2147483647;
}

* { box-sizing: border-box; }

/* Several elements below (.app-shell, .modal-overlay, ...) set `display` explicitly in
   their own rules, e.g. for flex layout. An author rule setting `display` always beats
   the browser's default `[hidden] { display: none }` at equal specificity (author origin
   outranks user-agent origin), so without this, the `hidden` attribute alone silently
   fails to hide them - this is what caused the modal overlay to be stuck visible
   (a permanent full-screen translucent layer + an empty floating box) even though the
   HTML had `hidden` set. This rule makes `hidden` authoritative everywhere, always. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-void);
  color: var(--text);
  font-family: 'Segoe UI', 'Consolas', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Dropdown lists render on a white popup - their text is always solid black, never the
   inherited light-grey theme text (unreadable on white). */
select, select option, select optgroup { color: #000 !important; }
select option, select optgroup { background-color: #fff; }

/* ===================== LOGIN ===================== */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-void);
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow);
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--chrome-1);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.login-brand h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text);
}

.login-sub {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#login-form label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin: 14px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#login-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text);
}

#login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.login-footnote {
  margin: 18px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
}

.form-error {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--danger-dim);
  border: 1px solid #e0b3ac;
  color: #7a2318;
  font-size: 12.5px;
}

.form-notice {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--ok-dim);
  border: 1px solid #a8d6b8;
  color: #1e5c38;
  font-size: 12.5px;
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 16px 0;
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-divider span { padding: 0 10px; }

.login-discord-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

/* ===================== APP SHELL ===================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
  padding: 0 18px;
  background: var(--chrome-0);
  border-bottom: 1px solid var(--chrome-border);
  flex-shrink: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Department/Admin pages are separate documents now, not sections of a shared app - this
   is the one link back to the Community Home. */
.home-link {
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
.home-link:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-sub {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
}

.clock {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-display {
  font-weight: 600;
  color: #fff;
}

.role-pill {
  padding: 2px 8px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Horizontal icon toolbar - LIGHT, per the real PremierOne Mobile Client reference (its
   toolbar row is white/light gray with colored icon squares; only the title bar above it
   is dark navy - two different tones, not one uniform dark bar). Matches the in-game
   NUI's #navrail exactly (same visual language on both surfaces). */
.sidenav {
  width: 100%;
  height: 68px;
  min-height: 68px;
  flex-shrink: 0;
  background: var(--bg-panel-alt);
  border-right: none;
  border-bottom: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.nav-item {
  /* Real CAD mobile client toolbars are almost entirely one restrained accent color -
     red/orange are reserved for specific items below, not the default for every tab. */
  --sec-color: var(--sec-teal);
  flex: 1 1 0;
  min-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  padding: 6px 4px;
  border: none;
  border-right: 1px solid var(--border);
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-dim);
  border-radius: 0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

/* Small keyboard-shortcut-style hint in the corner, per the real PremierOne Mobile Client
   reference (each toolbar button shows its F-key) - a visual label only. */
.nav-item {
  position: relative;
}
.nav-item .fkey {
  position: absolute;
  top: 2px; left: 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-faint);
}

.nav-item .nav-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: var(--sec-color);
  flex-shrink: 0;
}
.nav-item .nav-icon svg { width: 100%; height: 100%; }
/* The four quick-action status buttons (En Route / On Scene / T-Stop / Clear) get a
   filled colored circle with a white glyph, matching the reference toolbar. */
.nav-item .nav-icon.badge-circle {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--sec-color);
  color: #fff;
  padding: 4px;
  box-sizing: border-box;
}
.nav-item .nav-label { line-height: 1.1; }

/* On the web console there's no "my patrol unit" concept (no on-duty/callsign toggle like
   the in-game client), so the four quick-status actions have nothing to act on here - shown
   for visual/toolbar-layout consistency but inert, with a tooltip explaining why. */
.nav-item.nav-disabled {
  cursor: not-allowed;
  opacity: .45;
}
.nav-item.nav-disabled:hover { background: transparent; color: var(--text-dim); }

.nav-item:hover {
  background: var(--bg-raised);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--chrome-1);
  border-bottom-color: var(--sec-color);
}

.nav-item[data-section="home"] { --sec-color: var(--sec-orange); }
.nav-item[data-section="mapping"] { --sec-color: var(--sec-teal); }
.nav-item[data-section="enroute"] { --sec-color: var(--ok); }
.nav-item[data-section="onscene"] { --sec-color: var(--danger); }
.nav-item[data-section="tstop"] { --sec-color: var(--danger); }
.nav-item[data-section="clear"] { --sec-color: var(--ok); }
.nav-item[data-section="qyperson"] { --sec-color: var(--sec-teal); }
.nav-item[data-section="qyvehicle"] { --sec-color: var(--sec-teal); }
.nav-item[data-section="rtcc"] { --sec-color: var(--purple); }
.nav-item[data-section="bolos"] { --sec-color: #a4291e; }
.nav-item[data-section="supervisor"] { --sec-color: var(--sec-orange); }

.content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 18px;
  background: var(--bg-void);
}

.section { display: none; }
.section.active { display: block; }

/* ---------- Query (Person / Vehicle sub-nav, per the real CAD reference's left QUERIES
   panel) - merges what used to be two separate top-level nav items. ---------- */
.query-layout { display: flex; align-items: flex-start; gap: 14px; }
.query-subnav {
  width: 160px; flex-shrink: 0;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.query-subnav-header {
  padding: 10px 12px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-faint); border-bottom: 1px solid var(--border-soft);
}
.query-sub-btn {
  padding: 10px 12px; font-size: 12.5px; color: var(--text-dim); cursor: pointer;
  border-left: 3px solid transparent; border-bottom: 1px solid var(--border-soft);
}
.query-sub-btn:hover { background: var(--bg-raised); color: var(--text); }
.query-sub-btn.active { background: var(--accent-dim); color: var(--chrome-1); border-left-color: var(--accent); font-weight: 700; }
.query-content { flex: 1; min-width: 0; }
.query-view { display: none; }
.query-view.active { display: block; }

/* ---------- LEO Home (F1) dashboard - Incidents/Unit Status/Query/Who's On + a matching
   icon quick-launch rail, per the real PremierOne Mobile Client Home screen reference. Not
   to be confused with .home-welcome/.home-tiles below, which is the Community Home page's
   department picker - a different page entirely. ---------- */
.home-dash { display: flex; gap: 14px; align-items: flex-start; }
.home-dash-main { flex: 1; min-width: 0; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.home-dash-tabs { display: flex; background: var(--bg-panel-alt); border-bottom: 1px solid var(--border); }
.home-dash-tabs .home-dash-tab {
  padding: 9px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; border-right: 1px solid var(--border-soft); border-bottom: 2px solid transparent;
}
.home-dash-tabs .home-dash-tab:hover { background: var(--bg-raised); color: var(--text); }
.home-dash-tabs .home-dash-tab.active { background: var(--bg-panel); color: var(--chrome-1); border-bottom-color: var(--accent); font-weight: 700; }
.home-dash-content { padding: 0; }
.home-dash-view { display: none; }
.home-dash-view.active { display: block; }

.home-dash-rail { width: 100px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.home-rail-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 10px 4px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; font-size: 10.5px; font-weight: 600; color: var(--text-dim); text-align: center;
}
.home-rail-btn:hover { background: var(--bg-raised); color: var(--text); }
.home-rail-btn.active { background: var(--accent-dim); color: var(--chrome-1); border-color: var(--accent); }
.home-rail-btn .rail-icon { width: 30px; height: 30px; color: var(--sec-teal); }
.home-rail-btn .rail-icon svg { width: 100%; height: 100%; }
.home-rail-btn .rail-label u { text-decoration: underline; }

/* ---------- Command bar / status bar - LEO officers can use the web app as their MDT the
   same as in-game, so these mirror the in-game NUI's #command-bar/#statusbar exactly (navy
   chrome rows above/below the main content, matching the real PremierOne Mobile Client
   reference). ---------- */
.command-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 18px; background: var(--chrome-0); border-bottom: 1px solid var(--chrome-border);
  min-height: 34px;
}
.command-bar .cmd-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; color: var(--chrome-text-dim);
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
}
.command-bar .cmd-pill b { color: #fff; font-weight: 700; }
.command-bar .cmd-pill .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.statusbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 18px; background: var(--chrome-0); border-top: 1px solid var(--chrome-border);
}
.statusbar .status-btn {
  font-size: 10.5px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: var(--chrome-text-dim);
  cursor: pointer;
}
/* Background is set inline per-status color from mdt_taxonomies (bright, functional - kept
   saturated for quick scanning), so this needs dark text regardless of the chrome's own
   light/dark text convention. */
.statusbar .status-btn.active-status { color: #12181f; font-weight: 700; }
.statusbar .status-btn:disabled { opacity: .4; cursor: not-allowed; }
/* The On/Off Duty toggle lives in the same pill row as the ten-code buttons, per the user's
   direction that it should be "tied to the other status buttons" - but it's still the one
   action available when every other pill in the row is disabled, so it gets a solid filled
   background (not just an outline like the ten-codes) to read as the obvious thing to click. */
.statusbar .status-btn.duty-btn { font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.statusbar .status-btn.duty-off { background: var(--ok); border-color: var(--ok); color: #fff; }
.statusbar .status-btn.duty-off:hover { background: #34c973; }
.statusbar .status-btn.duty-on { background: var(--danger); border-color: var(--danger); color: #fff; }
.statusbar .status-btn.duty-on:hover { background: #d14a3d; }
.statusbar .spacer { flex: 1; }
.statusbar .btn-ghost, .statusbar .btn-primary, .statusbar .btn-danger { font-size: 11.5px; }

/* ---------- CALL DETAIL (full-page drill-down, not a toolbar destination) - left sidebar
   of sub-views + a persistent bottom action bar, per the real PremierOne Mobile Client
   incident detail screen reference. ---------- */
.cd-titlebar {
  padding: 8px 18px; background: var(--bg-panel-alt); border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text); text-align: center;
}
/* Call detail (public/js/calldetail.js draws inside): fills the content area edge to edge -
   50px topbar + 68px nav strip above it, .content's 18px padding cancelled out. */
#section-call-detail.active { margin: -18px; height: calc(100vh - 118px); }
.cd-layout { display: flex; min-height: 0; }
.cd-sidenav { width: 150px; flex-shrink: 0; background: var(--bg-panel-alt); border-right: 1px solid var(--border); }
.cd-sub-btn {
  padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); cursor: pointer;
  border-bottom: 1px solid var(--border-soft); border-left: 3px solid transparent;
}
.cd-sub-btn:hover { background: var(--bg-raised); color: var(--text); }
.cd-sub-btn.active { background: var(--accent-dim); color: var(--chrome-1); border-left-color: var(--accent); font-weight: 700; }
.cd-sub-btn.cd-stub { color: var(--text-faint); }
.cd-content { flex: 1; min-width: 0; background: var(--bg-panel); }
.cd-summary-type { font-size: 20px; font-weight: 700; color: var(--chrome-1); }
.cd-actionbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 18px;
  background: var(--bg-panel-alt); border-top: 1px solid var(--border);
}

/* ---------- FORM EDITOR / VIEWER page (#section-form-editor) - styled like a real printed
   report (per the reference PDFs) rather than a plain settings form: a tray holding a
   centered white "page" card, generous padding, a solid navy report-header banner up top. --- */
/* Paper report form (incident-forms.js): a white "sheet" with a navy header, a 5-up metadata
   strip, numbered dark section bars carrying the import buttons, and a dense 4-column grid of
   ruled boxes - label inside the box top-left, borderless input under it - like a printed
   department form. Fixed light colours: it's a document, the same in every theme. */
.fe-scroll { background: var(--bg-base); padding: 20px 14px 90px; }
.fe-page {
  max-width: 1000px; margin: 0 auto; background: #fff; color: #111;
  border: 1px solid #9aa3ad; border-radius: 3px; overflow: hidden; box-shadow: var(--shadow);
}
.fe-report-header { position: relative; background: var(--chrome-1); color: #fff; padding: 14px 24px; text-align: center; }
.fe-report-header .fe-agency { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; opacity: .85; }
.fe-report-header .fe-title { font-size: 19px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; margin-top: 2px; }
.fe-status { display: inline-block; border: 2px solid rgba(255,255,255,.7); border-radius: 4px; padding: 2px 10px; font-weight: 800; font-size: 12px; letter-spacing: 1px; vertical-align: middle; }
.fe-report-header .fe-status { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
/* the same stamps used as small badges in lists (incident forms, My Drafts) - on the light page */
.plain-list .fe-status-draft { color: #8a6100; border-color: #d9a400; }
.plain-list .fe-status-filed { color: #2e7d32; border-color: #66bb6a; }
.plain-list .fe-status-returned { color: #c43e00; border-color: #ff8a65; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .plain-list .fe-status-draft { color: #f1c86a; border-color: #8a6d1f; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .plain-list .fe-status-filed { color: #7fd6a0; border-color: #2f6a45; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .plain-list .fe-status-returned { color: #ffab7a; border-color: #8a4a26; }
.fe-status-draft { border-color: #ffca28; color: #ffca28; }
.fe-status-filed { border-color: #81c784; color: #81c784; }
.fe-status-approved { border-color: #66bb6a; color: #fff; background: #2e7d32; }
.fe-status-returned { border-color: #ff8a65; color: #ff8a65; }
/* supervisor's note on a returned report (editor) */
.fe-return-note { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #e0a37f; border-left: 4px solid #e65100; background: #fff3e0; color: #6d3200; border-radius: 4px; font-size: 13px; }
.fe-return-note b { display: block; margin-bottom: 3px; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-return-note { background: #3a2412; color: #ffcf9e; border-color: #6b4325; border-left-color: #ff8a3d; }
/* supervisor review queue */
.sup-review-tabs { display: flex; gap: 6px; }
.sup-review-tabs button.active { background: var(--chrome-1); color: #fff; border-color: var(--chrome-1); }
.sup-review-tabs .badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: #c62828; color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.nav-item .nav-badge { position: absolute; top: 4px; right: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #c62828; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.mydrafts-returned { border-left: 3px solid #e65100; }
.fe-meta-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 2px solid #111; background: #f3f4f6;
}
.fe-meta-strip > div { padding: 6px 12px; border-right: 1px solid #b8bec6; }
.fe-meta-strip > div:last-child { border-right: 0; }
.fe-meta-strip label { display: block; font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase; color: #555; }
.fe-meta-strip div div { color: #111; font-weight: 700; font-size: 13px; }
.fe-body { padding: 14px 18px 22px; }
.fe-section { margin-top: 14px; }
.fe-section:first-child { margin-top: 0; }
.fe-bar { display: flex; align-items: center; gap: 10px; background: #1f2a37; color: #fff; padding: 4px 6px 4px 4px; }
.fe-num { background: #fff; color: #1f2a37; font-weight: 800; font-size: 11px; min-width: 20px; text-align: center; border-radius: 2px; padding: 1px 4px; }
.fe-bar-title { font-weight: 700; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase; flex: 1; }
.fe-import-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.fe-import { background: #e8f0fb; color: #163656; border: 1px solid #9bb7da; border-radius: 3px; font-size: 11px; font-weight: 700; padding: 3px 9px; cursor: pointer; }
.fe-import:hover { background: #fff; }
.fe-add-repeat { margin: -6px 0 14px; }
.fe-add-repeat .fe-import { width: 100%; padding: 7px; border-style: dashed; font-size: 12px; }
/* Crash diagram (crash-diagram.js) */
.cd-wrap { padding: 4px 0 6px; }
.cd-toolbar { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 6px; }
.cd-toolbar label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-right: 6px; }
.fe-body .cd-toolbar select { width: auto !important; min-width: 170px; border: 1px solid #9bb7da !important; padding: 3px 6px; }
.cd-canvas { border: 1px solid #8a94a0; max-width: 900px; user-select: none; cursor: default; }
.cd-canvas .cd-item { cursor: move; }
.cd-selpanel { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 34px; padding: 6px 0 0; font-size: 12.5px; }
.cd-selpanel b { margin-right: 6px; }
.cd-hint { color: var(--text-dim); font-size: 12px; }
.cd-lbl { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-dim); }
.fe-body .cd-lbl input.cd-label { width: 90px; min-height: 26px; border: 1px solid #9bb7da !important; padding: 2px 6px; }
.fe-import.cd-del { color: #b42318; border-color: #e0b3ac; }
.fe-diagram { max-width: 900px; border: 1px solid #8a94a0; margin: 2px 0 4px; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.cd-canvas, .fe-diagram) { border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-import.cd-del { color: #ff9c90; border-color: #6b2a24; }
.fe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 1px solid #8a94a0; border-top: 1px solid #8a94a0; }
.fe-cell { border-right: 1px solid #8a94a0; border-bottom: 1px solid #8a94a0; padding: 2px 6px 3px; min-width: 0; background: #fff; }
.fe-cell:focus-within { background: #f0f6ff; }
.fe-cell > label { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #4a5361; margin: 0 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fe-body .fe-cell input, .fe-body .fe-cell select, .fe-body .fe-cell textarea {
  width: 100%; border: 0 !important; background: transparent !important; color: #111 !important; padding: 2px 0; font-size: 13px; min-height: 22px; box-shadow: none; outline: none;
}
.fe-body .fe-cell textarea { resize: vertical; font-family: inherit; line-height: 1.45; }
.fe-val { font-size: 13px; color: #111; min-height: 20px; white-space: pre-wrap; word-break: break-word; }
.fe-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 10px; padding: 2px 0; }
.fe-check { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #111; text-transform: none; font-weight: 400; }
.fe-check input { width: auto !important; min-height: 0 !important; }
.fe-cert-text { margin: 6px 2px 8px; font-size: 12px; color: #333; font-style: italic; }
/* In-car dark theme: the report paper goes dark with the rest of the screen. A white page is too
   bright in a dark cab, and the theme's light input text (above) vanished on the white boxes. */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-page { background: var(--bg-panel); color: var(--text); border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-meta-strip { background: var(--bg-panel-alt); border-bottom-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-meta-strip > div { border-right-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-meta-strip label,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-cell > label { color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-meta-strip div div,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-val,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-check { color: var(--text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-cert-text { color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-grid { border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-cell { background: var(--bg-panel); border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-cell:focus-within { background: var(--bg-raised); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-body .fe-cell :is(input, select, textarea) { color: var(--text) !important; background: transparent !important; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-body .fe-cell select option { background: var(--bg-panel-alt); color: var(--text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-bar { background: #0e1620; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-import { background: #1f3550; color: #d6e7fa; border-color: #3d5d82; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-import:hover { background: #2a4668; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-body input[type="date"],
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fe-body input[type="time"] { color-scheme: dark; }
/* sticky editor footer with Save Draft / Submit */
#section-form-editor .fe-footer { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--bg-panel); border-top: 1px solid var(--border); box-shadow: 0 -4px 14px rgba(0,0,0,.12); }
#fe-save-state { color: var(--text-dim); font-size: 12px; }

/* New-call-assignment alert - the My Inc (F9) nav item blinks 3x per 2s cycle until the
   officer acknowledges the new-incident popup or navigates to My Inc themselves. */
@keyframes nav-flash {
  0%, 8% { background: var(--danger); color: #fff; }
  16%, 24% { background: transparent; }
  33%, 41% { background: var(--danger); color: #fff; }
  49%, 57% { background: transparent; }
  66%, 74% { background: var(--danger); color: #fff; }
  82%, 100% { background: transparent; }
}
.nav-item.flashing { animation: nav-flash 2s linear infinite; }

/* Small utility classes ported from the in-game NUI's stylesheet so Call Detail's content
   render functions can share identical markup between both surfaces - .pane-body/.form-grid/
   .section-title/.note-item didn't otherwise exist here (web's other detail views build
   their own DOM via openDetailModal instead of innerHTML templates). */
.pane-body { padding: 14px 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-faint); margin: 14px 0 6px; border-bottom: 1px solid var(--border-soft); padding-bottom: 4px;
}
.note-item { padding: 6px 0; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.note-item .meta { color: var(--text-faint); font-size: 10.5px; }

/* ===================== HOME (department picker) ===================== */

.home-welcome { margin-bottom: 20px; }
.home-welcome h1 { margin: 0 0 4px; font-size: 20px; letter-spacing: 0.3px; color: var(--text); }
.home-welcome .muted { margin: 0; }

.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.home-tile {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  border-top: 3px solid var(--dept-color, var(--border));
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 3px rgba(10, 20, 30, 0.08);
}
.home-tile:hover { background: var(--bg-panel-alt); box-shadow: 0 2px 6px rgba(10, 20, 30, 0.12); }
.home-tile h3 {
  margin: 0 0 6px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--dept-color, var(--text));
}
.home-tile p { margin: 0; color: var(--text-dim); font-size: 12.5px; }

.home-tile.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.home-tile.disabled:hover { background: var(--bg-panel); box-shadow: 0 1px 3px rgba(10, 20, 30, 0.08); }

.home-tile-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 7px;
  border-radius: var(--radius);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--bg-raised);
  color: var(--text-faint);
}

/* ===================== PANELS / TABLES ===================== */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(10, 20, 30, 0.06);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -14px -14px 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--chrome-border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--chrome-1);
}

.panel-header h2 {
  margin: 0;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
}

.approx-tag {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-row input, .filter-row select {
  padding: 7px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text);
}

.filter-row input {
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
  max-height: 60vh;
  overflow-y: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

/* Light data grid, read at a desk - real dispatch software runs dense tabular data on a
   near-white grid for scannability. Header row stays a navy chrome tone to read as a
   distinct band, not floating text. */
:root {
  --grid-row: #ffffff;
  --grid-row-alt: #f1f4f7;
  --grid-text: #1c2733;
  --grid-hover: #dce8f5;
  --grid-pri1-bg: #f6d4d1;
  --grid-pri1-text: #7a1518;
  --grid-pri2-bg: #f7e6c3;
  --grid-pri2-text: #6b4a10;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--chrome-1);
  color: var(--chrome-text-dim);
  text-align: left;
  padding: 6px 9px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--chrome-border);
  z-index: 1;
}

tbody td {
  padding: 5px 9px;
  border-bottom: 1px solid var(--grid-row-alt);
  background: var(--grid-row);
  color: var(--grid-text);
}

tbody tr:nth-child(even) td { background: var(--grid-row-alt); }
tbody tr:hover td { background: var(--grid-hover); }

tr.priority-1 td { background: var(--grid-pri1-bg); color: var(--grid-pri1-text); font-weight: 600; }
tr.priority-1:hover td { background: #efb8b4; }
tr.priority-2 td { background: var(--grid-pri2-bg); color: var(--grid-pri2-text); }
tr.priority-2:hover td { background: #f0dba0; }

.empty-row { text-align: center; color: var(--text-faint) !important; background: var(--bg-panel) !important; }

tr.clickable { cursor: pointer; }

/* Supervisor panel (supervisor.js, one section per department page): per-officer summary
   beside the period's records. Collapses to one column on narrow screens. */
.sup-grid { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.sup-grid h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-dim); }
@media (max-width: 980px) { .sup-grid { grid-template-columns: 1fr; } }
.sup-notice { margin: 0 0 10px; padding: 8px 12px; background: #fff4d6; color: #7a5600; border: 1px solid #f0d58a; border-radius: var(--radius); font-size: 12.5px; }
#sup-agency { margin-right: 6px; }

/* Department tag on the cross-department Dispatch board (dispatch.html) - a department's own
   color (mdt_departments.color, same value the Home tiles use) on a small solid chip, so a
   row's department reads at a glance on the dark grid. */
.dept-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #fff;
  background: var(--dept-color, #4a5568);
  white-space: nowrap;
}

.empty-row {
  text-align: center;
  color: var(--text-faint);
  padding: 18px !important;
}

/* ===================== DISPATCH LAYOUT ===================== */
/* Calls + Units only - the map used to be the third column here but now fills its own
   standalone Mapping (F2) section, matching the in-game NUI's #dispatch-grid split. */

.dispatch-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
}

.calls-panel { grid-column: 1; margin-bottom: 0; }
.units-panel { grid-column: 2; margin-bottom: 0; }

@media (max-width: 980px) {
  .dispatch-grid {
    grid-template-columns: 1fr;
  }
  .calls-panel, .units-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Mapping (F2) - standalone section, its own panel fills the content area. */
.map-pane { max-width: 720px; margin: 0 auto; }

#map-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--dispatch-bg-0);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  display: block;
}

.map-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-green { background: var(--ok); }
.dot-cyan { background: var(--accent); }
.dot-amber { background: var(--warn); }

/* ===================== PILLS / STATUS COLORS ===================== */

.status-pill, .pri-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.status-pill { background: var(--bg-raised); color: var(--text-dim); border: 1px solid var(--border); }

.status-open, .status-active, .status-issued { background: var(--danger-dim); color: #7a2318; border-color: #e0b3ac; }
.status-dispatched, .status-enroute, .status-pending, .status-served { background: var(--warn-dim); color: #6b4a10; border-color: #e6cd8f; }
.status-onscene, .status-available { background: var(--ok-dim); color: #1e5c38; border-color: #a8d6b8; }
.status-closed, .status-recalled, .status-paid, .status-dismissed, .status-inactive { background: var(--bg-raised); color: var(--text-faint); }
.status-danger { background: var(--danger-dim); color: #7a2318; border: 1px solid #e0b3ac; }

.pri-pill { background: var(--bg-raised); color: var(--text-dim); border: 1px solid var(--border); }
.pri-1 { background: var(--danger-dim); color: #7a2318; border-color: #e0b3ac; }
.pri-2 { background: var(--warn-dim); color: #6b4a10; border-color: #e6cd8f; }
.pri-3 { background: var(--ok-dim); color: #1e5c38; border-color: #a8d6b8; }

tr.priority-1 { box-shadow: inset 3px 0 0 var(--danger); }
tr.priority-2 { box-shadow: inset 3px 0 0 var(--warn); }
tr.priority-3 { box-shadow: inset 3px 0 0 var(--ok); }

/* ===================== DISPATCH TABLES (dark, not the light records grid) =====================
   Unlike the records tables above (light grid, read at a desk), the live dispatch board is
   read at a glance and stays dark by default per the real CAD reference screenshot - only
   the row for a call actively being worked (not still sitting Pending) gets the light
   highlight. Scoped to #calls-table/#units-table plus the reusable .grid-table class (used
   by the Home dashboard's Incidents/Unit Status/Who's On tables, which show the same live
   data in a second place) - persons/vehicles/warrants/etc. keep the light grid. */
#calls-table thead th, #units-table thead th, .grid-table thead th { background: var(--dispatch-bg-1); color: var(--dispatch-text-dim); border-bottom: 1px solid var(--dispatch-border); }
#calls-table tbody td, #units-table tbody td, .grid-table tbody td { background: var(--dispatch-bg-1); color: var(--dispatch-text); border-bottom: 1px solid var(--dispatch-bg-2); }
#calls-table tbody tr:nth-child(even) td, #units-table tbody tr:nth-child(even) td, .grid-table tbody tr:nth-child(even) td { background: var(--dispatch-bg-2); }
#calls-table tbody tr:hover td, #units-table tbody tr:hover td, .grid-table tbody tr:hover td { background: var(--dispatch-bg-3); }
#calls-table tr.priority-1 td, .grid-table tr.priority-1 td { color: #ff8a80; font-weight: 600; }
#calls-table tr.priority-2 td, .grid-table tr.priority-2 td { color: #ffcc80; }
#calls-table tr.row-active td, .grid-table tr.row-active td { background: var(--grid-row); color: var(--grid-text); font-weight: 700; }
#calls-table tr.row-active:hover td, .grid-table tr.row-active:hover td { background: var(--grid-hover); }
#calls-table .empty-row td, #units-table .empty-row td, .grid-table .empty-row td { background: var(--dispatch-bg-1) !important; color: var(--dispatch-text-dim); }

/* ===================== BUTTONS ===================== */
/* Real Windows-app buttons carry a touch of dimensionality (subtle border/shadow), not a
   fully flat modern-web look - part of what reads as "a real computer" rather than a sleek
   dark SaaS dashboard. */

button {
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 8px 14px;
  font-weight: 600;
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(10,20,30,.08);
}
button:hover { background: #fff; border-color: var(--accent); }

.btn-primary {
  background: var(--chrome-1);
  border-color: var(--chrome-0);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset;
}
.btn-primary:hover { background: var(--chrome-2); }

.btn-secondary {
  background: var(--bg-raised);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--bg-raised); color: var(--text); }

.btn-danger {
  background: var(--danger-dim);
  border-color: #e0b3ac;
  color: #7a2318;
}
.btn-danger:hover { background: #f2c7c1; }

.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-xs { padding: 4px 8px; font-size: 11.5px; margin-left: 6px; }
.btn-block { width: 100%; margin-top: 18px; }

button:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* ===================== MODAL (a real dialog - white body, navy title bar) ============== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 30, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  z-index: 50;
}

.modal-box {
  width: 100%;
  max-width: 560px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.modal-box h2 {
  margin: -22px -24px 16px;
  padding: 14px 24px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--chrome-1);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-box h3 {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 4px;
}

.modal-form { display: flex; flex-direction: column; }

.form-field { margin-bottom: 12px; }

.form-field label {
  display: block;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text);
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.detail-wrap { display: flex; flex-direction: column; gap: 14px; }

/* ===================== QUERY (Qy Person / Qy Vehicle) =====================
   One run screen: search bar on top, flagged results left, full return right (leo.js). The
   return block (.qy-ret) is also what opens in a popup when a name/plate is run from a call. */
.qy { display: flex; flex-direction: column; gap: 10px; }
.qy-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.qy-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qy-toggle button { border: 0; border-radius: 0; background: var(--bg-panel-alt); color: var(--text-dim); padding: 7px 16px; font-weight: 600; font-size: 13px; cursor: pointer; }
.qy-toggle button + button { border-left: 1px solid var(--border); }
.qy-toggle button.active { background: var(--chrome-1); color: #fff; }
.qy-search { flex: 1; min-width: 260px; display: flex; gap: 8px; }
.qy-search[hidden] { display: none; }
.qy-search input { flex: 1; font-size: 15px; padding: 9px 12px; }
.qy-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 0; }
.qy-recent:empty { display: none; }
.qy-recent-label { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); margin-right: 2px; }
.qy-recent-item { border: 1px solid var(--border); background: var(--bg-panel); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--text); cursor: pointer; }
.qy-recent-item:hover { background: var(--bg-raised); }
.qy-recent-item.hit { border-color: #e0b3ac; color: #7a2318; background: var(--danger-dim); }
.qy-body { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 12px; align-items: start; }
@media (max-width: 980px) { .qy-body { grid-template-columns: 1fr; } }
.qy-results { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); max-height: calc(100vh - 290px); overflow-y: auto; }
.qy-hint, .qy-empty { padding: 18px 16px; color: var(--text-faint); font-size: 13px; }
.qy-empty { text-align: center; padding: 48px 16px; }
.qy-count { padding: 7px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); border-bottom: 1px solid var(--border-soft); }
.qy-row { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); border-left: 3px solid transparent; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.qy-row:hover { background: var(--grid-hover); }
.qy-row.selected { background: var(--accent-dim); border-left-color: var(--accent); }
.qy-row.hit { border-left-color: var(--danger); }
.qy-row-main { display: flex; flex-direction: column; gap: 1px; }
.qy-row-main b { font-size: 14px; }
.qy-row-sub { font-size: 12px; color: var(--text-dim); }
.qy-row-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.qy-chip { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; border: 1px solid transparent; white-space: nowrap; }
.qy-chip-bad { background: var(--danger-dim); color: #7a2318; border-color: #e0b3ac; }
.qy-chip-warn { background: var(--warn-dim); color: #6b4a10; border-color: #e6cd8f; }
.qy-chip-ok { background: var(--ok-dim); color: #1e5c38; border-color: #a8d6b8; }
.qy-chip-info { background: var(--accent-dim); color: var(--chrome-1); border-color: #b5cde6; }
.qy-chip-muted { background: var(--bg-raised); color: var(--text-dim); border-color: var(--border); }
.qy-plate { font-family: Consolas, 'Courier New', monospace; letter-spacing: 1px; }
.qy-return { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); min-height: 200px; max-height: calc(100vh - 290px); overflow-y: auto; }
.qy-ret { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.qy-ret-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border-soft); }
.qy-ret-title { font-size: 20px; font-weight: 700; color: var(--text); }
.qy-ret-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.qy-alert { background: var(--danger-dim); border: 1px solid #e0b3ac; border-left: 4px solid var(--danger); color: #7a2318; padding: 8px 12px; border-radius: var(--radius); font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.qy-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; }
.qy-fields .wide { grid-column: span 3; }
@media (max-width: 700px) { .qy-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qy-fields .wide { grid-column: span 2; } }
.qy-fields label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); margin: 0 0 1px; }
.qy-fields span { font-size: 13.5px; color: var(--text); }
.qy-notes { background: var(--bg-panel-alt); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 8px 12px; font-size: 12.5px; color: var(--text-dim); white-space: pre-wrap; }
.qy-sec h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.qy-sec h4 .btn-xs { margin-left: 0; }
.qy-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.qy-table td { padding: 5px 8px; border-bottom: 1px solid var(--border-soft); background: transparent !important; color: var(--text) !important; }
.qy-table tr:last-child td { border-bottom: 0; }
.qy-table tr.qy-link { cursor: pointer; }
.qy-table tr.qy-link:hover td { background: var(--grid-hover) !important; }
.qy-meta { color: var(--text-faint); font-size: 11.5px; }
.qy-none { font-size: 12.5px; color: var(--text-faint); padding: 2px 0 4px; }
.qy-actions { display: flex; gap: 8px; padding-top: 6px; border-top: 1px solid var(--border-soft); }
/* The same return inside a popup: drop its own padding (the modal already has some). */
.modal-box .qy-ret { padding: 0; }

.detail-block {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.detail-block p { margin: 4px 0; font-size: 13px; }

.plain-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 13px;
}

.plain-list li {
  padding: 4px 0;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.muted { color: var(--text-faint); }

.inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.inline-form select, .inline-form input {
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-base);
  color: var(--text);
  flex: 1;
}

/* ===================== MESSAGES ===================== */

.messages-list {
  max-height: 50vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.message-row {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: var(--bg-panel-alt);
  font-size: 13px;
}

.msg-meta {
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.message-form input { flex: 1; }

/* ===================== TOAST ===================== */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--chrome-0);
  border: 1px solid var(--chrome-border);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 100;
  font-size: 13px;
  max-width: 90vw;
}

/* ===================== SCROLLBARS ===================== */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-panel-alt); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #b7c0c9; }

/* ===================== 10-99 officer emergency banner (public/js/panic.js) ===================== */
#panic-banner { position: sticky; top: 0; z-index: 9000; background: #b71c1c; color: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .45); animation: panic-pulse 1.2s ease-in-out infinite; }
#panic-banner[hidden] { display: none; }
#panic-banner .panic-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, .25); font-size: 14px; }
#panic-banner .panic-tag { background: #fff; color: #b71c1c; font-weight: 800; padding: 2px 8px; border-radius: 4px; letter-spacing: .04em; }
#panic-banner .panic-text b { margin-right: 6px; }
#panic-banner .panic-sp { flex: 1; }
#panic-banner .panic-btn { background: #fff; color: #b71c1c; border: 0; border-radius: 4px; padding: 5px 12px; font-weight: 700; cursor: pointer; }
#panic-banner .panic-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
@keyframes panic-pulse { 0%, 100% { background: #b71c1c; } 50% { background: #e53935; } }
/* Bodycam clip view (public/js/bodycam-view.js) */
.bwcv-chip { display: inline-block; padding: 1px 7px; border-radius: 2px; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.bwcv-hold { background: #6a1b9a; color: #fff; }
.bwcv-gone { background: #607d8b; color: #fff; }
/* Officer-involved shooting banner (public/js/uof.js) - supervisors / dispatch; steady, no pulse */
#ois-banner { position: sticky; top: 0; z-index: 8999; background: #7f0000; color: #fff; box-shadow: 0 3px 12px rgba(0, 0, 0, .45); }
#ois-banner[hidden] { display: none; }
#ois-banner .panic-row { display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-bottom: 1px solid rgba(255, 255, 255, .2); font-size: 13.5px; }
#ois-banner .panic-tag, .uof-ois-tag { background: #fff; color: #7f0000; font-weight: 800; padding: 2px 8px; border-radius: 4px; letter-spacing: .04em; }
.uof-ois-tag { background: #b71c1c; color: #fff; font-size: 10px; padding: 1px 6px; }
#ois-banner .panic-text b { margin-right: 6px; }
#ois-banner .panic-sp { flex: 1; }
#ois-banner .panic-btn { background: #fff; color: #7f0000; border: 0; border-radius: 4px; padding: 5px 12px; font-weight: 700; cursor: pointer; }
#ois-banner .panic-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
.status-btn.status-btn-panic { background: #c62828; border-color: #c62828; color: #fff; font-weight: 800; letter-spacing: .03em; }
.status-btn.status-btn-panic:hover:not(:disabled) { background: #e53935; }
/* Home > Who's On: units on each call with their status */
#home-whoson .whoson-unit { display: inline-flex; align-items: center; gap: 4px; margin: 1px 8px 1px 0; font-weight: 600; white-space: nowrap; }

/* Penal code picker (leo.js openPenalCodePicker) */
.pc-pick-list { max-height: 55vh; overflow-y: auto; border: 1px solid var(--border, #d0d5dc); border-radius: 6px; }
.pc-pick-row { display: grid; grid-template-columns: 120px 1fr auto; grid-template-rows: auto auto; column-gap: 10px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.pc-pick-row:hover { background: rgba(30, 90, 168, .08); }
.pc-pick-code { font-family: Consolas, monospace; font-weight: 700; grid-row: 1 / span 2; align-self: center; }
.pc-pick-title { font-weight: 600; }
.pc-pick-deg { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #e0e4ea; color: #333; align-self: start; text-transform: uppercase; }
.pc-pick-deg.pc-deg-felony { background: #fde0e0; color: #b71c1c; }
.pc-pick-deg.pc-deg-misdemeanor { background: #fff1d6; color: #9a5b00; }
.pc-pick-deg.pc-deg-infraction { background: #e1effd; color: #1e5aa8; }
.pc-pick-meta { grid-column: 2 / span 2; color: #6b7480; font-size: 12px; }

/* ===================== In-car DARK / NIGHT theme: components with fixed light colours =====================
   Everything below re-colours the parts of style.css / fire.css / dispatch.css / civmdt.css that
   hard-code light backgrounds or dark-on-light text, so the in-car screen is fully dark (day-dark and
   night) instead of dark with light grey patches. Scoped to the in-car screen only; the desktop CAD
   keeps its light look. The html.in-vehicle-screen prefix out-ranks the page stylesheets, whatever
   order they load in. */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) {
  --ivd-ok-text: #7fd6a0; --ivd-warn-text: #f1c86a; --ivd-bad-text: #ff9c90; --ivd-info-text: #8cc2f5; --ivd-purple-text: #c9a8f5;
  --ivd-ok-bg: #12301f; --ivd-warn-bg: #33290f; --ivd-bad-bg: #3a1714; --ivd-info-bg: #11263d; --ivd-purple-bg: #261a3d; --ivd-mute-bg: #1c232c;
}
/* generic controls */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) select option,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) select optgroup { background-color: var(--bg-panel-alt); color: var(--text) !important; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) button:hover,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .btn-secondary:hover { background: var(--bg-raised); }
/* danger buttons were red text on a red-tinted background in the dark theme - barely readable */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .btn-danger { background: var(--ivd-bad-bg); color: var(--ivd-bad-text); border-color: #7a2c24; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .btn-danger:hover { background: #5a201b; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night).dui-selects select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23aab5c1' stroke-width='2'/%3E%3C/svg%3E");
}
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dui-select-panel { background: var(--bg-panel-alt); color: var(--text); border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dui-select-opt.active { background: var(--accent-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dui-select-opt.selected { border-left-color: var(--accent); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dui-select-group { color: var(--text-dim); }
/* status / priority pills and alert boxes (dark text on the now-dark *-dim backgrounds) */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.status-open, .status-active, .status-issued, .status-danger, .pri-1, .qy-chip-bad, .qy-recent-item.hit) { background: var(--ivd-bad-bg); color: var(--ivd-bad-text); border-color: #6b2a24; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.status-dispatched, .status-enroute, .status-pending, .status-served, .pri-2, .qy-chip-warn) { background: var(--ivd-warn-bg); color: var(--ivd-warn-text); border-color: #5e4a17; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .qy-alert { background: var(--ivd-bad-bg); border-color: #6b2a24; color: var(--ivd-bad-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .sup-notice,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dc-warn-box,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-locked,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-warn { background: var(--ivd-warn-bg); color: var(--ivd-warn-text); border-color: #5e4a17; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dc-crit-box { background: var(--ivd-bad-bg); color: var(--ivd-bad-text); border-color: #6b2a24; }
/* penal code picker */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .pc-pick-deg { background: var(--ivd-mute-bg); color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .pc-pick-deg.pc-deg-felony { background: var(--ivd-bad-bg); color: var(--ivd-bad-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .pc-pick-deg.pc-deg-misdemeanor { background: var(--ivd-warn-bg); color: var(--ivd-warn-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .pc-pick-deg.pc-deg-infraction { background: var(--ivd-info-bg); color: var(--ivd-info-text); }
/* call detail timeline / premise flags (dispatch.css) */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dc-ev.note { background: var(--bg-panel-alt); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dc-ev.critical { background: var(--ivd-bad-bg); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dc-premise.officer_safety { background: var(--ivd-bad-bg); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dc-premise.hazard { background: var(--ivd-warn-bg); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .dc-premise.medical { background: var(--ivd-info-bg); }
/* Fire / EMS (fire.css) */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fire-page { --fx-accent-dim: #3a1714; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-duty, .fx-card, .fx-editor-head, .fx-editor-foot) { background: var(--bg-panel); border-color: var(--border); color: var(--text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-editor { background: var(--bg-base); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-card-h, .fx-table th, .fx-table td, .fx-unit, .fx-ecg, .fx-ecg-h, .fx-ecg-picklist, .fx-ecg-pick) { border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-card-h { color: var(--text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-table th { background: var(--bg-panel); color: var(--text-faint); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-table tr.click:hover td,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-ecg-pick:hover { background: var(--grid-hover); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-duty .sub, .fx-unit .nm, .fx-editor-head .s, .fx-grid label, .fx-sub label) { color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-count, .fx-table tr.closed td, .fx-table .empty, .fx-rows th) { color: var(--text-faint); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-unit .call { color: var(--accent); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-ecg-h { background: var(--bg-panel-alt); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-duty input, .fx-card-h input, .fx-card-h select, .fx-form input, .fx-form select, .fx-grid input, .fx-grid select, .fx-grid textarea, .fx-rows input, .fx-rows select) { background-color: var(--bg-panel-alt); color: var(--text) !important; border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-status-btn { background: var(--bg-panel-alt); color: var(--text); border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-status-btn:hover { background: var(--bg-raised); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-status-btn.on { background: var(--fx-accent); border-color: var(--fx-accent); color: #fff; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-pill,
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-pill.out-of-service, .fx-pill.off-duty, .fx-pill.p4, .fx-pill.draft) { background: var(--ivd-mute-bg); color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-pill.available, .fx-pill.available-on-scene, .fx-pill.approved) { background: var(--ivd-ok-bg); color: var(--ivd-ok-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-pill.responding, .fx-pill.p3, .fx-pill.submitted) { background: var(--ivd-info-bg); color: var(--ivd-info-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-pill.on-scene, .fx-pill.p2) { background: var(--ivd-warn-bg); color: var(--ivd-warn-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-pill.transporting, .fx-pill.at-hospital) { background: var(--ivd-purple-bg); color: var(--ivd-purple-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.fx-pill.p1, .fx-pill.returned, .fx-ecg-pick .chip) { background: var(--ivd-bad-bg); color: var(--ivd-bad-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .fx-ecg-pick .chip.good { background: var(--ivd-ok-bg); color: var(--ivd-ok-text); }
/* Civilian MDT (civmdt.css) */
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-card { background: var(--bg-panel); border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.cv-card-h, .cv-profile, .cv-table th, .cv-table td, .cv-form) { border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-card-h, html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-empty h3 { color: var(--text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-profile:hover { background: var(--grid-hover); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-profile.active { background: var(--ivd-ok-bg); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-avatar { background: var(--bg-raised); color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.cv-meta, .cv-kv .k, .cv-table th, .cv-table .empty) { color: var(--text-faint); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.cv-grid label, .cv-note, .cv-empty) { color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-form { background: var(--bg-panel-alt); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) :is(.cv-form input, .cv-form select, .cv-grid input, .cv-grid select) { background-color: var(--bg-panel-alt); color: var(--text) !important; border-color: var(--border); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-chip, html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-chip.grey { background: var(--ivd-mute-bg); color: var(--text-dim); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-chip.green { background: var(--ivd-ok-bg); color: var(--ivd-ok-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-chip.red { background: var(--ivd-bad-bg); color: var(--ivd-bad-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-chip.amber { background: var(--ivd-warn-bg); color: var(--ivd-warn-text); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .cv-chip.blue { background: var(--ivd-info-bg); color: var(--ivd-info-text); }
/* Evidence block on the incident (ll_evidencelocker) */
.ev-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 6px; }
.ev-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; color: var(--text-faint); border-bottom: 1px solid var(--border); padding: 4px 6px; }
.ev-table td { border-bottom: 1px solid var(--border-soft); padding: 5px 6px; vertical-align: top; }
.ev-log summary { cursor: pointer; font-size: 12.5px; color: var(--accent); margin: 4px 0; }
.ev-log li { font-size: 12px; padding: 3px 0; }
.ev-act { display: inline-block; font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 3px; margin-right: 4px; }
.ev-act.ev-in { background: var(--ok-dim); color: var(--ok); }
.ev-act.ev-out { background: var(--warn-dim); color: var(--warn); }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .ev-act.ev-in { color: #7fd6a0; }
html.in-vehicle-screen:is(.dui-day-dark, .dui-night) .ev-act.ev-out { color: #f1c86a; }
.lab-req { padding: 4px 0; }
.lab-summary { margin: 3px 0 2px; font-weight: 600; }
/* Booking & jail (ll_booking) */
.jail-thumb { width: 34px; height: 45px; object-fit: cover; border-radius: 3px; display: block; }
.booking-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 10px; }
.booking-head h3 { margin: 0 0 4px; }
.booking-head p { margin: 3px 0; }
.booking-mugshot { width: 150px; height: 200px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; flex-shrink: 0; }
.booking-mugshot.none { display: flex; align-items: center; justify-content: center; color: var(--text-faint); background: var(--bg-panel-alt); }
.qy-mugshot { width: 72px; height: 96px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); margin-right: 12px; flex-shrink: 0; }
/* Licence points (person return) */
.pts-bar { height: 8px; background: var(--bg-panel-alt); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; margin: 4px 0 8px; }
.pts-bar span { display: block; height: 100%; background: var(--ok); }
.pts-bar span.near { background: var(--warn); }
.pts-bar span.over { background: var(--danger); }
.qy-table tr.pts-old td { opacity: .55; }