/* Public Sans — the U.S. government's open typeface (SIL Open Font License, /publicsans-license.txt). Bundled so every screen matches. */
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/publicsans-regular.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('/publicsans-italic.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/publicsans-medium.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/publicsans-semibold.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 700 900; font-display: swap; src: url('/publicsans-bold.woff2') format('woff2'); }
/* ═══ CivilHound design system ═══════════════════════════════════════════════
   The look of a sheriff's records office: night-navy chrome, brass (badge metal)
   for the one thing that's "you are here", a deep service blue for actions, cool
   paper-white work surfaces. Light is the default; dark ("night shift") is
   html[data-theme="dark"]. Screens use tokens, never raw colors. Printed pages
   (labels, cover sheets, affidavits) always print black on white. */
:root {
  --font: 'Public Sans', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', Menlo, monospace;
  /* chrome: the top bar, same in both themes */
  --chrome: #0d1b2e; --chrome-2: #15273f; --chrome-line: #243954; --chrome-text: #c3cede; --chrome-dim: #7e8fa8;
  --brass: #b08a3e; --brass-soft: #f4ecdc; --gold: var(--brass); --amber: var(--brass);
  /* surfaces */
  --bg: #f1f3f6; --panel: #ffffff; --card: var(--panel); --subtle: #f6f7f9; --head: #f8f9fb; --hover: #f1f4f8;
  --line: #d9dee6; --line-2: #e8ebf0; --field-line: #c4ccd8; --field: #ffffff;
  /* text */
  --text: #18212f; --heading: #0f1826; --muted: #5a6577; --faint: #8a94a4;
  /* action & status */
  --accent: #1e4e8c; --accent-hover: #173f73; --accent-bg: #e9eff8; --accent-ink: #ffffff; --navy: var(--accent); --navy-2: var(--accent-hover);
  --ok: #1b6e43; --ok-bg: #e6f2eb; --warn: #8a5a00; --warn-bg: #fbf1dc; --bad: #a8261b; --bad-bg: #fbeceb; --info: #1e4e8c; --info-bg: #e9eff8;
  --radius: 6px; --radius-sm: 4px;
  --shadow: 0 1px 1px rgb(15 24 38 / 4%);
  --shadow-pop: 0 10px 30px rgb(15 24 38 / 18%), 0 1px 3px rgb(15 24 38 / 8%);
  --focus: 0 0 0 3px rgb(30 78 140 / 25%);
  color-scheme: light;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}
html[data-theme='dark'] {
  --brass: #c9a45a; --brass-soft: #2e2615;
  --bg: #0a121e; --panel: #111b2a; --subtle: #0e1724; --head: #0f1927; --hover: #172437;
  --line: #233247; --line-2: #1a2738; --field-line: #304360; --field: #0c1522;
  --text: #dfe5ee; --heading: #f1f4f8; --muted: #98a6ba; --faint: #6c7b91;
  --accent: #6e9fe0; --accent-hover: #8ab3ea; --accent-bg: #172a45; --accent-ink: #08111d;
  --ok: #5cc28a; --ok-bg: #102a1c; --warn: #e3ae4f; --warn-bg: #30240d; --bad: #f2837a; --bad-bg: #34181a; --info: #7eaae6; --info-bg: #15263f;
  --shadow: 0 1px 1px rgb(0 0 0 / 25%);
  --shadow-pop: 0 12px 32px rgb(0 0 0 / 55%);
  --focus: 0 0 0 3px rgb(126 170 230 / 30%);
  color-scheme: dark;
}
@media print {
  html, html[data-theme='dark'] {
    --bg: #fff; --panel: #fff; --subtle: #fff; --head: #fff; --line: #999; --line-2: #ccc; --field: #fff; --field-line: #999;
    --text: #000; --heading: #000; --muted: #333; --accent: #000; --accent-bg: #fff;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
h1 { font-size: 1.43rem; font-weight: 600; margin: 0; color: var(--heading); letter-spacing: -0.01em; line-height: 1.25; }
h2 { font-size: 1.07rem; font-weight: 600; margin: 0; color: var(--heading); }
h3 { font-size: 0.95rem; font-weight: 600; margin: 0; color: var(--heading); }
a { color: var(--accent); }
/* Record numbers: same face, normal (proportional) figures — Public Sans' fixed-width digits are too wide and read as stretched. */
.mono { font-weight: 500; white-space: nowrap; }
code, kbd, .code { font-family: var(--font-mono); font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.gap { gap: 10px; }
.gap-sm { gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.sm { gap: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.grid2.top { align-items: start; }
.center { display: grid; place-items: center; min-height: 60vh; }
.wrap-any { word-break: break-word; max-width: 520px; }
.text-warn { color: var(--warn); font-weight: 600; }

/* Form controls */
input, select, textarea {
  font: inherit; color: inherit; background: var(--field); border: 1px solid var(--field-line); border-radius: var(--radius-sm); padding: 6px 9px; width: 100%; min-height: 32px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { line-height: 1.5; }
select { padding-right: 26px; }
input[type='checkbox'], input[type='radio'] { width: auto; min-height: 0; accent-color: var(--accent); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled, select:disabled, textarea:disabled { background: var(--subtle); color: var(--muted); }
textarea.code { font-size: 12.5px; line-height: 1.4; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-l { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.hint { font-size: 0.8rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 0.93rem;
  min-height: 32px; padding: 5px 12px; border-radius: var(--radius-sm); border: 1px solid var(--field-line); background: var(--panel); color: var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--hover); border-color: var(--muted); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.btn.danger { background: var(--panel); border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.link { background: none; border: none; color: var(--accent); padding: 2px 4px; font-weight: 500; min-height: 0; }
.btn.link:hover { text-decoration: underline; }
.btn.sm { min-height: 26px; padding: 2px 9px; font-size: 0.82rem; }
.btn.big { min-height: 44px; padding: 10px 16px; font-size: 1rem; width: 100%; }

/* Panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: -14px -16px 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: var(--head); border-radius: var(--radius) var(--radius) 0 0; }
.card-h h2, .card-h h3 { font-size: 0.88rem; font-weight: 600; }

/* Status labels: square-cornered, small, with a dot for state */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: 3px; font-size: 0.75rem; font-weight: 600; background: var(--line-2); color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.has-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.flag { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0 5px; border: 1px solid currentColor; border-radius: 3px; line-height: 1.55; white-space: nowrap; }
.flag.bad { color: var(--bad); } .flag.info { color: var(--info); } .flag.warn { color: var(--warn); } .flag.muted { color: var(--muted); border-color: var(--line); }
.code-chip { font-size: 0.78rem; font-weight: 600; color: var(--muted); }

.alert { padding: 9px 12px; border-radius: var(--radius); border: 1px solid; border-left-width: 4px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert.info { background: var(--info-bg); border-color: var(--info); }
.alert.ok { background: var(--ok-bg); border-color: var(--ok); }
.alert.warn { background: var(--warn-bg); border-color: var(--warn); }
.alert.bad { background: var(--bad-bg); border-color: var(--bad); }
.alert.flush { border-radius: 0; border-left: 0; border-right: 0; }
.issues { margin: 0; padding-left: 18px; }
.issues li.bad { color: var(--bad); }
.issues li.warn { color: var(--warn); }
.empty { color: var(--muted); margin: 6px 0; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; }
.skel span { display: block; height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--line-2) 0%, var(--hover) 50%, var(--line-2) 100%); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
.skel span:first-child { height: 16px; width: 40% !important; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel span { animation: none; } }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
code.secret { display: block; font-size: 1.1rem; letter-spacing: 1px; margin: 8px 0; user-select: all; }

/* Data tables: compact rows, sticky-feeling header band */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table td .badge { vertical-align: 1px; }
.table a { text-decoration: none; font-weight: 600; }
.table a:hover { text-decoration: underline; }
.table th, .table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table th { font-size: 0.78rem; color: var(--muted); font-weight: 600; background: var(--head); border-bottom-color: var(--line); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.small td { font-size: 0.85rem; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--hover); }
.table td.num, .table th.num { text-align: right; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.dl dt { color: var(--muted); font-size: 0.82rem; }
.dl dd { margin: 0; }

/* Tabs: underline style */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 0.9rem; background: none; border: none; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.tabs button:hover { color: var(--text); }
.tabs button.active, .tabs button[aria-selected='true'] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .tab-count, .tabs .rp-n { font-size: 0.75rem; font-weight: 600; background: var(--line-2); color: var(--muted); border-radius: 9px; padding: 0 6px; line-height: 1.6; }
.tabs button.active .tab-count, .tabs button[aria-selected='true'] .tab-count, .tabs button.active .rp-n, .tabs button[aria-selected='true'] .rp-n { background: var(--accent); color: var(--accent-ink); }
.table td.mono, .table td.nowrap { white-space: nowrap; }
.timeline { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }

/* KPI tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tile { background: var(--panel); padding: 11px 16px; }
.tile-n { font-size: 1.45rem; font-weight: 600; color: var(--heading); }
.tile-l { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--subtle); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 4px 2px 9px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; }
.chip .x { border: none; background: none; cursor: pointer; font-size: 1.05rem; color: var(--muted); }
.scan-input { font-size: 1.05rem; letter-spacing: 0.02em; }
.barcode { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 2px; }
.viewer iframe { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 8px; background: #fff; }
.aff-preview { background: #fcfcfd; color: #111; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; font-family: Georgia, 'Times New Roman', serif; white-space: pre-line; }
.aff-title { font-weight: 700; text-align: center; margin-bottom: 8px; }
.sign-box { border: 1px dashed var(--field-line); border-radius: var(--radius); padding: 12px; }
.sigpad canvas { width: 100%; max-width: 600px; height: 160px; border: 1px solid #c9cfd9; border-radius: var(--radius); background: #fff; touch-action: none; display: block; }

/* Record header tools (barcode, print) sit at the right of the title line */
.rec-head .rec-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.rec-head .rec-tools .barcode { border: 0; padding: 0; background: transparent; }
html[data-theme='dark'] .rec-head .rec-tools .barcode { background: #fff; padding: 2px; border-radius: 3px; }
.rec-head .crumb a { color: var(--muted); text-decoration: none; }
.rec-head .crumb a:hover { color: var(--accent); }
/* A row of record actions: real buttons, one quiet style, the risky ones set apart by color only when they act */
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.toolbar .btn, .toolbar .btn.ghost { min-height: 30px; padding: 4px 11px; font-size: 0.86rem; font-weight: 500; border-color: var(--field-line); background: var(--panel); }
.toolbar .btn:hover { background: var(--hover); }
.toolbar .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.toolbar .btn.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-bg); }

/* Row actions menu */
.rowmenu { position: relative; display: inline-block; }
.rowmenu .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 2px; opacity: 0.7; }
.rowmenu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 200px; display: flex; flex-direction: column; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.rowmenu-pop button { font: inherit; font-size: 0.9rem; text-align: left; background: none; border: 0; color: var(--text); padding: 7px 10px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.rowmenu-pop button:hover { background: var(--hover); }
.rowmenu-pop button.danger { color: var(--bad); }

/* Tables inside a card run to the card's edges */
.card:not(.flush) > .table-wrap { margin-left: -16px; margin-right: -16px; }
.card:not(.flush) > .table-wrap:last-child { margin-bottom: -14px; }
.card:not(.flush) > .card-h + .table-wrap { margin-top: -12px; }
.card .table th:first-child, .card .table td:first-child { padding-left: 16px; }
.card .table th:last-child, .card .table td:last-child { padding-right: 16px; }

/* Card whose content runs edge to edge (tables) */
.card.flush { padding: 0; }
.card.flush > .card-h { margin: 0; }
.card.flush > .alert, .card.flush > .spinner { margin: 14px 16px; }
/* Severity: a colored dot and a word, never color alone */
.sev { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.sev::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.sev.bad::before { background: var(--bad); } .sev.bad { color: var(--bad); }
.sev.warn::before { background: var(--brass); }
.table.exc .exc-t { font-weight: 600; }
.table.exc tr.exc-i td { background: var(--subtle); padding-top: 5px; padding-bottom: 5px; font-size: 0.88rem; }
.table td.nowrap { white-space: nowrap; }
.exc-sum { display: inline-flex; gap: 14px; font-size: 0.85rem; color: var(--muted); }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 36px 16px; text-align: center; }
.empty-state .ico { color: var(--ok); margin-bottom: 4px; }
/* The paper pipeline: stages in order, each opens its queue */
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.pipe-step { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 18px 14px 26px; text-decoration: none; color: var(--text); border-right: 1px solid var(--line-2); }
.pipe-step:first-child { padding-left: 18px; }
.pipe-step:last-child { border-right: 0; }
.pipe-step:not(:last-child)::after { content: ''; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: var(--panel); border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.pipe-step:hover { background: var(--hover); }
.pipe-step:hover::after { background: var(--hover); }
.pipe-l { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.pipe-n { font-size: 1.85rem; font-weight: 600; color: var(--heading); letter-spacing: -0.01em; line-height: 1.2; }
.pipe-h { font-size: 0.78rem; color: var(--faint); }
@media (max-width: 900px) {
  .pipe { grid-template-columns: 1fr; }
  .pipe-step, .pipe-step:first-child { flex-direction: row; align-items: baseline; gap: 10px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .pipe-step::after { display: none; }
  .pipe-n { order: -1; font-size: 1.3rem; min-width: 2ch; }
  .pipe-h { display: none; }
}

/* Page header: title, breadcrumb, actions on the right */
.page-h { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-h .crumb { font-size: 0.78rem; color: var(--muted); margin-bottom: 2px; }
.page-h .crumb a { color: var(--muted); text-decoration: none; }
.page-h .crumb a:hover { color: var(--accent); }
.page-h .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.seg-ctl { display: inline-flex; border: 1px solid var(--field-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.seg-ctl button { font: inherit; font-size: 0.86rem; font-weight: 500; border: 0; border-right: 1px solid var(--field-line); background: none; color: var(--text); padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.seg-ctl button:last-child { border-right: 0; }
.seg-ctl button:hover { background: var(--hover); }
.seg-ctl button.on, .seg-ctl button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.filterbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filterbar input[type='search'], .filterbar .search { max-width: 380px; }
.filterbar select { width: auto; }

/* Auth */
/* Sign-in: the brand on a navy panel at left, the form on paper at right (stacked on a phone) */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr); background: var(--bg); }
.auth-side { background: var(--chrome); color: var(--chrome-text); display: flex; flex-direction: column; gap: 28px; padding: clamp(28px, 5vw, 64px); border-right: 3px solid var(--brass); }
.auth-badge { width: 220px; height: 220px; object-fit: contain; margin-left: -12px; }
.auth-pitch { max-width: 380px; margin: auto 0; }
.auth-name { color: #fff; font-size: 2rem; font-weight: 700; letter-spacing: -0.015em; }
.auth-pitch p { margin: 18px 0 0; font-size: 1.08rem; line-height: 1.55; color: var(--chrome-text); }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-h { font-size: 1.6rem; margin-bottom: 18px; }
.auth-card .btn.primary { min-height: 40px; font-size: 1rem; }
.auth-card input { min-height: 38px; }
@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { border-right: 0; border-bottom: 3px solid var(--brass); padding: 12px 20px; }
  .auth-pitch { display: flex; align-items: center; gap: 12px; }
  .auth-pitch::after { content: 'CivilHound'; color: #fff; font-size: 1.3rem; font-weight: 700; }
  .auth-badge { width: 64px; height: 64px; margin: 0; }
  .auth-pitch { margin: 0; }
  .auth-name { font-size: 1.35rem; }
  .auth-pitch p { display: none; }
  .auth-side .auth-footer { display: none; }
}
.brand-lg { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.brand-name { font-weight: 700; font-size: 1.3rem; color: var(--heading); }

/* ─── Office shell: dark top bar with modules, grouped side menu ─────────── */
.topbar { height: 46px; background: var(--chrome); color: var(--chrome-text); display: flex; align-items: center; gap: 16px; padding: 0 14px; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #000; }
.topbar .brand { color: #fff; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 8px; font-size: 1rem; white-space: nowrap; }
.topbar .agency { color: var(--chrome-dim); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.topbar .who { font-size: 0.85rem; }
.topbar .muted { color: var(--chrome-dim); }
.topbar .btn.ghost { color: var(--chrome-text); }
.topbar .btn.ghost:hover { background: var(--chrome-2); color: #fff; }
.modtabs { display: flex; align-self: stretch; }
.modtabs a { display: flex; align-items: center; padding: 0 13px; color: var(--chrome-text); text-decoration: none; font-weight: 600; font-size: 0.86rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.modtabs a:hover { color: #fff; background: var(--chrome-2); }
.modtabs a.on { color: #fff; border-bottom-color: var(--gold); background: var(--chrome-2); }
.gsearch { margin-left: auto; position: relative; width: min(360px, 32vw); }
.gsearch .gs-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--chrome-dim); pointer-events: none; }
.gsearch input { background: var(--chrome-2); border: 1px solid var(--chrome-line); color: #fff; min-height: 30px; padding: 4px 34px 4px 32px; font-size: 0.85rem; }
.gsearch input::placeholder { color: var(--chrome-dim); }
.gsearch input:focus { border-color: #5b8fe0; box-shadow: 0 0 0 3px rgb(91 143 224 / 30%); }
.gsearch kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 11px var(--font-mono); color: var(--chrome-dim); border: 1px solid var(--chrome-line); border-radius: 3px; padding: 0 5px; pointer-events: none; }
.umenu { position: relative; }
.umenu > button { white-space: nowrap; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--chrome-text); font: inherit; font-size: 0.85rem; cursor: pointer; padding: 4px 6px; border-radius: 4px; }
.umenu > button:hover { background: var(--chrome-2); color: #fff; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: #2c4677; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 0.7rem; flex: none; }
.umenu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); min-width: 230px; padding: 6px; z-index: 30; }
.umenu-pop .um-h { padding: 6px 10px 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.umenu-pop .um-k { font-size: 0.78rem; color: var(--muted); font-weight: 600; padding: 6px 10px 2px; }
.umenu-pop a, .umenu-pop button.um-i { display: flex; width: 100%; text-align: left; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 4px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; font-size: 0.9rem; cursor: pointer; }
.umenu-pop a:hover, .umenu-pop button.um-i:hover { background: var(--hover); }
.umenu-pop .ico { color: var(--muted); }
.btn .ico { flex: none; }
.theme-seg { display: flex; gap: 4px; padding: 4px 10px 8px; }
.theme-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: 1; font: inherit; font-size: 0.8rem; padding: 4px 6px; border: 1px solid var(--field-line); background: var(--panel); color: var(--text); border-radius: 4px; cursor: pointer; }
.theme-seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.office-body { display: flex; min-height: calc(100vh - 46px); }
/* The side menu's panel runs the full height of the page, not just the first screen. */
.office-body:has(> .sidenav) { background: linear-gradient(to right, var(--panel) 213px, var(--line) 213px 214px, transparent 214px); }
.sidenav { width: 214px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line); padding: 8px 0 16px; display: flex; flex-direction: column; position: sticky; top: 46px; height: calc(100vh - 46px); overflow-y: auto; }
.sidenav .sn-h { margin: 18px 16px 6px; font-size: 0.76rem; color: var(--faint); font-weight: 600; }
.sidenav .sn-h:first-child { margin-top: 6px; }
.sidenav a { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 7px 16px 7px 13px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.9rem; border-left: 3px solid transparent; }
.sidenav a:hover { background: var(--hover); }
.sidenav a.active { background: var(--hover); color: var(--heading); font-weight: 600; border-left-color: var(--brass); }
.sidenav a .ico { color: var(--faint); flex: none; }
.sidenav a:hover .ico { color: var(--muted); }
.sidenav a.active .ico { color: var(--brass); }
.sidenav a span { flex: 1; min-width: 0; }
.sidenav .sn-n { font-size: 0.75rem; font-weight: 600; color: var(--muted); background: var(--line-2); border-radius: 9px; padding: 0 6px; }
.sidenav .sn-n.hot { background: var(--bad); color: #fff; }
.sidenav .sn-foot { margin-top: auto; padding-top: 10px; }
.content { flex: 1; padding: 18px 24px 40px; max-width: 1480px; min-width: 0; }
@media (max-width: 1100px) {
  .topbar .agency { display: none; }
  .modtabs a { padding: 0 9px; }
}
@media (max-width: 860px) {
  .topbar { gap: 8px; }
  .modtabs, .gsearch kbd { display: none; }
  .gsearch { width: auto; flex: 1; }
  .umenu .who-name { display: none; }
  .office-body { flex-direction: column; }
  .office-body:has(> .sidenav) { background: none; }
  .sidenav { width: auto; height: auto; position: static; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; }
  .sidenav .sn-h, .sidenav .sn-foot { display: none; }
  .sidenav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: 10px 12px; }
  .sidenav a.active { border-bottom-color: var(--accent); }
  .content { padding: 14px; }
}

/* Field (mobile-first) */
.field-app { min-height: 100vh; display: flex; flex-direction: column; }
.field-bar { position: sticky; top: 0; z-index: 5; background: var(--chrome); color: #fff; display: flex; gap: 8px; align-items: center; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); }
.field-bar .btn.ghost { color: #fff; }
.net { font-size: 0.8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.net.on { background: var(--ok-bg); color: var(--ok); }
.net.off { background: var(--bad-bg); color: var(--bad); }
.field-main { flex: 1; padding: 14px; padding-bottom: 32px; max-width: 720px; width: 100%; margin: 0 auto; }
.field-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--panel); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.field-nav button { font: inherit; background: none; border: none; padding: 14px 2px; font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); cursor: pointer; }
.field-nav button.active { color: var(--heading); box-shadow: inset 0 3px 0 var(--amber); }
.paper-card { text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); cursor: pointer; width: 100%; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.green { background: #22a060; }
.dot.gray { background: #9aa3b2; }
.dot.none { display: none; }
.gps { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.seg { display: flex; border: 1px solid var(--field-line); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; font: inherit; font-weight: 600; padding: 10px; background: var(--panel); border: none; border-right: 1px solid var(--field-line); cursor: pointer; }
.seg button:last-child { border-right: none; }
.seg button.active { background: var(--accent); color: #fff; }
.doc-frame { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: 8px; }
.doc-img { max-width: 100%; border-radius: 8px; }
.scan-video { width: 100%; border-radius: 10px; background: #000; }

/* Print */
.print-page { padding: 20px; display: flex; flex-direction: column; gap: 24px; }
.label { border: 1px dashed #999; padding: 10px; width: 3.5in; text-align: center; }
.label img { max-width: 100%; }
.cover { border: 1px solid #999; padding: 24px; max-width: 7in; }
.cover table { border-collapse: collapse; margin: 12px 0; }
.cover th, .cover td { text-align: left; padding: 4px 12px 4px 0; }
@media print {
  .no-print { display: none !important; }
  body { background: var(--panel); }
}

/* ScanAI review */
.scan-review { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.1fr); gap: 16px; align-items: start; }
.scan-doc { position: sticky; top: 70px; }
.scan-doc iframe { width: 100%; height: calc(100vh - 110px); min-height: 480px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.scan-field { border-radius: 8px; padding: 6px; margin: -6px; }
.scan-field.flagged { background: var(--warn-bg); box-shadow: inset 3px 0 0 #e0a100; }
.conf-row { margin-top: 4px; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 1000px) {
  .scan-review { grid-template-columns: 1fr; }
  .scan-doc { position: static; }
  .scan-doc iframe { height: 60vh; }
}

/* ─── Maps ─────────────────────────────────────────────────────────────── */
.slippy { position: relative; overflow: hidden; overflow: clip; background: #dde3ea; border: 1px solid var(--line); border-radius: var(--radius); touch-action: none; user-select: none; cursor: grab; outline-offset: 2px; }
.slippy:active { cursor: grabbing; }
.slippy.crosshair { cursor: crosshair; }
.slippy-tiles img { position: absolute; max-width: none; pointer-events: none; image-rendering: auto; }
.slippy-overlay { position: absolute; inset: 0; pointer-events: none; }
/* Heading up: the map layer turns around the middle (where your car is while following). */
.slippy-rot { position: absolute; inset: 0; transform-origin: 50% 50%; transition: transform 0.6s ease; }
.map-zoom .map-compass { position: relative; display: grid; place-items: center; color: var(--muted); }
.map-zoom .map-compass svg { transition: transform 0.6s ease; }
.map-compass-l { position: absolute; right: 4px; bottom: 2px; font-size: 9px; font-weight: 800; color: var(--muted); }
.route-line { fill: none; stroke: var(--navy); stroke-width: 3.5; stroke-dasharray: 8 6; stroke-linejoin: round; }
.route-line-bg { fill: none; stroke: #fff; stroke-width: 7; stroke-linejoin: round; opacity: 0.85; }
.pin { position: absolute; transform: translate(-50%, -100%); background: none; border: none; padding: 0; cursor: pointer; line-height: 0; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 45%)); }
.pin.selected { transform: translate(-50%, -100%) scale(1.3); z-index: 2; }
.pin.selected svg path { stroke: var(--amber); stroke-width: 3; }
.pin.dot-pin { transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; background: var(--pin); border: 2px solid #fff; }
.slippy-diamonds { position: absolute; inset: 0; pointer-events: none; }
/* A paper at this house: a blue diamond turning in place on the address point. */
.paper-diamond { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; perspective: 60px; }
.paper-diamond::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #60a5fa, #1d4ed8 60%, #1e3a8a); border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgb(30 58 138 / 50%), 0 0 10px rgb(59 130 246 / 70%); transform: rotate(45deg); animation: paper-spin 2.4s linear infinite; }
@keyframes paper-spin { from { transform: rotateY(0deg) rotate(45deg); } to { transform: rotateY(360deg) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .paper-diamond::before { animation: none; } }
.pin:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.me-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 25%); pointer-events: none; }
.me-acc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; background: rgb(26 115 232 / 14%); border: 1px solid rgb(26 115 232 / 40%); }
.map-ui { position: absolute; z-index: 3; }
.map-layers { top: 10px; left: 10px; display: flex; background: var(--panel); border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.map-layers button { font: inherit; font-size: 0.85rem; font-weight: 600; border: none; background: var(--panel); padding: 7px 11px; cursor: pointer; color: var(--muted); }
.map-layers button + button { border-left: 1px solid var(--line); }
.map-layers button.active { background: var(--accent); color: #fff; }
.map-zoom { top: 10px; right: 10px; display: flex; flex-direction: column; background: var(--panel); border-radius: 8px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.map-zoom button { font: inherit; font-size: 1.15rem; width: 38px; height: 38px; border: none; background: var(--panel); cursor: pointer; }
.map-zoom button + button { border-top: 1px solid var(--line); }
.map-zoom .map-zoom-slider { writing-mode: vertical-lr; direction: rtl; width: 38px; height: 150px; margin: 6px 0; padding: 0; accent-color: #1d4ed8; cursor: pointer; background: transparent; border: none; min-height: 0; }
.map-zoom .map-zoom-slider + button { border-top: 1px solid var(--line); }
.map-zoom .map-follow { display: grid; place-items: center; color: var(--muted); }
.map-zoom .map-follow.on { color: #fff; background: #1d4ed8; }
@media (max-height: 520px) { .map-zoom .map-zoom-slider { height: 90px; } }
.me-car { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 3; padding: 0; margin: 0; border: none; background: none; min-height: 0; }
.me-car svg { pointer-events: auto; cursor: pointer; }
.map-carpick { top: 10px; left: 50%; transform: translateX(-50%); z-index: 25; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; width: min(300px, calc(100% - 110px)); max-height: calc(100% - 20px); overflow-y: auto; }
.map-carpick-t { font-weight: 700; font-size: 0.88rem; }
.map-carpick-row { display: flex; flex-direction: column; gap: 4px; }
.map-carpick-row button { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; font: inherit; font-size: 0.85rem; text-align: left; }
.map-carpick-row button.on { border-color: #1d4ed8; background: #eff6ff; }
.map-carpick-row svg { flex: none; width: 18px; height: 33px; }
.me-car svg { position: absolute; left: -12px; top: -22px; transform-origin: 12px 22px; transition: transform 0.6s ease; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 45%)); }
.map-extra { left: 10px; bottom: 26px; }
.map-followpref { top: 54px; left: 10px; display: flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 5px 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.map-followpref input { width: 16px; height: 16px; margin: 0; min-height: 0; }
.map-attrib { right: 0; bottom: 0; font-size: 11px; background: rgb(255 255 255 / 85%); padding: 1px 6px; border-top-left-radius: 6px; color: #333; }
.pin-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.85rem; }
.pin-legend li { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgb(0 0 0 / 15%); }
.map-popup { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.map-side { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow: auto; }
.stop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stop-list button { text-align: left; font: inherit; color: inherit; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.stop-list button.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(20 33 61 / 15%); }
.stop-num { flex: none; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 0.8rem; display: grid; place-items: center; }
.field-map .slippy { border-radius: 0; margin: 0 -14px; border-left: none; border-right: none; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } .map-side { max-height: none; } }

/* ─── Duty, check-ins, dispatch ───────────────────────────────────────── */
.duty-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 14px; font-size: 0.9rem; border-bottom: 1px solid var(--line); background: var(--subtle); }
.duty-bar.off { background: var(--subtle); color: var(--muted); }
.duty-bar.available { background: var(--ok-bg); color: var(--ok); }
.duty-bar.on_scene { background: var(--warn-bg); color: var(--warn); }
.duty-bar.unavailable { background: var(--subtle); color: var(--text); }
.onscene-banner { display: flex; gap: 10px; align-items: center; background: var(--warn-bg); border: 1px solid #f1c27d; color: #6d3c00; border-radius: var(--radius); padding: 10px 12px; }
.checkin-overlay { position: fixed; inset: 0; z-index: 50; background: rgb(20 33 61 / 92%); display: grid; place-items: center; padding: 20px; }
.checkin-overlay.overdue { background: rgb(150 24 18 / 94%); animation: pulse-bg 1.6s ease-in-out infinite; }
@keyframes pulse-bg { 50% { background: rgb(120 16 12 / 96%); } }
.checkin-box { background: var(--panel); border-radius: 16px; padding: 24px; max-width: 420px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.checkin-box h1 { font-size: 1.8rem; }
.checkin-ok { font-size: 1.4rem; padding: 18px; }
.checkin-alerted { font-weight: 600; color: var(--bad); }
.dispatch-alert { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-radius: var(--radius); padding: 12px 14px; border: 2px solid; }
.dispatch-alert.overdue { background: var(--bad-bg); border-color: var(--bad); color: #6e1510; animation: pulse-border 1.2s ease-in-out infinite; }
.dispatch-alert.checkin_due { background: var(--warn-bg); border-color: #e0a100; color: #6b4200; }
@keyframes pulse-border { 50% { border-color: #f08a82; } }
.map-popup.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(20 33 61 / 15%); }
@media (prefers-reduced-motion: reduce) { .checkin-overlay.overdue, .dispatch-alert.overdue { animation: none; } }
.auth-footer { margin-top: auto; display: flex; gap: 12px; align-items: center; color: #d9e1f0; font-size: 0.85rem; line-height: 1.45; max-width: 400px; width: 100%; }
.auth-footer strong { color: #fff; }
.auth-footer .palmetto { color: var(--brass); flex: none; }
.auth-footer-copy { color: #9fb0cc; font-size: 0.78rem; }

/* ─── Public cover page ───────────────────────────────────────────────── */
.landing { min-height: 100vh; background: var(--bg); color: var(--text); }
.landing-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(16px, 5vw, 56px); background: var(--chrome); color: #fff; }
.landing-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: 0.01em; }
.landing-signin { background: transparent; border-color: rgb(255 255 255 / 35%); color: #fff; font-weight: 600; }
.landing-signin:hover { background: rgb(255 255 255 / 10%); }
.landing-hero { background: linear-gradient(160deg, #14213d 0%, #24375f 60%, #2d4478 100%); color: #fff; padding: clamp(56px, 10vw, 120px) clamp(16px, 5vw, 56px) clamp(64px, 10vw, 110px); }
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; max-width: 18ch; margin: 18px 0 16px; }
.landing-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 60ch; color: #d9e1f0; margin: 0; }
.landing-badge { display: inline-block; background: rgb(252 163 17 / 18%); color: var(--amber); border: 1px solid rgb(252 163 17 / 55%); padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.landing-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.landing-cta .btn.primary { background: var(--brass); border-color: var(--brass); color: #1a1406; font-weight: 700; }
.landing-cta .btn.primary:hover { background: #c39a4b; }
.landing-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 45%); text-decoration: none; }
.landing-section { padding: clamp(48px, 7vw, 88px) clamp(16px, 5vw, 56px); max-width: 1180px; margin: 0 auto; }
.landing-section h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; }
.landing-story { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 36px; font-size: 1.08rem; line-height: 1.6; }
.landing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 30px; }
.landing-card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--brass); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.landing-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.landing-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.landing-about { max-width: none; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.landing-about-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; font-size: 1.05rem; line-height: 1.65; }
.landing-home { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-weight: 600; color: var(--heading); }
.landing-home .palmetto { color: var(--heading); }
.landing-final { text-align: center; }
.landing-final p { color: var(--muted); font-size: 1.05rem; margin: 0 auto 22px; max-width: 56ch; }
.landing-footer { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 22px clamp(16px, 5vw, 56px); background: var(--chrome); color: #9fb0cc; font-size: 0.88rem; }
.landing-cta .btn, .landing-final .btn { width: auto; min-width: 180px; }
.landing-top, .landing-hero, .landing-footer { padding-left: max(clamp(16px, 5vw, 56px), calc((100% - 1180px) / 2 + 56px)); padding-right: max(clamp(16px, 5vw, 56px), calc((100% - 1180px) / 2 + 56px)); }
@media (max-width: 520px) { .landing-cta .btn, .landing-final .btn { width: 100%; } }
.landing-about-grid { max-width: calc(1180px - 2 * clamp(16px, 5vw, 56px)); }
.landing-contact { font-size: 1.05rem; }
.landing-contact a, .landing-footer a { color: inherit; font-weight: 700; }
.landing-footer a { color: var(--brass); }
.landing-cta-center { justify-content: center; }
.landing-final .landing-cta .btn.primary { background: var(--accent); border-color: #14213d; color: #fff; text-decoration: none; }
.landing-band { background: var(--chrome); color: #e6ecf6; padding: clamp(48px, 7vw, 88px) 0; }
.landing-band h2 { color: #fff; }
.landing-band .landing-split { max-width: calc(1180px - 2 * clamp(16px, 5vw, 56px)); margin: 0 auto; padding: 0 clamp(16px, 5vw, 56px); box-sizing: content-box; }
.landing-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.landing-split.reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.landing-split p { font-size: 1.06rem; line-height: 1.65; }
.landing-kicker { display: inline-block; color: var(--brass); font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.landing-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.landing-points li { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 12%); border-left: 4px solid var(--amber); border-radius: 10px; padding: 14px 16px; line-height: 1.5; }
.landing-points strong { color: #fff; display: block; margin-bottom: 2px; }
.landing-sat { margin: 0; }
.landing-sat svg { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 18px 40px rgb(20 33 61 / 28%); border: 4px solid #fff; }
.landing-sat figcaption { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
.landing-sat figcaption span { display: flex; align-items: center; gap: 8px; }
.dot-legend { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.dot-legend.geo { border: 2px dashed #6b7a90; }
.dot-legend.pin { background: #fca311; border: 2px solid #14213d; }
@media (max-width: 820px) { .landing-split, .landing-split.reverse { grid-template-columns: 1fr; } }
.landing-split h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; margin: 0 0 14px; }
.landing-alerts { display: flex; flex-direction: column; gap: 12px; }
.alert-card { background: var(--panel); color: var(--text); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; border-left: 6px solid; box-shadow: 0 10px 24px rgb(0 0 0 / 25%); }
.alert-card.address { border-color: #e07b00; }
.alert-card.person { border-color: #c9362b; }
.alert-card strong { font-size: 1.08rem; }
.alert-card span:last-child { color: var(--muted); font-size: 0.95rem; }
.alert-tag { align-self: flex-start; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); }
.alert-card.person .alert-tag { background: var(--bad-bg); color: var(--bad); }
.alert-ack { align-self: flex-start; background: rgb(31 157 85 / 18%); color: #9be3b8; border: 1px solid rgb(31 157 85 / 45%); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.9rem; }
.landing-safety { border-top: 1px solid rgb(255 255 255 / 8%); }
.landing-sat figcaption span { white-space: nowrap; } .dot-legend { flex: none; }

/* ─── Safety alerts (phone + Route Mode) ───────────────────────────────── */
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.safety-empty { margin: 0; color: var(--muted); font-size: 0.9rem; }
.safety-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.safety-list li { border-left: 4px solid var(--bad); background: var(--bad-bg); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.safety-list li.acked { background: var(--bad-bg); border-left-color: #d98b85; }
.safety-cat { font-weight: 800; color: var(--bad); text-transform: uppercase; letter-spacing: 0.02em; font-size: 0.95rem; }
.safety-det { font-size: 0.95rem; }
.safety-meta { font-size: 0.78rem; color: var(--muted); }
.safety-add { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.safety-add select, .safety-add input { padding: 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.safety-addbtn { margin-top: 6px; padding-left: 0; }
.safety.compact .safety-list li { padding: 6px 8px; }

/* ─── Route Mode (in-car laptop) ───────────────────────────────────────── */
.rm { height: 100vh; display: flex; flex-direction: column; background: var(--subtle); overflow: hidden; }
.rm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px; background: var(--chrome); color: #fff; }
.rm-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rm-mark { font-weight: 900; letter-spacing: 0.12em; font-size: 1.15rem; }
.rm-note { font-size: 0.8rem; color: #ffd48a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.rm .btn.rm-light { color: #fff; }
.rm .btn.rm-light:hover { background: rgb(255 255 255 / 12%); }
.rm-duty { display: flex; gap: 8px; align-items: center; }
.rm-dbtn { font: inherit; font-weight: 800; letter-spacing: 0.04em; font-size: 0.9rem; padding: 9px 16px; border-radius: 8px; border: 2px solid rgb(255 255 255 / 35%); background: transparent; color: #fff; cursor: pointer; }
.rm-dbtn:disabled { cursor: default; }
.rm-dbtn:not(.on):disabled { opacity: 0.45; }
.rm-dbtn.on.duty { background: #1a7f4b; border-color: #1a7f4b; }
.rm-dbtn.on.offduty { background: #5d6675; border-color: #5d6675; }
.rm-dbtn.on.unavailable { background: var(--amber); border-color: var(--amber); color: var(--heading); }
.rm-strip { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; padding: 10px 14px 0; }
.rm-where, .rm-next { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; display: flex; flex-direction: column; min-width: 0; }
.rm-where strong, .rm-next strong { font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-next { border-left: 6px solid var(--amber); }
.rm-k { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); }
.rm-sub { font-size: 0.8rem; color: var(--muted); }
.rm-side { display: inline-block; margin-left: 10px; padding: 1px 10px; border-radius: 999px; background: var(--chrome); color: #fff; font-size: 0.95rem; vertical-align: 2px; }
.rm-side.left, .rm-side.right { background: var(--amber); color: var(--heading); }
.rm-err { padding: 6px 14px 0; color: var(--bad); font-size: 0.9rem; }
.rm-body { flex: 1; display: grid; grid-template-columns: minmax(340px, 1.05fr) minmax(420px, 1.6fr) minmax(170px, 0.55fr); gap: 10px; padding: 10px 14px 14px; min-height: 0; }
.rm-left { display: grid; grid-template-rows: minmax(200px, 1fr) auto auto; gap: 10px; min-height: 0; }
.rm-map { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); min-height: 0; }
.rm-map > .slippy, .rm-map > div:first-child { height: 100% !important; }
.rm-map.expanded { position: fixed; inset: 10px; z-index: 40; box-shadow: 0 20px 60px rgb(0 0 0 / 35%); }
.rm-expand { position: absolute; right: 10px; bottom: 28px; z-index: 5; box-shadow: var(--shadow); }
.rm-alerts { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; max-height: 30vh; overflow: auto; }
.rm-alerts.hot { border: 2px solid var(--bad); }
.rm-alerts-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rm-alerts-h > span:first-child { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); }
.rm-alerts-act { margin-left: auto; display: flex; gap: 6px; }
.rm-bigbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-big { font: inherit; font-weight: 900; font-size: 1.25rem; letter-spacing: 0.05em; padding: 16px 10px; border-radius: 12px; border: 3px solid transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rm-big small { font-size: 0.75rem; font-weight: 600; letter-spacing: 0; opacity: 0.9; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-big.out { background: var(--warn-bg); color: var(--warn); border-color: #f0b25a; }
.rm-big.out.active { background: #e07b00; color: #fff; border-color: #e07b00; }
.rm-big.in { background: var(--ok-bg); color: var(--ok); border-color: #8fd0ad; }
.rm-big.in.active { background: var(--ok); color: #fff; border-color: var(--ok); }
.rm-big:disabled:not(.active) { opacity: 0.5; cursor: not-allowed; }
.rm-big.active:disabled { cursor: default; }
.rm-list { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; min-height: 0; }
.rm-list-h { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rm-sort { white-space: nowrap; margin-left: auto; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rm-sort select { font: inherit; font-size: 0.9rem; letter-spacing: 0; font-weight: 600; color: var(--text); padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.rm-table-wrap { overflow: auto; flex: 1; min-height: 0; }
.rm-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.rm-table th { position: sticky; top: 0; background: var(--subtle); text-align: left; font-size: 0.78rem; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); z-index: 1; }
.rm-table td { padding: 8px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.rm-table tbody tr { cursor: pointer; }
.rm-table tbody tr:hover { background: var(--subtle); }
.rm-table tbody tr.sel { background: var(--warn-bg); box-shadow: inset 4px 0 0 var(--amber); }
.rm-table tbody tr.dim td { color: #8a92a0; }
.rm-table td:first-child { font-weight: 800; color: var(--heading); width: 28px; }
.rm-p { display: flex; gap: 6px; align-items: center; }
.rm-p2 { font-size: 0.8rem; color: var(--muted); }
.rm-alert-dot { color: #fff; background: var(--bad); border-radius: 4px; padding: 0 4px; font-size: 0.8rem; }
.rm-last { font-size: 0.82rem; white-space: nowrap; }
.rm-pct { font-weight: 800; font-size: 1.05rem; color: var(--heading); white-space: nowrap; }
.rm-pct.nsh { font-weight: 600; font-size: 0.8rem; color: var(--muted); }
.rm-foot { margin: 0; padding: 8px 12px; font-size: 0.75rem; color: var(--muted); border-top: 1px solid var(--line); }
.rm-pickups { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.rm-tiles { display: grid; grid-template-rows: auto repeat(4, 1fr); gap: 10px; min-height: 0; }
/* "Papers in my possession" and its three breakdown boxes read as one unit. */
.rm-group { border: 1px solid var(--line); border-radius: 14px; background: var(--subtle); padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.rm-group > .rm-tile { min-height: 78px; }
.rm-sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: relative; }
.rm-sub::before { content: ''; position: absolute; left: 50%; top: -6px; width: 2px; height: 6px; background: var(--line); }
.rm-subtile { font: inherit; background: var(--panel); border: 1px solid var(--line); border-top-width: 4px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; padding: 6px 2px; gap: 1px; min-width: 0; }
.rm-subtile.ok { border-top-color: #1f9d55; }
.rm-subtile.warn { border-top-color: #e0a100; }
.rm-subtile.off { border-top-color: #8b95a5; }
.rm-subtile.active { outline: 3px solid var(--navy); outline-offset: -1px; }
.rm-subtile-n { font-size: 1.35rem; font-weight: 900; color: var(--heading); line-height: 1.1; }
.rm-subtile-l { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.15; }
.rm-tile { font: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 8px; gap: 2px; }
.rm-tile:hover { border-color: #b9c1ce; }
.rm-tile.active { border: 3px solid var(--navy); }
.rm-tile.hot { background: var(--info-bg); border-color: var(--info); }
.rm-tile-n { font-size: 2rem; font-weight: 900; color: var(--heading); line-height: 1.1; }
.rm-tile.hot .rm-tile-n { color: var(--info); }
.rm-tile-l { font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.rm-msgs { position: fixed; right: 14px; top: 70px; bottom: 14px; width: min(420px, 90vw); background: var(--panel); border-radius: 12px; box-shadow: 0 20px 60px rgb(0 0 0 / 30%); z-index: 50; display: flex; flex-direction: column; }
.rm-msgs-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rm-msgs-list { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.rm-msgs-f { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.rm-msgs-f input { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.msg { max-width: 85%; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-b { display: inline-block; padding: 8px 12px; border-radius: 12px; background: var(--subtle); white-space: pre-wrap; text-align: left; }
.msg.mine .msg-b { background: var(--accent); color: #fff; }
.msg-m { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.desk-thread { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; padding: 8px; background: var(--subtle); border: 1px solid var(--line); border-radius: 8px; }

/* ─── Arrival dashboard & quick results (phone + laptop) ───────────────── */
.rm-bigbtns { grid-template-columns: 1fr 1fr 1fr; }
.rm-big { font-size: 1.05rem; }
.rm-big.go { background: var(--accent); color: #fff; border-color: var(--accent); }
.arr-wide { min-height: 100vh; background: var(--subtle); }
.arr { display: flex; flex-direction: column; gap: 12px; }
.arr-wide .arr { padding: 0 14px 14px; }
.arr-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--chrome); color: #fff; padding: 10px 14px; border-radius: 10px; }
.arr-wide .arr-top { border-radius: 0; margin: 0 -14px; }
.arr-where { display: flex; flex-direction: column; min-width: 0; }
.arr-where strong { font-size: 1.35rem; }
.arr-top .arr-k { color: #ffd48a; }
.arr-top-act { display: flex; gap: 8px; }
.arr-k { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); }
.arr-others { font-size: 0.9rem; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.arr-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.arr-wide .arr-grid { grid-template-columns: 1.1fr 1fr 1.3fr; grid-template-areas: 'paper pct hist' 'safety safety hist'; }
.arr-wide .arr-paper { grid-area: paper; }
.arr-wide .arr-pct { grid-area: pct; }
.arr-wide .arr-safety { grid-area: safety; }
.arr-wide .arr-hist { grid-area: hist; max-height: 56vh; overflow: auto; }
.arr-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.arr-safety.hot { border: 2px solid var(--bad); }
.arr-safety.must { box-shadow: 0 0 0 4px var(--bad-bg); }
.arr-name { font-size: 1.5rem; font-weight: 800; }
.arr-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: 0.95rem; }
.arr-dl dt { color: var(--muted); font-weight: 600; }
.arr-dl dd { margin: 0; }
.arr-dl dd.ok { color: var(--ok); font-weight: 700; }
.arr-dl dd.bad { color: var(--bad); font-weight: 700; }
.arr-instr { margin-top: 10px; padding: 8px 10px; background: var(--warn-bg); color: var(--warn); border-radius: 8px; }
.arr-pcts { display: flex; gap: 24px; margin: 6px 0; }
.arr-pcts > div { display: flex; flex-direction: column; }
.arr-big { font-size: 2.6rem; font-weight: 900; color: var(--heading); line-height: 1; }
.arr-lbl { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.arr-win { width: 100%; font-size: 0.85rem; border-collapse: collapse; margin-top: 6px; }
.arr-win td { padding: 3px 4px; border-top: 1px solid #eef0f3; }
.arr-win tr.now td { background: var(--warn-bg); font-weight: 700; }
.arr-hlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.arr-hlist li { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; }
.arr-hrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.arr-out { font-size: 0.9rem; }
.arr-out.ok { color: var(--ok); font-weight: 700; }
.arr-note { font-style: italic; margin-top: 2px; }
.arr-who { font-size: 0.78rem; color: var(--muted); }
.arr-ask { background: var(--panel); border: 2px solid var(--navy); border-radius: 12px; padding: 14px; text-align: center; }
.arr-ask h2 { font-size: 1.35rem; margin-bottom: 10px; }
.arr-warn { color: var(--bad); font-weight: 700; margin: 6px 0; }
.arr-yn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; margin: 0 auto; }
.arr-yes, .arr-no, .arr-save { font: inherit; font-weight: 900; font-size: 1.4rem; letter-spacing: 0.05em; padding: 18px; border-radius: 12px; border: 3px solid transparent; cursor: pointer; }
.arr-yes { background: var(--ok); color: #fff; }
.arr-no { background: var(--subtle); color: var(--text); border-color: #cfd4dc; }
.arr-yes:disabled, .arr-save:disabled { opacity: 0.45; cursor: not-allowed; }
.arr-hanger .arr-yes:not(.on) { background: var(--ok-bg); color: var(--ok); border-color: #8fd0ad; }
.arr-hanger .arr-no.on { background: var(--text); color: #fff; }
.arr-results { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.arr-rhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.arr-offline { background: var(--warn-bg); color: var(--warn); padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.arr-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.arr-wide .arr-choices { grid-template-columns: repeat(4, 1fr); }
.arr-choice { font: inherit; font-weight: 900; font-size: 1.05rem; letter-spacing: 0.03em; min-height: 84px; padding: 12px 8px; border-radius: 12px; border: 3px solid var(--line); background: var(--subtle); color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.arr-choice small { font-size: 0.75rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.arr-choice.ok { background: var(--ok-bg); color: var(--ok); border-color: #b7e2c9; }
.arr-choice.stop { background: var(--bad-bg); color: var(--bad); border-color: #f2c4bf; }
.arr-choice.more { background: var(--panel); color: var(--info); border-style: dashed; }
.arr-choice.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(20 33 61 / 25%); background: var(--accent); color: #fff; }
.arr-choice.active small { color: #dfe6f3; }
.arr-choice:disabled { opacity: 0.4; cursor: not-allowed; }
.arr-follow { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.arr-confirm { margin: 0; font-size: 1.05rem; }
.arr-sub h3, .arr-hanger h3 { margin-bottom: 8px; font-size: 1.1rem; }
.arr-hanger { text-align: center; }
.arr-subgrid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.arr-wide .arr-subgrid { grid-template-columns: 1.3fr 1.3fr 1fr; }
.arr-subgrid label, .arr-notes { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.arr-subgrid input, .arr-notes textarea { font: inherit; font-size: 1rem; color: var(--text); padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.arr-checks { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.arr-wide .arr-checks { flex-direction: row; gap: 18px; }
.arr-checks label { display: flex; gap: 8px; align-items: center; font-size: 1rem; }
.arr-checks input { width: 22px; height: 22px; }
.arr-save { background: var(--accent); color: #fff; width: 100%; }
.arr-done { align-items: center; justify-content: center; min-height: 70vh; }
.arr-done-box { background: var(--panel); border-radius: 16px; padding: 28px; text-align: center; max-width: 560px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.arr-done-check { font-size: 3rem; color: var(--ok); font-weight: 900; }
/* Phone: keep the Yes/No question in reach above the bottom tabs. */
.field-main .arr-ask { position: sticky; bottom: 8px; z-index: 5; padding: 10px; box-shadow: 0 -6px 20px rgb(16 24 40 / 12%); }
.field-main .arr-ask h2 { font-size: 1.05rem; margin-bottom: 6px; }
.field-main .arr-yes, .field-main .arr-no { padding: 12px; font-size: 1.2rem; }
.field-main .arr-ask .small { display: none; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.edit-grid.addr { grid-template-columns: 2fr 1fr 1.3fr auto auto; }
@media (max-width: 700px) { .edit-grid.addr { grid-template-columns: 1fr 1fr; } }
.edit-grid select, .edit-grid input { width: 100%; }

/* Papers queues & bulk actions */
.paper-tabs { flex-wrap: wrap; }
.paper-tabs .active .tab-count { background: var(--accent); color: #fff; }
.check-col { width: 36px; }
.check-col input { width: 18px; height: 18px; cursor: pointer; }
.table tr.selected td { background: var(--warn-bg); }
.bulk-bar { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.bulk-bar .btn { background: var(--panel); }
.bulk-bar .btn.primary { background: var(--amber); border-color: var(--amber); color: var(--heading); }
.bulk-bar .btn.ghost { background: transparent; color: #fff; }
.bulk-form { align-items: flex-end; }
.bulk-fails { margin: 6px 0 0; padding-left: 18px; }
.ivd-check { font-weight: 600; margin-top: 4px; }
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, 3.5in); gap: 0.25in; }
.label-sheet .label { break-inside: avoid; }
@media print {
  .cover-page { break-after: page; border: none; }
  .cover-page:last-child { break-after: auto; }
  .print-page { padding: 0; }
}

/* DYMO 30256 labels (4in × 2.3125in, landscape) */
.dymo-label { width: 4in; height: 2.3125in; box-sizing: border-box; padding: 0.12in 0.2in; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.04in; background: #fff; color: #000; border: 1px dashed #999; margin-bottom: 12px; overflow: hidden; break-after: page; }
.dymo-num { font-size: 34pt; font-weight: 700; letter-spacing: 1px; line-height: 1; white-space: nowrap; }
.dymo-num.mid { font-size: 26pt; }
.dymo-num.long { font-size: 17pt; letter-spacing: 0; }
.dymo-name { font-size: 20pt; font-weight: 700; text-transform: uppercase; line-height: 1.1; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dymo-bar { height: 0.75in; max-width: 3.6in; }
@media print {
  .print-labels { padding: 0; gap: 0; }
  .dymo-label { border: none; margin: 0; }
  .dymo-label:last-child { break-after: auto; }
}

/* Deputy cover sheet (letter, one per page) */
.cover-sheet { width: 7.5in; box-sizing: border-box; padding: 0.3in; border: 1px solid #999; background: #fff; color: #000; display: flex; flex-direction: column; gap: 14px; font-size: 11pt; break-after: page; }
.cover-sheet:last-child { break-after: auto; }
.cs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid #000; padding-bottom: 10px; }
.cs-agency { font-weight: 700; font-size: 13pt; }
.cs-title { font-size: 10pt; letter-spacing: 2px; text-transform: uppercase; }
.cs-bar img { height: 70px; }
.cs-name { font-size: 26pt; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.cs-addr { font-size: 14pt; }
.cs-bolo { border: 3px double #000; padding: 8px 10px; margin-bottom: 6px; font-size: 11pt; }
.cs-alerts { border: 3px solid #000; padding: 8px 10px; background: #f1f1f1; }
.cs-k { font-size: 9pt; font-weight: 800; letter-spacing: 1.5px; margin-bottom: 4px; }
.cs-muted { color: #444; font-size: 9.5pt; }
.cs-table { border-collapse: collapse; width: 100%; }
.cs-table th { text-align: left; width: 1.7in; padding: 4px 8px 4px 0; vertical-align: top; font-weight: 700; }
.cs-table td { padding: 4px 0; border-bottom: 1px solid #ccc; }
.cs-notes > div + div { margin-top: 3px; }
.cs-attempts table { width: 100%; border-collapse: collapse; }
.cs-attempts th, .cs-attempts td { border: 1px solid #666; padding: 4px 6px; text-align: left; font-size: 9.5pt; }
.cs-attempts td { height: 26px; }
.cs-foot { text-align: right; font-size: 9pt; color: #444; }
@media print { .cover-sheet { border: none; padding: 0; width: auto; } .print-covers { padding: 0; } }

/* Vehicles in the yard */
.veh { display: flex; flex-direction: column; gap: 10px; }
.veh-add { align-self: flex-start; }
.veh-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; background: var(--subtle); }
.veh-row legend { font-weight: 700; padding: 0 4px; }
.veh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.arr-wide .veh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.veh-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.veh-grid select, .veh-grid input { font: inherit; font-size: 1rem; color: var(--text); padding: 9px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; background: var(--panel); }
.veh-tag { display: flex; gap: 6px; }
.veh-tag select { width: 72px; flex: none; }
.veh-tag input { flex: 1; text-transform: uppercase; }
.veh-photo { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.veh-photo img { height: 64px; border-radius: 6px; }
.arr-veh { font-size: 0.85rem; margin-top: 2px; }
.cs-veh > div + div { margin-top: 2px; }

/* Reconciliation */
.rec-scan { display: flex; gap: 10px; }
.rec-scan input { flex: 1; font-size: 1.4rem; padding: 14px 16px; border: 2px solid var(--navy); border-radius: 10px; letter-spacing: 0.02em; }
.rec-scan .btn { font-size: 1.1rem; padding: 0 24px; }
.rec-result { border-radius: 14px; padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; border: 3px solid; }
.rec-result.ok { background: var(--ok-bg); border-color: #7cc79f; }
.rec-result.info { background: var(--info-bg); border-color: #8fb1ea; }
.rec-result.warn { background: var(--warn-bg); border-color: #f0c77a; }
.rec-result.bad { background: var(--bad-bg); border-color: #e59a94; }
.rec-top { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.rec-num { font-size: 1.2rem; font-weight: 700; }
.rec-name { font-size: 1.2rem; font-weight: 800; text-transform: uppercase; }
.rec-chip { background: var(--panel); border-radius: 999px; padding: 2px 10px; font-size: 0.85rem; font-weight: 600; }
.rec-pile { font-size: 2.2rem; font-weight: 900; line-height: 1.1; color: var(--heading); }
.rec-title { font-size: 1.15rem; font-weight: 700; }
.rec-detail { font-size: 1rem; }
.rec-piles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rec-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; border-top: 5px solid var(--line); }
.rec-group.ok { border-top-color: var(--ok); }
.rec-group.info { border-top-color: var(--info); }
.rec-group.warn { border-top-color: #e0a100; }
.rec-group.bad { border-top-color: var(--bad); }
.rec-group h3 { margin-bottom: 6px; }
.rec-group ul { margin: 0; padding-left: 18px; }
.rec-group li { margin: 3px 0; }
@media print { .rec .card { border: none; box-shadow: none; } .sidenav, .topbar { display: none !important; } }

/* Build a stack */
.stack-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.stack-table tbody tr { cursor: pointer; }
.stack-rank { font-weight: 800; color: var(--heading); }
.stack-chance { font-size: 1.15rem; font-weight: 800; color: var(--heading); white-space: nowrap; }
.stack-why { display: flex; flex-wrap: wrap; gap: 4px; }
.stack-why span { background: var(--subtle); border-radius: 999px; padding: 2px 8px; font-size: 0.8rem; }
.stack-no { margin-top: 12px; }
.stack-no summary { cursor: pointer; font-weight: 600; }
.scan-toast { margin-bottom: 12px; }

/* Deputy Home & schedule */
.field-main.wide { max-width: 1100px; }
/* Deputy paper list: who and where first, the paper number second */
.paper-card { gap: 3px; padding: 12px 14px; border-radius: var(--radius); }
.paper-card:hover { border-color: var(--accent); }
.pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pc-name { font-size: 1.05rem; font-weight: 600; color: var(--heading); }
.pc-addr { color: var(--text); }
.pc-meta { display: flex; gap: 12px; color: var(--muted); font-size: 0.85rem; }
.pc-status { margin-top: 4px; color: var(--text); }
.alert.flush { padding: 6px 14px; font-size: 0.86rem; border-left-width: 0; }
/* Deputy paper screen: the paper's file header, then details; the two attempt buttons ride above the bottom tabs */
.fp-head { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.fp-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-top h1 { font-size: 1.4rem; font-weight: 700; }
.fp-name { font-size: 1.15rem; font-weight: 600; color: var(--heading); margin-top: 4px; }
.fp-type { color: var(--muted); font-size: 0.9rem; }
.fp-addr { margin-top: 6px; }
.fp-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.fp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.fp-actions .btn { min-height: 40px; }
.fp-bar { position: sticky; bottom: 70px; z-index: 6; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 18px rgb(15 24 38 / 12%); }
.fp-bar .btn { min-height: 48px; font-size: 1rem; white-space: normal; line-height: 1.2; }
@media (min-width: 761px) { .fp-bar { bottom: 12px; } }
.home-next { display: flex; flex-direction: column; align-items: flex-end; background: var(--ok-bg); color: var(--ok); padding: 8px 14px; border-radius: 10px; }
.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.hs { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; background: var(--panel); border-top: 5px solid var(--line); }
.hs.ok { border-top-color: var(--ok); }
.hs.info { border-top-color: var(--info); }
.hs.bad { border-top-color: var(--bad); }
.hs-n { font-size: 2rem; font-weight: 900; color: var(--heading); line-height: 1.1; }
.hs-l { font-weight: 700; }
.hs-c { font-size: 0.8rem; color: var(--muted); }
.home-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.home-form { display: flex; flex-direction: column; justify-content: center; min-height: 64px; padding: 12px 14px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 800; text-decoration: none; }
.home-form:hover { background: var(--navy-2); }
.home-form.disabled { background: var(--subtle); color: var(--muted); cursor: not-allowed; }
.home-form small { font-weight: 600; font-size: 0.75rem; }
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cal-head h2 { min-width: 170px; text-align: center; }
.cal-legend { margin-left: auto; font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; }
.cal-legend .k-working { background: var(--ok-bg); border: 1px solid #7cc79f; }
.cal-legend .k-flexible { background: var(--info-bg); border: 1px solid #8fb1ea; }
.cal-legend .k-off { background: var(--subtle); border: 1px solid var(--line); }
.cal-legend .k-sup { background: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { font-size: 0.75rem; font-weight: 800; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { font: inherit; min-height: 74px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 5px 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; cursor: pointer; text-align: left; position: relative; }
.cal-day.empty { border: none; background: transparent; cursor: default; }
.cal-day.past { opacity: 0.55; }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--amber); }
.cal-day.sel { box-shadow: inset 0 0 0 3px var(--navy); }
.cal-day.k-working { background: var(--ok-bg); border-color: #7cc79f; }
.cal-day.k-flexible { background: var(--info-bg); border-color: #8fb1ea; }
.cal-day.k-off { background: var(--subtle); border-color: var(--line); }
.cal-num { font-weight: 800; }
.cal-what { font-size: 0.78rem; font-weight: 700; }
.cal-sug { font-size: 0.72rem; color: var(--muted); }
.cal-lock { color: var(--heading); margin-left: 4px; font-size: 0.7rem; }
.day-ed { margin-top: 12px; border: 2px solid var(--navy); border-radius: 12px; padding: 12px 14px; background: var(--panel); display: flex; flex-direction: column; gap: 10px; }
.day-ed-h { display: flex; justify-content: space-between; align-items: center; }
.day-ed-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.day-ed-row label, .day-ed-note { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.day-ed-row input, .day-ed-note input { font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
.day-ed-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sched-week td.k-working { background: var(--ok-bg); font-weight: 600; }
.sched-week td.k-flexible { background: var(--info-bg); }
.sched-week td.k-off { background: var(--subtle); color: var(--muted); }
.sched-week td.sup { box-shadow: inset 3px 0 0 var(--navy); }
.sched-week th.today { color: var(--heading); text-decoration: underline; }
.stack-sched { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 560px) { .cal-day { min-height: 56px; padding: 3px; } .cal-what, .cal-sug { font-size: 0.65rem; } .cal-legend { margin-left: 0; } }

/* BOLO */
.bolo-banner { border: 2px solid #b45309; background: var(--warn-bg); border-left: 8px solid #d97706; border-radius: 8px; padding: 12px 16px; }
.bolo-title { font-weight: 800; letter-spacing: .3px; color: var(--warn); margin-bottom: 4px; }
.bolo-line { margin-top: 2px; }
.bolo-table td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.ok-text { color: var(--ok); font-weight: 600; }

/* People & address history */
.addr-flags { border-radius: 8px; padding: 12px 16px; border: 2px solid #b45309; border-left: 8px solid #d97706; background: var(--warn-bg); }
.addr-flags.bad { border-color: #b91c1c; border-left-color: #b91c1c; background: var(--bad-bg); }
.addr-flags-title { font-weight: 800; margin-bottom: 4px; }
.addr-flags.bad .addr-flags-title { color: var(--bad); }
.addr-flags > div + div { margin-top: 2px; }
.addr-hist li + li, .attempts-list li + li { margin-top: 8px; }
.fact-group + .fact-group { margin-top: 12px; }
.fact-k { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.fact { padding: 2px 0; }
.add-fact { margin-top: 16px; border-top: 1px solid #e5e7eb; padding-top: 12px; }
.linkish { background: none; border: 0; color: var(--info); cursor: pointer; padding: 0 0 0 8px; text-decoration: underline; }
.stat-row { display: flex; gap: 32px; margin-bottom: 10px; }
.stat-n { font-size: 28px; font-weight: 800; line-height: 1; }
.people-q { font-size: 16px; padding: 10px 12px; }
.arr-addrflags { border: 3px solid #dc2626; background: var(--bad-bg); }
.arr-addrflags .arr-k { color: var(--bad); }
.arr-addrflag { font-weight: 600; margin-top: 4px; }

/* ── Two-product homepage (CivilHound / CivilLogix) ── */
.landing-brand { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.1; }
.landing-brand-by { font-size: 0.72rem; font-weight: 600; color: #aab6cc; letter-spacing: 0.04em; }
.landing-nav { display: flex; gap: clamp(12px, 3vw, 28px); margin-left: auto; margin-right: clamp(12px, 3vw, 28px); }
.landing-nav a { color: #e6ecf6; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.landing-nav a:hover { color: var(--amber); }
@media (max-width: 560px) { .landing-nav { display: none; } }
.lp-hero { padding-bottom: clamp(48px, 7vw, 80px); }
.lp-hero h1 { max-width: 22ch; }
.lp-products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; margin-top: clamp(28px, 5vw, 44px); max-width: 1180px; }
.lp-product { background: var(--panel); color: var(--text); border-radius: 16px; padding: 20px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: center; box-shadow: 0 18px 44px rgb(0 0 0 / 30%); border-top: 6px solid var(--amber); }
.lp-product.logix { border-top-color: #2f7de1; }
.lp-product img { width: 170px; height: 170px; object-fit: contain; }
.lp-product h2 { font-size: 1.7rem; margin: 2px 0 8px; color: var(--heading); }
.lp-product p { margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.lp-for { font-size: 0.9rem; font-weight: 600; color: var(--brass); }
.lp-product.logix .lp-for { color: var(--info); }
.lp-chip { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); border: 1px solid #f5d28f; }
.lp-chip.muted { background: var(--info-bg); color: var(--info); border-color: #b9d0f3; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.lp-actions .btn { width: auto; text-decoration: none; }
.lp-product.hound .btn.primary { background: var(--accent); border-color: #14213d; color: #fff; }
.lp-product.logix .btn.primary { background: #1d5fb8; border-color: #1d5fb8; color: #fff; }
@media (max-width: 560px) { .lp-product { grid-template-columns: 1fr; text-align: center; } .lp-product img { margin: 0 auto; width: 150px; height: 150px; } .lp-actions { justify-content: center; } }
.lp-prodhead-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.lp-prodhead-grid img { width: 100%; height: auto; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.lp-prodhead-grid h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; margin: 0 0 14px; }
.lp-prodhead-grid p { font-size: 1.06rem; line-height: 1.65; }
@media (max-width: 820px) { .lp-prodhead-grid { grid-template-columns: 1fr; } .lp-prodhead-grid img { max-width: 320px; margin: 0 auto; } }
.lp-logix { border-top: 1px solid var(--line); }
.lp-logix .landing-kicker { display: inline-block; color: var(--brass); font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.lp-logix .landing-card { border-top-color: #2f7de1; }
.lp-audiences { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 28px; margin-top: 34px; }
.lp-aud-title { font-size: 1.2rem; color: var(--heading); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 3px solid #2f7de1; display: inline-block; }
.lp-aud-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.lp-together { text-align: center; padding-left: clamp(16px, 5vw, 56px); padding-right: clamp(16px, 5vw, 56px); }
.lp-together h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 30ch; margin: 0 auto 30px; line-height: 1.2; }
.lp-flow { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; text-align: left; counter-reset: none; }
.lp-flow li { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 14%); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.lp-flow strong { color: #fff; font-size: 1.05rem; }
.lp-flow-n { width: 32px; height: 32px; border-radius: 50%; background: var(--amber); color: var(--heading); font-weight: 800; display: grid; place-items: center; }
.lp-final-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; max-width: 900px; margin: 10px auto 26px; }
.lp-final-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lp-final-card img { border-radius: 12px; }
.lp-final-card h3 { margin: 6px 0 0; font-size: 1.2rem; }
.lp-final-card p { margin: 0 0 12px !important; font-size: 1rem !important; }
.lp-final-card .btn.primary { background: var(--accent); border-color: #14213d; color: #fff; text-decoration: none; }

.brand-login { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: -6px 0 18px; text-align: center; }
.brand-login img { width: 180px; height: 180px; object-fit: contain; }
.topbar .brand .brand-icon { width: 30px; height: 30px; }

/* Door hanger responses */
.dh-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; }
@media (max-width: 820px) { .dh-row { grid-template-columns: 1fr; } }
.dh-answer { display: flex; flex-direction: column; gap: 3px; }
.dh-answer + .dh-answer { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dh-k { font-weight: 700; color: var(--muted); font-size: 0.85rem; }
.dh-side { display: flex; flex-direction: column; gap: 8px; }
.dh-sugg { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.dh-manual input { width: 150px; }
.dh-paper { border-left: 5px solid #2f7de1; }
.dh-steps { margin: 0 0 12px; padding-left: 20px; line-height: 1.6; }
.dh-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.dh-link input { flex: 1; min-width: 260px; font-size: 0.85rem; }
.warn-text { color: var(--warn); width: 100%; }
.arr-dh { border: 3px solid #2f7de1; background: var(--info-bg); }
.arr-dh .arr-k { color: #1d4ed8; }
.arr-dhrow + .arr-dhrow { margin-top: 8px; }

/* Lock / Sign out on every field screen */
.session-btns { display: inline-flex; gap: 6px; }
.field-bar .sess-btn, .rm-top .sess-btn { color: #fff; border-color: rgb(255 255 255 / 35%); }
.arr-wide-session { display: flex; justify-content: flex-end; padding: 6px 10px; background: var(--chrome); }
.arr-wide-session .sess-btn { color: #fff; border-color: rgb(255 255 255 / 35%); }
@media (max-width: 480px) { .field-bar .sess-btn { padding: 4px 8px; font-size: 0.8rem; } }
/* Route Mode: keep each column inside its track (big buttons were pushing the left column over the list). */
.rm-left, .rm-list, .rm-body > * { min-width: 0; }
.rm-big { min-width: 0; overflow-wrap: anywhere; }

/* Saved signatures */
.mysig-img { background: var(--panel); border: 1px dashed var(--line); border-radius: 8px; padding: 8px; display: inline-block; max-width: 100%; }
.mysig-img img { display: block; max-width: 100%; height: auto; max-height: 110px; }
.small-sig img { max-height: 70px; }
.narrow-page { max-width: 820px; }
.topbar a.who { color: inherit; text-decoration: none; }
.topbar a.who:hover { text-decoration: underline; }
/* Phone: header buttons wrap instead of pushing the page sideways. */
.field-bar { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 480px) {
  .field-bar .session-btns { margin-left: auto; }
  .field-bar .btn.sm { padding: 5px 9px; font-size: 0.82rem; }
}
.field-app { overflow-x: hidden; }

/* Route Mode pickup scanning */
.rm-pickup { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.rm-pickup-scan { display: flex; gap: 8px; }
.rm-pickup-scan input { flex: 1; font-size: 1.15rem; padding: 10px 12px; }
.rm-pickup-note { font-weight: 700; }
.rm-pickup-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rm-pickups li.got { color: var(--ok); }
.rm-pickups li.extra { color: var(--warn); }
.rm-check { display: inline-block; width: 1.2em; font-weight: 800; }
.rm-pickup-confirm { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--warn-bg); border: 2px solid #d97706; border-radius: 10px; padding: 12px; }

/* Writ Book */
.wb-filters { align-items: flex-end; }
.wb-filters .field { margin: 0; }
.wb-sheet { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.wb-head { text-align: center; margin-bottom: 12px; line-height: 1.5; }
.wb-title { font-weight: 800; letter-spacing: 0.06em; font-size: 1.05rem; }
.wb-table td, .wb-table th { vertical-align: top; font-size: 0.88rem; }
.wb-table td:nth-child(3) { min-width: 260px; }
.wb-table td:nth-child(4), .wb-table td:nth-child(5) { min-width: 130px; }
.wb-table td:last-child { min-width: 150px; }
.wb-table .num { text-align: right; white-space: nowrap; }
@media print {
  body:has(.writbook) .topbar, body:has(.writbook) .sidenav { display: none !important; }
  body:has(.writbook) .office-body, body:has(.writbook) .content { display: block; padding: 0; margin: 0; }
  .wb-sheet { border: none; padding: 0; }
  .wb-table { font-size: 8.5pt; }
  .wb-table td, .wb-table th { padding: 3px 4px; border-bottom: 1px solid #bbb; }
  .wb-table tr { break-inside: avoid; }
  .wb-table thead { display: table-header-group; }
  .table-wrap { overflow: visible !important; }
}
.wb-table td.mono { white-space: nowrap; }

/* Work mode: Route / Freelance */
.wm-picker { margin: 10px 0; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius); background: var(--panel); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.wm-q { font-weight: 600; font-size: 1rem; color: var(--heading); }
.wm-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.wm-choice { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--field-line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.wm-choice strong { font-size: 1rem; font-weight: 600; color: var(--heading); }
.wm-choice span { color: var(--muted); font-size: 0.88rem; }
.wm-choice:hover { border-color: var(--accent); background: var(--accent-bg); }
.wm-where { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.wm-where fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.wm-where legend { font-weight: 800; padding: 0 4px; }
.wm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--subtle); }
.wm-now { font-weight: 600; }
.wm-k { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-right: 4px; }
.wm-lock { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* Supervisor metrics */
.mx-range { align-items: flex-end; }
.mx-range .field { margin: 0; }
.mx-tiles .tile { text-align: left; }
.mx-table .num { text-align: right; }
.mx-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #9ca3af; margin-right: 4px; }
.mx-dot.s-available { background: #16a34a; }
.mx-dot.s-on_scene { background: #d97706; }
.mx-dot.s-unavailable { background: #dc2626; }
.mx-hot { color: var(--bad); font-weight: 800; }

/* M · A · E · W circles and door hanger icon */
.svc-line { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.svc-c { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700; background: var(--line-2); color: var(--muted); border: 1px solid var(--line); }
.svc-c.on { background: #16a34a; color: #fff; }
.svc-line.compact .svc-c { width: 20px; height: 20px; font-size: 0.66rem; }
.dh-ico { display: inline-grid; place-items: center; color: var(--muted); margin-left: 4px; }
.dh-ico.on { color: var(--ok); }
.svc-ok { font-size: 0.72rem; font-weight: 800; color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: 2px 8px; }
.svc-line.vacate { font-size: 0.82rem; font-weight: 700; color: var(--warn); }
.svc-line.vacate.ok { color: var(--ok); }
.vac-text { background: var(--warn-bg); border-radius: 6px; padding: 2px 8px; }
.svc-line.vacate.ok .vac-text { background: var(--ok-bg); }

/* Customer portal */
.portal { min-height: 100vh; background: var(--subtle); display: flex; flex-direction: column; }
.portal-top { display: flex; align-items: center; gap: 10px; padding: 10px clamp(12px, 3vw, 28px); background: var(--chrome); color: #fff; flex-wrap: wrap; }
.portal-brand { display: flex; align-items: center; gap: 10px; }
.portal-brand img { border-radius: 6px; background: var(--panel); }
.portal-agency { font-weight: 800; }
.portal-sub { font-size: 0.8rem; color: #c9d1e0; }
.portal-hbtn { color: #fff; border-color: rgb(255 255 255 / 35%); background: transparent; }
.portal-who { font-size: 0.9rem; color: #c9d1e0; }
.bell { position: relative; }
.bell-n { background: var(--amber); color: var(--heading); border-radius: 999px; padding: 0 6px; font-weight: 800; font-size: 0.75rem; margin-left: 2px; }
.bell-panel { position: absolute; right: clamp(12px, 3vw, 28px); top: 62px; width: min(420px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgb(0 0 0 / 20%); padding: 12px; z-index: 20; }
.bell-list li { padding: 8px 4px; border-bottom: 1px solid var(--line); }
.bell-list li.unread { background: var(--warn-bg); }
.portal-main { padding: 16px clamp(12px, 3vw, 28px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.portal-q { min-width: min(320px, 60vw); }
.portal-table td { vertical-align: top; }
.portal-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 250px; }
.portal-actions .btn { text-decoration: none; }
.portal-row.open td { background: var(--subtle); }
.portal-detail td { background: var(--subtle); }
.portal-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.portal-detail h3 { margin: 0 0 6px; font-size: 1rem; }
.portal-attempts { margin: 0; padding-left: 20px; }
.portal-thread li { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; background: var(--panel); border: 1px solid var(--line); }
.portal-thread li.office { border-left: 4px solid #14213d; }
.portal-thread li.customer { border-left: 4px solid #2f7de1; }
.portal-thread li.note { background: var(--warn-bg); }
.new-msg { color: var(--warn); font-weight: 700; }
.portal-foot { padding: 14px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.modal-back { position: fixed; inset: 0; background: rgb(15 23 42 / 45%); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; padding: 20px; width: min(520px, 100%); display: flex; flex-direction: column; gap: 10px; box-shadow: 0 24px 60px rgb(0 0 0 / 30%); }
.modal h2 { margin: 0; font-size: 1.2rem; }
.notify-all { font-size: 1.05rem; }
.notify-list { display: flex; flex-direction: column; gap: 6px; padding-left: 22px; }
.arr-cnotes { border: 2px solid #2f7de1; background: var(--info-bg); }

/* Deputy Admin: papers issued to me */
.hs-btn { font: inherit; cursor: pointer; border: 1px solid var(--line); }
.hs-btn.active { outline: 3px solid var(--navy); outline-offset: -2px; }
.issued-stats .hs.total .hs-n { color: var(--heading); }
.issued-table tr.clickable { cursor: pointer; }
.issued-table tr.clickable:hover td { background: var(--subtle); }

/* ── Deputy app header: ☰ + title left; UNAVAILABLE / ON DUTY / OFF DUTY / LOCK right — same on every screen ── */
.fh { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--chrome); color: #fff; }
.fh-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fh-burger { width: 42px; height: 38px; border-radius: 8px; border: 1px solid rgb(255 255 255 / 30%); background: transparent; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer; flex: none; }
.fh-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; }
.fh-burger:hover { background: rgb(255 255 255 / 12%); }
.fh-title { font-weight: 900; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fh-sync { font: inherit; font-size: 1.1rem; width: 34px; height: 32px; border-radius: 8px; border: 1px solid rgb(255 255 255 / 30%); background: transparent; color: #fff; cursor: pointer; flex: none; }
.fh-sync:disabled { opacity: 0.5; cursor: default; }
.fh-note { font-size: 0.8rem; color: #c9d2e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fh-keys { display: flex; gap: 6px; flex: none; }
.fh-key { font: inherit; font-weight: 800; letter-spacing: 0.04em; font-size: 0.85rem; padding: 8px 14px; border-radius: 8px; border: 2px solid rgb(255 255 255 / 35%); background: transparent; color: #fff; cursor: pointer; white-space: nowrap; }
.fh-key:disabled { cursor: default; }
.fh-key:not(.on):not(.lock):disabled { opacity: 0.45; }
.fh-key.on.duty { background: #1a7f4b; border-color: #1a7f4b; }
.fh-key.on.offduty { background: #5d6675; border-color: #5d6675; }
.fh-key.on.unavailable { background: var(--amber); border-color: var(--amber); color: var(--heading); }
.fh-key.lock:hover, .fh-key:not(:disabled):not(.on):hover { background: rgb(255 255 255 / 12%); }
.fh-key .short { display: none; }
@media (max-width: 760px) {
  .fh { padding: 6px 8px; gap: 6px; }
  .fh-title, .fh .net.on, .hide-narrow { display: none; }
  .fh-key { padding: 7px 7px; font-size: 0.7rem; letter-spacing: 0.02em; }
  .fh-key .long { display: none; }
  .fh-key .short { display: inline; }
  .fh-burger { width: 38px; height: 34px; }
  .fh-sync { width: 30px; height: 30px; }
}
@media (max-width: 360px) { .fh-key { padding: 6px 5px; font-size: 0.64rem; } }

/* ☰ menu */
.fm-back { position: fixed; inset: 0; z-index: 60; background: rgb(10 20 40 / 45%); }
.fm { position: absolute; left: 0; top: 0; bottom: 0; width: min(320px, 86vw); background: var(--panel); display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; box-shadow: 8px 0 40px rgb(0 0 0 / 25%); padding-bottom: env(safe-area-inset-bottom); animation: fm-in 0.16s ease-out; }
@keyframes fm-in { from { transform: translateX(-24px); opacity: 0.4; } }
.fm-h { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--chrome); color: #fff; padding-top: max(14px, env(safe-area-inset-top)); }
.fm-h img { width: 38px; height: 38px; }
.fm-h > div { flex: 1; min-width: 0; }
.fm-h .small { color: #c9d2e0; }
.fm-x { font: inherit; background: none; border: 0; color: #fff; font-size: 1.2rem; cursor: pointer; padding: 6px; }
.fm ul { list-style: none; margin: 0; padding: 8px; }
.fm-main button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--text); background: none; border: 0; border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.fm-main button small { display: block; color: var(--muted); font-size: 0.8rem; }
.fm-main button.active, .fm-more button.active { background: var(--info-bg); }
.fm-main button:hover, .fm-more button:hover { background: var(--subtle); }
.fm-i { width: 28px; display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.fm-main button.active .fm-i { color: var(--brass); }
.fm-more { border-top: 1px solid var(--line); }
.fm-more button { width: 100%; text-align: left; font: inherit; background: none; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer; color: var(--text); }
.fm-out { margin: auto 16px 16px; font: inherit; font-weight: 700; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.fm-out:hover { background: var(--bad-bg); border-color: #e3b4ae; color: var(--bad); }
.fm-theme { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--line); }
.arr-wide { padding: 0; }

/* Schedule: need heat map (one blue ramp, light → dark; level also written in each cell) */
.hm { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hm-wd { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-align: center; }
.hm-c { position: relative; font: inherit; min-height: 64px; border-radius: 8px; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px 2px; cursor: pointer; }
.hm-c.empty { background: transparent; cursor: default; }
.hm-c.lv-low, .hm-legend i.lv-low { background: #cde2fb; color: #0d366b; }
.hm-c.lv-medium, .hm-legend i.lv-medium { background: #2a78d6; color: #fff; }
.hm-c.lv-high, .hm-legend i.lv-high { background: #104281; color: #fff; }
.hm-c.lv-closed, .hm-legend i.lv-closed { background: repeating-linear-gradient(135deg, var(--subtle) 0 6px, #dfe3ea 6px 8px); color: var(--muted); }
.hm-c.today { border-color: var(--amber); }
.hm-c.sel { outline: 3px solid var(--navy); outline-offset: 1px; }
.hm-d { font-size: 0.72rem; opacity: 0.9; }
.hm-n { font-size: 1.25rem; font-weight: 900; line-height: 1.1; }
.hm-l { font-size: 0.78rem; font-weight: 700; text-align: center; line-height: 1.1; }
.hm-me { position: absolute; top: 3px; right: 5px; font-size: 0.6rem; }
.hm-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--muted); }
.hm-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 4px; }
.hm-detail { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--subtle); }
.need-list li.need { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.need-badge { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.need.lv-medium .need-badge { background: #2a78d6; color: #fff; }
.need.lv-high .need-badge { background: #104281; color: #fff; }
.ok-text { color: var(--ok); font-weight: 700; }
@media (max-width: 480px) { .hm-c { min-height: 54px; } .hm-l { display: none; } .hm-n { font-size: 1.05rem; } }

/* Stats: thin single-series bars; values in text ink */
.stats-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 14px; }
.stats-2 h3 { font-size: 0.95rem; margin: 0 0 8px; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 8px; font-size: 0.85rem; }
.bar-l { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 10px; background: var(--subtle); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: #2a78d6; border-radius: 0 4px 4px 0; }
.bar-v { font-weight: 700; min-width: 64px; text-align: right; }
.bar-v small { font-weight: 400; color: var(--muted); }

/* Resources */
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.res { display: flex; flex-direction: column; gap: 3px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); background: var(--panel); }
.res:hover { border-color: var(--accent); }
.res small { color: var(--muted); }
.res.disabled { opacity: 0.6; cursor: not-allowed; }

/* ScanAI learning */
.learn-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--info); background: var(--info-bg); border-radius: 8px; padding: 2px 8px; max-width: 100%; white-space: normal; line-height: 1.3; }
.conf-row .row { flex-wrap: wrap; }
.learn-table td { vertical-align: top; }
.learn-trend { display: block; }
.learn-bar { display: block; height: 6px; width: 120px; background: var(--subtle); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.learn-bar span { display: block; height: 100%; background: #2a78d6; border-radius: 0 3px 3px 0; }
.learn-clues li { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; padding: 2px 0; }
.learn-clues li.off { opacity: 0.5; text-decoration: line-through; }

.pkg-tools { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.pkg-tools .btn { padding: 2px 8px; }

/* ScanAI review: page strip with split / join */
.page-strip { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 10px; margin-bottom: 10px; }
.page-strip-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.9rem; }
.page-strip-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; align-items: stretch; }
.page-strip-cell { display: flex; gap: 6px; align-items: stretch; flex: none; }
.page-thumb { position: relative; font: inherit; width: 92px; height: 120px; padding: 0; border: 2px solid var(--line); border-radius: 6px; background: var(--subtle); cursor: pointer; overflow: hidden; }
.page-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.page-thumb.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(21 32 58 / 20%); }
.page-thumb-n { position: absolute; bottom: 3px; right: 3px; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 800; border-radius: 4px; padding: 1px 5px; }
.page-thumb-ph { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--muted); font-size: 0.8rem; }
.page-cut { font: inherit; width: 54px; border: 2px dashed #c9a24a; border-radius: 8px; background: var(--warn-bg); color: #7a5800; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; }
.page-cut span { font-size: 1.2rem; }
.page-cut small { font-size: 0.6rem; font-weight: 700; line-height: 1.1; text-align: center; }
.page-cut:hover:not(:disabled) { background: var(--warn-bg); border-style: solid; }

/* Add-a-court / customer from a dropdown; + Phone */
.dir-add { margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle); display: flex; flex-direction: column; gap: 8px; }
.dir-add-row { display: flex; gap: 6px; flex-wrap: wrap; }
.dir-add-row input { flex: 1 1 200px; min-width: 0; }
.dir-similar { background: var(--warn-bg); border: 1px solid #e8cf8a; border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; display: flex; flex-direction: column; gap: 6px; }
.dir-similar li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.phone-add { margin-top: 4px; }
.phone-row { display: flex; gap: 4px; margin-top: 6px; }
.phone-row input { flex: 1; min-width: 0; }
.dir-add, .dir-similar { min-width: 0; max-width: 100%; box-sizing: border-box; }
.dir-add .row, .dir-similar .row, .dir-similar li { flex-wrap: wrap; }
.dir-add .btn, .dir-similar .btn { white-space: normal; text-align: left; }
.dir-similar li .grow { min-width: 0; flex: 1 1 140px; }
.bulk-bar .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
tr.sel td { background: var(--info-bg); }

/* Map lasso (Build a stack) */
.slippy.drawing { cursor: crosshair; touch-action: none; }
.lasso-trace { fill: rgb(224 161 0 / 15%); stroke: #c98a00; stroke-width: 3; stroke-dasharray: 6 4; stroke-linejoin: round; }
.lasso-shape { fill: rgb(42 120 214 / 12%); stroke: var(--info); stroke-width: 2; stroke-dasharray: 5 4; }

.stack-map { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.stack-map-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack-map-hint { margin: 0; padding: 6px 10px; background: var(--warn-bg); border: 1px solid #e8cf8a; border-radius: 8px; }

.portal-send { background: var(--amber); border-color: var(--amber); color: var(--heading); font-weight: 800; }
.send-files { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.send-form { margin-top: 10px; }

/* Agency transfers */
.link-box { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed #94a3b8; border-radius: 10px; background: var(--subtle); }
.link-box input { font-size: 12px; min-width: 0; }
.transfer-mini li { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.transfer-grid { align-items: start; }
.xfer-page { min-height: 100vh; background: var(--subtle); }
.xfer-top { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: #0f172a; color: #fff; }
.xfer-top .small { color: #cbd5e1; }
.xfer-main { max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.btn.big { font-size: 17px; padding: 12px 20px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; }
@media (max-width: 480px) { dl.kv { grid-template-columns: 1fr; gap: 0; } dl.kv dd { margin-bottom: 8px; } }
.rm-gps { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.rm-gps.bad { color: var(--bad); font-weight: 600; }
.arr-dl dd.warn { color: var(--warn); font-weight: 700; }
@media (max-width: 560px) { .fh-full { display: none; } }
.fm-gps { margin: 8px 12px; padding: 10px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--subtle); display: flex; flex-direction: column; gap: 8px; }
.fm-gps.on { border-color: #16a34a; background: var(--ok-bg); }
.fm-gps.error { border-color: #dc2626; background: var(--bad-bg); }
.fm-gps-l { display: flex; gap: 8px; align-items: flex-start; }
.fm-gps-l > span:last-child { display: flex; flex-direction: column; }
.fm-gps small { color: var(--muted); font-size: 12px; }

/* Import papers */
.imp-step1 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.imp-opts { margin-top: 12px; align-items: flex-end; }
.imp-opts .field { min-width: 220px; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 8px 20px; }
.imp-map-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr); gap: 8px; align-items: center; }
.imp-col { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 8px; background: var(--subtle); border-radius: 6px; }
.imp-map-row select.set { border-color: #16a34a; background: var(--ok-bg); }
.imp-table { max-height: 520px; overflow: auto; }
.imp-table tr.imp-bad td { background: var(--bad-bg); }
.imp-err { color: var(--bad); font-weight: 600; }
.imp-warn { color: var(--warn); }
@media (max-width: 700px) { .imp-step1 { grid-template-columns: 1fr; } }
.imp-opts label.check { display: inline-flex; gap: 6px; align-items: center; padding-bottom: 10px; }

/* Writs of ejectment */
.so-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.so-col { background: var(--subtle); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.so-col header { padding: 2px 4px 4px; }
.so-col.ready header strong { color: var(--warn); }
.so-col.scheduled header strong { color: #1d4ed8; }
.so-count { display: inline-block; min-width: 22px; text-align: center; border-radius: 999px; background: var(--panel); font-size: 12px; font-weight: 700; padding: 1px 6px; margin-left: 4px; }
.so-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.so-card.ready { border-left: 4px solid #d97706; }
.so-card.scheduled { border-left: 4px solid #2563eb; }
.so-card.alert { border-color: #dc2626; box-shadow: 0 0 0 2px #fecaca; }
.so-name { font-weight: 700; color: var(--heading); }
.so-actions { margin-top: 4px; }
.so-ask { color: var(--bad); font-style: italic; }
.so-empty { padding: 6px 4px; }
.so-line { display: flex; flex-direction: column; gap: 3px; }
.so-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.so-dow { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.so-day { min-height: 92px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 4px; display: flex; flex-direction: column; gap: 2px; align-items: stretch; text-align: left; cursor: pointer; font: inherit; }
.so-day.blank { background: transparent; border: none; cursor: default; }
.so-day.today { border-color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber); }
.so-day.sel { background: var(--info-bg); border-color: #2563eb; }
.so-dn { font-size: 12px; font-weight: 700; color: var(--muted); }
.so-chip { font-size: 11px; border-radius: 6px; padding: 2px 4px; background: var(--info-bg); color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-chip.completed { background: var(--ok-bg); color: #14532d; }
.so-chip.alert { background: var(--bad-bg); color: var(--bad); }
.so-month { min-width: 150px; text-align: center; }
.so-dayrow + .so-dayrow { margin-top: 8px; }
.modal.wide { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.so-deps { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; margin: 0; }
.so-deps legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.so-dep { display: flex; gap: 8px; align-items: center; padding: 4px 2px; }
.so-dep.off { color: var(--warn); }
.so-dep.busy { color: var(--bad); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.so-outcome { display: flex; }
.so-outcome button { flex: 1; }
.so-result.big .so-outcome button { padding: 14px; font-size: 16px; }
.so-result label.check { display: flex; gap: 8px; align-items: center; }
.so-mine li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.so-mine li.alert { background: var(--bad-bg); }
.so-when { background: #0f172a; color: #fff; border-radius: 14px; padding: 18px; }
.so-when .small { color: #cbd5e1; }
.so-when-big { font-size: 26px; font-weight: 800; margin: 4px 0; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } .so-day { min-height: 64px; } .so-chip { font-size: 10px; } }

/* Owner console & account pages */
.owner { min-height: 100vh; background: var(--subtle); }
.owner .topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: #0f172a; color: #fff; }
.muted-on-dark { color: #cbd5e1; }
.btn.ghost-on-dark { background: transparent; color: #fff; border-color: rgb(255 255 255 / 35%); }
.owner-main { max-width: 1200px; margin: 0 auto; padding: 18px 16px 48px; }
.small-h { font-size: 14px; margin: 6px 0 0; color: var(--heading); }
.email-body { white-space: pre-wrap; background: var(--subtle); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; margin: 0; }
.bad-text { color: var(--bad); }
.align-end { align-items: flex-end; }

/* Serve Mode layout & customize */
.rm-left { display: flex; flex-direction: column; }
.rm-left .rm-map { flex: 1 1 200px; min-height: 200px; }
.rm-tiles { display: flex; flex-direction: column; }
.rm-tiles > .rm-tile, .rm-tiles > .rm-group { flex: 1 1 auto; }
.rm-body.map-right { grid-template-columns: minmax(420px, 1.6fr) minmax(340px, 1.05fr) minmax(170px, 0.55fr); }
.rm-body.map-right > .rm-list { order: 1; }
.rm-body.map-right > .rm-left { order: 2; }
.rm-body.map-right > .rm-tiles { order: 3; }
.rm-body.no-tiles { grid-template-columns: minmax(340px, 1fr) minmax(420px, 1.7fr); }
.rm-body.no-tiles.map-right { grid-template-columns: minmax(420px, 1.7fr) minmax(340px, 1fr); }
/* Text size: everything but the map grows (the map keeps exact touch/drag positions). */
.rm.ts-large .rm-strip, .rm.ts-large .rm-list, .rm.ts-large .rm-tiles, .rm.ts-large .rm-alerts, .rm.ts-large .rm-bigbtns { zoom: 1.15; }
.rm.ts-xlarge .rm-strip, .rm.ts-xlarge .rm-list, .rm.ts-xlarge .rm-tiles, .rm.ts-xlarge .rm-alerts, .rm.ts-xlarge .rm-bigbtns { zoom: 1.3; }
html.ts-large .fpage, html.ts-large .home, html.ts-large .arr-wide { zoom: 1.15; }
html.ts-xlarge .fpage, html.ts-xlarge .home, html.ts-xlarge .arr-wide { zoom: 1.3; }
/* Night mode: the whole screen dark; photos and the map flipped back and dimmed for night driving. */
html.night { filter: invert(0.92) hue-rotate(180deg); background: #000; }
html.night img, html.night video, html.night canvas, html.night .slippy-tiles { filter: invert(1) hue-rotate(180deg) brightness(0.75); }
html.night .slippy-tiles img { filter: none; }
.cz h3 { margin: 6px 0; font-size: 15px; }
.cz-sec { border-top: 1px solid var(--line); padding-top: 8px; }
.cz-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; flex-wrap: wrap; }
.cz-row > span:first-child { min-width: 80px; font-weight: 600; }
.cz-seg { display: inline-flex; }
.cz-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cz-area-h { font-weight: 700; margin-bottom: 4px; }
.cz-item { display: flex; align-items: center; gap: 4px; padding: 3px 0; }
.cz-item.off { color: var(--muted); }
.cz-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cz-actions { border-top: 1px solid var(--line); padding-top: 10px; }
.ok-text { color: var(--ok); }
@media (max-width: 760px) { .cz-areas, .cz-cols { grid-template-columns: 1fr; } }
/* The header is already dark: keep it as is at night. */
html.night .fh { filter: invert(1) hue-rotate(180deg); }
html.night .fh img { filter: none; }

/* Fingerprint sign-in */
.or-line { display: flex; align-items: center; gap: 10px; }
.or-line::before, .or-line::after { content: ''; flex: 1; border-top: 1px solid var(--line, var(--line)); }
.pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pk-btn > span[aria-hidden] { font-size: 1.25em; }
.pk-list li { padding: 8px 0; border-bottom: 1px solid var(--line, #e4e7ec); gap: 10px; }
.pk-list li:last-child { border-bottom: 0; }

/* Authenticator setup QR */
.authkey { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.authkey-steps { align-self: stretch; margin: 0; padding-left: 20px; }
.authkey-qr { background: var(--panel); padding: 6px; border-radius: 8px; border: 1px solid var(--line, var(--line)); line-height: 0; }
.authkey details { align-self: stretch; }
.authkey summary { cursor: pointer; }

/* House numbers from the county's address points (zoomed in) */
.slippy-hn { position: absolute; inset: 0; pointer-events: none; }
.slippy-hn .hn { position: absolute; transform: translate(-50%, 3px); font: 600 11px/1 system-ui, sans-serif; color: var(--text); background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(29, 36, 51, 0.25); border-radius: 3px; padding: 1px 3px; white-space: nowrap; }
.map-attrib .map-warn { color: #b42318; font-weight: 600; }

/* ─── RMS: record editor (case header · section list · form · status rail) ── */
.rw { display: flex; flex-direction: column; gap: 12px; }
/* The case jacket: the one place brass shows on a record — its left edge marks the file you're in. */
.rec-head { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius); padding: 12px 18px 0; box-shadow: var(--shadow); }
.rec-head .crumb { font-size: 0.78rem; color: var(--muted); }
.rec-head .crumb .btn.link { color: var(--muted); font-size: 0.78rem; padding: 0; }
.rec-head .crumb .btn.link:hover { color: var(--accent); }
.rec-head .rec-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; font-size: inherit; font-weight: inherit; }
.rec-head .rec-title h1 { font-size: 1.36rem; font-weight: 600; letter-spacing: -0.01em; }
.rec-head .rec-title h1 .mono { font-weight: 700; color: var(--heading); }
.rec-sep { color: var(--faint); font-weight: 400; }
.rec-meta { display: flex; flex-wrap: wrap; gap: 6px 36px; margin: 12px -18px 0; padding: 10px 18px 11px; border-top: 1px solid var(--line-2); background: var(--head); border-radius: 0 0 var(--radius) var(--radius); }
.rec-meta div { min-width: 0; }
.rec-meta dt { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.rec-meta dd { margin: 1px 0 0; font-weight: 600; font-size: 0.92rem; color: var(--heading); }
.rec-grid { display: grid; grid-template-columns: 212px minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.rec-grid.two { grid-template-columns: 212px minmax(0, 1fr); }
.rec-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
/* Section list (left) */
.rw-steps.rec-secs { position: sticky; top: 58px; display: flex; flex-direction: column; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 0; box-shadow: var(--shadow); z-index: 2; }
.rw-steps button { display: flex; align-items: center; gap: 9px; width: 100%; font: inherit; font-size: 0.9rem; font-weight: 500; text-align: left; border: 0; border-left: 3px solid transparent; background: none; color: var(--text); padding: 8px 12px 8px 11px; cursor: pointer; white-space: nowrap; }
.rw-steps button:hover { background: var(--hover); }
.rw-steps button.on { background: var(--accent-bg); border-left-color: var(--accent); font-weight: 600; color: var(--heading); }
.rw-steps button .n { display: inline-grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 50%; font-size: 0.68rem; font-weight: 700; border: 1.5px solid var(--field-line); color: var(--muted); }
.rw-steps button.ok .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.rw-steps button.bad .n { background: var(--bad); border-color: var(--bad); color: #fff; }
.rw-steps button .l { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.rec-c { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.rw-cnt { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad-bg); color: var(--bad); font-size: 0.7rem; font-weight: 700; }
/* Status rail (right) */
.rec-rail { position: sticky; top: 58px; max-height: calc(100vh - 140px); overflow-y: auto; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rec-rail section { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.rec-rail section:last-child { border-bottom: 0; }
.rec-rail h4 { margin: 0 0 8px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.rec-prog { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.rec-prog i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; }
.rec-iss { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rec-iss li { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 0.82rem; line-height: 1.35; }
.rec-iss li:last-child { border-bottom: 0; }
.rec-iss li::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-top: 5px; }
.rec-iss li.warn::before { background: var(--gold); }
.rec-iss li span { flex: 1; }
.rec-iss .btn.link { font-size: 0.8rem; font-weight: 600; padding: 0; }
.rec-kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 0; font-size: 0.85rem; }
.rec-kv dt { color: var(--muted); }
.rec-kv dd { margin: 0; font-weight: 600; text-align: right; }
.rec-act { list-style: none; margin: 0; padding: 0 0 0 14px; display: flex; flex-direction: column; gap: 10px; font-size: 0.8rem; color: var(--muted); border-left: 2px solid var(--line-2); margin-left: 4px; }
.rec-act li { position: relative; display: flex; flex-direction: column; }
.rec-act li::before { content: ''; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--faint); }
.rec-act li.ev-approved::before { border-color: var(--ok); background: var(--ok); }
.rec-act li.ev-returned::before { border-color: var(--warn); background: var(--warn); }
.rec-act li.ev-submitted::before { border-color: var(--accent); }
.rec-act-a { color: var(--heading); font-weight: 600; font-size: 0.84rem; }
.rec-act-n { color: var(--warn); margin-top: 2px; }
.rw-review-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.rw-review-actions .btn.primary { min-width: 140px; }
.print-only { display: none !important; }
@media print { .print-only { display: block !important; } }
/* Footer bar */
.rw-nav { display: flex; gap: 8px; align-items: center; }
.rw-nav .spacer { flex: 1; }
.rec-foot { position: sticky; bottom: 0; z-index: 4; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; box-shadow: 0 -2px 10px rgb(16 24 40 / 6%); }
.rw-save { font-size: 0.82rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.rw-save.saved { color: var(--ok); }
.rw-save.conflict, .rw-save.error { color: var(--bad); font-weight: 600; }
.rw-body { border: 0; padding: 0; margin: 0; min-width: 0; }
.rw-body:disabled .rw-add, .rw-body:disabled .rw-search input, .rw-body:disabled .rw-card header .btn { display: none; }
/* Form sections */
.rw-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 120px; transition: box-shadow 0.3s; }
.rw-card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 -14px; padding: 8px 14px; background: var(--head); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; min-height: 40px; }
.rw-card > header h3 { margin: 0; font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rw-card > header h3 .muted.small { font-weight: 500; }
.rw-card > header .btn.ghost { color: var(--muted); font-weight: 500; }
.rw-card > header .btn.ghost:hover { color: var(--bad); background: var(--bad-bg); }
.rw-card.victim > header { box-shadow: inset 3px 0 0 var(--info); }
.rw-card.suspect > header { box-shadow: inset 3px 0 0 var(--muted); }
.rw-card.arrest > header { box-shadow: inset 3px 0 0 var(--bad); }
.rw-card.flash { box-shadow: 0 0 0 3px var(--gold); }
.rw-q { display: flex; flex-direction: column; gap: 5px; }
.rw-ql { font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.rw-ql .hint { font-weight: 400; color: var(--faint); }
/* Choices: compact toggle buttons; three or fewer join into one segmented control */
.rw-choices { display: flex; flex-wrap: wrap; gap: 4px; }
.rw-choices button { font: inherit; font-size: 0.86rem; padding: 4px 11px; min-height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--field-line); background: var(--field); color: var(--text); cursor: pointer; transition: background 0.1s, border-color 0.1s; }
.rw-choices button:hover:not(:disabled) { border-color: var(--accent); }
.rw-choices button.on, .rw-choices button[aria-checked='true'], .rw-choices button[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.rw-choices button.on-soft { background: var(--accent-bg); }
.rw-choices button:disabled { opacity: 0.45; cursor: default; }
.rw-choices:not(:has(> :nth-child(4))) { gap: 0; flex-wrap: nowrap; width: max-content; max-width: 100%; }
.rw-choices:not(:has(> :nth-child(4))) > button { border-radius: 0; margin-left: -1px; }
.rw-choices:not(:has(> :nth-child(4))) > button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.rw-choices:not(:has(> :nth-child(4))) > button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.rw-choices:not(:has(> :nth-child(4))) > button:only-child { border-radius: var(--radius-sm); }
.rw-choices:not(:has(> :nth-child(4))) > button.on, .rw-choices:not(:has(> :nth-child(4))) > button[aria-checked='true'] { position: relative; z-index: 1; }
.rw-choices.big button { min-width: 140px; min-height: 36px; font-weight: 600; }
/* Fields in rows */
.rw-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.rw-f { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.rw-row > .rw-f { flex: 1 1 150px; }
.rw-row > .rw-f.wide { flex: 2 1 280px; }
.rw-f > span, .rw-f > label > span { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.rw-f input, .rw-f select, .rw-f textarea { min-height: 32px; }
.rw-f label { display: flex; flex-direction: column; gap: 4px; }
.rw-unk { align-self: center; margin-top: 18px; }
.rw-name { position: relative; }
.rw-hits { position: absolute; top: 100%; left: 0; right: 0; z-index: 6; list-style: none; margin: 4px 0 0; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); max-height: 280px; overflow: auto; }
.rw-hits button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 7px 10px; border-radius: 4px; cursor: pointer; }
.rw-hits button:hover { background: var(--hover); }
/* Offense finder */
.rw-search { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.rw-big { font-size: 0.9rem; font-weight: 600; color: var(--heading); }
.rw-search > input { min-height: 38px; font-size: 0.98rem; border: 1.5px solid var(--accent); padding-left: 12px; }
.rw-found { list-style: none; margin: -6px 0 0; padding: 0; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); overflow: hidden; }
.rw-found li + li { border-top: 1px solid var(--line-2); }
.rw-found button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; font: inherit; font-size: 0.9rem; color: inherit; border: 0; background: var(--panel); padding: 7px 12px; cursor: pointer; }
.rw-found button { justify-content: flex-start; }
.rw-found button strong { font-weight: 500; }
.rw-fc { font-size: 0.78rem; font-weight: 600; color: var(--muted); width: 34px; flex: none; }
.rw-fn { margin-left: auto; text-align: right; }
.rw-official { font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.rw-found button:hover:not(:disabled), .rw-found li:first-child button:not(:disabled) { background: var(--accent-bg); }
.rw-found button:disabled { opacity: 0.5; }
.rw-search > .btn.link { align-self: flex-start; font-size: 0.85rem; }
.rw-browse { display: flex; flex-direction: column; gap: 12px; max-height: 420px; overflow: auto; padding-right: 4px; }
.rw-more { border-top: 1px dashed var(--line); padding-top: 8px; }
.rw-more summary { cursor: pointer; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.rw-more[open] { display: flex; flex-direction: column; gap: 10px; }
.rw-add { display: flex; flex-wrap: wrap; gap: 6px; }
.rw-arrest { border-top: 1px solid var(--line-2); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.rw-narr { width: 100%; min-height: 340px; line-height: 1.6; padding: 12px 14px; resize: vertical; font-size: 0.95rem; }
.rw-narr-view { white-space: pre-wrap; margin: 0; line-height: 1.55; }
.rw-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rw-issues li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 0.9rem; }
.rw-issues li:last-child { border-bottom: 0; }
.rw-issues li > span::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-right: 8px; vertical-align: 1px; }
.rw-issues.warn li > span::before { background: var(--gold); }
.rw-fix > header { box-shadow: inset 3px 0 0 var(--bad); }
.rw-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rw-summary .kv { margin: 0; }
.rw-reviewbox > header { box-shadow: inset 3px 0 0 var(--accent); }
.rw-actions .btn.big, .rw-reviewbox .btn.big { width: auto; min-width: 180px; min-height: 36px; font-size: 0.95rem; }
.rec-act-t { color: var(--muted); }
@media (max-width: 1240px) {
  .rec-grid { grid-template-columns: 200px minmax(0, 1fr); }
  .rec-rail { grid-column: 1 / -1; position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .rec-rail section { flex: 1 1 220px; border-bottom: 0; border-right: 1px solid var(--line-2); }
}
@media (max-width: 760px) {
  .rec-head { border-radius: 0; margin: -14px -14px 0; border-left: 0; border-right: 0; }
  .rec-meta { gap: 6px 18px; }
  .rec-grid, .rec-grid.two { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rw-steps.rec-secs { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 0; top: 52px; border-radius: var(--radius); }
  .rw-steps button { border-left: 0; border-bottom: 2px solid transparent; padding: 10px 10px; width: auto; }
  .rw-steps button.on { border-bottom-color: var(--accent); }
  .rw-steps button:not(.on) .l { display: none; }
  .rec-rail { display: none; }
  .rw-choices button { flex: 1 1 auto; min-height: 40px; }
  .rw-choices:not(:has(> :nth-child(4))) { width: 100%; }
  .rw-choices.big button { min-width: 0; flex: 1 1 45%; }
  .rec-foot { flex-wrap: wrap; }
  .rec-foot .btn.primary { flex: 1; min-height: 42px; }
}
@media print {
  .topbar, .sidenav, .rw-steps, .rw-nav, .rec-rail, .rw-actions, .rw-reviewbox, .rw-fix, .rec-head .btn, .rw-summary header .btn, .fh, .field-bottom { display: none !important; }
  .rec-grid { display: block; }
  .rw-card, .rec-head { box-shadow: none; }
}

/* ─── RMS: records list ─────────────────────────────────────────────── */
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rp-kpi { background: var(--panel); padding: 12px 18px; }
.rp-kpi .l { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.rp-kpi .n { font-size: 1.6rem; letter-spacing: -0.01em; font-weight: 600; color: var(--heading); line-height: 1.25; }
.rp-kpi .d { font-size: 0.75rem; color: var(--muted); }
.rp-kpi.hot .n { color: var(--bad); }
.filterbar .rp-search { min-width: min(100%, 380px); max-width: 520px; flex: 1; }
.rp-table { font-size: 0.875rem; }
.rp-table td { white-space: nowrap; vertical-align: middle; padding-top: 9px; padding-bottom: 9px; }
.rp-table td.wrap { white-space: normal; min-width: 200px; }
.rp-fixed { table-layout: fixed; }
.table td.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-table .rp-off { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.rp-table .rp-off .code-chip { flex: none; min-width: 30px; }
.rp-table .rp-off .rp-open { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-more { flex: none; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.rp-table .rp-note { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--warn); font-size: 0.8rem; margin-top: 1px; }
.rp-flags { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; overflow: hidden; }
@media (max-width: 1320px) { .rp-c-flags { display: none; } }
@media (max-width: 1120px) { .rp-c-off { display: none; } }
.rp-table .rp-open { padding: 0; color: inherit; font-weight: 500; text-align: left; justify-content: flex-start; display: block; max-width: 100%; min-height: 0; line-height: inherit; }
.rp-table td.wrap .rp-open { white-space: normal; }
.rp-table tr:hover .rp-open { color: var(--accent); }
.rp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-list button { width: 100%; display: flex; justify-content: space-between; gap: 12px; text-align: left; font: inherit; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.rp-list button:hover { border-color: var(--accent); }
.rp-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.rp-cards { display: flex; }
@media (max-width: 760px) {
  .rp-kpis { grid-template-columns: 1fr 1fr; }
  .rp-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .rp-list button { flex-direction: column; }
  .rp-side { flex-direction: row; align-items: center; }
}

/* ─── RMS: crime analytics ──────────────────────────────────────────── */
.ca { --ca-empty: var(--line-2); }
.ca-loading .ca-stats, .ca-loading .card { opacity: 0.55; transition: opacity 0.2s; }
.ca-filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ca-filters button { font: inherit; font-weight: 600; border: 1px solid var(--field-line); background: var(--panel); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.ca-filters button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.ca-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.ca-stat { background: var(--panel); padding: 10px 14px; }
.ca-n { font-size: 1.6rem; letter-spacing: -0.01em; font-weight: 600; color: var(--heading); line-height: 1.25; }
.ca-l { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.ca-sub { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.ca-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; }
.ca h2 { font-size: 0.95rem; margin: 0 0 10px; }
.ca-h3 { font-size: 0.95rem; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.ca-svg { width: 100%; height: auto; display: block; touch-action: none; }
.ca-grid { stroke: var(--line-2); stroke-width: 1; }
.ca-cross { stroke: var(--muted); stroke-width: 1; }
.ca-axis { font-size: 11px; fill: var(--muted); }
.ca-tip { position: fixed; z-index: 50; pointer-events: none; background: #1d2433; color: #fff; border-radius: 6px; padding: 6px 9px; font-size: 0.82rem; box-shadow: 0 6px 18px rgb(0 0 0 / 25%); }
.ca-tip span { color: #c7cdd8; }
.ca-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ca-bars li { display: grid; grid-template-columns: minmax(120px, 38%) 1fr 64px; align-items: center; gap: 8px; padding: 2px 0; cursor: default; }
.ca-bl { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-track { position: relative; height: 16px; }
.ca-bar { position: absolute; left: 0; top: 2px; bottom: 2px; background: #2a78d6; border-radius: 0 4px 4px 0; min-width: 2px; }
.ca-bars li:hover .ca-bar { background: #3987e5; }
.ca-prev { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text); opacity: 0.55; }
.ca-bv { font-size: 0.86rem; font-weight: 600; text-align: right; white-space: nowrap; }
.ca-delta { margin-left: 6px; font-size: 0.72rem; font-weight: 600; }
.ca-delta.up { color: var(--bad); }
.ca-delta.down { color: var(--ok); }
.ca-bar.alt { background: #7f95b3; }
.ca-bars li:hover .ca-bar.alt { background: #6a82a3; }
.ca-legend i + i { margin-left: 10px; }
.ca-legend { margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }
.ca-k-bar { display: inline-block; width: 14px; height: 10px; background: #2a78d6; border-radius: 0 3px 3px 0; }
.ca-k-prev { display: inline-block; width: 2px; height: 12px; background: var(--text); opacity: 0.55; }
.ca-heat { display: flex; flex-direction: column; gap: 2px; overflow-x: auto; }
.ca-heat-row { display: grid; grid-template-columns: 34px repeat(24, minmax(10px, 1fr)); gap: 2px; align-items: center; }
.ca-hh { font-size: 10px; color: var(--muted); text-align: left; white-space: nowrap; }
.ca-hd { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.ca-cell { height: 18px; border-radius: 3px; outline-offset: 1px; }
.ca-cell:hover, .ca-cell:focus { outline: 2px solid #1d2433; }
.ca-key { display: flex; align-items: center; gap: 3px; margin-top: 8px; font-size: 0.75rem; color: var(--muted); }
.ca-key i { width: 16px; height: 10px; border-radius: 2px; display: inline-block; }
@media (max-width: 640px) {
  .ca-two { grid-template-columns: 1fr; }
}
.rp-h { font-size: 1rem; margin: 6px 0 0; color: var(--muted); }
.rw-hgt { display: flex; gap: 6px; }
.rw-hgt input { width: 100%; min-width: 0; }
.rw-mug { display: flex; gap: 14px; align-items: center; }
.rw-mug img, .rw-mug-empty { width: 96px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--subtle); }
.rw-mug-empty { display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; }
.ar-row { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.ar-mug { width: 52px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex-shrink: 0; }
.ar-mug.empty { background: var(--subtle); }
.ar-mug.initials { display: flex; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent); font-weight: 600; font-size: 1rem; border-color: transparent; }
.ar-mug.sm { width: 34px; height: 34px; border-radius: 50%; }
.ar-mug.sm.initials { font-size: 0.78rem; }
.ar-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.table .two { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.table .two .sub { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .two .ell-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-table td { padding-top: 10px; padding-bottom: 10px; }
.ar-table td.ell { max-width: 340px; }
.rw-ev { padding: 8px 10px; background: var(--subtle); border-radius: 8px; }
.ev-scan { width: 260px; border: 1.5px solid var(--accent); }
.ev-chain { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 3px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.ev-chain li { position: relative; }
.ev-chain li::before { content: ''; position: absolute; left: -23px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.ev-labels { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px; background: #fff; }
.ev-label { width: 3.9in; border: 1px dashed #999; padding: 10px 12px; font-family: system-ui, sans-serif; break-inside: avoid; }
.ev-l-top { display: flex; justify-content: space-between; font-size: 0.85rem; }
.ev-bar svg { max-width: 100%; height: auto; }
.ev-l-desc { font-size: 0.9rem; font-weight: 600; margin-top: 4px; }
.ev-l-meta { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
@media print { .ev-label { border: 1px solid #000; } }

/* People & vehicles: record badges, reports on a profile, vehicle lookup */
.people-badges { margin-top: 4px; gap: 6px; }
.pr-list { display: flex; flex-direction: column; gap: 8px; }
.pr-list button { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; font: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.pr-list button:hover { border-color: var(--accent); }
.pr-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pr-photo { width: 52px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.pr-arrest { color: #8a1c1c; }
.veh-stolen { font-size: 1.05rem; }
.veh-stolen strong:first-child { letter-spacing: .06em; }
.veh-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.veh-list li:last-child { border-bottom: 0; }

/* ─── Public site hero: the pitch at left, the real product at right ─── */
.lp-hero2 { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr); gap: clamp(28px, 4vw, 56px); align-items: center; background: var(--chrome); background-image: radial-gradient(900px 500px at 85% 20%, #1b3156 0%, transparent 65%); padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(56px, 8vw, 110px); overflow: hidden; }
.lp-hero2 h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; max-width: 16ch; margin: 10px 0 18px; color: #fff; }
.lp-built { margin: 0; color: var(--brass); font-weight: 600; font-size: 0.98rem; }
.lp-hero2 .landing-lead { color: #c9d4e6; max-width: 54ch; line-height: 1.6; }
.lp-hero-shot { position: relative; padding-bottom: 40px; }
.lp-browser { border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgb(0 0 0 / 45%), 0 0 0 1px rgb(255 255 255 / 8%); transform: perspective(1800px) rotateY(-6deg); transform-origin: left center; }
.lp-browser-bar { height: 26px; background: #e7eaef; display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.lp-browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #c5cad3; }
.lp-browser img { display: block; width: 100%; height: auto; }
.lp-phone { position: absolute; right: -6px; bottom: 0; width: 27%; min-width: 120px; height: auto; border-radius: 22px; border: 6px solid #0a1424; box-shadow: 0 24px 60px rgb(0 0 0 / 55%); background: #0a1424; }
.lp-two { padding-top: clamp(40px, 5vw, 64px); }
.lp-two-h { margin-bottom: 18px; }
.lp-inside h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 6px; }
.lp-inside-lead { color: var(--muted); margin: 0 0 24px; }
.lp-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.lp-shot { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.lp-shot.wide { grid-column: 1 / -1; }
.lp-shot img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgb(15 24 38 / 12%); }
.lp-shot figcaption { color: var(--muted); line-height: 1.55; max-width: 70ch; }
.lp-shot figcaption strong { color: var(--heading); display: block; font-size: 1.05rem; margin-bottom: 2px; }
@media (max-width: 900px) {
  .lp-hero2 { grid-template-columns: 1fr; }
  .lp-browser { transform: none; }
  .lp-shots { grid-template-columns: 1fr; }
}

/* Quick jump (Ctrl+K) */
.qj-back { position: fixed; inset: 0; z-index: 80; background: rgb(8 14 24 / 45%); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.qj { width: min(640px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); overflow: hidden; }
.qj-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.qj-in input { border: 0; box-shadow: none !important; background: transparent; font-size: 1.05rem; padding: 4px 0; min-height: 0; color: var(--text); }
.qj kbd, .qj-foot kbd { font: 600 0.72rem var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--subtle); }
.qj-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.qj-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; color: var(--text); }
.qj-list li .ico { color: var(--faint); }
.qj-list li.on { background: var(--accent-bg); }
.qj-list li.on .ico { color: var(--accent); }
.qj-l { flex: 1; }
.qj-g { font-size: 0.8rem; color: var(--faint); }
.qj-none { color: var(--muted); cursor: default !important; }
.qj-foot { display: flex; gap: 18px; padding: 8px 14px; border-top: 1px solid var(--line-2); font-size: 0.78rem; color: var(--faint); background: var(--subtle); }

/* File pickers */
input[type='file'] { padding: 4px; }
input[type='file']::file-selector-button { font: inherit; font-weight: 600; font-size: 0.88rem; border: 1px solid var(--field-line); background: var(--panel); color: var(--text); border-radius: var(--radius-sm); padding: 4px 10px; margin-right: 10px; cursor: pointer; }
.filedrop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 18px; border: 1.5px dashed var(--field-line); border-radius: var(--radius); background: var(--subtle); text-align: center; cursor: pointer; transition: border-color 0.12s, background 0.12s; }
.filedrop:hover, .filedrop.over { border-color: var(--accent); background: var(--accent-bg); }
.filedrop.has { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.filedrop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.filedrop:focus-within { box-shadow: var(--focus); }
.fd-main { font-weight: 600; color: var(--heading); }
.fd-main u { color: var(--accent); text-decoration: underline; }
.fd-hint { font-size: 0.85rem; color: var(--muted); }
.card.flush .table th:first-child, .card.flush .table td:first-child { padding-left: 16px; }
.card.flush .table th:last-child, .card.flush .table td:last-child { padding-right: 16px; }

/* Deputy app, Records: a left column for starting work and getting around, the numbers and lists beside it. */
.field-main.wide:has(.rp-shell) { max-width: 1440px; }
.rp-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; }
.rp-rail { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 14px; }
.rp-rail-start { display: flex; flex-direction: column; gap: 8px; }
.rp-rail-new { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; cursor: pointer; padding: 14px 16px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(180deg, #24599d 0%, var(--accent) 100%); box-shadow: 0 1px 2px rgb(15 24 38 / 20%), inset 0 1px 0 rgb(255 255 255 / 12%); }
.rp-rail-new:hover { background: var(--accent-hover); }
.rp-rail-new:disabled { opacity: 0.6; cursor: default; }
.rp-rail-new strong { display: block; font-size: 1.02rem; font-weight: 600; }
.rp-rail-new small { display: block; font-size: 0.78rem; opacity: 0.8; }
.rp-rail-plus { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 16%); font-size: 1.4rem; font-weight: 400; line-height: 1; }
html[data-theme='dark'] .rp-rail-new { background: linear-gradient(180deg, #2c62a8 0%, #1e4e8c 100%); }
.rp-rail-sub { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; font: inherit; font-weight: 500; cursor: pointer; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.rp-rail-sub:hover { border-color: var(--accent); color: var(--accent); }
.rp-rail-sub .ico { color: var(--muted); }
.rp-rail-nav { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: var(--shadow); }
.rp-rail-h { font-size: 0.72rem; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; padding: 10px 10px 4px; }
.rp-rail-nav button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: 0.92rem; font-weight: 500; color: var(--text); background: none; border: 0; border-radius: 7px; padding: 9px 10px; cursor: pointer; position: relative; }
.rp-rail-nav button span:first-of-type { flex: 1; min-width: 0; }
.rp-rail-nav button .ico { color: var(--faint); flex: none; }
.rp-rail-nav button:hover:not(:disabled) { background: var(--hover); }
.rp-rail-nav button:hover:not(:disabled) .ico { color: var(--muted); }
.rp-rail-nav button.on { background: var(--accent-bg); color: var(--heading); font-weight: 600; }
.rp-rail-nav button.on::before { content: ''; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); }
.rp-rail-nav button.on .ico { color: var(--accent); }
.rp-rail-nav button:disabled { color: var(--faint); cursor: default; }
.rp-rail-n { font-size: 0.74rem; font-weight: 600; color: var(--muted); background: var(--line-2); border-radius: 9px; padding: 0 7px; line-height: 1.6; }
.rp-rail-n.hot { background: var(--warn-bg); color: var(--warn); }
.rp-rail-soon { font-size: 0.68rem; font-weight: 600; color: var(--faint); border: 1px solid var(--line); border-radius: 9px; padding: 0 6px; line-height: 1.5; }
.rp-kpi-btn { background: var(--panel); text-align: left; font: inherit; color: inherit; border: 0; cursor: pointer; }
.rp-kpi-btn:hover { background: var(--hover); }
.rp-kpi.hot.rp-kpi-btn .n { color: var(--warn); }
@media (max-width: 900px) {
  .rp-shell { display: block; }
  .rp-rail { position: static; margin-bottom: 12px; gap: 10px; }
  .rp-rail-start { flex-direction: row; }
  .rp-rail-start .rp-rail-new { flex: 1.4; padding: 11px 12px; }
  .rp-rail-start .rp-rail-sub { flex: 1; }
  .rp-rail-new small { display: none; }
  .rp-rail-nav { flex-direction: row; overflow-x: auto; padding: 4px; gap: 4px; scrollbar-width: none; }
  .rp-rail-nav button { width: auto; white-space: nowrap; flex: none; padding: 7px 10px; }
  .rp-rail-nav button.on::before { display: none; }
  .rp-rail-h, .rp-rail-nav button:disabled { display: none; }
}

/* Report writing: date + time boxes, name parts, "Unknown" checks */
.rw-when { display: flex; flex-direction: column; gap: 6px; }
.rw-when-l { font-weight: 600; font-size: 0.9rem; color: var(--heading); }
.rw-when-row { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.rw-when-row input[type='date'] { min-width: 170px; }
.rw-when-row input[type='time'] { min-width: 130px; }
.rw-now { min-height: 36px; }
.rw-between { align-self: flex-start; padding-left: 0; }
.rw-names { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 10px 12px; }
.rw-names .rw-f { min-width: 0; }
.rw-names .rw-f input { width: 100%; }
.rw-name { position: relative; }
.rw-name .rw-hits { left: 0; right: 0; }
@media (max-width: 640px) { .rw-names { grid-template-columns: 1fr 1fr; } }
.rw-phys { align-items: flex-start; }
.rw-phys > .rw-f > .rw-f { min-width: 0; }
.rw-unk { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--muted); cursor: pointer; margin-top: 2px; }
.rw-unk input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.rw-f input:disabled, .rw-f select:disabled { background: var(--subtle); color: var(--faint); }
.rw-place-q input { max-width: 460px; }
.rw-mode { margin-left: auto; }

/* One question at a time */
.qc-wrap { max-width: 760px; margin: 14px auto 0; display: flex; flex-direction: column; gap: 12px; }
.qc-top { display: flex; flex-direction: column; gap: 6px; }
.qc-prog { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.qc-prog i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.25s ease; }
.qc-count { display: flex; align-items: center; }
.qc { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgb(15 24 38 / 5%), 0 8px 24px rgb(15 24 38 / 6%); padding: 24px 26px 0; display: flex; flex-direction: column; gap: 10px; animation: qc-in 0.18s ease-out; }
@keyframes qc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qc { animation: none; } }
.qc-title { font-size: 1.45rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.qc-help { margin: -4px 0 4px; color: var(--muted); }
.qc-body { border: 0; padding: 0; margin: 0; min-width: 0; }
.qc-body .rw-card { box-shadow: none; }
.qc-foot { display: flex; align-items: center; gap: 10px; margin: 14px -26px 0; padding: 14px 26px; border-top: 1px solid var(--line-2); background: var(--head); border-radius: 0 0 12px 12px; position: sticky; bottom: 0; }
.qc-next { min-width: 120px; min-height: 40px; font-size: 1rem; }
.qc-skip { color: var(--muted); }
.qc-people { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qc-people li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.qc-skipped { border-left: 3px solid var(--warn); }
.qc-skipped ul { display: flex; flex-direction: column; gap: 4px; }
.qc-skipped .btn.link { padding: 0; text-align: left; }

@media (max-width: 640px) {
  .qc { padding: 18px 16px 0; border-radius: 10px; }
  .qc-foot { margin: 10px -16px 0; padding: 12px 16px; flex-wrap: wrap; }
  .qc-foot .rw-save { order: -1; flex-basis: 100%; font-size: 0.8rem; }
  .qc-title { font-size: 1.25rem; }
}

/* First report: pick how to write */
.qc-pick { max-width: 760px; margin: 14px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.qc-pick h2 { font-size: 1.3rem; }
.qc-pick > p { margin: 4px 0 16px; }
.qc-pick-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qc-pick-opts button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--field-line); border-radius: 10px; padding: 16px; cursor: pointer; }
.qc-pick-opts button:hover { border-color: var(--accent); box-shadow: var(--focus); }
.qc-pick-opts strong { font-size: 1.05rem; color: var(--heading); }
.qc-pick-opts span:not(.qc-pick-art) { color: var(--muted); font-size: 0.9rem; }
.qc-pick-art { width: 100%; height: 84px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--line-2); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; margin-bottom: 6px; }
.qc-pick-art i { display: block; width: 46%; height: 40px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 2px 6px rgb(15 24 38 / 8%); }
.qc-pick-art.form i { width: 70%; height: 14px; box-shadow: none; }
@media (max-width: 640px) { .qc-pick-opts { grid-template-columns: 1fr; } }
/* Phones: Back / Skip / Next pinned just above the deputy app's bottom bar. */
@media (max-width: 640px) {
  .qc-foot { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; z-index: 6; box-shadow: 0 -4px 14px rgb(15 24 38 / 10%); }
  .field-main .qc-foot { bottom: calc(49px + env(safe-area-inset-bottom)); }
  .qc { padding-bottom: 18px; }
  .qc-wrap { padding-bottom: 96px; }
}
@media (max-width: 640px) { .rw-cards .rec-meta { display: none; } }
.rec-act-n.plain { color: var(--muted); }
.rw-send { align-items: flex-end; }
.rw-send select { min-width: 240px; min-height: 36px; }

/* People & vehicles: detailed search boxes */
.ps-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.ps-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 0.86rem; font-weight: 500; color: var(--muted); }
.ps-f.wide { grid-column: span 2; }
.ps-f input, .ps-f select { font: inherit; font-size: 0.95rem; color: var(--text); font-weight: 400; min-height: 36px; padding: 6px 10px; border: 1px solid var(--field-line); border-radius: var(--radius-sm); background: var(--field); width: 100%; }
.ps-hgt { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ps-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line-2); }
.ps-quick .people-q { font-size: 0.92rem; }
@media (max-width: 720px) { .ps-grid { grid-template-columns: 1fr 1fr; } .ps-f.wide { grid-column: 1 / -1; } }

/* ═══ Agency pages: messages, directory, org chart, court, case files, fleet, permits ═══ */
.ops label:not(.check):not(.field):not(.btn) { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.ops label:not(.check):not(.btn) > :is(input, select, textarea), .ops label .pp, .ops label .row { font-size: 0.93rem; font-weight: 400; color: var(--text); }
.ops label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; cursor: pointer; }
.ops .grid-2, .ops .grid-3, .ops .grid-4 { display: grid; gap: 12px 14px; align-items: start; }
.ops .grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.ops .grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ops .grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ops .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .ops .span-2 { grid-column: auto; } }
.ops .stack-sm { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ops .card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ops .pre { white-space: pre-wrap; }
.ops ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ops dl.kv.cols { grid-template-columns: max-content 1fr max-content 1fr; margin-top: 12px; }
@media (max-width: 760px) { .ops dl.kv.cols { grid-template-columns: max-content 1fr; } }
.ops .row .spacer { min-width: 0; }
.ops .warn-text { color: var(--warn); }
.ops .w-call { max-width: 90px; }
.ops .w-miles { max-width: 120px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ops-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ops-kpi { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); border-top: 3px solid var(--line); font: inherit; color: var(--text); }
button.ops-kpi { cursor: pointer; }
button.ops-kpi:hover { background: var(--hover); }
.ops-kpi strong { font-size: 1.5rem; font-weight: 700; color: var(--heading); line-height: 1.1; }
.ops-kpi span { font-size: 0.82rem; color: var(--muted); }
.ops-kpi.ok { border-top-color: var(--ok); } .ops-kpi.warn { border-top-color: var(--warn); } .ops-kpi.bad { border-top-color: var(--bad); }
.ops-kpi.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* People picker */
.pp { position: relative; }
.pp-box { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 34px; padding: 3px 6px; background: var(--field); border: 1px solid var(--field-line); border-radius: var(--radius-sm); cursor: text; }
.pp-box:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.pp-box input { border: 0; box-shadow: none !important; padding: 3px 2px; min-height: 26px; flex: 1; min-width: 120px; background: transparent; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-bg); color: var(--accent); border-radius: 999px; padding: 1px 4px 1px 10px; font-size: 0.85rem; font-weight: 600; }
.pp-chip button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 50%; }
.pp-chip button:hover { background: rgb(0 0 0 / 8%); }
.pp-menu { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 3px); margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-pop); max-height: 280px; overflow: auto; }
.pp-menu li { display: flex; flex-direction: column; padding: 6px 9px; border-radius: 4px; cursor: pointer; }
.pp-menu li:hover { background: var(--hover); }

/* Topbar messages button */
.mail-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; color: var(--chrome-text); text-decoration: none; }
.mail-btn:hover { background: var(--chrome-2); color: #fff; }
.mail-btn.overdue { color: #f2b4ad; }
.mail-n { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brass); color: #10151d; font-size: 0.7rem; font-weight: 700; line-height: 17px; text-align: center; }
.mail-btn.overdue .mail-n { background: #e5574b; color: #fff; }
.mail-n.inline { position: static; display: inline-block; margin-left: 6px; vertical-align: 1px; }
.fh-burger { position: relative; }
.fh-dot { position: absolute; top: 4px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 2px var(--chrome); }
.fh-dot.bad { background: #e5574b; }

/* Messages */
.mail-list { overflow: hidden; }
.mail-row { display: grid; grid-template-columns: minmax(140px, 200px) 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); padding: 11px 16px; font: inherit; color: var(--text); cursor: pointer; }
.mail-row:last-child { border-bottom: 0; }
.mail-row:hover { background: var(--hover); }
.mail-row .mr-from, .mail-row .mr-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row .mr-subj strong { font-weight: 500; }
.mail-row.unread { background: var(--accent-bg); }
.mail-row.unread .mr-from, .mail-row.unread .mr-subj strong { font-weight: 700; color: var(--heading); }
.mail-row.esc { box-shadow: inset 4px 0 0 var(--bad); }
.mail-row .mr-meta { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
@media (max-width: 700px) {
  .mail-row { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .mail-row .mr-subj { grid-column: 1 / -1; grid-row: 2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.mail-msg header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.mail-msg.mine { border-left: 3px solid var(--accent); }
.mail-body { white-space: pre-wrap; line-height: 1.6; }
.mail-link { margin-top: 10px; }
.mail-status { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.mail-reply { display: flex; flex-direction: column; gap: 8px; }
.mail-compose .mc-row { display: flex; align-items: center; gap: 10px; }
.mail-compose .mc-row > :nth-child(2) { flex: 1; min-width: 0; }
.mail-compose .mc-k { width: 64px; flex: none; font-weight: 600; color: var(--muted); font-size: 0.85rem; }

/* Directory */
.dir-shifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.dir-now { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--chrome); color: var(--chrome-text); }
.dir-now strong { color: #fff; font-size: 1.15rem; }
.dir-now .muted { color: var(--chrome-dim); }
.dir-now.none strong { color: var(--chrome-dim); }
.dir-shift { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); font: inherit; color: var(--text); cursor: pointer; }
.dir-shift.on { border-left-color: var(--ok); }
.dir-shift.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dir-call { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--chrome); color: #fff; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em; }
.dir-table td { vertical-align: top; }
.dir-cards { display: flex; flex-direction: column; gap: 8px; }
.dir-card { display: flex; flex-direction: column; gap: 4px; }
.dir-card .row { gap: 6px; flex-wrap: wrap; }
.dir-phone { align-self: flex-start; }

/* Org chart */
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 22px; padding-left: 14px; border-left: 2px solid var(--line); }
.org-tree li { margin: 8px 0; }
.org-node { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; max-width: 760px; }
.org-node .row { gap: 8px; }
.org-node.k-shift { border-left-color: var(--brass); }
.org-node.k-unit { border-left-color: var(--muted); }
.org-people { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.org-people span { background: var(--subtle); border: 1px solid var(--line-2); border-radius: 999px; padding: 0 8px; font-size: 0.8rem; }
.org-edit { border-color: var(--accent); }
.org-rot { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.org-rot legend { font-weight: 600; font-size: 0.85rem; padding: 0 4px; }
.rot-prev { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; max-width: 640px; }
.rot-prev span { display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; color: var(--faint); padding: 3px 0; border-radius: 4px; background: var(--subtle); }
.rot-prev span b { font-size: 0.82rem; color: var(--muted); }
.rot-prev span.on { background: var(--ok-bg); color: var(--ok); }
.rot-prev span.on b { color: var(--ok); }

/* Court */
.court-day h3 { margin: 6px 0 6px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.court-row { display: grid; grid-template-columns: 92px 1fr minmax(160px, 260px) auto; gap: 14px; align-items: center; width: 100%; padding: 11px 16px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-2); font: inherit; color: var(--text); cursor: pointer; }
.court-row:last-child { border-bottom: 0; }
.court-row:hover { background: var(--hover); }
.court-row.s-cancelled { opacity: 0.6; }
.court-row.s-cancelled .cr-what strong { text-decoration: line-through; }
.cr-time { font-weight: 700; color: var(--heading); display: flex; flex-direction: column; }
.cr-what, .cr-people { display: flex; flex-direction: column; min-width: 0; }
.cr-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .court-row { grid-template-columns: 70px 1fr; } .cr-people, .cr-meta { grid-column: 2; justify-content: flex-start; } }
.court-form { border-color: var(--accent); }
.court-people li { padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.court-people li:last-child { border-bottom: 0; }
.disp-list { display: flex; flex-direction: column; gap: 10px; }
.disp { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.disp.open { border-color: var(--warn); background: var(--warn-bg); }
.disp-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.disp-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; margin-top: 6px; }
.disp-opt { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--field-line); border-radius: var(--radius-sm); background: var(--panel); font: inherit; color: var(--text); cursor: pointer; }
.disp-opt:hover { border-color: var(--accent); }
.disp-opt.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: inset 0 0 0 1px var(--accent); }
.disp-go { grid-column: 1 / -1; }
.disp-go input { flex: 1; }
.court-next { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; margin-bottom: 8px; padding: 9px 12px; border: 1px solid var(--line); border-left: 4px solid #6d4cc2; border-radius: var(--radius); background: var(--panel); font: inherit; color: var(--text); cursor: pointer; }
.cal-court { display: block; margin-top: 2px; padding: 0 4px; border-radius: 3px; background: #6d4cc2; color: #fff; font-size: 0.68rem; font-weight: 600; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-legend .k-court { background: #6d4cc2; }

/* Cases */
.case-list { display: flex; flex-direction: column; gap: 10px; }
.case-card { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.case-card:hover { border-color: var(--accent); }
.case-card .row { gap: 8px; flex-wrap: wrap; }
.stages { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.stages li { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 4px solid var(--line); font-size: 0.78rem; color: var(--faint); min-width: 0; }
.stages li.done { border-top-color: var(--ok); color: var(--muted); }
.stages li.cur { border-top-color: var(--accent); color: var(--heading); font-weight: 700; }
.stages li em { font-style: normal; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .stages li span { font-size: 0.68rem; } .stages li em { display: none; } }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding: 6px 0 10px; }
.timeline .tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 3px solid var(--accent); margin-top: 3px; z-index: 1; }
.timeline li.k-evidence .tl-dot { border-color: var(--brass); }
.timeline li.k-court .tl-dot { border-color: #6d4cc2; }
.timeline li.k-solicitor .tl-dot { border-color: var(--ok); }
.timeline li.k-outcome .tl-dot { border-color: var(--ok); background: var(--ok); }
.timeline li.k-investigation .tl-dot { border-color: var(--warn); }
.timeline li.future { opacity: 0.75; }
.timeline li.future .tl-dot { border-style: dashed; }
.timeline.compact li { padding: 3px 0 7px; }
.outcomes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.card.ask { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.file-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }

/* Fleet & gear */
.spare-list { display: flex; flex-direction: column; gap: 8px; }
.spare { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.gear { display: flex; flex-direction: column; }
.gear-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 2px; border-bottom: 1px solid var(--line-2); }
.gear-row.ok { box-shadow: inset 3px 0 0 var(--ok); padding-left: 10px; }
.gear-row.bad { box-shadow: inset 3px 0 0 var(--bad); padding-left: 10px; }
.gear-ans { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gear-ans input { min-width: 220px; }
.cert-sign { border-top: 1px solid var(--line); padding-top: 12px; }
.cert-sign input { max-width: 320px; }

/* Scrap permits */
.permit-list { display: flex; flex-direction: column; gap: 8px; }
.permit-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.permit-row:hover { border-color: var(--accent); }
.permit-thumb { width: 56px; height: 66px; object-fit: cover; border-radius: 4px; background: var(--subtle); border: 1px solid var(--line); }
.permit-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
@media (max-width: 560px) { .permit-row { grid-template-columns: 48px 1fr; } .permit-side { grid-column: 2; align-items: flex-start; } }
.img-pick { display: flex; flex-direction: column; gap: 4px; }
.img-pick .lbl { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.img-box { width: 180px; height: 200px; display: grid; place-items: center; padding: 8px; border: 2px dashed var(--field-line); border-radius: var(--radius); background: var(--subtle); cursor: pointer; font: inherit; color: var(--muted); }
.img-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.permit-decide { display: flex; flex-direction: column; gap: 10px; border-color: var(--accent); }
.permit-decide input { max-width: 420px; }
.permit-card { max-width: 560px; border: 2px solid var(--heading); border-radius: 10px; background: var(--panel); overflow: hidden; }
.pc-head { display: flex; flex-direction: column; padding: 8px 14px; background: var(--chrome); color: #fff; }
.pc-head span { font-size: 0.78rem; color: var(--chrome-text); }
.pc-body { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 14px; }
.pc-body dl.kv { margin: 0; gap: 2px 12px; font-size: 0.88rem; }
.pc-photo { width: 120px; height: 150px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); font-size: 0.8rem; background: var(--subtle); }
.pc-veh, .pc-foot { padding: 6px 14px; border-top: 1px solid var(--line-2); }
.pc-foot { color: var(--muted); }
.id-copy { max-width: 100%; border: 1px solid var(--line); border-radius: 4px; }
@media print {
  body:has(.permit-card) .office > :not(.office-body), body:has(.permit-card) .sidenav, body:has(.permit-card) .content > .ops > :not(.permit-card) { display: none !important; }
  body:has(.permit-card) .permit-card { border-color: #000; }
  body:has(.permit-card) .pc-head { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.disp-change { align-self: flex-start; }
@media (max-width: 560px) {
  .stages li span { white-space: nowrap; }
  .stages li:not(.cur) span { visibility: hidden; }
  .stages li.cur span { overflow: visible; }
}
.ops label .hint { font-weight: 400; }
.extra-row td { background: var(--subtle); }
.extra-box { display: flex; flex-direction: column; gap: 10px; padding: 6px 2px; }
.extra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.extra-grid label.check { display: inline-flex; gap: 6px; align-items: center; }
.cal-day { min-width: 0; }
.cal-court { max-width: 100%; }
.cal-court b { font-weight: 700; }
@media (max-width: 560px) { .cal-court .cc-role { display: none; } .cal-court { font-size: 0.62rem; padding: 0 2px; } }
.ops section.card > :not(.card-h) + :not(.card-h) { margin-top: 12px; }
.ops section.card > label.check { display: flex; }
.ops section.card > label.check + label.check { margin-top: 6px; }
.grant-q { display: flex; flex-direction: column; gap: 4px; }
.grant-q .lbl { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.grant-q .grant-no { max-width: 220px; }
.disposal-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.disposal-steps li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: var(--radius-sm); }
.disposal-steps li.done { border-top-color: var(--ok); }

/* Deputy app: the menu as a column on the left (laptops / tablets), hidden with ☰ */
.field-app.with-side { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-content: start; }
.field-app.with-side > * { grid-column: 2; }
.field-app.with-side > .fh { grid-column: 1 / -1; }
.field-app.with-side > .field-side { grid-column: 1; grid-row: 2 / span 30; }
.field-app.with-side .field-main { padding-bottom: 40px; }
.field-nav.with-side { display: none; }
.field-side { position: sticky; top: 52px; align-self: start; height: calc(100vh - 52px); overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding: 10px 8px 16px; background: var(--panel); border-right: 1px solid var(--line); }
.field-side button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; font: inherit; font-weight: 500; color: var(--text); text-align: left; cursor: pointer; }
.field-side button:hover { background: var(--hover); }
.field-side button.active { background: var(--accent-bg); color: var(--accent); font-weight: 650; box-shadow: inset 3px 0 0 var(--brass); }
.field-side button svg { flex: none; color: var(--muted); }
.field-side button.active svg { color: var(--accent); }
.field-side .fs-dot { width: 18px; flex: none; }
.field-side .mail-n.inline { margin-left: auto; }
.field-side .mail-n.bad { background: #e5574b; color: #fff; }
.field-side .fs-h { margin: 16px 6px 4px; padding: 0 4px 5px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); border-bottom: 1px solid var(--line); }
.field-side .fs-out { margin-top: auto; color: var(--muted); }
@media print { .field-side { display: none; } .field-app.with-side { display: block; } }

/* Case photos */
.case-pick { display: flex; flex-direction: column; gap: 6px; max-height: 460px; overflow: auto; }
.case-pick-row { display: grid; grid-template-columns: 130px 1fr; gap: 2px 12px; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); font: inherit; color: var(--text); cursor: pointer; }
.case-pick-row:hover { border-color: var(--accent); background: var(--hover); }
.case-pick-row .small { grid-column: 2; }
.confirm-case { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.big-case { font-size: 1.2rem; font-weight: 700; color: var(--heading); }
.drop { border: 2px dashed var(--field-line); border-radius: var(--radius); padding: 14px; min-height: 120px; display: grid; place-items: center; background: var(--subtle); cursor: pointer; }
.drop:has(.ph-grid) { display: block; cursor: default; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; width: 100%; }
.ph-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ph-card img { width: 100%; height: 170px; object-fit: cover; border-radius: 4px; background: var(--subtle); }
.ph-card.sending { opacity: 0.6; }
.ph-card.error { border-color: var(--bad); }
.ph-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tagp { display: flex; flex-direction: column; gap: 6px; }
.tagp-boxes { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.tagp-boxes label.check { font-size: 0.85rem !important; font-weight: 500 !important; color: var(--text) !important; }
.tagp .need { border-color: var(--warn); }
.bad-text { color: var(--bad); }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.folder { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font: inherit; color: var(--text); cursor: pointer; }
.folder:hover, .folder.on { border-color: var(--accent); }
.folder.on { box-shadow: inset 0 0 0 1px var(--accent); }
.folder-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; height: 64px; background: var(--brass-soft); border-radius: 4px; overflow: hidden; }
.folder-thumbs img { width: 100%; height: 64px; object-fit: cover; }
.folder-open { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.folder-open h3 { margin-bottom: 8px; }
.ph-view { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); }
.ph-view img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; }
.review-photos { border-color: var(--warn); }
.rw-photos { margin: 0 0 14px; }
.ev-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-photos img { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.folders { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.folder-thumbs img:only-child { grid-column: 1 / -1; }
.folder-thumbs img:first-child:nth-last-child(2) { grid-column: span 2; }

/* Warrants */
.w-search { max-width: 520px !important; font-size: 1rem; }
.w-list { display: flex; flex-direction: column; gap: 8px; }
.w-row { display: flex; justify-content: space-between; gap: 14px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; border-left: 4px solid var(--line); }
.w-row:hover { border-color: var(--accent); }
.w-row.s-active { border-left-color: var(--bad); }
.w-row.s-served { border-left-color: var(--ok); }
.w-main, .w-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.w-side { align-items: flex-end; text-align: right; flex: none; }
.w-name { font-size: 1.05rem; color: var(--heading); letter-spacing: 0.01em; }
.w-cautions { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.w-caution { background: var(--bad); color: #fff; border-radius: 4px; padding: 0 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
.w-banner { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.w-stages { grid-template-columns: repeat(5, 1fr); }
.charge-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) 70px minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.charge-row:not(:has(input:nth-of-type(4))) { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) 70px auto; }
.add-charge { align-self: flex-start; }
.caution-boxes { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 12px; }
.caution-boxes .lbl { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.wrap-seg { flex-wrap: wrap; }
@media (max-width: 560px) { .w-row { flex-direction: column; } .w-side { align-items: flex-start; text-align: left; } .charge-row, .charge-row:not(:has(input:nth-of-type(4))) { grid-template-columns: 1fr 1fr; } }

/* ─── BlueHQ (803systems.com) ─────────────────────────────────── */
.bhq-word { font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.bhq-word b { font-weight: 800; letter-spacing: 0.03em; }
.bhq-brand { flex-direction: row !important; align-items: center !important; gap: 10px !important; }
.bhq-brand svg { flex: none; }
.bhq-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.bhq-brand .bhq-word { font-size: 1.3rem; }
.bhq-hero { background-image: radial-gradient(900px 520px at 85% 25%, #1e3d78 0%, transparent 65%); }
.bhq-hero-board { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 14%); border-radius: 18px; padding: 20px; box-shadow: 0 24px 60px rgb(0 0 0 / 35%); max-width: 520px; justify-self: center; width: 100%; }
.bhq-board-head { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 1.05rem; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid rgb(255 255 255 / 12%); }
.bhq-board-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bhq-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 92px; padding: 12px 8px; border-radius: 12px; background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 10%); color: #e3eaf6; font-size: 0.85rem; font-weight: 600; line-height: 1.25; }
.bhq-tile .ico, .bhq-tile svg { color: var(--brass); }
.bhq-intro { color: var(--muted); max-width: 70ch; line-height: 1.6; margin: 0; }
.bhq-card { border-top-color: #2f5fb3; }
.bhq-card-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, #2f5fb3 14%, transparent); color: #2f5fb3; margin-bottom: 10px; }
.bhq-roles .landing-card { border-top-color: var(--brass); }
.bhq-note { color: var(--muted); margin: 20px 0 0; }
.bhq-final-lead { margin-top: 0 !important; }

@media (max-width: 820px) {
}
@media (max-width: 560px) {
  .bhq-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bhq-brand .landing-brand-by { display: none; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bhq-card-icon { color: #7ea6ee; } }
:root[data-theme="dark"] .bhq-card-icon { color: #7ea6ee; }

/* BlueHQ logo: chrome "Blue", blue "HQ", gold star in the Q */
.bhq-logo { display: inline-flex; align-items: baseline; font-weight: 900; font-size: clamp(3.2rem, 6.4vw, 5.4rem); line-height: 1; letter-spacing: -0.03em; transform: skewX(-10deg); filter: drop-shadow(0 6px 18px rgb(0 0 0 / 55%)); white-space: nowrap; }
.bhq-logo-blue { background: linear-gradient(180deg, #ffffff 0%, #e4e9f0 38%, #8d98a6 52%, #dfe5ec 70%, #a9b3bf 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / 25%); }
.bhq-logo-hq { background: linear-gradient(180deg, #8cc0ff 0%, #3d8bff 40%, #1f63e6 62%, #1747b8 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px rgb(140 192 255 / 45%); text-shadow: 0 0 28px rgb(61 139 255 / 35%); }
.bhq-logo-q { position: relative; display: inline-block; }
.bhq-logo-star { position: absolute; left: 50%; top: 52%; width: 0.4em; height: 0.4em; transform: translate(-50%, -50%) skewX(10deg); filter: drop-shadow(0 0 6px rgb(255 205 90 / 55%)); }

/* BlueHQ sign-in: night sky over the county, light-bar glow at the edges */
.bhq-auth .auth-side { border-right: 0; box-shadow: inset -1px 0 0 rgb(61 139 255 / 45%), 6px 0 30px rgb(21 87 214 / 25%); position: relative; overflow: hidden; color: #d9e3f2;
  background:
    radial-gradient(600px 340px at -8% 4%, rgb(40 110 255 / 42%), transparent 70%),
    radial-gradient(520px 300px at 108% 96%, rgb(40 110 255 / 30%), transparent 70%),
    radial-gradient(900px 260px at 50% 30%, rgb(255 140 60 / 14%), transparent 70%),
    linear-gradient(180deg, #0a1428 0%, #0b1832 45%, #08101f 100%); }
.bhq-auth .auth-side::before { content: ''; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none; opacity: 0.55;
  background-image: radial-gradient(circle, rgb(255 196 120 / 55%) 0 1px, transparent 1.6px), radial-gradient(circle, rgb(150 190 255 / 45%) 0 1px, transparent 1.6px);
  background-size: 37px 23px, 53px 31px; background-position: 0 0, 17px 9px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 55%, #000 100%); }
.bhq-pitch { position: relative; margin: auto 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.bhq-tagline { margin: 22px 0 0; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: #eef3fb; }
.bhq-rule { display: block; width: 72px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #3d8bff, #8cc0ff); margin: 16px 0; box-shadow: 0 0 12px rgb(61 139 255 / 70%); }
.bhq-pillars { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; row-gap: 6px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: #b9c7dc; }
.bhq-pillars li + li::before { content: ''; display: inline-block; width: 2px; height: 0.95em; background: #3d8bff; margin: 0 12px -0.12em; box-shadow: 0 0 6px rgb(61 139 255 / 80%); }
.bhq-serve { margin: 34px 0 0; font-size: 0.82rem; letter-spacing: 0.28em; text-transform: uppercase; color: #8fa6c8; }
.bhq-auth .auth-footer { position: relative; }
.bhq-auth .auth-footer .palmetto { color: #c9a24d; }
.bhq-auth .auth-card .btn.primary { background: linear-gradient(180deg, #2f7dff, #1557d6); border-color: #1557d6; }
.bhq-auth .auth-card .btn.primary:hover { background: linear-gradient(180deg, #3d8bff, #1a62e6); }
@media (max-width: 820px) {
  .bhq-auth .auth-side { border-bottom: 0; padding: 18px 20px 20px; box-shadow: inset 0 -1px 0 rgb(61 139 255 / 45%), 0 6px 24px rgb(21 87 214 / 25%); }
  .bhq-auth .auth-side::before { display: none; }
  .bhq-pitch { margin: 0; }
  .bhq-pitch::after { content: none; }
  .bhq-logo { font-size: 2.4rem; }
  .bhq-tagline { margin-top: 10px; font-size: 0.7rem; letter-spacing: 0.24em; }
  .bhq-rule, .bhq-pillars, .bhq-serve { display: none; }
}

/* ─── Deputy home (BlueHQ) ─────────────────────────────────────────── */
.dh-hello { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dh-hello h1 { margin: 0; }
.dh-h { font-size: 1.05rem; margin: 6px 0 10px; color: var(--heading); }
.dh-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.dh-q { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--heading); font-weight: 600; text-align: left; cursor: pointer; box-shadow: var(--shadow); min-height: 84px; }
.dh-q:hover { border-color: var(--accent); }
.dh-q svg { color: var(--accent); }
.dh-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.dh-g { padding: 0; overflow: hidden; border-left: 4px solid var(--line); }
.dh-g.bad { border-left-color: #c0392b; }
.dh-g.warn { border-left-color: var(--brass); }
.dh-g.info { border-left-color: #2f6fd6; }
.dh-g-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--heading); font-size: 0.98rem; }
.dh-n { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 800; font-size: 0.9rem; background: var(--hover); }
.dh-g.bad .dh-n { background: #c0392b; color: #fff; }
.dh-g.warn .dh-n { background: var(--brass); color: #1a1406; }
.dh-g.info .dh-n { background: #2f6fd6; color: #fff; }
.dh-more { margin-left: auto; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.dh-g ul { list-style: none; margin: 0; padding: 0 0 6px; border-top: 1px solid var(--line); }
.dh-g li button { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; padding: 8px 14px; background: none; border: 0; text-align: left; cursor: pointer; color: var(--text); }
.dh-g li button:hover { background: var(--hover); }
.dh-it { font-weight: 600; }
.dh-when { white-space: nowrap; }
.dh-clear { display: flex; align-items: center; gap: 12px; padding: 18px; }
.dh-clear svg { color: #2e8b57; }
.grid-2-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }

/* ─── Deputy menu: Messages stands out; section headings on the phone menu ─── */
.field-side button.fs-mail { font-size: 1.08rem; font-weight: 700; padding-top: 12px; padding-bottom: 12px; margin: 2px 0 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; }
.field-side button.fs-mail.active { background: var(--hover); }
.field-side button.fs-mail .mail-n { font-size: 0.85rem; min-width: 22px; height: 22px; }
.fm-h2 { padding: 12px 16px 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.fm-main button.fm-mail strong { font-size: 1.12rem; }
.fm-main button.fm-mail { padding-top: 14px; padding-bottom: 14px; }

/* ─── Look-ups ─── */
.rp-search.big { font-size: 1.1rem; padding: 12px 14px; max-width: 640px; }
.cp-row { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.cp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ev-list li:last-child { border-bottom: 0; }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.uc-row { display: flex; gap: 16px; align-items: center; text-align: left; cursor: pointer; width: 100%; color: var(--text); }
.uc-when { display: flex; flex-direction: column; min-width: 92px; padding-right: 14px; border-right: 1px solid var(--line); }
.oc-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.oc-row.big strong { font-size: 1.3rem; }
.oc-row.big { border-left: 4px solid #2f6fd6; }
.pn-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pn-row:last-child { border-bottom: 0; }
.pn-row a { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .cp-side, .ev-side { align-items: flex-start; text-align: left; } }

/* ─── Home: two columns, announcements, upcoming, messages ─── */
.dh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.dh-oncall { display: flex; flex-direction: column; align-items: flex-end; padding: 8px 14px; border: 1px solid var(--line); border-left: 4px solid #2f6fd6; border-radius: var(--radius); background: var(--panel); }
.dh-important { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, #c0392b 9%, var(--panel)); border: 1px solid color-mix(in srgb, #c0392b 45%, var(--line)); border-left: 5px solid #c0392b; }
.dh-important p { margin: 4px 0; }
.dh-imp-tag { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: #c0392b; color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }
.dh-imp-tag.sm { margin: 0 0 0 6px; font-size: 0.65rem; }
.dh-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .dh-cols { grid-template-columns: 1fr; } }
.dh-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dh-main .dh-groups { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.dh-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dh-card .dh-h { margin-top: 0; }
.dh-ev, .dh-msgs, .dh-ann { list-style: none; margin: 0; padding: 0; }
.dh-ev li button, .dh-msgs li button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); cursor: pointer; }
.dh-ev li:last-child button, .dh-msgs li:last-child button { border-bottom: 0; }
.dh-ev li button:disabled { cursor: default; }
.dh-ev li button svg { color: var(--accent); flex: none; }
.dh-ev-day { display: flex; flex-direction: column; min-width: 78px; font-size: 0.9rem; }
.dh-msgs li button { justify-content: space-between; align-items: baseline; }
.dh-msgs li:not(.unread) .dh-it { font-weight: 500; }
.dh-msgs li.unread .dh-it::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2f6fd6; margin-right: 6px; vertical-align: 1px; }
.dh-ann li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.dh-ann li:last-child { border-bottom: 0; }
.dh-ann p { margin: 4px 0; white-space: pre-wrap; }
.dh-post { padding: 10px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.dh-ann li > strong { display: inline; }
.dh-ann li > .small.muted { display: block; margin-top: 2px; }
.dh-ann li > .btn.link { padding: 0; margin-top: 2px; }
.dh-ev-day { min-width: 96px; white-space: nowrap; }

/* Demo agencies: the "View as" role switcher, pinned bottom-right. */
.demo-switch { position: fixed; left: 12px; bottom: 12px; z-index: 15; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 32px);
  background: #10233f; color: #fff; border-radius: 999px; padding: 6px 8px 6px 12px; box-shadow: 0 6px 24px rgba(0,0,0,.28); font-size: 14px; }
.demo-switch label { font-weight: 600; color: #fff; }
.demo-switch select { width: auto; min-height: 34px; padding: 4px 30px 4px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background-color: #fff; color: #10233f; border: none; }
.demo-switch .demo-tag { background: #d9a520; color: #10233f; font-weight: 800; font-size: 11px; letter-spacing: .08em; border-radius: 999px; padding: 2px 8px; }
.demo-switch .demo-busy { font-size: 13px; opacity: .85; }
.demo-switch .demo-err { font-size: 13px; color: #ffb4b4; flex-basis: 100%; padding: 0 4px 2px; }
body.demo-on .field-main { padding-bottom: 84px; }
body.demo-on .sidenav, body.demo-on .field-side { padding-bottom: 66px; }
@media (max-width: 700px) {
  .demo-switch { left: 50%; right: auto; transform: translateX(-50%); bottom: 10px; flex-wrap: nowrap; padding: 4px 6px 4px 10px; font-size: 13px; }
  .demo-switch label { display: none; }
  .demo-switch select { max-width: 62vw; }
}
@media print { .demo-switch { display: none; } }
body.demo-on .arr-ask { bottom: 64px; }

/* Home: "Today I want to…" */
.ask { display: flex; flex-direction: column; gap: 10px; }
.ask-label { font-size: 1.05rem; font-weight: 700; color: var(--heading); }
.ask-form { display: flex; flex-direction: column; gap: 6px; }
.ask-row { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 2px solid var(--accent); border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); }
.ask-row > svg { color: var(--accent); flex-shrink: 0; }
.ask-row input { flex: 1; border: none; box-shadow: none; background: transparent; font-size: 1.1rem; min-height: 44px; padding: 0 4px; min-width: 0; }
.ask-row input:focus { box-shadow: none; }
.ask-row .btn { border-radius: 10px; min-height: 44px; padding: 0 20px; font-size: 1rem; }
.ask-x { border: none; background: none; font-size: 1.5rem; line-height: 1; color: var(--faint); cursor: pointer; padding: 0 6px; }
.ask-ex { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-ex button { border: 1px solid var(--line); background: var(--panel); color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 0.88rem; cursor: pointer; }
.ask-ex button:hover { border-color: var(--accent); color: var(--accent); }
.ask-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; align-items: start; }
.ask-out > .btn.link { grid-column: 1 / -1; justify-self: start; }
.ask-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.ask-card.bad { border-color: var(--bad); border-left-width: 4px; }
.ask-h { display: flex; align-items: center; gap: 8px; color: var(--heading); font-size: 1.02rem; }
.ask-h svg { color: var(--accent); }
.ask-card.bad .ask-h svg { color: var(--bad); }
.ask-action { flex-direction: row; align-items: center; font: inherit; color: var(--heading); cursor: pointer; border-color: var(--accent); }
.ask-action svg { color: var(--accent); }
.ask-action strong { flex: 1; }
.ask-line { display: flex; flex-direction: column; gap: 3px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.ask-line:first-of-type { border-top: none; padding-top: 0; }
.ask-phone { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
.ask-tel { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.ask-sec { display: flex; flex-direction: column; gap: 4px; }
.ask-sub { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ask-sub.bad { color: var(--bad); }
.ask-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--subtle); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.ask-item:hover:not(:disabled) { border-color: var(--accent); }
.ask-item:disabled { cursor: default; }
@media (max-width: 700px) {
  .ask-row { padding-left: 10px; }
  .ask-row input { font-size: 1rem; }
  .ask-row .btn { padding: 0 14px; }
}

/* Training */
.tr-h { font-size: 1.05rem; margin: 6px 0 0; }
.tr-bad { color: var(--bad); }
.tr-cert { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 18px; }
.tr-ring { --pct: 0; width: 132px; height: 132px; border-radius: 50%; flex-shrink: 0; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--panel) 78%, transparent 79%), conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--line-2) 0); }
.tr-ring strong { font-size: 1.9rem; line-height: 1; color: var(--heading); }
.tr-ring span { font-size: 0.75rem; color: var(--muted); }
.tr-cert-info { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.tr-cert-info h2 { margin: 0; font-size: 1.25rem; }
.tr-cert-info p { margin: 0; }
.tr-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin: 0; }
.tr-facts dt { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.tr-facts dd { margin: 0; font-weight: 600; color: var(--heading); }
.tr-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tr-year { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.tr-year.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.tr-year.future { opacity: 0.75; }
.tr-year header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tr-year ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tr-item { display: grid; grid-template-columns: 22px 1fr; column-gap: 8px; align-items: center; }
.tr-item .small { grid-column: 2; }
.tr-dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; background: var(--line-2); color: var(--muted); grid-row: span 2; }
.tr-item.done .tr-dot, .tr-item.made_up .tr-dot { background: var(--ok-bg); color: var(--ok); }
.tr-item.due .tr-dot { background: var(--warn-bg); color: var(--warn); }
.tr-item.missed .tr-dot { background: var(--bad); color: #fff; }
.tr-item.missed .tr-item-name { color: var(--bad); font-weight: 600; }
.tr-item-name { font-weight: 500; }
.tr-bar { height: 12px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.tr-bar.sm { height: 7px; }
.tr-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.tr-classes { display: flex; flex-direction: column; gap: 10px; }
.tr-class { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; flex-wrap: wrap; }
.tr-class-when { width: 54px; flex-shrink: 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tr-class-when span { display: block; background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; padding: 2px 0; }
.tr-class-when strong { display: block; font-size: 1.35rem; padding: 2px 0 4px; color: var(--heading); }
.tr-class-body { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.tr-class-body p { margin: 4px 0 0; }
.tr-class-title { padding: 0; font-size: 1.02rem; font-weight: 700; text-align: left; }
.tr-class-act { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.tr-subs, .tr-roster, .tr-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tr-subs li, .tr-roster li, .tr-cats li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.tr-subs li:first-child, .tr-roster li:first-child, .tr-cats li:first-child { border-top: none; }
.tr-cats li > span { flex: 1; }
.tr-void td { color: var(--faint); text-decoration: line-through; }
.tr-void td .tr-bad { text-decoration: none; }
.mrn { background: #fff; color: #000; border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 14px; max-width: 960px; }
.mrn header { text-align: center; }
.mrn header h1 { color: #000; font-size: 1.2rem; margin: 2px 0; }
.mrn-top { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 20px; margin: 0; }
.mrn-top div { display: flex; gap: 8px; border-bottom: 1px solid #999; padding-bottom: 2px; }
.mrn-top dt { font-weight: 600; white-space: nowrap; }
.mrn-top dd { margin: 0; }
.mrn-year { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.mrn-year caption { text-align: left; font-weight: 700; padding: 4px 0; }
.mrn-year th, .mrn-year td { border: 1px solid #777; padding: 4px 6px; vertical-align: top; white-space: pre-line; color: #000; }
.mrn-year thead th { background: #eee; }
.mrn-year tbody th { text-align: left; width: 110px; background: #f6f6f6; }
@media print {
  .no-print, .demo-switch, .topbar, .sidenav, .field-bar, .field-side { display: none !important; }
  .mrn { border: none; padding: 0; max-width: none; }
}
@media (max-width: 700px) {
  .tr-ring { width: 104px; height: 104px; }
  .tr-ring strong { font-size: 1.5rem; }
  .mrn-top { grid-template-columns: 1fr; }
}

/* Critical notices, PIO, tips */
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.btn.danger-solid:hover { filter: brightness(1.08); }
.row .btn.big { width: auto; }
.dh-q.bad { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.dh-q.bad svg { color: var(--bad); }
.cn-to, .cn-updates, .pio-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cn-updates li, .pio-hist li { border-left: 3px solid var(--line); padding-left: 10px; }
.cn-person { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.cn-person.on { border-left: 4px solid var(--bad); }
.cn-person-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pio-text { white-space: pre-wrap; line-height: 1.6; }
.hook-link { display: flex; flex-direction: column; gap: 4px; background: var(--subtle); border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }
.hook-link code { word-break: break-all; font-size: 0.85rem; }
tr.tip-new td { font-weight: 600; }
.tip-snip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 460px; font-weight: 400; }
.tip-page .xfer-main { max-width: 680px; }
.tip-form h1, .tip-done h1 { font-size: 1.4rem; margin: 0; }
.tip-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tip-codes { display: flex; gap: 24px; flex-wrap: wrap; margin: 0; }
.tip-codes dt { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.tip-codes dd { margin: 0; font-family: ui-monospace, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.06em; color: var(--heading); }
.news-item h2 { margin: 2px 0 8px; font-size: 1.2rem; }
.news-body { white-space: pre-wrap; line-height: 1.6; }

/* Field intel & case workspace */
.fi-list { display: flex; flex-direction: column; gap: 10px; }
.fi-item { text-align: left; font: inherit; color: var(--text); cursor: pointer; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.fi-item:hover { border-color: var(--accent); }
.fi-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fi-what { white-space: pre-wrap; }
.fi-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fi-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--subtle); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; }
.fi-row { padding-bottom: 8px; border-bottom: 1px dashed var(--line-2); }
.fi-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fi-photos img { width: 160px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.cw-add { display: flex; flex-wrap: wrap; gap: 6px; }
.cw-add .btn { display: inline-flex; align-items: center; gap: 5px; }
.cw-form { background: var(--subtle); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; }
.cw-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cw-group h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.cw-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cw-group li { display: flex; justify-content: space-between; gap: 8px; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; background: var(--panel); }
.cw-thumb { display: block; max-width: 220px; max-height: 160px; border-radius: 6px; margin-top: 6px; }
.timeline li.k-workspace .tl-dot { background: #7c5cc4; }
/* Keep whatever the demo box would cover scrollable out from under it. */
html.demo-on { scroll-padding-bottom: 90px; }
body.demo-on .ops, body.demo-on .field-main { padding-bottom: 80px; }

/* Use of force, personnel, early warning */
.uof-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.uof-fs:disabled input, .uof-fs:disabled select, .uof-fs:disabled textarea { background: var(--subtle); color: var(--text); opacity: 1; }
.uof-force { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.uof-ft.bad { color: var(--bad); font-weight: 600; }
.ews-table th { font-size: 0.75rem; vertical-align: bottom; }
.ews-table td { text-align: center; }
.ews-table td:first-child { text-align: left; }
.ews-hit { background: var(--bad-bg); color: var(--bad); font-weight: 800; }
.ews-near { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.ews-alert { border: 1px solid var(--bad); border-left-width: 4px; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ews-alert ul { margin: 4px 0 0; padding-left: 18px; }
.ews-set label { flex-direction: row !important; align-items: center; gap: 6px !important; }
.ews-set input { width: 80px; }
.ews-table td:first-child, .ews-table th:first-child { min-width: 170px; }
.fq-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* HR */
.pay-fig { display: flex; flex-direction: column; gap: 6px; }
.pay-line { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line-2); padding-bottom: 4px; }
.pay-line.total { border-bottom: none; border-top: 2px solid var(--line); padding-top: 6px; font-size: 1.1rem; }
.pay-journey { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-journey > div { display: flex; flex-direction: column; }
.pay-journey strong { font-size: 1.35rem; color: var(--heading); }
.pay-arrow { font-size: 1.6rem; color: var(--muted); }
.pay-up { color: var(--ok); }
.pay-down { color: var(--bad); }
.pay-sups { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ev-grid { display: flex; flex-direction: column; gap: 8px; }
.ev-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(200px, 2fr); gap: 10px; align-items: center; }
.ev-scale { display: flex; gap: 4px; }
.ev-pt { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 700; color: var(--muted); }
.ev-pt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ev-pt.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ev-pt:focus-within { box-shadow: var(--focus); }
.insp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px 16px; }
.insp-item { display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; border-radius: 8px; }
.insp-item.bad { background: var(--bad-bg); }
@media (max-width: 700px) { .ev-row { grid-template-columns: 1fr; } }

/* Rules editor — plain forms */
.re .re-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.re .re-q { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.re .re-num { display: flex; flex-direction: column; gap: 4px; }
.re .re-num input[type='number'] { width: 90px; }
.re .re-h { margin: 10px 0 0; font-size: 0.95rem; border-top: 1px solid var(--line, #ddd); padding-top: 10px; }
.re .re-sub { margin-left: 14px; padding-left: 12px; border-left: 3px solid var(--line, #ddd); display: flex; flex-direction: column; gap: 6px; }
.re .re-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.re .re-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.re .re-types { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.re .re-type { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #ddd); border-radius: 8px; background: var(--panel, #fff); color: inherit; cursor: pointer; font: inherit; }
.re .re-type.on { border-color: var(--accent, #1d4ed8); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #1d4ed8) 25%, transparent); }
.re .re-type.off { opacity: 0.6; }
.re .re-checks { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 4px; }
.re .re-fees { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.re .re-fees input { width: 100px; }

/* Training roster */
.tr-rost-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.tr-rost-filters .rp-search { flex: 1 1 220px; }
.tr-rost tr.on td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tr-rost td:first-child, .tr-rost th:first-child { width: 36px; }
.tr-rost-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; z-index: 2; }
.tr-rost-filters select { width: auto; flex: 0 1 auto; }
.re .re-list li > input { width: auto; flex: 0 1 auto; }
.re .re-list li > input:not([type]) { flex: 1 1 200px; max-width: 320px; }
.re .re-num input[type='time'] { width: auto; max-width: 180px; }
.fq-avgs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fq-avg { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--subtle); }
.fq-avg strong { font-size: 1.4rem; }
.fq-rost input.fq-in { width: 78px; }
.fq-rost input.fq-in.sm { width: 56px; }
.fq-rost input.fq-in.wide { width: 130px; }

/* ═══ Printed incident report (letter, black and white) ═══════════════════ */
.irp-wrap { min-height: 100vh; background: #d9dcdf; padding: 0 0 40px; }
.irp-tools { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 14px; padding: 10px 20px; background: #fff; border-bottom: 1px solid #bbb; }
.irp-tools .small { flex: 1; }
.irp { width: 8.5in; max-width: 100%; margin: 24px auto 0; padding: 0.6in 0.55in; background: #fff; color: #000; font-family: 'Public Sans', Arial, sans-serif; font-size: 9.5pt; line-height: 1.35; box-shadow: 0 2px 12px rgb(0 0 0 / 25%); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.irp * { color: #000; }
.irp-head { display: grid; grid-template-columns: 0.95in 1fr 2.35in; gap: 14pt; align-items: center; padding-bottom: 10pt; border-bottom: 3pt double #000; }
.irp-seal svg { width: 0.95in; height: 0.95in; display: block; }
.irp-agency { text-align: center; font-size: 8.5pt; }
.irp-aname { font-size: 13pt; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.irp-agency h1 { margin: 8pt 0 0; font-size: 17pt; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #000; }
.irp-box { margin: 0; border: 1.5pt solid #000; }
.irp-box > div { display: flex; justify-content: space-between; gap: 8pt; padding: 3pt 6pt; border-top: 0.75pt solid #000; font-size: 8pt; }
.irp-box > div:first-child { border-top: 0; }
.irp-box dt { font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 7pt; align-self: center; }
.irp-box dd { margin: 0; font-weight: 700; text-align: right; }
.irp-box .big { flex-direction: column; gap: 1pt; background: #e8e8e8; }
.irp-box .big dd { font-size: 15pt; font-weight: 800; text-align: left; font-family: 'Courier New', monospace; letter-spacing: 0.02em; }
.irp-sec { margin-top: 12pt; }
.irp-sec.keep { break-inside: avoid; }
.irp-h { display: flex; align-items: center; gap: 6pt; margin: 0 0 4pt; padding: 3pt 6pt; background: #e2e2e2; border-top: 1.5pt solid #000; border-bottom: 0.75pt solid #000; font-size: 9pt; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #000; break-after: avoid; }
.irp-n { display: inline-flex; align-items: center; justify-content: center; min-width: 14pt; height: 14pt; padding: 0 3pt; background: #000; color: #fff !important; font-size: 8pt; }
.irp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-left: 0.75pt solid #000; border-top: 0.75pt solid #000; }
.irp-f { display: flex; flex-direction: column; min-height: 26pt; padding: 2pt 4pt 3pt; border-right: 0.75pt solid #000; border-bottom: 0.75pt solid #000; min-width: 0; }
.irp-l { font-size: 6.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.irp-v { font-size: 9pt; overflow-wrap: anywhere; }
.irp-person { margin-top: 6pt; break-inside: avoid; }
.irp-ptag { display: flex; align-items: center; gap: 6pt; padding: 2pt 0; font-weight: 800; font-size: 8.5pt; text-transform: uppercase; letter-spacing: 0.06em; }
.irp-ptag span { display: inline-block; min-width: 18pt; padding: 0 3pt; border: 1pt solid #000; text-align: center; font-family: 'Courier New', monospace; }
.irp-t { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.irp-t th { text-align: left; padding: 2pt 4pt; border: 0.75pt solid #000; background: #f0f0f0; font-size: 6.5pt; text-transform: uppercase; letter-spacing: 0.05em; }
.irp-t td { padding: 3pt 4pt; border: 0.75pt solid #000; vertical-align: top; }
.irp-t tr { break-inside: avoid; }
.irp-t .r { text-align: right; }
.irp-sub { font-size: 7.5pt; }
.irp-mono { font-family: 'Courier New', monospace; }
.irp-total { text-align: right; font-weight: 700; padding: 3pt 4pt; }
.irp-narr { padding: 6pt 8pt; border: 0.75pt solid #000; white-space: pre-wrap; font-size: 9.5pt; line-height: 1.5; orphans: 3; widows: 3; }
.irp-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 28pt; padding: 18pt 4pt 4pt; }
.irp-sigline { height: 22pt; border-bottom: 1pt solid #000; display: flex; align-items: flex-end; }
.irp-esig { font-size: 7.5pt; font-style: italic; padding-bottom: 2pt; }
.irp-signame { padding-top: 3pt; }
.irp-hist { list-style: none; margin: 0; padding: 0; font-size: 7.5pt; columns: 2; column-gap: 18pt; }
.irp-hist li { break-inside: avoid; padding: 1pt 0; }
.irp-hist .irp-when { display: inline-block; min-width: 1.45in; font-weight: 600; }
.irp-printed { margin: 14pt 0 0; font-size: 7pt; border-top: 0.75pt solid #000; padding-top: 4pt; }
@media print {
  .irp-wrap { background: #fff; padding: 0; min-height: 0; }
  .irp { width: auto; margin: 0; padding: 0; box-shadow: none; }
}
@media screen and (max-width: 820px) {
  .irp { padding: 0.3in 0.25in; }
  .irp-head { grid-template-columns: 1fr; text-align: center; }
  .irp-seal svg { margin: 0 auto; }
  .irp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .irp-f { grid-column: span 2 !important; }
}

/* ═══ BlueHQ look ("Blend"): navy chrome and side menu with badge gold for "you are here",
   a light, roomy work area, bold uppercase labels and big buttons. CivilHound keeps its own look. ═══ */
html[data-product='bluehq'] {
  --chrome: #1c2e4a; --chrome-2: #22375b; --chrome-line: #34496e; --chrome-text: #dce3ee; --chrome-dim: #9aa9c0;
  --brass: #c9a24d; --gold: var(--brass); --amber: var(--brass);
  --side-bg: #22375b; --side-text: #d3dbe8; --side-dim: #8fa1bd; --side-hover: #2a4268; --side-active: #30497a;
  --font-display: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
}
html[data-product='bluehq']:not([data-theme='dark']) {
  --bg: #f3f4f1; --hover: #eef1f5;
  --accent: #2a5089; --accent-hover: #1f3d6b; --accent-bg: #e8eef7; --navy: var(--accent); --navy-2: var(--accent-hover); --info: #2a5089; --info-bg: #e8eef7;
  --focus: 0 0 0 3px rgb(42 80 137 / 25%);
}
html[data-product='bluehq'][data-theme='dark'] { --side-bg: #0f1a2b; --side-hover: #172437; --side-active: #1d2f4b; }
html[data-product='bluehq'] .topbar { height: 52px; border-bottom-color: var(--chrome-line); }
html[data-product='bluehq'] .topbar .brand { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
html[data-product='bluehq'] .topbar .brand .brand-icon { width: 34px; height: 34px; }
html[data-product='bluehq'] .sidenav { top: 52px; height: calc(100vh - 52px); background: var(--side-bg); border-right-color: var(--chrome-line); }
html[data-product='bluehq'] .sidenav .sn-h { color: var(--side-dim); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; font-weight: 700; }
html[data-product='bluehq'] .sidenav a { color: var(--side-text); }
html[data-product='bluehq'] .sidenav a .ico { color: var(--side-dim); }
html[data-product='bluehq'] .sidenav a:hover { background: var(--side-hover); color: #fff; }
html[data-product='bluehq'] .sidenav a:hover .ico { color: var(--side-text); }
html[data-product='bluehq'] .sidenav a.active { background: var(--side-active); color: #fff; border-left-color: var(--brass); }
html[data-product='bluehq'] .sidenav a.active .ico { color: var(--brass); }
html[data-product='bluehq'] .sidenav .sn-n { background: var(--brass); color: #1c2e4a; }
html[data-product='bluehq'] .sidenav .sn-n.hot { background: #e5574b; color: #fff; }
html[data-product='bluehq'] .field-side { background: var(--side-bg); border-right-color: var(--chrome-line); }
html[data-product='bluehq'] .field-side button { color: var(--side-text); }
html[data-product='bluehq'] .field-side button svg { color: var(--side-dim); }
html[data-product='bluehq'] .field-side button:hover { background: var(--side-hover); color: #fff; }
html[data-product='bluehq'] .field-side button.active { background: var(--side-active); color: #fff; box-shadow: inset 4px 0 0 var(--brass); }
html[data-product='bluehq'] .field-side button.active svg { color: var(--brass); }
html[data-product='bluehq'] .field-side .fs-h { color: #f3d27a; letter-spacing: 0.1em; border-bottom-color: rgb(255 255 255 / 22%); text-shadow: 0 1px 1px rgb(0 0 0 / 35%); }
html[data-product='bluehq'] .field-side .fs-out { color: var(--side-dim); }
html[data-product='bluehq'] .field-side button.fs-mail { background: var(--side-hover); border-color: var(--chrome-line); color: #fff; }
html[data-product='bluehq'] .field-side button.fs-mail.active { background: var(--side-active); }
/* Home */
html[data-product='bluehq'] .dh-hello h1 { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: 0.01em; text-transform: uppercase; }
html[data-product='bluehq'] .ask-label { font-weight: 800; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
html[data-product='bluehq'] .ask-row { border-radius: 8px; padding: 7px 7px 7px 16px; box-shadow: 0 6px 20px rgb(11 20 36 / 8%); }
html[data-product='bluehq'] .ask-row input { font-size: 1.15rem; min-height: 46px; }
html[data-product='bluehq'] .ask-row .btn { border-radius: 6px; min-height: 46px; padding: 0 26px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
html[data-product='bluehq'] .dh-quick { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
html[data-product='bluehq'] .dh-q { min-height: 100px; justify-content: space-between; border: 2px solid var(--line); border-radius: 8px; font-weight: 800; font-size: 0.92rem; letter-spacing: 0.04em; text-transform: uppercase; box-shadow: none; }
html[data-product='bluehq'] .dh-q svg { width: 28px; height: 28px; }
html[data-product='bluehq'] .dh-q:hover { border-color: var(--accent); background: var(--accent-bg); }
html[data-product='bluehq']:not([data-theme='dark']) .dh-q.bad { background: #fbeae8; border-color: #e0a29c; color: #9e2a22; }
html[data-product='bluehq']:not([data-theme='dark']) .dh-q.bad svg { color: #b23a31; }
html[data-product='bluehq'] .dh-h { font-weight: 800; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 700px) {
  html[data-product='bluehq'] .dh-hello h1 { font-size: 1.55rem; }
  html[data-product='bluehq'] .dh-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-product='bluehq'] .dh-q { min-height: 84px; }
}
.fh-mark { flex: none; display: block; }
html[data-product='bluehq'] .fh-title { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.case-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.case-filters select { width: auto; }
/* Warrant requests: person in custody */
.wr-custody { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 8px; }
.wr-custody.on { border-color: var(--bad); background: var(--bad-bg); }
.wr-custody.on strong { color: var(--bad); }
.wr-custody-row td { background: var(--bad-bg); }
.wr-custody-row td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.wr-custody-tag { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 3px; background: var(--bad); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; font-family: var(--font); }
.wr-custody-banner { padding: 12px 16px; border-radius: 8px; background: var(--bad); color: #fff; }
.wr-custody-banner strong { letter-spacing: 0.06em; }
/* Narcan on the report */
.rw-card.narcan.on { border-color: #c0392b; box-shadow: inset 4px 0 0 #c0392b; }
.narcan-q { font-size: 1.02rem; }
.narcan-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn); }
.narcan-form p { margin: 0; }
/* Home: alerts for you, pass-on */
.dh-alerts { margin-bottom: 14px; }
.dh-alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dh-alert { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-left: 5px solid var(--brass); }
.dh-alert.k-narcan, .dh-alert.k-custody_warrant, .dh-alert.k-critical, .dh-alert.k-uof_serious { border-left-color: var(--bad); }
.dh-alert.k-juvenile { border-left-color: var(--accent); }
.dh-alert-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; }
.dh-alert-kind { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dh-alert-act { display: flex; gap: 6px; align-items: center; }
.dh-passon { margin-top: 18px; }
.dh-passon select { width: auto; }
.passon-add { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin-bottom: 8px; }
.passon-add input:first-child { flex: 2 1 260px; }
.passon-add input:nth-child(2) { flex: 1 1 140px; }
.passon-list { list-style: none; margin: 0; padding: 0; }
.passon-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line); }
.passon-list li:first-child { border-top: 0; }
.rw-card.passon-on { border-color: var(--brass); box-shadow: inset 4px 0 0 var(--brass); }
.rw-card.passon-on p { margin: 0; }
/* Report printing: redaction */
.irp-red { display: inline-block; background: #000; color: #000; line-height: 1.1; padding: 0 1px; letter-spacing: -0.5px; font-family: 'Courier New', monospace; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.irp .irp-red { color: #000; }
.irp .irp-red.lbl { color: #fff !important; font-weight: 800; font-size: 8pt; letter-spacing: 0.08em; padding: 1pt 5pt; }
.irp-redtag { margin-left: 6pt; font-style: normal; font-size: 7pt; font-weight: 700; border: 1pt solid #000; padding: 0 4pt; text-transform: none; letter-spacing: 0; }
.irp-redpick { margin-left: auto; font-size: 8pt; font-weight: 600; text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; }
.irp-redcopy dd { font-weight: 900 !important; letter-spacing: 0.1em; }
.irp.editing .irp-narr { cursor: text; }
.irp-tk { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; border-radius: 2px; }
.irp-tk:hover { background: #ffe58a; }
.irp-tk.irp-red { background: #000; color: #000; }
.irp-ask { max-width: 640px; margin: 48px auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.irp-ask h1 { font-size: 1.3rem; }
.irp-ask fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.irp-ask legend { font-weight: 700; padding: 0 4px; }
.irp-pio { max-width: 8.5in; margin: 12px auto 0; padding: 12px 16px; background: #fff7d6; border: 1px solid #d9ae52; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }
.irp-pio input { width: auto; min-width: 260px; }
@media print { .irp-ask { display: none; } }

/* ═══ Schools and lockdown drills ════════════════════════════════════════ */
.ops .grid-5 { display: grid; gap: 10px 12px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.sch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.sch-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; cursor: pointer; border: 1px solid var(--line); font: inherit; color: inherit; }
.sch-card:hover { border-color: var(--accent); }
.sch-card.mine { border-left: 4px solid var(--brass, var(--accent)); }
.sch-name { font-size: 1.05rem; }
.sch-last { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; font-size: 0.9rem; }
.ld-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
@media (max-width: 760px) { .ld-top { grid-template-columns: 1fr; } }
.ld-watch { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ld-time { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: 0.02em; }
.ld-type { width: 72px; }
.ld-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.ld-room { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; border-left: 4px solid var(--line); }
.ld-room h3 { margin: 0; font-size: 1.05rem; }
.ld-room.done { border-left-color: var(--ok, #2e7d4f); }
.ld-room.miss { border-left-color: var(--bad, #b3261e); }
.ld-check { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); }
.ld-check > span { min-width: 0; }
.ld-yn { display: inline-flex; flex-shrink: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ld-yn button { min-width: 58px; min-height: 40px; border: 0; background: var(--card, #fff); font: inherit; font-weight: 700; cursor: pointer; color: inherit; }
.ld-yn button + button { border-left: 1px solid var(--line); }
.ld-yn button.on.yes { background: #2e7d4f; color: #fff; }
.ld-yn button.on.no { background: #b3261e; color: #fff; }
.ld-yn button:disabled { cursor: default; }
.ld-note { width: 100%; }

/* ═══ Case forms on the screen ═══════════════════════════════════════════ */
.fm-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; padding: 10px 12px; }
.fm-sign { display: flex; flex-direction: column; gap: 6px; }
.fm-canvas { width: 100%; border: 1px solid #c9cfd9; border-radius: 8px; background: #fff; touch-action: none; display: block; }
.fm-sign.small .fm-canvas { max-width: 220px; height: 80px; }
.fm-sigimg { background: #fff; border: 1px solid var(--line); border-radius: 6px; object-fit: contain; }
.fm-rights { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.fm-rights li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
@media (max-width: 640px) { .fm-rights li { grid-template-columns: 1fr; } }
.fm-waiver { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.fm-waiver h4 { margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.fm-quote { font-style: italic; padding: 8px 12px; border-left: 3px solid var(--line); }
.tk-types { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.tw-yn { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 8px; }
.tw-dmg { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.dmg { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.dmg text { fill: #000; font-family: Arial, sans-serif; }
.dmg-spot { cursor: pointer; }
.dmg-spot:focus { outline: none; }
.dmg-spot:focus rect { stroke-width: 3; }

/* ═══ Printed paper forms (letter, black and white) ══════════════════════ */
.pf { width: 8.5in; max-width: 100%; margin: 24px auto 0; padding: 0.5in 0.5in; background: #fff; color: #000; font-family: Arial, Helvetica, sans-serif; font-size: 9.5pt; line-height: 1.3; box-shadow: 0 2px 12px rgb(0 0 0 / 25%); position: relative; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pf * { color: #000; }
.pf .mono, .pf-v.mono { font-family: 'Courier New', monospace; }
.pf-head { display: grid; grid-template-columns: 1fr auto; gap: 14pt; align-items: center; padding-bottom: 8pt; margin-bottom: 8pt; border-bottom: 2pt solid #000; }
.pf-ag { display: flex; gap: 10pt; align-items: center; font-size: 9pt; }
.pf-agname { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 13pt; }
.pf-title { text-align: right; }
.pf-title h1 { margin: 0; font-size: 14pt; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.pf-sub { font-size: 8pt; margin-top: 2pt; }
.pf-headbox { margin-top: 6pt; min-width: 2.6in; }
.pf-grid { display: grid; border-left: 0.75pt solid #000; border-top: 0.75pt solid #000; margin-bottom: 6pt; }
.pf-grid.c1 { grid-template-columns: 1fr; }
.pf-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pf-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pf-grid.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pf-grid.c8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.pf-box { display: flex; flex-direction: column; min-height: 24pt; padding: 1.5pt 4pt 2pt; border-right: 0.75pt solid #000; border-bottom: 0.75pt solid #000; min-width: 0; }
.pf-box.tall { min-height: 70pt; }
.pf-box.grow { flex: 1; border: 0.75pt solid #000; }
.pf-l { font-size: 6.5pt; text-transform: uppercase; letter-spacing: 0.03em; }
.pf-v { font-size: 9.5pt; overflow-wrap: anywhere; }
.pf-v.big { font-size: 14pt; font-weight: 800; }
.pf-pre { white-space: pre-wrap; }
.pf-check { display: inline-flex; align-items: center; gap: 3pt; margin-right: 8pt; white-space: nowrap; font-size: 8.5pt; }
.pf-cb { display: inline-flex; align-items: center; justify-content: center; width: 8.5pt; height: 8.5pt; border: 0.9pt solid #000; font-size: 7pt; font-weight: 800; line-height: 1; margin-right: 2pt; vertical-align: -1pt; }
.pf-cb.big { width: 22pt; height: 22pt; font-size: 16pt; }
.pf-line { display: flex; flex-direction: column; min-width: 0; }
.pf-ink { height: 34pt; border-bottom: 1pt solid #000; display: flex; align-items: flex-end; }
.pf-ink img { max-height: 34pt; max-width: 100%; object-fit: contain; }
.pf-esig { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 12pt; }
.pf-cap { display: flex; justify-content: space-between; gap: 8pt; font-size: 8pt; padding-top: 2pt; text-transform: uppercase; }
.pf-foot { margin: 12pt 0 0; font-size: 7pt; border-top: 0.75pt solid #000; padding-top: 3pt; }
.pf-stamp { position: absolute; top: 0.18in; right: 0.5in; border: 2pt solid #000; padding: 2pt 8pt; font-weight: 800; letter-spacing: 0.08em; font-size: 9pt; }
.pf-keep { break-inside: avoid; margin-top: 10pt; }
.pf-ld { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8pt; }
.pf-ld th, .pf-ld td { border: 0.75pt solid #000; padding: 3pt 3pt; text-align: left; white-space: nowrap; overflow: hidden; }
.pf-ld thead th { background: #c8c8c8; font-size: 9pt; }
.pf-ld tbody th { width: 0.95in; font-weight: 400; font-size: 9pt; }
.pf-ld td.no { background: #e6e6e6; font-weight: 700; }
.pf-notes { display: grid; grid-template-columns: auto 1fr; gap: 6pt; padding: 4pt 0 0; min-height: 30pt; border-bottom: 0.75pt solid #000; }
.pf-center { text-align: center; margin-bottom: 10pt; }
.pf-h1 { margin: 2pt 0; font-family: Georgia, 'Times New Roman', serif; font-size: 16pt; font-weight: 700; text-transform: uppercase; }
.pf-h1.it { font-family: Arial, sans-serif; font-style: italic; font-weight: 800; font-size: 14pt; }
.pf-h2 { margin: 10pt 0 4pt; text-align: center; font-size: 11pt; font-weight: 800; text-transform: uppercase; }
.pf-read { font-family: Georgia, serif; font-weight: 700; text-align: left; font-size: 10pt; margin: 6pt 0 0 0.6in; }
.pf-agline { border-bottom: 1pt solid #000; display: inline-block; min-width: 3.4in; font-weight: 700; padding: 0 8pt 1pt; }
.pf-small { font-size: 8pt; }
.pf-fill { font-family: Georgia, 'Times New Roman', serif; font-size: 11pt; display: flex; flex-direction: column; gap: 8pt; margin: 8pt 0.4in 12pt; }
.pf-fill u, .pf-promise u, .pf-boat u { text-decoration: none; border-bottom: 0.9pt solid #000; padding: 0 6pt; display: inline-block; min-width: 1.6in; }
.pf-two { display: flex; justify-content: space-between; gap: 18pt; }
.pf-rights { list-style: none; margin: 0 0.3in; padding-left: 0; font-family: Georgia, serif; font-size: 10.5pt; display: flex; flex-direction: column; gap: 10pt; }
.pf-rights li { display: grid; grid-template-columns: 1fr 1.25in; gap: 12pt; align-items: end; }
.pf-init { border-bottom: 1pt solid #000; height: 26pt; display: flex; align-items: flex-end; justify-content: center; }
.pf-init img { max-height: 26pt; max-width: 100%; }
.pf-waiver { margin: 0 0.4in; font-family: Georgia, serif; font-size: 10.5pt; line-height: 1.35; }
.pf-outcome { margin: 8pt 0.4in 0; border: 1pt solid #000; padding: 4pt 6pt; }
.pf-sigs { display: flex; flex-direction: column; gap: 14pt; margin: 18pt 0.4in 0; }
.pf-promise { font-family: Georgia, serif; font-weight: 700; font-size: 12pt; line-height: 1.5; margin: 16pt 0.4in; }
.pf-blank { min-width: 2.8in !important; }
.pf-charges { margin: 18pt 0.4in 0; font-family: Georgia, serif; font-size: 12pt; }
.pf-rule { border-bottom: 0.9pt solid #000; min-height: 22pt; display: flex; align-items: flex-end; padding: 0 4pt 1pt; font-size: 11pt; }
.pf-row { display: flex; gap: 12pt; margin-bottom: 6pt; }
.pf-row.between { justify-content: space-between; align-items: flex-end; }
.pf-cells { display: inline-flex; border-left: 1pt solid #000; }
.pf-cells span { width: 16pt; height: 18pt; border: 1pt solid #000; border-left: 0; display: inline-flex; align-items: center; justify-content: center; font-family: 'Courier New', monospace; font-weight: 700; }
.pf-ncic-p { display: grid; grid-template-columns: 1.15in 1fr; border: 1pt solid #000; }
.pf-ncic-p > .pf-grid { margin: 0; border-top: 0; }
.pf-ncic-p.wide { grid-template-columns: 2.25in 1fr; }
.pf-h2.u { text-decoration: underline; }
.pf-kinds { display: flex; flex-direction: column; gap: 3pt; padding: 4pt; border-right: 1pt solid #000; }
.pf-kinds.two { flex-direction: row; gap: 6pt; }
.pf-kinds.two > div { display: flex; flex-direction: column; gap: 2pt; font-size: 8pt; }
.pf-kinds .pf-check { font-size: 8pt; margin: 0; white-space: normal; align-items: flex-start; }
.pf-boat { display: flex; flex-wrap: wrap; gap: 4pt 12pt; align-items: baseline; margin: 8pt 0; font-size: 8pt; }
.pf-boat u { min-width: 0.7in; }
.pf-remarks { border: 1pt solid #000; min-height: 80pt; padding: 3pt 5pt; margin-bottom: 8pt; white-space: pre-wrap; }
.pf-sigrow { margin-top: 6pt; }
.pf-tow-top { display: flex; gap: 10pt; align-items: stretch; margin-bottom: 6pt; }
.pf-hold { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 7pt; gap: 2pt; padding: 0 4pt; }
.pf-hold.on .pf-cb { background: #000; color: #fff !important; }
.pf-checks { display: flex; flex-direction: column; justify-content: center; gap: 3pt; }
.pf-sideblock { display: grid; grid-template-columns: 14pt 1fr; margin-bottom: 6pt; }
.pf-sideblock > .pf-grid, .pf-sideblock > .pf-prop { margin: 0; }
.pf-vlabel { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 7.5pt; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; border: 0.75pt solid #000; border-right: 0; }
.pf-prop { display: grid; grid-template-columns: 1fr 1.9in; border-right: 0.75pt solid #000; }
.pf-prop > .pf-grid { margin: 0; }
.pf-dmgcol { display: flex; flex-direction: column; align-items: center; gap: 4pt; padding: 4pt; border-top: 0.75pt solid #000; border-bottom: 0.75pt solid #000; }
.pf-dmgcol .dmg { border: 0; border-radius: 0; }
.pf-kv3 { display: grid; grid-template-columns: auto auto auto; gap: 1pt 4pt; font-size: 7.5pt; align-items: center; }
.pf-pickup { text-align: center; font-weight: 800; font-size: 10pt; margin: 6pt 0; }
.pf-cert { font-size: 8pt; text-transform: uppercase; margin: 10pt 0 6pt; }
.pf-sigrow4 { display: grid; grid-template-columns: 2fr 0.8fr 0.8fr 1.6fr 0.8fr; gap: 0 8pt; align-items: end; }
.pf-sigrow4 .pf-box { border: 0; border-bottom: 1pt solid #000; }
.utt { border: 1.2pt solid #000; padding: 0; font-size: 8.5pt; position: relative; }
.utt-head { display: grid; grid-template-columns: 0.9in 1fr 2.1in; align-items: center; border-bottom: 1pt solid #000; }
.utt-form { font-size: 7pt; padding: 4pt; align-self: start; }
.utt-title { text-align: center; padding: 6pt 0; }
.utt-title h1 { margin: 0; font-size: 16pt; font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; }
.utt-side { display: flex; flex-direction: column; border-left: 1pt solid #000; align-self: stretch; }
.utt-side .pf-box { border-right: 0; min-height: 18pt; }
.utt-sec { display: grid; grid-template-columns: 14pt 1fr; border-bottom: 1pt solid #000; }
.utt-sec .pf-grid { margin: 0; border-top: 0; }
.utt-lab { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: 7pt; letter-spacing: 0.08em; text-transform: uppercase; border-left: 0.75pt solid #000; }
.utt-red { color: #000; font-weight: 800; text-align: center; padding: 2pt; letter-spacing: 0.02em; border-bottom: 0.75pt solid #000; }
.utt-types { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 2pt; font-size: 6.5pt; }
.utt-types .pf-check { font-size: 6.5pt; margin: 0; }
.utt-legal { padding: 4pt 8pt; font-size: 8.5pt; text-align: justify; }
.utt-legal p { margin: 4pt 0 0; }
.utt-foot { display: flex; justify-content: space-between; align-items: center; padding: 4pt 8pt; border-top: 1pt solid #000; font-weight: 700; }
.utt-num { font-family: 'Courier New', monospace; font-size: 16pt; letter-spacing: 0.04em; }
.utt-stamp { top: -0.34in; right: 0; }
@media print {
  .pf-wrap { background: #fff; padding: 0; min-height: 0; }
  .pf { width: auto; margin: 0; padding: 0; box-shadow: none; }
  .pf-stamp { top: 0; right: 0; }
  .utt-stamp { top: -0.3in; right: 0; }
}
@media screen and (max-width: 820px) {
  .pf { padding: 0.3in 0.2in; font-size: 8.5pt; }
  .pf-head { grid-template-columns: 1fr; }
  .pf-title { text-align: left; }
}

/* ═══ Report: information only, offender unknown, society victim ═════════ */
.rw-infoonly { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, #fff); }
.rw-infoonly.on { border-color: var(--accent); background: var(--accent-bg, #eef3fb); }
.rw-infoonly input { margin-top: 3px; }
.rw-flags { display: flex; flex-wrap: wrap; gap: 6px 22px; width: 100%; padding-top: 6px; }
.rw-flags .check { font-weight: 600; }
.sv-preview { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--hover, #f5f6f8); display: flex; flex-direction: column; gap: 4px; }
.sv-names { max-height: 120px; overflow: auto; }
.dh-school-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: #e9f2ea; color: #1f5a2f; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
html[data-theme='dark'] .dh-school-tag { background: #1d3a26; color: #cfe8d5; }
.dh-escorts { margin-top: 18px; }
.dh-esc { list-style: none; margin: 8px 0 0; padding: 0; }
.dh-esc li + li { border-top: 1px solid var(--line); }
.dh-esc button { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 14px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.dh-esc button:hover { background: var(--hover); }
.dh-esc li.mine { border-left: 4px solid var(--brass, var(--accent)); }
.dh-esc-when { font-weight: 700; font-size: 0.9rem; }
.dh-esc-need { color: var(--bad, #b3261e); font-weight: 700; }
@media (max-width: 640px) { .dh-esc button { grid-template-columns: 1fr; gap: 2px; } }
.esc-link { display: block; word-break: break-all; font-size: 0.85rem; padding: 6px 8px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; user-select: all; }

/* ═══ Charge picker (SC CDR codes) ═══════════════════════════════════════ */
.sp { position: relative; width: 100%; }
.sp > input { width: 100%; }
.sp-menu { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 2px); max-height: 320px; overflow: auto; margin: 0; padding: 4px 0; list-style: none; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / 18%); min-width: min(560px, 92vw); }
.sp-menu li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 7px 10px; cursor: pointer; font-size: 0.9rem; }
.sp-menu li.on, .sp-menu li:hover { background: var(--hover); }
.sp-st { font-size: 0.82rem; }
.sp-tags { display: flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.sp-f { color: #b3261e; font-size: 0.75rem; }
.sp-m { font-size: 0.75rem; color: var(--muted, #667); }
.sp-dv { background: #6d2a8a; color: #fff; border-radius: 4px; padding: 0 4px; font-size: 0.72rem; }
@media (max-width: 640px) { .sp-menu li { grid-template-columns: 1fr; gap: 0; } }

/* ═══ License scan ═══════════════════════════════════════════════════════ */
.ls-btn { display: inline-flex; align-items: center; gap: 6px; }
.ls-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.ls-back { position: fixed; inset: 0; z-index: 90; background: rgb(0 0 0 / 45%); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ls { width: min(520px, 100%); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.ls-cam { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.ls-cam video { width: 100%; display: block; max-height: 50vh; object-fit: cover; }
.ls-aim { position: absolute; left: 8%; right: 8%; top: 32%; bottom: 32%; border: 3px solid rgb(255 255 255 / 85%); border-radius: 8px; box-shadow: 0 0 0 999px rgb(0 0 0 / 35%); }
.ls-cam p { position: absolute; bottom: 0; left: 0; right: 0; margin: 0; padding: 6px 10px; color: #fff !important; background: rgb(0 0 0 / 50%); }
.ls-raw { width: 100%; font-family: monospace; font-size: 0.8rem; }
.ls-err { color: var(--bad, #b3261e); font-weight: 600; }
.ls-kv dd { margin-bottom: 4px; }
.ls-match { padding: 8px 10px; border-radius: 8px; background: var(--hover); }

/* ═══ Deputy BOLOs ═══════════════════════════════════════════════════════ */
.bolo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.bolo-card { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; text-align: left; cursor: pointer; padding: 12px; color: inherit; font: inherit; }
.bolo-card:hover { border-color: var(--accent); }
.bolo-card img, .bolo-ph { width: 88px; height: 88px; object-fit: cover; border-radius: 6px; background: var(--hover); display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.bolo-photo { max-width: 100%; max-height: 320px; border-radius: 8px; margin-bottom: 10px; }
.bolo-home { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bolo-home a { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; padding: 6px; border-radius: 6px; border-left: 3px solid var(--warn, #c98a00); }
.bolo-home a:hover { background: var(--hover); }
.bolo-home img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex: none; }
.block { display: block; }
.dh-q.serve { border-color: var(--accent); background: var(--accent-bg); }

/* ═══ Case file checklist ════════════════════════════════════════════════ */
.cf-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cf-items li { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cf-items li:last-child { border-bottom: 0; }
.cf-box { width: 34px; height: 28px; border: 2px solid var(--line); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.72rem; }
.cf-items li.done .cf-box { border-color: var(--ok, #2e7d32); color: var(--ok, #2e7d32); font-size: 1rem; }
.cf-items li.na .cf-box { color: var(--muted); }
.cf-found { color: var(--accent); }
.cf-doc { margin-right: 10px; }
.cf-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .cf-items li { grid-template-columns: 42px 1fr; } .cf-acts { grid-column: 1 / -1; justify-content: flex-start; } }
@media print { .no-print, .cf-acts { display: none !important; } }

/* ═══ Applicants, FOIA, body cam, events, shut-offs ══════════════════════ */
.ap-bar { width: 90px; height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.ap-bar span { display: block; height: 100%; background: var(--accent); }
.ap-step-form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.cf-items li.part .cf-box { border-color: var(--accent); }
.wf-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 8px; }
.foia-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foia-step { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.foia-step.cur { border-color: var(--accent); background: var(--accent-bg); }
.foia-step.done { opacity: 0.85; }
.foia-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; border: 2px solid var(--line); }
.foia-step.done .foia-n { border-color: var(--ok, #2e7d32); color: var(--ok, #2e7d32); }
.foia-step.cur .foia-n { border-color: var(--accent); color: var(--accent); }
.bwc-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 10px; }
.bwc-yn { border: 0; padding: 0; margin: 0 0 8px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.bwc-yn legend { font-weight: 600; margin-bottom: 4px; }
.bwc-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bwc-bars li { display: grid; grid-template-columns: minmax(110px, 40%) 1fr auto; gap: 8px; align-items: center; font-size: 0.88rem; }
.bwc-b { height: 10px; background: var(--hover); border-radius: 5px; overflow: hidden; }
.bwc-b span { display: block; height: 100%; background: var(--accent); }
.bwc-pat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sig-img { max-width: 100%; max-height: 120px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.ev-list { display: flex; flex-direction: column; gap: 10px; }
.ev-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.ev-head { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ev-head:hover strong { text-decoration: underline; }
.ev-counts { display: flex; gap: 14px; align-items: center; }
.ev-slider { display: flex; flex-direction: column; gap: 4px; max-width: 520px; }
.ev-track { position: relative; display: grid; border: 1px solid var(--line); border-radius: 999px; background: var(--hover); padding: 3px; }
.ev-track button { position: relative; z-index: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--heading); cursor: pointer; }
.ev-slider.compact .ev-track button { padding: 6px 4px; font-size: 0.85rem; }
.ev-track button.on { color: #fff; }
.ev-track button:disabled { cursor: default; }
.ev-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 999px; transition: transform 0.2s ease; background: var(--accent); max-width: calc(100% - 6px); }
.ev-thumb.standby { background: #c98a00; }
.ev-thumb.no { background: #7a7f87; }
.ev-home { display: flex; flex-direction: column; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ev-home:last-child { border-bottom: 0; }
.ev-page { border-left: 3px solid var(--line); padding-left: 10px; margin-top: 10px; }
.grid-3-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.pg-reply { display: flex; gap: 12px; flex-wrap: wrap; }
.pg-reply .btn { flex: 1; min-width: 140px; padding: 16px; font-size: 1.05rem; }
.oc-role { margin: 8px 0; }
.hr-cards { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }

/* ═══ 803systems.com: coming soon ════════════════════════════════════════ */
.cs-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: #e8edf5; background: radial-gradient(1200px 700px at 8% 0%, #1b2d5c 0%, transparent 60%), radial-gradient(900px 600px at 95% 30%, #2a2433 0%, transparent 60%), #0e1630; }
.cs-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 48px clamp(16px, 7vw, 96px); max-width: 1100px; }
.cs-logo { width: min(520px, 100%); height: auto; filter: drop-shadow(0 8px 22px rgb(0 0 0 / 55%)); }
.cs-tag { margin: 0; font-weight: 800; letter-spacing: 0.28em; text-transform: uppercase; font-size: clamp(0.95rem, 2.2vw, 1.3rem); color: #f4f6fb; }
.cs-rule { display: block; width: 108px; height: 4px; border-radius: 2px; background: #5b8dff; box-shadow: 0 0 12px rgb(91 141 255 / 60%); }
.cs-verbs { margin: 0; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600; font-size: clamp(0.8rem, 1.8vw, 1.05rem); color: #c9d3e3; }
.cs-verbs i { font-style: normal; color: #5b8dff; margin: 0 0.6em; text-shadow: 0 0 8px rgb(91 141 255 / 80%); }
.cs-built { margin: 18px 0 0; letter-spacing: 0.2em; text-transform: uppercase; color: #8fa2c2; font-size: clamp(0.8rem, 1.6vw, 1rem); }
.cs-soon { margin: 6px 0 0; font-size: clamp(1rem, 2vw, 1.2rem); color: #e8edf5; max-width: 40ch; }
.cs-foot { display: flex; justify-content: space-between; gap: 12px; padding: 16px clamp(16px, 7vw, 96px); font-size: 0.85rem; color: #8fa2c2; }
.cs-foot a { color: #8fa2c2; }
.cs-foot a:hover { color: #fff; }

/* ═══ Home shortcuts: customize ══════════════════════════════════════════ */
.dh-q-wrap { position: relative; display: flex; flex-direction: column; }
.dh-q-wrap .dh-q { flex: 1; }
.dh-quick.editing .dh-q { opacity: 0.85; cursor: default; border-style: dashed; }
.dh-q-edit { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.dh-q-edit button { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--heading); font-weight: 800; cursor: pointer; line-height: 1; }
.dh-q-edit button.x { color: var(--bad); }
.dh-q-edit button:disabled { opacity: 0.35; cursor: default; }
.dh-q-tools { display: flex; justify-content: flex-end; margin-top: -6px; }
.dh-q-tools .stack { width: 100%; }
.dh-q-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ═══ Home calendar ══════════════════════════════════════════════════════ */
.hc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 8px 0 10px; }
.hc-dow { text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.hc-day { position: relative; aspect-ratio: 1 / 1; max-height: 42px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--heading); font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hc-day:hover { border-color: var(--accent); }
.hc-day.past { opacity: 0.5; }
.hc-day.today { border: 2px solid var(--accent); color: var(--accent); }
.hc-day.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.hc-dot { position: absolute; bottom: 4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }
.hc-day.on .hc-dot { background: #fff; }

/* ═══ After-school details roster ════════════════════════════════════════ */
.sd-roster { display: flex; flex-direction: column; gap: 16px; }
.sd-day h3 { margin: 0 0 8px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.sd-ev { display: grid; grid-template-columns: 90px 1fr minmax(180px, 30%); gap: 12px; padding: 12px 14px; margin-bottom: 8px; align-items: start; }
.sd-when { display: flex; flex-direction: column; }
.sd-who ul { margin: 0; }
@media (max-width: 640px) { .sd-ev { grid-template-columns: 1fr; } }
@media print { .sd-ev { break-inside: avoid; } }

/* ═══ Policies ═══════════════════════════════════════════════════════════ */
.pol-search { width: 100%; font-size: 1.05rem; padding: 12px 14px; }
.pol-snip { max-width: 70ch; margin-top: 2px; }
.pol-pdf { width: 100%; height: min(78vh, 1000px); border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.pol-text { max-height: 70vh; overflow: auto; padding: 4px 2px; line-height: 1.55; }
.pol-upload { border-top: 1px solid var(--line); padding-top: 10px; }

/* ═══ Mileage ════════════════════════════════════════════════════════════ */
.ml-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.ml-input { font-size: 1.6rem; font-weight: 700; letter-spacing: 0.04em; max-width: 240px; padding: 10px 12px; }
.pol-versions li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.pol-versions li:last-child { border-bottom: 0; }

/* ═══ Radio call numbers ═════════════════════════════════════════════════ */
.cn-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.cn-search input.mono { max-width: 110px; font-size: 1.1rem; font-weight: 700; }
.cn-or { padding-bottom: 10px; color: var(--muted); }
.cn-fix { border: 1px solid var(--accent); border-radius: 8px; padding: 10px; margin: 8px 0 12px; background: var(--accent-bg); }

/* ═══ Equipment report (spreadsheet view) ════════════════════════════════ */
.ar-title { margin: 0; font-size: 1.15rem; }
.ar-totals { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-total { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; text-align: left; color: var(--heading); }
.ar-total.on, .ar-total:hover { border-color: var(--accent); background: var(--accent-bg); }
.ar-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.ar-sheet { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 0.84rem; }
.ar-sheet th, .ar-sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 8px; white-space: nowrap; text-align: left; }
.ar-sheet thead th { position: sticky; top: 0; background: var(--hover); z-index: 1; padding: 0; }
.ar-sheet thead th button { all: unset; display: block; padding: 6px 8px; font-weight: 700; cursor: pointer; }
.ar-sheet tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--hover) 45%, transparent); }
.ar-sheet tbody tr:hover td { background: var(--accent-bg); cursor: pointer; }
.ar-sheet td.num { text-align: right; }
.ar-sheet .ar-n { color: var(--muted); text-align: right; position: sticky; left: 0; background: var(--panel); }
.ar-cols { margin: 0; }
@media print {
  @page { size: landscape; margin: 0.4in; }
  .ar-wrap { max-height: none; overflow: visible; border: 0; }
  .ar-sheet { font-size: 9pt; width: 100%; }
  .ar-sheet th, .ar-sheet td { border: 1px solid #999; }
  .ar-total { border: 0; padding: 0 8px 0 0; }
}

/* ═══ Funding tags (narcotics seizure, victim's advocate, grant) ═════════ */
.fund-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.fund-narcotics { color: #8a1c1c; border-color: #d99a9a; background: #fbecec; }
.fund-victim_advocate { color: #5b2a86; border-color: #c4a6e0; background: #f4ecfb; }
.fund-grant { color: #1d5a2e; border-color: #9fcfae; background: #ebf7ee; }
.fund-box { border: 1px solid var(--line); border-left-width: 5px; border-radius: 8px; padding: 10px 12px; background: var(--panel); color: var(--text); }
.fund-box.fund-narcotics { border-left-color: #b42323; }
.fund-box.fund-victim_advocate { border-left-color: #6f35a5; }
.fund-box.fund-grant { border-left-color: #2a7d43; }
html[data-theme='dark'] .fund-badge { background: transparent; }

/* Similar cases */
.sim-looking { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sim-count { font-size: 1.05rem; margin: 0; }
.sim-map { padding: 0; overflow: hidden; }
.sim-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sim-item { padding: 0; }
.sim-open { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 14px 16px; cursor: pointer; border-radius: inherit; }
.sim-open:hover { background: var(--hover, rgba(0, 0, 0, 0.03)); }
.sim-open:focus-visible { outline: 2px solid var(--accent, #1d4ed8); outline-offset: -2px; }
.sim-why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sim-snip { margin: 8px 0 0; font-size: 0.9rem; line-height: 1.5; color: var(--muted-fg, inherit); }
.sim-snip mark { background: #fde68a; color: #111; border-radius: 2px; padding: 0 2px; }
@media print { .sim-open { padding: 6px 0; } .sim-item { break-inside: avoid; } }

/* ═══ Incident report: section cards down the left (full form), and narrative first ═══ */
.qc-pick-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rw-mode { flex-wrap: wrap; }
.rec-grid.cards { grid-template-columns: 300px minmax(0, 1fr); }
.rec-cards { position: sticky; top: 58px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 140px); overflow-y: auto; padding-bottom: 4px; }
.rec-card { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; box-shadow: var(--shadow); min-height: 64px; }
.rec-card:hover { border-color: var(--accent); border-left-color: var(--accent); }
.rec-card.ok { border-left-color: var(--ok); }
.rec-card.bad { border-left-color: var(--bad); }
.rec-card.on { border-color: var(--accent); border-left-color: var(--accent); box-shadow: var(--focus); background: var(--accent-bg); }
.rec-card.review { align-items: center; text-align: center; border-left-width: 1px; border-radius: 999px; min-height: 52px; justify-content: center; }
.rec-card.review.ok { background: var(--ok-bg); border-color: var(--ok); }
.rec-card.review .rec-card-h { justify-content: center; }
.rec-card-h { display: flex; align-items: center; gap: 8px; }
.rec-card-t { font-weight: 700; font-size: 1.02rem; color: var(--heading); flex: 1; }
.rec-card-s { font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.rec-card-s.ok { color: var(--ok); background: var(--ok-bg); }
.rec-card-s.bad { color: var(--bad); background: var(--bad-bg); }
.rec-card-l { font-size: 0.88rem; line-height: 1.35; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.rec-card-l.muted { color: var(--muted); }
.rec-card-narr { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; white-space: normal; }
.rec-card-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: 0.88rem; }
.rec-card-counts span { display: flex; justify-content: space-between; }
.rec-card-counts span.muted { color: var(--muted); }
.rec-card-act { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.rec-card-act h4 { margin: 0 0 6px; font-size: 0.78rem; color: var(--muted); font-weight: 600; }

.nf { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; margin-top: 12px; }
.nf-write { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.nf-write header { display: flex; align-items: baseline; gap: 12px; }
.nf-write h2 { margin: 0; font-size: 1.2rem; flex: 1; }
.nf-write p { margin: 0; }
.nf-text { min-height: 58vh; resize: vertical; font: inherit; font-size: 1.05rem; line-height: 1.6; padding: 14px 16px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--field); color: var(--text); }
.nf-go { display: flex; justify-content: flex-end; }
.nf-side { position: sticky; top: 58px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 140px); overflow-y: auto; }
.nf-side h3 { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.nf-hints, .nf-on { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nf-hints li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 2px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.nf-hints li > :not(.nf-act) { grid-column: 1; }
.nf-hints .nf-act { grid-column: 2; grid-row: 1 / span 3; }
.nf-hints li.done { background: var(--ok-bg); border-color: transparent; }
.nf-k { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.nf-v { font-weight: 600; color: var(--heading); }
.nf-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.nf-act select { max-width: 140px; }
.nf-added { font-size: 0.85rem; font-weight: 700; color: var(--ok); }
.nf-on li { display: flex; flex-direction: column; gap: 2px; }
.nf-on .btn.link { padding: 0; justify-content: flex-start; font-weight: 700; }
.qc-pick-art.narr i:first-child { width: 80%; }

@media (max-width: 1100px) {
  .rec-grid.cards { grid-template-columns: 240px minmax(0, 1fr); }
  .nf { grid-template-columns: minmax(0, 1fr); }
  .nf-side { position: static; max-height: none; }
}
@media (max-width: 760px) {
  .qc-pick-opts { grid-template-columns: 1fr; }
  .rec-grid.cards { grid-template-columns: minmax(0, 1fr); }
  .rec-cards { position: static; max-height: none; flex-direction: row; overflow-x: auto; }
  .rec-card { min-width: 180px; }
  .nf-text { min-height: 40vh; }
}
@media print { .rec-cards, .nf-side { display: none !important; } .rec-grid.cards { display: block; } }

/* ═══ Patrol (field) map ═══ */
.pm { display: flex; gap: 12px; width: 100%; height: calc(100vh - 130px); min-height: 420px; }
.pm-map { position: relative; flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.pm-map > * { height: 100%; }
.pm-panel { width: 46px; flex-shrink: 0; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pm-panel.open { width: 300px; }
.pm-tabs { display: flex; border-bottom: 1px solid var(--line-2); }
.pm-tabs button { flex: 1; font: inherit; font-weight: 700; padding: 10px 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.pm-panel:not(.open) .pm-tabs button { writing-mode: vertical-rl; padding: 14px 10px; }
.pm-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.pm-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.pm-body h3 { margin: 6px 0 0; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pm-layer { display: flex; align-items: center; gap: 8px; }
.pm-layer i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.pm-layer .small { margin-left: auto; }
.pm-layer-row { display: flex; flex-direction: column; gap: 2px; }
.pm-layer-row .btn.link { align-self: flex-start; padding: 0; }
.pm-add { border-top: 1px solid var(--line-2); padding-top: 8px; }
@media (max-width: 760px) {
  .pm { flex-direction: column; height: auto; }
  .pm-map { height: 60vh; }
  .pm-panel, .pm-panel.open { width: auto; }
  .pm-panel:not(.open) .pm-tabs button { writing-mode: horizontal-tb; }
}

/* ═══ Resources on duty ═══ */
.res-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.res-card { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.res-card header { display: flex; align-items: center; gap: 8px; }
.res-card h3 { margin: 0; font-size: 0.98rem; flex: 1; }
.res-card.none { opacity: 0.75; }
.res-n { min-width: 30px; height: 30px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: var(--ok-bg); color: var(--ok); }
.res-n.zero { background: var(--bad-bg); color: var(--bad); }
.res-card li { display: flex; flex-direction: column; }
.res-people li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.res-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.res-grid th { font-size: 0.75rem; white-space: normal; min-width: 72px; }
.res-grid td { text-align: center; }
.res-grid td:first-child { text-align: left; }

/* ═══ Command boards ═══ */
.cb-start { font-weight: 800; }
.cb-big { min-height: 52px; padding: 0 26px; font-size: 1.05rem; font-weight: 800; }
.cb-big.on { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.cb-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.cb-role { min-height: 48px; justify-content: center; font-weight: 700; }
.cb-role.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.cb-group { margin-bottom: 10px; }
.cb-group h4 { margin: 0 0 4px; font-size: 0.86rem; display: flex; align-items: center; gap: 6px; }
.cb-group h4 i { width: 10px; height: 10px; border-radius: 5px; display: inline-block; }
.cb-log li { padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.cb-pick { margin: 8px 0; }

/* Access checkboxes */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 18px; }
.perm-group { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px 10px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.perm-group legend { font-weight: 700; font-size: 0.86rem; padding: 0 4px; }
.perm-group legend .btn.link { padding: 0; font-weight: 500; }
.perm-group .check { font-size: 0.88rem; }
.perm-changed { color: var(--accent); font-weight: 600; }

/* ── Route demo (demo agencies): addresses + attempts + M·A·E·W, full screen ── */
.demo-switch .demo-route { color: #fff; font-weight: 700; text-decoration: underline; font-size: 14px; }
.rd-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.rd-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.rd-top h1 { margin: 0; font-size: 1.3rem; }
.rd-body { flex: 1; display: grid; grid-template-columns: minmax(320px, 440px) 1fr; gap: 12px; padding: 12px 16px; min-height: 0; }
.rd-left { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 90px); padding-right: 2px; }
.rd-map { padding: 0; overflow: hidden; overflow: clip; height: calc(100vh - 90px); position: sticky; top: 12px; }
.rd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rd-stop { padding: 10px 12px; }
.rd-stop.open { outline: 2px solid var(--accent, #1d4ed8); }
.rd-head { display: flex; gap: 10px; align-items: flex-start; }
.rd-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #1d4ed8; color: #fff; font-weight: 800; }
.rd-num.done { background: #16a34a; }
.rd-addr { flex: 1; min-width: 0; }
.rd-addr strong { overflow-wrap: anywhere; }
.rd-x { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rd-num.muted { background: #98a2b3; }
.rd-mute-check { font-size: 0.88rem; }
.rd-attempts { list-style: none; margin: 6px 0 0 40px; padding: 0; color: var(--muted); }
.rd-actions { margin: 8px 0 0 40px; }
.rd-attempt { margin: 8px 0 0 40px; display: flex; flex-direction: column; gap: 8px; }
.rd-outcomes { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-when { max-width: 230px; }
.rd-empty { padding: 8px 4px; }
@media (max-width: 820px) {
  .rd-body { grid-template-columns: 1fr; padding: 10px 12px; }
  .rd-left { max-height: none; overflow: visible; order: 2; }
  .rd-map { order: 1; height: 45vh; position: static; }
  .rd-attempts, .rd-actions, .rd-attempt { margin-left: 0; }
}

/* ── Turn-by-turn directions over the route demo map ── */
.rd-map { position: relative; }
.tbt { position: absolute; z-index: 20; left: 50%; bottom: 26px; transform: translateX(-50%); width: min(560px, calc(100% - 120px)); background: #0f2a4a; color: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgb(0 0 0 / 35%); overflow: hidden; }
.tbt-main { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.tbt-main.bad { background: #7a1d1d; }
.tbt-main.ok { background: #14532d; }
.tbt-main a { color: #fff; font-weight: 700; }
.tbt-arrow { flex: none; width: 52px; height: 52px; }
.tbt-arrow path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tbt-text { flex: 1; min-width: 0; font-size: 1.05rem; line-height: 1.3; }
.tbt-text strong { font-size: 1.25rem; display: block; }
.tbt-dist { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.tbt-then { font-size: 0.9rem; opacity: 0.85; margin-top: 2px; }
.tbt-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px 6px 16px; background: rgb(0 0 0 / 22%); font-size: 0.88rem; }
.tbt-btns { display: flex; gap: 6px; }
.tbt-voice { width: auto; max-width: 170px; min-height: 30px; padding: 2px 26px 2px 8px; font-size: 0.82rem; border-radius: 8px; background-color: rgb(255 255 255 / 92%); color: #0f2a4a; border: none; }
.tbt-btns { align-items: center; }
.tbt-btns .btn { background: rgb(255 255 255 / 92%); color: #0f2a4a; border-color: transparent; }
@media (max-width: 820px) { .tbt { bottom: 24px; width: calc(100% - 20px); } .tbt-arrow { width: 40px; height: 40px; } .tbt-dist { font-size: 1.3rem; } }

.rd-src { margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rd-tag { font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.rd-tag.ok { background: var(--ok-bg); color: var(--ok); }
.rd-tag.warn { background: #fef3c7; color: #92400e; }
.rd-moving { pointer-events: none; position: absolute; z-index: 21; left: 50%; bottom: 30px; transform: translateX(-50%); background: #92400e; color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100% - 40px); text-align: center; }
.fm-mapwrap { position: relative; }
.fm-muted summary { cursor: pointer; color: var(--muted); }
.rm-mapwrap { position: relative; height: 100%; }
.rm-muted { position: absolute; z-index: 6; left: 10px; bottom: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; font-size: 0.82rem; box-shadow: var(--shadow); }
/* Other deputies on duty: their vehicle with the call number under it. */
.pin.veh-pin { transform: translate(-50%, -50%); filter: drop-shadow(0 1px 2px rgb(0 0 0 / 45%)); }
.pin.veh-pin svg { width: 18px; height: 33px; }
.pin.veh-pin .veh-label { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 1px; background: #1f63e6; color: #fff; font: 700 10px/1.2 system-ui, sans-serif; padding: 1px 4px; border-radius: 4px; white-space: nowrap; }
.pin.veh-pin.selected { transform: translate(-50%, -50%) scale(1.3); }
.pm-map > .tbt, .pm-map > .pm-pop { height: auto; }
.pm-pop { position: absolute; z-index: 19; left: 12px; bottom: 28px; max-width: min(420px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 6px; }
/* Warrant map: a purple diamond hovering over the house, its shadow on the ground. */
.pin.float-pin { width: 22px; height: 44px; transform: translate(-50%, -100%); filter: none; overflow: visible; }
.pin.float-pin .fd-shadow { position: absolute; left: 4px; bottom: -3px; width: 14px; height: 6px; border-radius: 50%; background: rgb(0 0 0 / 35%); animation: fd-shadow 2.4s ease-in-out infinite; }
.pin.float-pin .fd-diamond { position: absolute; left: 2px; top: 4px; width: 18px; height: 18px; perspective: 60px; animation: fd-bob 2.4s ease-in-out infinite; }
.pin.float-pin .fd-diamond::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #e9d5ff, var(--pin) 45%, #4c1d95); border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgb(76 29 149 / 55%), 0 0 12px rgb(147 51 234 / 75%); transform: rotate(45deg); animation: paper-spin 3s linear infinite; }
.pin.float-pin.selected .fd-diamond::before { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber), 0 0 14px rgb(147 51 234 / 85%); }
@keyframes fd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes fd-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.8); opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .pin.float-pin .fd-diamond, .pin.float-pin .fd-shadow { animation: none; } }
/* The little window over a marker. */
.pin.carded { z-index: 40; }
.map-card { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: 270px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgb(0 0 0 / 28%); padding: 10px 12px; text-align: left; line-height: 1.35; font-size: 0.82rem; pointer-events: none; cursor: default; }
.map-card::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
/* Warrant map */
.wm-map { position: relative; height: calc(100vh - 220px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; overflow: clip; }
.wm-map > .tbt, .wm-map > .pm-pop { height: auto; }
.wm-name { font-weight: 800; font-size: 0.95rem; color: #4c1d95; }
.wm-sub { color: var(--muted); font-size: 0.78rem; margin-bottom: 4px; }
.wm-caution { color: #b42318; font-weight: 800; font-size: 0.78rem; margin-bottom: 4px; }
.wm-charges { margin: 2px 0 6px; padding-left: 16px; font-weight: 600; }
.wm-row { margin-top: 2px; }
.wm-k { font-weight: 700; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; margin-right: 4px; }
.wm-note { font-style: italic; color: var(--text); margin-top: 1px; }
.wm-foot { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 0.74rem; font-family: var(--mono, monospace); }
.map-card.below { bottom: auto; top: calc(100% + 10px); }
.map-card.below::after { bottom: auto; top: -7px; transform: translateX(-50%) rotate(225deg); }

/* Command board alert: the pop-up, and the Command boards tab (and the menu that holds it) flashing fluorescent green. */
@keyframes cmd-flash { 0%, 100% { background: #39ff14; color: #04210a; box-shadow: 0 0 14px #39ff14; } 50% { background: #0b3d12; color: #b6ffa6; box-shadow: none; } }
html[data-cmd-alert] .field-side button[data-path="/field/command"],
html[data-cmd-alert] .fm button[data-path="/field/command"],
html[data-cmd-alert] a[href="/command"],
html[data-cmd-alert] a[data-module="records"],
html[data-cmd-alert] .fh-burger { animation: cmd-flash 1s steps(2, jump-none) infinite; border-radius: 6px; font-weight: 800; }
html[data-cmd-alert] .field-side button[data-path="/field/command"] svg,
html[data-cmd-alert] a[href="/command"] svg { color: currentColor; }
@media (prefers-reduced-motion: reduce) { html[data-cmd-alert] .field-side button[data-path="/field/command"], html[data-cmd-alert] .fm button[data-path="/field/command"], html[data-cmd-alert] a[href="/command"], html[data-cmd-alert] a[data-module="records"], html[data-cmd-alert] .fh-burger { animation: none; background: #39ff14; color: #04210a; } }
.cmd-pop-back { position: fixed; inset: 0; z-index: 2000; background: rgb(4 33 10 / 45%); display: grid; place-items: center; padding: 16px; }
.cmd-pop { width: min(440px, 100%); background: var(--panel); border: 3px solid #39ff14; border-radius: 16px; box-shadow: 0 0 0 4px rgb(57 255 20 / 25%), 0 20px 60px rgb(0 0 0 / 45%); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.cmd-pop-tag { align-self: center; background: #39ff14; color: #04210a; font-weight: 900; letter-spacing: 0.08em; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; animation: cmd-flash 1s steps(2, jump-none) infinite; }
.cmd-pop h2 { margin: 0; font-size: 1.6rem; }
.cmd-pop-where { font-size: 1.1rem; font-weight: 700; }
.cmd-pop-det { font-weight: 400; font-size: 0.95rem; margin-top: 4px; color: var(--text); }
.cmd-pop-by { font-weight: 400; font-size: 0.82rem; color: var(--muted); margin-top: 4px; }
.cmd-pop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmd-pop-btns .btn { min-height: 52px; font-size: 1.05rem; font-weight: 800; }
.cmd-pop-btns .cmd-yes { background: #16a34a; border-color: #15803d; color: #fff; }
.cmd-pop-more { display: flex; justify-content: center; gap: 16px; }
/* Command board photos */
.cb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cb-photo { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); cursor: pointer; text-align: left; font: inherit; }
.cb-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #111; }
.cb-photo span { padding: 2px 8px 6px; color: var(--muted); }
.cb-view { position: fixed; inset: 0; z-index: 1500; background: rgb(0 0 0 / 85%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 10px; }
.cb-view img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; }
.cb-view-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; color: #fff; }
.cb-k9-map { border-radius: 8px; overflow: hidden; overflow: clip; }
.cb-k9-time { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cb-k9-time input[type=range] { flex: 1; accent-color: #ea580c; }
.cb-k9-stop { background: #b42318; color: #fff; border-color: #b42318; }
/* Narcotics */
.narc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.narc-list > li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.narc-ci.off { opacity: 0.6; }
.narc-hit:not(.seen) { border-left: 4px solid #b42318; padding-left: 10px; background: #fef3f2; }
.narc-form { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 12px; }

/* Drone flights */
.drone-totals { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.drone-totals > div { background: var(--card, #fff); border: 1px solid var(--line, #ddd); border-radius: 10px; padding: 10px 16px; min-width: 110px; }
.drone-totals b { display: block; font-size: 1.6rem; line-height: 1.1; }
.drone-totals span { font-size: .8rem; color: var(--muted, #666); }
.drone-list { list-style: none; margin: 0; padding: 0; }
.drone-list > li { border-bottom: 1px solid var(--line, #ddd); }
.drone-row { all: unset; display: block; width: 100%; padding: 10px 4px; cursor: pointer; box-sizing: border-box; }
.drone-row:focus-visible { outline: 2px solid var(--accent, #2563eb); }
.drone-detail { padding: 4px 4px 14px; }
.drone-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 8px; }
.drone-dl dt { font-weight: 600; color: var(--muted, #666); }
.drone-dl dd { margin: 0; }
.drone-narr { white-space: pre-wrap; }
.drone-form h4 { margin: 8px 0 0; }

/* Patrol map */
.slippy-heat { pointer-events: none; }
.slippy-labels { position: absolute; inset: 0; pointer-events: none; }
.map-label { position: absolute; transform: translate(-50%, -50%); background: rgba(255,255,255,.92); color: #111; border: 2px solid #f59e0b; border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ptm-slice { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; background: rgba(15,23,42,.88); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 14px; pointer-events: none; white-space: nowrap; }
.ptm-drawing { position: absolute; top: 48px; left: 50%; transform: translateX(-50%); z-index: 5; background: #f59e0b; color: #111; padding: 6px 12px; border-radius: 8px; font-weight: 700; pointer-events: none; }
.ptm-ctl { display: grid; gap: 8px; margin: 6px 0 10px; }
.ptm-ctl .seg { display: inline-flex; border: 1px solid var(--line, #cbd5e1); border-radius: 8px; overflow: hidden; width: max-content; }
.ptm-ctl .seg button { white-space: nowrap; border: 0; background: transparent; padding: 6px 12px; cursor: pointer; font: inherit; color: inherit; }
.ptm-ctl .seg button.on { background: var(--accent, #1f63e6); color: #fff; }
.ptm-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted, #64748b); }
.ptm-legend i { flex: 1; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #2563eb, #10b981, #facc15, #f97316, #dc2626); }
.ptm-spots { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ptm-spot { all: unset; box-sizing: border-box; display: flex; gap: 10px; width: 100%; padding: 6px; border-radius: 8px; cursor: pointer; }
.ptm-spot:hover, .ptm-spot:focus-visible { background: rgba(148,163,184,.18); }
.ptm-spot:focus-visible { outline: 2px solid var(--accent, #1f63e6); }
.ptm-rank { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #dc2626; color: #fff; display: grid; place-items: center; font-size: 13px; }
.ptm-rising { color: #dc2626; font-weight: 700; font-size: 12px; }
.ptm-areas { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.ptm-areas li { display: flex; gap: 8px; align-items: flex-start; }
.ptm-areas li > i { flex: none; width: 12px; height: 12px; border-radius: 3px; margin-top: 4px; }
.ptm-areas li > span { flex: 1; min-width: 0; }
.ptm-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.ptm-color.on { border-color: var(--text, #111); box-shadow: 0 0 0 2px #fff inset; }
.block { display: block; }
.pm-map > .ptm-slice, .pm-map > .ptm-drawing { height: auto; }
/* Phones: the map keeps its height; the panel goes below it (a long panel used to squeeze the map flat). */
@media (max-width: 760px) {
  .pm { height: auto; }
  .pm-map { flex: none; height: 60vh; min-height: 320px; }
}
@media (max-width: 760px) {
  .ptm-slice { top: 52px; left: 12px; transform: none; font-size: 13px; }
}

/* Victim link: the victim's page */
.vl-top { justify-content: center; text-align: center; }
.vl-tabs { display: flex; gap: 4px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 0 12px; position: sticky; top: 0; z-index: 2; }
.vl-tabs button { flex: none; border: 0; background: transparent; font: inherit; font-weight: 600; padding: 12px 10px; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.vl-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.vl-badge { background: #dc2626; color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 6px; min-width: 18px; text-align: center; }
.vl-hello h1 { margin: 0 0 6px; font-size: 1.4rem; }
.vl-todo { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.vl-todo .btn.link { font-size: 1.05rem; font-weight: 700; padding: 0; }
.vl-ok { color: #15803d; font-size: .85rem; font-weight: 600; }
.vl-need { color: #b45309; font-size: .85rem; font-weight: 600; }
.vl-h { margin: 4px 0 0; }
.vl-form h3 { margin: 10px 0 0; font-size: 1rem; }
.vl-wide { grid-column: 1 / -1; }
.vl-yn { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.vl-yn legend { font-weight: 600; width: 100%; margin-bottom: 4px; }
.vl-yn label { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; }
.vl-rights { white-space: pre-wrap; background: var(--subtle); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.vl-sig { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 1.4rem; }
.vl-item.done { opacity: .75; }
.vl-item-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.vl-note { margin: 0; background: #fffbeb; border-left: 3px solid #f59e0b; padding: 6px 10px; border-radius: 4px; }
.vl-sent { margin: 0; padding-left: 18px; }
.vl-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vl-msgs li { display: flex; flex-direction: column; max-width: 85%; }
.vl-msgs li.me { margin-left: auto; align-items: flex-end; }
.vl-msgs li.them { align-items: flex-start; }
.vl-bubble { padding: 8px 12px; border-radius: 14px; white-space: pre-wrap; background: var(--subtle); border: 1px solid var(--line); }
.vl-msgs li.me .vl-bubble { background: var(--accent, #1f63e6); color: #fff; border-color: transparent; }
.vl-report-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 2px solid var(--text); padding-bottom: 8px; margin-bottom: 8px; }
.vl-report-h h2 { margin: 0; }
.vl-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.vl-table th, .vl-table td { text-align: left; border-bottom: 1px solid var(--line); padding: 6px 4px; }
.vl-narr { white-space: pre-wrap; }
.vl-foot { text-align: center; }
@media print {
  .vl-page .vl-tabs, .vl-page .xfer-top, .vl-page .vl-foot, .vl-page .no-print { display: none !important; }
  .vl-page, .vl-page .xfer-main { background: #fff; padding: 0; max-width: none; }
  .vl-report { border: 0; box-shadow: none; }
}

/* Victim link: the deputy's panel on a report */
.vlk-link { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 10px; display: grid; gap: 6px; }
.vlk-link.off { opacity: .6; }
.vlk-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.vlk-link h4 { margin: 6px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.vlk-reqs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.vlk-done { text-decoration: line-through; color: var(--muted); }
.vlk-sent { list-style: none; margin: 2px 0 0 26px; padding: 0; display: grid; gap: 2px; }
.vlk-field { margin-right: 10px; font-size: .9rem; }
.vlk-reply input { flex: 1; min-width: 0; }
.vlk-ask { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; gap: 4px; }
.vlk-ask-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.vlk-ask-row input:not([type]) { flex: 1; min-width: 180px; }
.vlk-url { word-break: break-all; }
.vlk-msgs { max-height: 320px; overflow-y: auto; }

/* Command board: labeled photo tabs */
.cb-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--line); padding-bottom: 0; }
.cb-tabs button { flex: none; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--subtle); font: inherit; font-weight: 700; padding: 8px 14px; cursor: pointer; color: var(--text); }
.cb-tabs button.on { background: var(--accent, #1f63e6); color: #fff; border-color: var(--accent, #1f63e6); }
.cb-tabs button.sus:not(.on) { border-top: 3px solid #c0262d; }
.cb-tabs button.vic:not(.on) { border-top: 3px solid #2e9a5c; }
.cb-tabs .cb-tab-add { background: transparent; border-style: dashed; color: var(--muted); font-weight: 600; }
.cb-ref-add { margin-top: 8px; }
.cb-ref-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.cb-ref-h h2 { margin: 0; }
.cb-ref-note { background: #fffbeb; border-left: 3px solid #f59e0b; padding: 6px 10px; border-radius: 4px; }
.cb-ref-img { display: block; max-width: 100%; max-height: 72vh; margin: 8px auto; border-radius: 8px; object-fit: contain; }
.pin.icon-pin { transform: translate(-50%, -50%); filter: drop-shadow(0 1px 2px rgb(0 0 0 / 50%)); }
.pin.icon-pin.selected { transform: translate(-50%, -50%) scale(1.25); outline: 3px solid #facc15; outline-offset: 2px; border-radius: 8px; }

/* Ops planner */
.ops-chip { display: inline-block; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.ops-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ops-row { all: unset; box-sizing: border-box; display: flex; gap: 12px; width: 100%; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.ops-row:focus-visible { outline: 2px solid var(--accent); }
.ops-bar { width: 6px; border-radius: 3px; flex: none; }
.ops-row-main { flex: 1; min-width: 0; }
.ops-debrief-line, .ops-debrief { display: inline-block; margin-top: 4px; background: #ede9fe; color: #4c1d95; border-left: 4px solid #7c3aed; padding: 4px 10px; border-radius: 4px; font-weight: 600; }
.ops-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; background: var(--card, #fff); border: 1px solid var(--line); border-left: 8px solid; border-radius: 10px; padding: 12px 14px; }
.ops-head h1 { margin: 2px 0; font-size: 1.35rem; }
.ops-phases { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.ops-phases button { border: 2px solid var(--c); color: var(--c); background: transparent; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ops-phases button.on { background: var(--c); color: #fff; }
.ops-tabs { display: flex; gap: 4px; align-items: flex-end; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.ops-tabs > button { border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--subtle); font: inherit; font-weight: 700; padding: 8px 14px; cursor: pointer; color: var(--text); }
.ops-tabs > button.on { background: var(--accent, #1f63e6); color: #fff; border-color: var(--accent, #1f63e6); }
.ops-save { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; padding-bottom: 4px; }
.ops-mapwrap { display: grid; gap: 8px; }
.ops-mapwrap.editing { grid-template-columns: 300px 1fr; align-items: start; }
.ops-mapwrap.editing .ops-legend { grid-column: 1 / -1; }
.ops-tools { display: grid; gap: 8px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px; max-height: 78vh; overflow-y: auto; }
.ops-base, .ops-toolrow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ops-base button, .ops-toolrow > button { border: 1px solid var(--line); background: var(--subtle); border-radius: 6px; padding: 5px 9px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.ops-base button.on, .ops-toolrow > button.on { background: var(--accent, #1f63e6); color: #fff; border-color: var(--accent); }
.ops-colors { display: inline-flex; gap: 3px; }
.ops-colors button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #94a3b8; cursor: pointer; padding: 0; }
.ops-colors button.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.ops-pending, .ops-selected { background: #fffbeb; border: 1px solid #f59e0b; border-radius: 8px; padding: 6px 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; }
.ops-palette summary { font-weight: 700; cursor: pointer; }
.ops-icons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 6px; }
.ops-icons button { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent; border-radius: 6px; padding: 3px 6px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; color: var(--text); }
.ops-icons button.on { border-color: var(--accent); background: rgba(31, 99, 230, .1); box-shadow: inset 0 0 0 1px var(--accent); }
.ops-icons button svg { flex: none; }
.ops-units { display: grid; gap: 4px; margin-top: 6px; }
.ops-unit { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
.ops-unit.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ops-unit.placed { background: rgba(22, 163, 74, .06); }
.ops-unit > button { all: unset; display: flex; gap: 8px; align-items: center; cursor: pointer; width: 100%; }
.ops-unit > button svg { flex: none; }
.ops-canvas { position: relative; height: 72vh; min-height: 420px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0f172a; }
.ops-picking { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; background: #facc15; color: #111; padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.ops-ic { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.ops-ic em, .ops-place em { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 2px; background: rgba(15, 23, 42, .88); color: #fff; font: 600 11px/1.2 system-ui, sans-serif; font-style: normal; padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.ops-place { position: relative; display: inline-flex; opacity: .95; }
.ops-text { font: 800 15px/1.1 system-ui, sans-serif; white-space: nowrap; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.ops-photo { position: relative; max-width: 100%; max-height: 100%; margin: 0 auto; touch-action: none; user-select: none; }
.ops-photo img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.ops-photo > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ops-photo-ic { all: unset; position: absolute; transform: translate(-50%, -50%); cursor: pointer; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 60%)); }
.ops-photo-ic.selected { outline: 3px solid #facc15; outline-offset: 2px; border-radius: 6px; }
.ops-canvas:has(.ops-photo) { display: flex; align-items: center; justify-content: center; }
.ops-canvas .ops-photo { height: 100%; }
.ops-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.ops-legend-ic { display: inline-flex; gap: 4px; align-items: center; }
.ops-ro .ops-ro-v { white-space: pre-wrap; padding: 2px 0 6px; }
.ops-wx { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-bottom: 8px; }
.ops-wx-t { font-size: 1.8rem; }
.ops-asg { margin: 0; display: grid; gap: 4px; }
.ops-asg > div { display: grid; grid-template-columns: 220px 1fr; gap: 8px; }
.ops-asg dt { font-weight: 700; }
.ops-asg dd { margin: 0; }
.ops-asg-t { width: 100%; border-collapse: collapse; }
.ops-asg-t th, .ops-asg-t td { text-align: left; padding: 4px; border-bottom: 1px solid var(--line); }
.ops-asg-t select, .ops-asg-t input:not([type=checkbox]) { width: 100%; }
.ops-add-asg { margin-top: 8px; }
.ops-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.ops-people li { display: flex; gap: 10px; align-items: center; }
.ops-people li svg { flex: none; }
.ops-fs { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: grid; gap: 4px; }
.ops-fs legend { font-weight: 700; }
.ops-aud { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ops-aud h4 { margin: 8px 0 4px; font-size: .8rem; text-transform: uppercase; color: var(--muted); }
.ops-people-pick { max-height: 260px; overflow-y: auto; display: grid; gap: 2px; margin-top: 6px; }
.ops-notice { border-top: 1px solid var(--line); padding: 6px 0; }
.ops-notice-msg { white-space: pre-wrap; }
.ops-answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; }
.ops-answers li.attending b { color: #15803d; }
.ops-answers li.not_attending b { color: #b91c1c; }
.ops-answers li.none b { color: var(--muted); font-weight: 500; }
.ops-notice-in { border-left: 5px solid #ea580c; }
.ops-pop-tag { background: #ea580c !important; color: #fff !important; animation: none !important; }
@media (max-width: 900px) {
  .ops-mapwrap.editing { grid-template-columns: 1fr; }
  .ops-tools { max-height: none; }
  .ops-canvas { height: 62vh; }
  .ops-aud { grid-template-columns: 1fr; }
  .ops-asg > div { grid-template-columns: 1fr; }
}
@media print {
  .ops-page .ops-tabs, .ops-page .ops-phases, .ops-page .no-print { display: none !important; }
}

/* Demo notice (accept before going in) */
.demo-notice-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: #0b1b33; }
.demo-notice { max-width: 560px; width: 100%; background: #fff; color: #111827; border-radius: 14px; padding: 22px 22px 18px; border-top: 8px solid #f59e0b; box-shadow: 0 20px 60px rgb(0 0 0 / 40%); display: grid; gap: 10px; }
.demo-notice h1 { margin: 0; font-size: 1.4rem; }
.demo-notice-tag { justify-self: start; background: #f59e0b; color: #111; font-weight: 900; letter-spacing: .08em; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.demo-notice-text { font-size: 1.05rem; font-weight: 600; background: #fffbeb; border: 1px solid #f59e0b; border-radius: 8px; padding: 10px 12px; margin: 0; }
.demo-notice-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.demo-notice-check { align-items: flex-start; font-weight: 600; }

/* Office on a phone: the module tabs (Records, Warrants, Court…) become a scrolling row under the top bar instead
   of disappearing, and the side menu is a normal row (not stretched to the screen height). */
@media (max-width: 860px) {
  .topbar, html[data-product='bluehq'] .topbar { height: auto; flex-wrap: wrap; padding-top: 6px; row-gap: 4px; }
  .topbar .modtabs { display: flex; order: 10; flex: 0 0 calc(100% + 28px); margin: 0 -14px; height: 40px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid rgb(255 255 255 / 12%); }
  .topbar .modtabs::-webkit-scrollbar { display: none; }
  .topbar .modtabs a { padding: 0 12px; }
  .sidenav, html[data-product='bluehq'] .sidenav { position: static; top: auto; height: auto; border-right: 0; }
  body.demo-on .sidenav { padding-bottom: 0; }
  html[data-product='bluehq'] .sidenav a.active { border-left-color: transparent; border-bottom-color: var(--brass); }
}

/* Crime analytics: custom range, and the call panel beside the map */
.ca-custom { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ca-mapwrap { position: relative; }
.ca-mapwrap.has-call { display: grid; grid-template-columns: 1fr 320px; gap: 10px; }
.ca-call { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--card, #fff); max-height: 420px; overflow-y: auto; display: grid; gap: 6px; align-content: start; }
.ca-call-h { display: flex; justify-content: space-between; align-items: center; }
.ca-x { border: 0; background: var(--subtle); width: 32px; height: 32px; border-radius: 50%; font-size: 16px; cursor: pointer; color: var(--text); }
.ca-x:hover { background: var(--line); }
.ca-call-dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0; font-size: 14px; }
.ca-call-dl dt { color: var(--muted); }
.ca-call-dl dd { margin: 0; }
.ca-call h4 { margin: 6px 0 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ca-call-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.ca-tag { display: inline-block; color: #fff; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 4px; }
.ca-tag.uav { background: #7a4fd6; }
.ca-tag.k9 { background: #8a4b00; }
.ca-call-btns { margin-top: 6px; }
@media (max-width: 900px) { .ca-mapwrap.has-call { grid-template-columns: 1fr; } .ca-call { max-height: none; } }
.ca-two:has(.has-call) { grid-template-columns: 1fr; }

/* ─── Collision reports (TR-310) ─── */
.col-chip { display: inline-block; color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.col-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.col-row { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--card, #fff); }
.col-row:hover, .col-row:focus-visible { border-color: var(--accent, #2563eb); outline: none; }
.col-row .block, .col-unit-tabs .block { display: block; }
.col-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.col-head h1 { margin: 2px 0; font-size: 22px; }
.col-return input { flex: 1; min-width: 220px; }
.col-steps { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; position: sticky; top: 0; z-index: 3; background: var(--bg, #f8fafc); }
.col-steps button { flex: none; border: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); border-radius: 999px; padding: 7px 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.col-steps button.on { background: #0f172a; color: #fff; border-color: #0f172a; }
.col-need { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; text-align: center; }
.col-problems { background: #fef3c7; color: #78350f; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.col-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; align-items: end; }
.col-grid .field, .col-grid .field select, .col-grid .field input { width: 100%; min-width: 0; }
.col-wide { grid-column: span 2; }
.col-inline { align-self: center; }
.col-checks { margin-top: 10px; }
.col-multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.col-yn { border: 0; padding: 0; margin: 10px 0 0; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.col-yn legend { font-weight: 600; float: left; margin-right: 8px; }
.col-pick { margin-top: 8px; border-radius: 10px; overflow: hidden; }
.col-unit-tabs { display: flex; gap: 6px; overflow-x: auto; }
.col-unit-tabs button { flex: none; text-align: left; border: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); border-radius: 10px; padding: 8px 12px; font-weight: 700; cursor: pointer; }
.col-unit-tabs button.on { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.col-unit-tabs .col-add { border-style: dashed; color: #2563eb; }
.col-person { border-top: 1px solid var(--border, #e2e8f0); padding-top: 10px; margin-top: 10px; }
.col-person-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.col-person-h .ls-btn { margin-left: auto; }
.col-narr { width: 100%; font: inherit; line-height: 1.5; }
.col-nav { justify-content: space-between; }
.col-dtools { display: grid; gap: 8px; margin-bottom: 8px; }
.col-dt-row { display: flex; gap: 6px; flex-wrap: wrap; }
.col-dt-row button { border: 1px solid var(--border, #cbd5e1); background: var(--card, #fff); border-radius: 8px; padding: 7px 10px; font-weight: 600; cursor: pointer; }
.col-dt-row button.on { background: #2563eb; color: #fff; border-color: #2563eb; }
.col-dt-sel { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #eff6ff; padding: 6px 10px; border-radius: 8px; }
.col-diagram { width: 100%; max-width: calc(72vh * 10 / 7); margin: 0 auto; aspect-ratio: 10 / 7; height: auto; display: block; border-radius: 10px; touch-action: none; user-select: none; cursor: crosshair; }
.col-diagram .col-sel { filter: drop-shadow(0 0 6px #2563eb); }
.tp { background: #fff; color: #111; border: 1px solid #111; padding: 10px; font-size: 11px; }
.tp-head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 6px; }
.tp-num { font: 700 18px ui-monospace, monospace; text-align: right; }
.tp-row { display: flex; flex-wrap: wrap; border-bottom: 1px solid #555; }
.tp-cell { flex: 1 1 110px; border-right: 1px solid #555; padding: 2px 4px; min-height: 30px; position: relative; }
.tp-cell:last-child { border-right: 0; }
.tp-n { font-size: 8px; font-weight: 700; margin-right: 3px; }
.tp-l { font-size: 8px; text-transform: uppercase; color: #444; }
.tp-v { display: block; font-size: 11px; font-weight: 600; }
.tp-unit { border: 1px solid #111; margin: 6px 0; }
.tp-unit-h { background: #111; color: #fff; font-weight: 700; padding: 2px 6px; }
.tp-sec { font-weight: 700; background: #e5e7eb; padding: 2px 6px; margin-top: 6px; }
.tp-diagram { width: 100%; max-height: 420px; border: 1px solid #555; }
.tp-narr { white-space: pre-wrap; min-height: 80px; padding: 4px 6px; border: 1px solid #555; font-size: 12px; }
.tp-occ { width: 100%; border-collapse: collapse; }
.tp-occ th, .tp-occ td { border: 1px solid #555; padding: 2px 4px; text-align: left; vertical-align: top; }
.tp-foot { font-size: 8px; margin: 6px 0 0; }
@media (max-width: 640px) { .col-wide { grid-column: auto; } .col-grid { grid-template-columns: 1fr 1fr; } .col-head h1 { font-size: 18px; } }
@media print {
  body * { visibility: hidden; }
  .tp, .tp * { visibility: visible; }
  .tp { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
  .tp-unit, .tp-diagram, .tp-occ { break-inside: avoid; }
}

/* ─── K9 ─── */
.k9-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.k9-tabs button { flex: none; border: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); border-radius: 999px; padding: 7px 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.k9-tabs button.on { background: #0f172a; color: #fff; border-color: #0f172a; }
.k9-count { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; text-align: center; }
.k9-dogpick { max-width: 320px; }
.k9-er { display: grid; gap: 8px; }
.k9-er-card, .k9-vet { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; }
.k9-er-card.plain, .k9-vet.regular { background: var(--card, #fff); border-color: var(--border, #e2e8f0); }
.k9-er-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #b91c1c; }
.k9-er-tag.reg { color: #475569; }
.k9-vets { display: grid; gap: 8px; }
.k9-dogs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.k9-dog { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); }
.k9-dog:hover, .k9-dog:focus-visible { border-color: #2563eb; }
.k9-dog.retired { opacity: .7; }
.k9-dog-body { display: grid; gap: 2px; min-width: 0; }
.k9-dog .block, .k9-rows .block { display: block; }
.k9-photo { border-radius: 12px; object-fit: cover; flex: none; background: #f1f5f9; }
.k9-photo-none { display: inline-grid; place-items: center; font-size: 30px; }
.k9-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #e2e8f0; color: #334155; vertical-align: middle; }
.k9-pill.ok { background: #dcfce7; color: #166534; }
.k9-pill.warn { background: #fef3c7; color: #92400e; }
.k9-pill.bad { background: #fee2e2; color: #991b1b; }
.k9-alerts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.k9-alert { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.k9-alert.warn { background: #fef3c7; color: #92400e; }
.k9-alert.bad { background: #fee2e2; color: #991b1b; }
.k9-alerts.big .k9-alert { font-size: 14px; padding: 6px 10px; }
.k9-dog-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.k9-dog-head > div { flex: 1; min-width: 200px; }
.k9-dog-head h1 { margin: 2px 0; }
.k9-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.k9-stats > div { background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 10px 12px; display: grid; }
.k9-stats b { font-size: 22px; }
.k9-stats span { font-size: 12px; color: #64748b; }
.k9-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.k9-latest { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.k9-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 10px; }
.k9-grid .field input, .k9-grid .field select, .k9-grid .field textarea { width: 100%; min-width: 0; box-sizing: border-box; }
.k9-wide { grid-column: 1 / -1; }
.k9-check { align-self: center; }
.k9-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.k9-rows > li { padding: 10px 12px; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; background: var(--card, #fff); display: grid; gap: 6px; }
.k9-rows > li.open { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.k9-row-btn { all: unset; cursor: pointer; display: block; }
.k9-dogtag { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 6px; background: #ffedd5; color: #9a3412; font-size: 12px; font-weight: 700; }
.k9-files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.k9-file { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; background: #f1f5f9; border-radius: 6px; padding: 2px 8px; text-decoration: none; }
.k9-map { border-radius: 12px; overflow: hidden; }
.k9-row-act:empty { display: none; }
.k9-rows .pre, .k9-cols .pre, .stack .pre { white-space: pre-wrap; }
@media (max-width: 640px) { .k9-dogs, .k9-cols { grid-template-columns: 1fr; } .k9-grid { grid-template-columns: 1fr 1fr; } .k9-er-card .btn, .k9-vet .btn.primary { flex: 1; text-align: center; } }

/* Agency logo on printed reports */
.agency-logo { object-fit: contain; display: block; }
.irp-seal .agency-logo { width: 0.95in; height: 0.95in; }
.pf-ag .pf-logo { width: 0.8in; height: 0.8in; flex: none; }
.tp-head .tp-logo { width: 0.75in; height: 0.75in; flex: none; }
.tp-headtext { flex: 1; align-self: center; }
.logo-setting { align-items: center; }
.logo-setting .agency-logo { width: 96px; height: 96px; border-radius: 8px; background: #f1f5f9; }
@media print { .irp-seal .agency-logo, .pf-logo, .tp-logo { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
@media (max-width: 640px) { .irp-seal .agency-logo { margin: 0 auto; } }
.k9-filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.k9-filters .field { min-width: 180px; }
.k9-tabs { align-items: center; }
.k9-tabs .k9-vets-tab { margin-left: auto; background: #b91c1c; border-color: #b91c1c; color: #fff; font-size: 1.05rem; padding: 9px 20px; font-weight: 800; }
.k9-tabs .k9-vets-tab:hover { background: #991b1b; }
.k9-tabs .k9-vets-tab.on { background: #7f1d1d; border-color: #7f1d1d; box-shadow: 0 0 0 3px #fecaca; }
.back-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; position: sticky; top: 0; z-index: 5; background: var(--bg, #f8fafc); padding: 6px 0; }
.back-bar-btn { font-size: 1rem; padding: 9px 16px; }

/* Ops plan phases, selection bar, dragging */
.ops-stage { display: grid; gap: 6px; min-width: 0; }
.ops-phases { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ops-phases > button[role=tab] { border: 1px solid var(--line, #cbd5e1); background: var(--card, #fff); border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ops-phases > button[role=tab].on { background: #0f172a; color: #fff; border-color: #0f172a; }
.ops-phase-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #f59e0b; color: #111; font-size: 12px; }
.ops-phase-add { border: 1px dashed #2563eb; color: #2563eb; background: transparent; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.ops-phase-tools { margin-left: auto; display: inline-flex; gap: 4px; }
.ops-ghost { opacity: 0.4; filter: grayscale(0.6); pointer-events: none; }
.ops-ghost-note { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; background: rgb(15 23 42 / 75%); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.ops-selbar { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 7; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #fff; color: #111; border-radius: 12px; padding: 8px 10px; box-shadow: 0 6px 24px rgb(0 0 0 / 35%); max-width: calc(100% - 20px); }
.ops-selbar .ops-del { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.slippy .drag-pin, .ops-photo-ic.drag-pin { cursor: grab; }
.slippy .drag-pin:active, .ops-photo-ic.drag-pin:active { cursor: grabbing; }
.viol-select { width: 100%; font-size: 1rem; padding: 10px; }
.scan-ready { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.scan-ready-tag { font-size: 12px; font-weight: 700; color: #166534; background: #dcfce7; border: 1px solid #86efac; border-radius: 999px; padding: 3px 10px; }
.scan-ready-msg { font-size: 14px; font-weight: 600; background: #eff6ff; border: 1px solid #93c5fd; border-radius: 8px; padding: 4px 10px; }
.scan-raw { white-space: pre-wrap; word-break: break-all; max-height: 240px; overflow: auto; background: #f8fafc; border: 1px solid var(--line, #e2e8f0); border-radius: 6px; padding: 6px; }

/* Reserve officers */
.rsv-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: middle; background: #e2e8f0; color: #334155; }
.rsv-pill.ok { background: #dcfce7; color: #166534; }
.rsv-pill.warn { background: #fef3c7; color: #92400e; }
.rsv-pill.bad { background: #fee2e2; color: #991b1b; }
.rsv-pill.info { background: #dbeafe; color: #1e40af; }
.rsv-standing { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line, #e2e8f0); background: var(--card, #fff); }
.rsv-standing.bad { background: #fef2f2; border-color: #fecaca; }
.rsv-standing.ok { background: #f0fdf4; border-color: #bbf7d0; }
.rsv-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rsv-tile { display: grid; gap: 4px; align-content: start; background: var(--card, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 10px 12px; color: inherit; text-decoration: none; }
.rsv-tile > b { font-size: 22px; }
.rsv-tile.ok { border-color: #86efac; }
.rsv-tile.bad { border-color: #fca5a5; background: #fef2f2; }
.rsv-tile.warn { border-color: #fcd34d; background: #fffbeb; }
.rsv-bar { position: relative; height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; min-width: 90px; }
.rsv-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #2563eb; }
.rsv-fill.done { background: #16a34a; }
.rsv-pend { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, #93c5fd 0 4px, #dbeafe 4px 8px); }
.rsv-months { position: relative; display: flex; gap: 4px; align-items: flex-end; height: 56px; padding-bottom: 14px; min-width: 120px; }
.rsv-goal { position: absolute; left: 0; right: 0; border-top: 1px dashed #64748b; margin-bottom: 14px; }
.rsv-mcol { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.rsv-mbar { width: 70%; background: #94a3b8; border-radius: 2px 2px 0 0; min-height: 1px; }
.rsv-mbar.done { background: #16a34a; }
.rsv-mlab { position: absolute; bottom: -14px; font-size: 9px; color: #64748b; }
.rsv-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 8px; }
.rsv-form .field input, .rsv-form .field select { width: 100%; box-sizing: border-box; }
.rsv-with, .rsv-notes { grid-column: span 2; }
.rsv-hours b { font-size: 20px; }
.rsv-req { color: #b91c1c; font-size: 11px; text-transform: uppercase; }
.rsv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rsv-list > li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; background: var(--card, #fff); }
.rsv-list > li.returned { border-color: #fca5a5; }
.rsv-note { color: #991b1b; }
.rsv-pick { display: flex; gap: 8px; align-items: flex-start; }
.rsv-pick .block { display: block; }
.rsv-table td { vertical-align: top; }
.rsv-table tr.behind td:first-child, .rsv-table tr.missed td:first-child { box-shadow: inset 4px 0 #dc2626; }
.rsv-table tr.met td:first-child { box-shadow: inset 4px 0 #16a34a; }
.rsv-alerts { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.rsv-monthnav { align-items: center; }
.rsv-add { margin-bottom: 10px; }
@media (max-width: 640px) { .rsv-with, .rsv-notes { grid-column: 1 / -1; } .rsv-list > li { flex-direction: column; align-items: stretch; } }

/* ── Fleet shop: retirement heat bar, service blocks, chips ── */
.shop-heat { position: relative; height: 16px; border-radius: 999px; background: var(--line-2); overflow: hidden; min-width: 120px; }
.shop-heat-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.shop-heat-fill.green { background: linear-gradient(90deg, #4ade80, #16a34a); }
.shop-heat-fill.yellow { background: linear-gradient(90deg, #4ade80 0%, #facc15 70%, #eab308 100%); }
.shop-heat-fill.red { background: linear-gradient(90deg, #4ade80 0%, #facc15 55%, #ef4444 85%, #b91c1c 100%); }
.shop-heat-n { position: absolute; right: 6px; top: 0; font-size: 11px; line-height: 16px; font-weight: 700; color: var(--heading); text-shadow: 0 0 2px var(--surface, #fff); }
.shop-table td { vertical-align: top; }
.shop-chips, .int-areas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.shop-chip { font: inherit; font-size: 0.85rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--field-line); background: var(--field); color: var(--text); cursor: pointer; }
.shop-chip.on, .shop-chip[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.shop-chip b { margin-left: 4px; }
.shop-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.shop-block { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-left: 4px solid var(--line); }
.shop-block h3 { margin: 0; font-size: 1rem; }
.shop-block.ok { border-left-color: var(--ok); }
.shop-block.attention { border-left-color: var(--warn); background: var(--warn-bg); }
.shop-block.repaired { border-left-color: var(--info); }
.shop-block textarea { width: 100%; resize: vertical; }
.seg-ctl.sm button { font-size: 0.78rem; padding: 4px 8px; }
.shop-same { align-self: end; padding-bottom: 10px; }

/* ── Employee info: emergency contacts, interests, medical ── */
.ec-edit { display: flex; flex-direction: column; gap: 12px; }
.ec-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.ec-row legend { font-weight: 600; padding: 0 4px; }
.ec-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ec-list li { border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 8px; }
.ec-list .badge { margin-left: 6px; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; margin-bottom: 10px; }
.int-item { padding: 6px 8px; border-radius: 6px; border: 1px solid transparent; }
.int-item.on { border-color: var(--accent); background: var(--accent-bg); }
.int-item label { cursor: pointer; }
.int-note { width: 100%; margin-top: 4px; font-size: 0.85rem; }
.med-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 0.85rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; }

/* ── Borrowed equipment ── */
.loan-list { list-style: none; margin: 0; padding: 0; }
.loan-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.loan-list li.late { border-left: 3px solid var(--bad); padding-left: 8px; }
.loan-list .badge { margin-left: 6px; }
.loan-ext { flex-basis: 100%; }
.loan-hist { margin: 0; padding-left: 18px; }

@media print {
  .ec-page .no-print { display: none !important; }
  .ec-table .ec-list { grid-template-columns: repeat(3, 1fr); }
}
.shop-check { display: flex !important; flex-direction: row !important; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; font-weight: 500; margin: 4px 0 8px; cursor: pointer; }
.shop-check input[type='checkbox'] { width: auto; margin: 0; flex: none; }
.shop-block .seg-ctl { display: flex; width: 100%; }
.shop-block .seg-ctl button { flex: 1; padding: 4px 6px; }
.rsv-q { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.rsv-q legend { font-weight: 600; padding: 0 4px; }
.rsv-q label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.rsv-q input { width: auto; margin: 0; }
.rsv-solo { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.rsv-revoked { color: var(--bad); font-weight: 700; }
.rw-card.cams .cam-q + .cam-q { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }

/* ── Case review ── */
.cr-search input { flex: 1; max-width: 520px; }
.cr-no { color: var(--bad); font-weight: 600; }
.cr-narr summary { cursor: pointer; font-weight: 600; margin-top: 8px; }
.cr-group h3 { font-size: 0.95rem; margin: 14px 0 6px; }
.cr-group h3 label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.cr-group h3 input, .cr-items input[type='checkbox'] { width: auto; margin: 0; }
.cr-items { list-style: none; margin: 0; padding: 0; }
.cr-items li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.cr-it { flex: 1; min-width: 180px; }
.cr-ic { width: 28px; height: 32px; border-radius: 4px; flex: none; position: relative; background: var(--line-2); }
.cr-ic::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 800; color: #fff; }
.cr-ic.pdf { background: #c0392b; } .cr-ic.pdf::after { content: 'PDF'; }
.cr-ic.vid { background: #6d28d9; } .cr-ic.vid::after { content: 'VID'; }
.cr-ic.img { background: #0e7490; } .cr-ic.img::after { content: 'IMG'; }
.cr-ic.aud { background: #b45309; } .cr-ic.aud::after { content: 'AUD'; }
.cr-ic.doc { background: #475569; } .cr-ic.doc::after { content: 'FILE'; }
.cr-viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); z-index: 1000; display: grid; place-items: center; padding: 16px; }
.cr-viewer-in { background: var(--panel); border-radius: 10px; padding: 12px; max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.cr-viewer-in video, .cr-viewer-in img { max-width: 100%; max-height: 78vh; background: #000; border-radius: 6px; }
.cr-prog { position: relative; height: 26px; border-radius: 6px; background: var(--line-2); overflow: hidden; margin: 8px 0; }
.cr-prog span { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width 0.3s; }
.cr-prog b { position: relative; font-size: 0.8rem; line-height: 26px; padding-left: 8px; }
.scene-now { font-size: 1.1rem; } .scene-now b { font-size: 1.6rem; color: var(--ok); }
.scene-list { list-style: none; margin: 0; padding: 0; }
.scene-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; margin-bottom: 6px; background: var(--panel); }
.scene-list li.in { border-left: 4px solid var(--ok); }
.scene-list li.void > div:first-child { text-decoration: line-through; opacity: 0.6; }
.btn.big { font-size: 1.05rem; padding: 12px 18px; }

/* ── Equipment requests ── */
.eq-lines-mini { list-style: none; margin: 4px 0; padding: 0; }
.eq-lines-mini li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; font-size: 0.9rem; flex-wrap: wrap; }
.eq-total { font-weight: 700; font-size: 1.05rem; }
.eq-line { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--line); }
.eq-line.approved { border-left-color: var(--info); }
.eq-line.denied { border-left-color: var(--bad); opacity: 0.8; }
.eq-line-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.eq-tl { margin: 0; padding-left: 20px; font-size: 0.9rem; }
.eq-tl li { padding: 3px 0; }
.eq-plus { font-weight: 700; }
.eq-statusform { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.eq-pool { list-style: none; padding: 0; margin: 4px 0; }
.eq-pool ul { list-style: none; padding: 0; margin: 6px 0; max-height: 220px; overflow: auto; }
.eq-appr { list-style: none; margin: 0; padding: 0; }
.eq-appr li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.eq-appr-act { flex-basis: 100%; }
.eq-upload { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.eq-cat { list-style: none; margin: 8px 0 0; padding: 0; }
.eq-cat li { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.eq-cat li.on { background: var(--accent-bg); margin: 0 -8px; padding: 8px; border-radius: 6px; }
.eq-cat li.off { opacity: 0.55; }
.eq-cat-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.eq-cat-row select { width: 72px; flex: none; }
.eq-cat-name { font-weight: 600; flex: 1; cursor: pointer; }
.eq-cat-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.eq-other-h { font-size: 1rem; margin: 6px 0 0; }

/* Ops planner: right-click / press-and-hold menu */
.ops-rot { display: inline-flex; transform-origin: 50% 50%; }
.ops-photo, .ops-photo *, .slippy .icon-pin { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.ops-menu { position: fixed; z-index: 1000; width: 270px; background: #fff; color: #111; border-radius: 10px; padding: 5px; box-shadow: 0 10px 32px rgb(0 0 0 / 38%); display: flex; flex-direction: column; font: 500 14px/1.2 system-ui, sans-serif; }
.ops-menu > button { display: flex; align-items: baseline; gap: 6px; text-align: left; background: none; border: 0; border-radius: 6px; padding: 9px 10px; color: inherit; font: inherit; cursor: pointer; }
.ops-menu > button span { margin-left: auto; color: #64748b; font-size: 12px; }
.ops-menu > button:hover:not(:disabled), .ops-menu > button:focus-visible { background: #eef2ff; outline: none; }
.ops-menu > button:disabled { color: #94a3b8; cursor: not-allowed; }
.ops-menu-del { color: #b91c1c !important; border-top: 1px solid #e2e8f0 !important; border-radius: 0 0 6px 6px !important; margin-top: 2px; }
.ops-menu-rot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 10px 8px; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; margin: 2px 0; }
.ops-menu-rot > span { width: 100%; font-size: 13px; color: #334155; margin-bottom: 2px; }
.ops-menu-rot button { border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 6px; padding: 5px 8px; font: 600 12px system-ui, sans-serif; color: #111; cursor: pointer; }
.ops-menu-rot button:hover { background: #e0e7ff; }

/* Ticket court dates */
.cd-slot { border-top: 1px solid var(--line, #e2e8f0); padding-top: 10px; }
.cd-slot:first-child { border-top: 0; padding-top: 0; }
.cd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cd-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--hover, #f1f5f9); border: 1px solid var(--line, #e2e8f0); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 0.85rem; }
.cd-chip em { font-style: normal; background: var(--accent); color: var(--accent-ink, #fff); border-radius: 999px; padding: 0 6px; font-size: 0.75rem; font-weight: 700; }
.cd-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 5px; border-radius: 999px; line-height: 1.4; }
.cd-chip button:hover { background: var(--bad-bg, #fee2e2); color: var(--bad, #b91c1c); }
.cd-pick { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 20px; align-items: start; }
@media (max-width: 760px) { .cd-pick { grid-template-columns: 1fr; } }
.cd-cal { display: flex; flex-direction: column; gap: 8px; }
.cd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cd-wd { text-align: center; font-size: 0.72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.cd-day { aspect-ratio: 1; border: 1px solid var(--line, #e2e8f0); background: var(--panel, #fff); border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; color: inherit; }
.cd-day:hover:not(:disabled) { border-color: var(--accent); }
.cd-day.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.cd-day:disabled { opacity: 0.35; cursor: default; }
.cd-def { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line, #e2e8f0); padding-top: 8px; }
.cd-picked { display: flex; flex-direction: column; gap: 8px; }
.cd-picked-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; }
.cd-board { overflow-x: auto; max-height: 560px; overflow-y: auto; }
.cd-board table { min-width: 100%; }
.cd-board thead th { position: sticky; top: 0; background: var(--panel, #fff); z-index: 1; }
.cd-board tbody tr { cursor: pointer; }
.cd-board tr.cd-sel td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.cd-dayh { white-space: nowrap; min-width: 110px; }
.cd-cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.cd-st { font-size: 0.78rem; font-weight: 600; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.cd-st.on { background: #dcfce7; color: #166534; }
.cd-st.off { background: #f1f5f9; color: #64748b; }
.cd-st.flex { background: #fef9c3; color: #854d0e; }
.cd-st.none { color: var(--muted); }
.cd-st.court { background: #ffedd5; color: #9a3412; }
.cd-st.tix { background: #e0e7ff; color: #3730a3; }
.cd-tk { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 12px; margin: 6px 0 4px; }

/* Owner console: feature boxes */
.feat-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.feat-group { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 8px 12px 10px; margin: 0; min-width: 0; position: relative; }
.feat-group legend { font-weight: 700; padding: 0 4px; }
.feat-all { margin-left: 10px; display: inline-flex; gap: 8px; font-weight: 400; }
.feat-all .btn.link { padding: 0; min-height: 0; }
.feat-box { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; cursor: pointer; font-weight: 400; }
.feat-box input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; }

/* Area tip pop-up */
.at-back { z-index: 900; align-items: end; }
@media (min-width: 700px) { .at-back { align-items: center; } }
.at-modal { border-top: 6px solid #f59e0b; }
.at-head { display: flex; gap: 10px; align-items: center; }
.at-ic { font-size: 1.8rem; }
.at-note { font-size: 1.15rem; font-weight: 600; margin: 4px 0; }
.at-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.at-btns .btn.big { min-height: 52px; font-size: 1.05rem; }
.ptm-tip { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; flex: 1; }
.ptm-tipcard { display: block; }

/* Funeral escorts: crew */
.ec-crew { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ec-join { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .ec-join { grid-template-columns: 1fr; } }
.ec-join .btn.big { min-height: 52px; }
.ec-dep { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ec-dep label { display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; }
.ec-leave { border: 1px solid var(--line); border-left: 4px solid var(--bad, #b91c1c); border-radius: 8px; padding: 10px 12px; }
.chip-radio { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip-radio.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chip-radio input { margin: 0; }
.ec-msg summary { cursor: pointer; font-weight: 600; }
@media print { .no-print-ctl { display: none !important; } }
