/* In-car mobile data terminal: landscape laptop screen, status keys down the side. */
body.mdt { font: 400 14px/1.35 "IBM Plex Sans Condensed", var(--font-body); }
#app { height: 100vh; display: flex; flex-direction: column; min-width: 1000px; }
.signin .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.mbar { display: flex; align-items: center; height: 34px; background: #ffffff; border-bottom: 1px solid var(--line-amber); }
.brand { font: 700 13px var(--font-mono); letter-spacing: .12em; color: #f4fbf6; background: var(--green); height: 100%; display: flex; align-items: center; padding: 0 12px; }
.mb-item { font: 600 13px var(--font-mono); padding: 0 14px; height: 100%; display: flex; align-items: center; border-right: 1px solid var(--line); white-space: nowrap; color: var(--fg-2); }
.mb-item.strong { color: var(--term); font-size: 15px; }
.mb-item.clock { color: var(--term); border-left: 1px solid var(--line); }
#link.on { color: var(--ok); } #link.off { color: var(--p1); }
.spacer { flex: 1; }
.mb-btn { height: 100%; border: 0; border-left: 1px solid var(--line); background: none; font: 600 12px var(--font-mono); padding: 0 14px; color: var(--muted); }

.body { flex: 1; min-height: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.keys { display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--bg-2); border-right: 1px solid var(--line); }
.keys button { min-height: 58px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); text-align: left; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.keys button b { font: 700 11px var(--font-mono); color: var(--amber); }
.keys button span { font: 700 15px var(--font-mono); letter-spacing: .04em; }
.keys button.on { background: #e3efe6; border-color: var(--amber); }
.keys button.on span { color: var(--term); }
.keys .k-avail.on { background: #e1f0e6; border-color: var(--green); } .keys .k-avail.on span { color: var(--ok); }
.keys .k-onscene.on { background: #f9e9e0; border-color: var(--s-os); } .keys .k-onscene.on span { color: var(--s-os); }
.keys .k-enroute.on { background: #e8f0fa; border-color: var(--s-er); } .keys .k-enroute.on span { color: var(--s-er); }

.main { min-height: 0; display: flex; flex-direction: column; }
.mtabs { display: flex; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.mtabs button { height: 36px; padding: 0 18px; border: 0; border-right: 1px solid var(--line); background: none; font: 700 13px var(--font-mono); letter-spacing: .06em; color: var(--muted); }
.mtabs button.on { background: var(--bg); color: var(--term); box-shadow: inset 0 3px 0 var(--amber); }
.tab { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; }

.block { border: 1px solid var(--line); background: #f6f4ee; margin-bottom: 10px; }
.block-h { font: 700 11px var(--font-mono); letter-spacing: .12em; color: var(--muted); background: #e9ece4; padding: 4px 8px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.block-b { padding: 8px 10px; }
.cad-line { font: 600 15px/1.55 var(--font-mono); color: var(--term); white-space: pre-wrap; }
.cad-line .big { font-size: 22px; font-weight: 700; }
.cad-line .lbl { color: var(--term-dim); }
.hazard { background: var(--bad-bg); border: 1px solid var(--bad); color: var(--p1); font: 700 14px var(--font-mono); padding: 8px 10px; margin-bottom: 10px; }
.badge { font: 700 11px var(--font-mono); padding: 1px 5px; border-radius: 2px; margin-left: 8px; vertical-align: 2px; }
.badge.v { background: #e1f0e6; color: var(--ok); border: 1px solid var(--green); }
.badge.xy { background: var(--warn-bg); color: var(--term); border: 1px solid #d9b25a; }
.badge.u { background: var(--bad-bg); color: var(--p1); border: 1px solid var(--bad); }
.log { font: 500 13px/1.5 var(--font-mono); max-height: 34vh; overflow: auto; }
.log .r { display: grid; grid-template-columns: 70px 140px minmax(0, 1fr); gap: 8px; }
.log time { color: var(--muted); } .log .who { color: var(--term-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .r.note .txt { color: var(--term); } .log .r.cad .txt { color: #1d5d9b; } .log .r.system .txt { color: var(--fg-2); }
.entry { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); }
.entry .lbl { font: 700 12px var(--font-mono); color: var(--term-dim); }
.entry input, .entry select, .qform input, .iform input, .iform select { min-height: 36px; border-radius: 2px; font: 600 14px var(--font-mono); }
.btn { border-radius: 2px; font: 700 13px var(--font-mono); letter-spacing: .04em; min-height: 36px; }
.btn.small { min-height: 30px; font-size: 12px; }

.grid-t { width: 100%; border-collapse: collapse; font: 500 13px var(--font-mono); }
.grid-t th { text-align: left; font-size: 11px; letter-spacing: .08em; color: var(--muted); padding: 5px 8px; border-bottom: 1px solid var(--line); background: #f1efe8; position: sticky; top: 0; }
.grid-t td { padding: 5px 8px; border-bottom: 1px solid #e7e5dd; white-space: nowrap; }
.grid-t .p1 { color: var(--p1); font-weight: 700; } .grid-t .p2 { color: var(--p2); font-weight: 700; } .grid-t .p4 { color: var(--p4); }
.grid-t tr.mine td { background: #e3efe6; color: var(--term); }

.qform { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.qform input[type=text], .qform #q { flex: 1; text-transform: uppercase; }
.qtype { display: flex; gap: 12px; border: 0; padding: 0; margin: 0; font: 600 13px var(--font-mono); }
.qtype label { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
pre.ret { margin: 0 0 8px; white-space: pre-wrap; font: 600 14px/1.5 var(--font-mono); color: var(--term); background: #f6f4ee; border: 1px solid var(--line); padding: 10px 12px; }
pre.ret.hit { color: var(--p1); border-color: var(--bad); background: #fdecea; }
pre.ret .ret-top { color: var(--p1); font-weight: 800; }
.iform { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 760px; margin-bottom: 10px; }
.iform .span2 { grid-column: span 2; }
.empty { padding: 20px; color: var(--muted); font: 500 14px var(--font-mono); }
#map { height: calc(100vh - 34px - 36px - 46px); min-height: 360px; border: 1px solid var(--line); }
.bolo-item { font: 600 14px/1.5 var(--font-mono); color: var(--term); border: 1px solid #d9b25a; background: var(--warn-bg); padding: 8px 10px; margin-bottom: 8px; }

.dispatch-alert { position: fixed; inset: 0; z-index: 50; background: rgba(20,30,25,.55); display: grid; place-items: center; }
.dispatch-alert .box { width: min(820px, calc(100vw - 40px)); border: 3px solid var(--amber); background: #ffffff; padding: 22px 26px; display: flex; flex-direction: column; gap: 10px; animation: flash 1s steps(2) 6; }
@keyframes flash { 50% { border-color: var(--p1); } }
@media (prefers-reduced-motion: reduce) { .dispatch-alert .box { animation: none; } }
.dispatch-alert .t { font: 700 14px var(--font-mono); letter-spacing: .2em; color: var(--p1); }
.dispatch-alert .n { font: 700 34px/1.1 var(--font-mono); color: var(--term); }
.dispatch-alert .l { font: 600 20px var(--font-mono); color: var(--fg); }
.dispatch-alert .btn { min-height: 52px; font-size: 18px; }

/* lookup returns: actions under a block */
.ret-actions { margin: -4px 0 10px; display: flex; gap: 8px; }

/* F7 CITE: citation form on the left, the printed ticket preview on the right */
.cite { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; max-width: 1240px; }
.cite-form .block-b { display: flex; flex-direction: column; gap: 8px; }
.cite-form input, .cite-form select, .cite-form textarea { min-height: 34px; border-radius: 2px; font: 600 14px var(--font-mono); padding: 5px 8px; }
.cite-form textarea { min-height: 70px; font-weight: 500; }
.cite-form .field > span { font-size: 10.5px; }
.cite-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.cite-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
.cite-grid .span2 { grid-column: span 2; } .cite-grid .span3 { grid-column: span 3; } .cite-grid .span4 { grid-column: span 4; }
.cite-results, .cite-matches { display: flex; flex-direction: column; gap: 2px; }
.cite-results:empty, .cite-matches:empty { display: none; }
.cite-hit { text-align: left; border: 1px solid var(--line); background: var(--surface); padding: 6px 8px; font: 500 13px var(--font-mono); color: var(--fg); border-radius: 2px; }
.cite-hit:hover, .cite-hit:focus-visible { background: #e3efe6; border-color: var(--amber); }
.cite-hit b { color: var(--term); }
.cite-matches { max-height: 340px; overflow-y: auto; }
.cite-titles { display: flex; flex-wrap: wrap; gap: 0; }
.cite-titles:empty { display: none; }
.chip-btn.on { background: #e3efe6; border-color: var(--amber); color: var(--fg); box-shadow: inset 0 -2px 0 var(--amber); }
.cite-hit.stat { display: grid; grid-template-columns: 112px minmax(0, 1fr) 42px 84px 118px; gap: 10px; align-items: center; }
.cite-hit .t small { display: block; overflow: hidden; text-overflow: ellipsis; font: 500 11px var(--font-body); color: var(--muted); }
.cite-hit.arrest { background: #eceee8; color: var(--muted); cursor: not-allowed; }
.cite-hit.arrest:hover { background: #eceee8; border-color: var(--line); }
.cite-hit .flags { text-align: right; }
.cite-hit .flag { font: 700 10.5px var(--font-mono); letter-spacing: .04em; padding: 2px 5px; border: 1px solid currentColor; border-radius: 2px; white-space: nowrap; }
.cite-hit .flag.arrest { color: var(--p1); }
.cite-hit .flag.court { color: var(--s-dp); }
.cite-hit.stat.first { border-color: var(--amber); }
.cite-hit .code { color: var(--term-dim); font-weight: 600; }
.cite-hit .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cite-hit .fine { text-align: right; font-weight: 700; }
.cls { font-weight: 700; }
.cls.misdemeanor, .cls.misd { color: var(--s-dp); } .cls.felony, .cls.fel { color: var(--p1); } .cls.infraction, .cls.inf { color: var(--muted); }
.cite-sub { font: 500 12px var(--font-mono); color: var(--muted); }
.cite-sub.ok { color: var(--ok); font-weight: 600; }
.cite-warn { color: var(--p1); font-weight: 700; }
.cite-link { color: var(--term); letter-spacing: .04em; }
.chip-btn { font: 600 11px/1 var(--font-mono); letter-spacing: .04em; padding: 5px 7px; margin: 2px 4px 0 0; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); color: var(--term); }
.chip-btn:hover { border-color: var(--amber); background: #e3efe6; }
.cite-t td.wrap { white-space: normal; }
.cite-t td.num { text-align: right; font-weight: 700; }
.cite-t td:last-child { width: 30px; text-align: center; }
.cite-t .x { border: 0; background: none; color: var(--p1); font: 700 18px/1 var(--font-mono); padding: 0 4px; }
.cite-total { color: var(--term); font-size: 13px; }
.cite-check { display: flex; gap: 8px; align-items: center; font: 700 13px var(--font-mono); color: var(--fg); }
.cite-check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--clay); }
.cite-courtinfo { margin-left: 10px; font: 600 12px var(--font-mono); color: var(--muted); }
.cite-courtinfo.court { color: var(--p1); }
.sigpad { display: block; width: 100%; max-width: 560px; aspect-ratio: 4 / 1; background: #fffdf7; border: 1px dashed var(--line-amber); border-radius: 2px; touch-action: none; cursor: crosshair;
  background-image: linear-gradient(to top, transparent 24px, #9aa59c 24px, #9aa59c 25px, transparent 25px); }
.cite-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.cite-actions .btn.primary { min-width: 220px; min-height: 44px; font-size: 15px; }
.cite-issued { border: 2px solid var(--green); background: #e1f0e6; padding: 14px 16px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font: 600 14px var(--font-mono); color: var(--term); }
.cite-issued .big { font-size: 22px; font-weight: 700; }
.cite-aside { position: sticky; top: 0; border: 1px solid var(--line); background: #e9ece4; }
.cite-preview-c { display: block; width: 100%; height: auto; box-shadow: 0 2px 10px rgba(0,0,0,.18); background: #f7f3e7; }
.cite-aside .cite-sub { margin: 6px 8px 8px; }

/* ---------- title bar: STATUS OK, NIGHT, PANIC ---------- */
.mb-btn.ok { color: var(--ok); }
.mb-btn.ok.due { background: var(--warn-bg); color: var(--p2); box-shadow: inset 0 -3px 0 #d9b25a; animation: pulse 1.2s ease-in-out infinite; }
.mb-btn:disabled { opacity: .5; }
@keyframes pulse { 50% { background: #f3dc9e; } }
.mb-panic { height: 100%; display: flex; align-items: center; gap: 7px; border: 0; padding: 0 16px 0 12px; background: var(--bad); color: #fff;
  font: 700 13px var(--font-mono); letter-spacing: .14em; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mb-panic:hover { background: #9c1f18; }
.mb-panic .ring { flex: none; }
.mb-panic .ring-bg { stroke: rgba(255,255,255,.35); }
.mb-panic .ring-fg { stroke: #fff; }
.mb-panic.holding { background: #7d1712; }
.mb-panic.active { animation: sos-flash 1s steps(2) infinite; }
@keyframes sos-flash { 50% { background: #5e0f0b; } }

/* ---------- emergency banners under the title bar ---------- */
.sos-bar { display: flex; flex-direction: column; }
.sos { display: flex; align-items: center; gap: 14px; padding: 6px 12px; min-height: 40px; background: var(--bad); color: #fff; font: 600 14px var(--font-mono); border-bottom: 1px solid #7d1712; animation: sos-flash 1s steps(2) infinite; }
.sos b { font-size: 16px; letter-spacing: .06em; white-space: nowrap; }
.sos .sos-t { font-size: 12px; letter-spacing: .08em; padding: 2px 6px; border: 1px solid rgba(255,255,255,.6); border-radius: 2px; white-space: nowrap; }
.sos .sos-tm { margin-left: auto; font-weight: 700; }
.sos .sos-btn { background: #fff; color: var(--bad); border-color: #fff; }
.sos .sos-btn.armed { background: #ffe08a; color: #5e0f0b; }
.sos.acked, .sos.quiet { animation: none; }
.sos.acked { background: #8c1d17; }
.sos.mine { background: #5e0f0b; }
.sos.mine.acked { background: #2d5a3d; border-color: #1b3d28; }
@media (prefers-reduced-motion: reduce) { .sos, .mb-panic.active, .mb-btn.ok.due { animation: none; } }

/* ---------- screen tabs: badges and the MORE menu ---------- */
.mtabs { position: relative; }
.mtabs button { padding: 0 13px; white-space: nowrap; }
.nbadge { display: inline-block; min-width: 18px; padding: 1px 5px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 11px/16px var(--font-mono); text-align: center; letter-spacing: 0; vertical-align: 1px; }
.nbadge.amber { background: #d9b25a; color: #3b2a00; }
.more { position: relative; display: flex; }
.more-menu { position: absolute; top: 100%; right: 0; z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--line-amber); box-shadow: 0 8px 22px rgba(0,0,0,.16); display: flex; flex-direction: column; }
.mtabs .more-menu button { height: 40px; border-right: 0; border-bottom: 1px solid var(--line); text-align: left; display: flex; gap: 10px; align-items: center; color: var(--fg); }
.mtabs .more-menu button b { width: 46px; color: var(--amber); font-size: 11px; }
.mtabs .more-menu button:hover, .mtabs .more-menu button:focus-visible { background: #e3efe6; }
.mtabs .more-menu button.on { box-shadow: inset 3px 0 0 var(--amber); color: var(--term); }

/* ---------- record forms (ARREST, FI, TOW, REPORTS) ---------- */
.rec { max-width: 1060px; }
.rec.narrow { max-width: 900px; }
.rec.wide { max-width: 1180px; }
.rec .cite-form .block-b { display: flex; flex-direction: column; gap: 8px; }
.row-btns { display: flex; gap: 8px; margin-top: 4px; }
.hazard.danger { background: var(--p1); color: #fff; }
.chg { display: flex; flex-direction: column; gap: 8px; }
.chg-t td.jail { font-size: 11.5px; color: var(--fg-2); max-width: 220px; }
.chg-sum { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; font: 600 12px var(--font-mono); color: var(--fg-2); }
.chg-sum b { font-size: 14px; color: var(--term); }
.arr-warrants { display: flex; flex-direction: column; gap: 4px; }
.arr-warrants:empty { display: none; }
.arr-w { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--bad); background: var(--bad-bg); color: var(--p1); font: 600 13px var(--font-mono); }
.arr-w input { width: 18px; height: 18px; min-height: 0; accent-color: var(--bad); }
.cnt.short { color: var(--p1); }
.tow-v:empty { display: none; }
.tow-rel { border-top: 1px dashed var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.btn.armed { background: var(--warn-bg); border-color: #d9b25a; color: var(--p2); }

/* returns: SERVE rows under a block with an active warrant */
.ret-actions { flex-wrap: wrap; }
.ret-actions.warrant { align-items: center; margin: -8px 0 6px; padding: 6px 8px; border: 1px solid var(--bad); border-top: 0; background: var(--bad-bg); }
.ret-w { font: 700 13px var(--font-mono); color: var(--p1); letter-spacing: .04em; margin-right: 6px; }

/* REPORTS */
.rpt-t td.wrap { white-space: normal; }
.rpt-t tr.returned td { background: #fdf3e4; }
.rpt-note { margin-top: 3px; font: 600 12px var(--font-mono); color: var(--p2); }
.rpt-st { font: 700 11px var(--font-mono); letter-spacing: .06em; padding: 2px 6px; border-radius: 2px; border: 1px solid var(--line); color: var(--fg-2); background: var(--surface); }
.rpt-st.submitted { color: var(--blue); border-color: var(--blue); }
.rpt-st.returned { color: var(--p2); border-color: #d9b25a; background: var(--warn-bg); }
.rpt-st.approved { color: var(--ok); border-color: var(--green); background: #e1f0e6; }
.rpt-head { font: 700 15px var(--font-mono); color: var(--term); display: flex; gap: 6px; align-items: center; }
.rpt-returned { border: 2px solid #d9b25a; background: var(--warn-bg); padding: 10px 12px; margin-bottom: 10px; font: 500 14px var(--font-mono); color: var(--fg); display: flex; flex-direction: column; gap: 4px; white-space: pre-wrap; }
.rpt-returned b { color: var(--p2); letter-spacing: .06em; }
.rpt-approved { border: 1px solid var(--green); background: #e1f0e6; color: var(--ok); padding: 8px 12px; margin-bottom: 10px; font: 600 13px var(--font-mono); }
.rpt-approved.sub { border-color: var(--blue); background: #e8f0fa; color: var(--blue); }
.inv-t td { padding: 3px 6px; }
.inv-t input, .inv-t select { min-height: 32px; padding: 4px 8px; font: 600 13px var(--font-mono); border-radius: 2px; }
.inv-t td:first-child { width: 150px; } .inv-t td:nth-child(3) { width: 170px; } .inv-t td:last-child { width: 30px; text-align: center; }
.rec textarea { font: 500 14px/1.5 var(--font-mono); }

/* MSG */
.tab-msg { padding: 0; display: flex; }
.tab-msg[hidden] { display: none !important; }
.msg-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.msg-list { border-right: 1px solid var(--line); background: var(--bg-2); overflow-y: auto; display: flex; flex-direction: column; }
.msg-list select { margin: 8px; width: calc(100% - 16px); min-height: 34px; font: 600 12px var(--font-mono); border-radius: 2px; }
.msg-conv { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.msg-conv.on { background: var(--surface); box-shadow: inset 3px 0 0 var(--amber); }
.msg-conv .mc-h { display: flex; gap: 6px; align-items: center; font: 700 13px var(--font-mono); color: var(--term); }
.msg-conv .mc-h time { margin-left: auto; font-weight: 500; font-size: 11px; color: var(--muted); }
.msg-conv .mc-t { font: 500 12px var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-conv.unread .mc-t { color: var(--fg); font-weight: 600; }
.msg-main { min-height: 0; display: flex; flex-direction: column; }
.msg-thread { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.msg-day { align-self: center; font: 600 11px var(--font-mono); color: var(--muted); letter-spacing: .1em; padding: 4px 0; }
.msg { max-width: 72%; border: 1px solid var(--line); background: var(--surface); padding: 6px 10px; }
.msg.out { align-self: flex-end; background: #e3efe6; border-color: #b9d3c1; }
.msg.new { border-color: var(--amber); box-shadow: inset 3px 0 0 var(--amber); }
.msg-meta { font: 600 11px var(--font-mono); color: var(--term-dim); letter-spacing: .04em; }
.msg-meta time { color: var(--muted); }
.msg-text { font: 500 14px/1.45 var(--font-mono); color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-main .entry { background: var(--surface); }

/* ---------- NIGHT: dark, low glare, dimmed whites, amber and green text (spec item 13) ---------- */
body.mdt.night {
  --bg: #0f1411; --bg-2: #141a16; --surface: #1a211c; --surface-2: #1e2620; --line: #2c372f; --line-amber: #4a3d22;
  --fg: #c9c3b0; --fg-2: #a9a491; --muted: #7d8577;
  --clay: #8f3b1f; --clay-ink: #f1d9c8; --amber: #d6a24a; --term: #e0b35c; --term-dim: #a88a55;
  --green: #2f7d52; --ok: #6fbf8a; --blue: #7fa6d6; --bad: #c0463c; --bad-bg: #2a1513; --warn-bg: #2a2212;
  --p1: #ff7a6e; --p2: #e0b35c; --p3: #c9c3b0; --p4: #7d8577;
  --s-dp: #d1a43a; --s-er: #7fa6d6; --s-os: #e08a64; --s-tr: #b598d4;
  background: var(--bg); color: var(--fg);
}
body.mdt.night .mbar { background: #121813; }
body.mdt.night .brand { color: #0f1411; background: #6fbf8a; }
body.mdt.night .block, body.mdt.night pre.ret { background: #141a16; }
body.mdt.night .sigpad { background-color: #b9b3a2; filter: brightness(.85); }
body.mdt.night .block-h, body.mdt.night .cite-aside, body.mdt.night .grid-t th { background: #1a211c; }
body.mdt.night .grid-t td { border-bottom-color: #222b24; }
body.mdt.night .grid-t tr.mine td, body.mdt.night .keys button.on, body.mdt.night .cite-hit:hover, body.mdt.night .cite-hit:focus-visible,
body.mdt.night .chip-btn:hover, body.mdt.night .chip-btn.on, body.mdt.night .msg.out, body.mdt.night .mtabs .more-menu button:hover { background: #1e2a20; }
body.mdt.night .msg.out { border-color: #2f4a37; }
body.mdt.night .keys .k-avail.on { background: #17291d; } body.mdt.night .keys .k-onscene.on { background: #2b1b13; } body.mdt.night .keys .k-enroute.on { background: #172231; }
body.mdt.night pre.ret.hit { background: #2a1513; }
body.mdt.night .cite-hit.arrest, body.mdt.night .cite-hit.arrest:hover { background: #161b17; }
body.mdt.night .cite-issued, body.mdt.night .badge.v, body.mdt.night .rpt-st.approved, body.mdt.night .rpt-approved { background: #13261a; }
body.mdt.night .rpt-approved.sub { background: #131c27; }
body.mdt.night .rpt-t tr.returned td { background: #231c10; }
body.mdt.night .dispatch-alert .box, body.mdt.night .more-menu, body.mdt.night .toast, body.mdt.night .sc-card, body.mdt.night .signin form { background: #1a211c; }
body.mdt.night .dispatch-alert { background: rgba(0,0,0,.6); }
body.mdt.night .pin-label, body.mdt.night .map-btn { background: rgba(20,26,22,.92); color: var(--fg); }
body.mdt.night .map-layer img { filter: brightness(.55) saturate(.7); }
body.mdt.night .cite-preview-c { filter: brightness(.7) sepia(.2); }
body.mdt.night .sos { background: #7a1c16; color: #f3d6d2; }
body.mdt.night .sos.acked { background: #4a1310; }
body.mdt.night .sos.mine.acked { background: #1d3b28; }
body.mdt.night .sos .sos-btn { background: #f3d6d2; color: #5e0f0b; }
body.mdt.night .mb-panic { background: #8f2a22; color: #f3d6d2; }
@keyframes pulse-n { 50% { background: #574013; } }
body.mdt.night .mb-btn.ok.due { background: #3a2c0c; animation-name: pulse-n; }
body.mdt.night input, body.mdt.night select, body.mdt.night textarea { background: #101511; color: var(--fg); border-color: var(--line); }
body.mdt.night ::placeholder { color: #5d655a; }
body.mdt.night .nbadge.amber { background: #6b5320; color: #f0dca8; }

/* narrower in-car screens (1000-1180 px): tighten the title bar and the screen tabs so nothing scrolls sideways */
.brand, .mb-btn, .mb-panic { white-space: nowrap; }
@media (max-width: 1180px) {
  .mb-item { padding: 0 8px; font-size: 12px; }
  .mb-item.strong { font-size: 13px; }
  .brand { padding: 0 8px; font-size: 12px; letter-spacing: .08em; }
  .mb-btn { padding: 0 8px; font-size: 11px; }
  .mb-panic { padding: 0 10px 0 8px; letter-spacing: .08em; }
  .mtabs button { padding: 0 8px; font-size: 12px; letter-spacing: .02em; }
}
.mbar { min-width: 0; }
.mbar .mb-item { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mbar .brand, .mbar .mb-btn, .mbar .mb-panic, .mbar .clock { flex-shrink: 0; }
body.mdt.night .log .r.cad .txt { color: var(--blue); }
