:root{
  /* One incident window, one width. The Fire dialog (#incidentDialog) and the Law
     dialog (.law-incident-dialog) had drifted to min(940px,95vw) and
     min(980px,96vw) — the same screen in two sizes, because they are styled in
     two different files. Defined here so neither file can move alone. */
  --incident-dialog-width:min(940px,95vw);

  --bg:#0f141a;--panel:#182029;--panel2:#202a35;--line:#33404e;
  --text:#edf2f7;--muted:#98a7b7;--accent:#e24b3c;--good:#31b477;
  --warn:#e0a63a;--blue:#4f8edc;--danger:#d84b4b
}
*{box-sizing:border-box} body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
button,input,select,textarea{font:inherit} button{cursor:pointer}
.topbar{height:72px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#121922;position:sticky;top:0;z-index:20}
.brand{display:flex;gap:12px;align-items:center}.brand-mark{background:var(--accent);font-weight:900;padding:10px 8px;border-radius:7px}.brand small{display:block;color:var(--muted);margin-top:2px}
nav{display:flex;gap:8px}.nav-btn,.admin-tab{border:1px solid transparent;color:var(--muted);background:transparent;padding:10px 14px;border-radius:8px}
.nav-btn.active,.admin-tab.active{background:var(--panel2);border-color:var(--line);color:var(--text)}
main{max-width:1500px;margin:auto;padding:24px}.page{display:none}.page.active{display:block}
.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.page-head h1{margin:0;font-size:28px}.page-head p{margin:5px 0 0;color:var(--muted)}
.primary{background:var(--accent);border:0;color:white;font-weight:700;padding:11px 16px;border-radius:8px}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:16px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.panel h2{font-size:16px;margin:0}
.dispatch-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px}.history-panel{margin-top:16px}
.incident-list{display:grid;gap:10px}.incident-card{padding:13px;border:1px solid var(--line);border-left:5px solid var(--accent);border-radius:8px;background:var(--panel2);cursor:pointer}
.incident-card:hover{filter:brightness(1.08)}.incident-card strong{font-size:16px}.incident-card .meta,.muted{color:var(--muted);font-size:13px}.incident-card .location{margin:7px 0}
.pill{display:inline-block;padding:3px 8px;border-radius:999px;background:#293645;color:#bdcad8;font-size:12px}
.unit-row{display:grid;grid-template-columns:90px 1fr 120px 80px;gap:10px;padding:9px 4px;border-bottom:1px solid #29343f;align-items:center}.unit-row:last-child{border-bottom:0}
.unit-id{font-weight:800}.status{font-size:12px;font-weight:800;padding:5px 7px;border-radius:5px;text-align:center;background:#2b3540}.available{color:var(--good)}.unavailable{color:#e77b73}
.form-grid{display:grid;gap:12px}.form-grid.two{grid-template-columns:1fr 1fr}label{display:grid;gap:6px;color:#c7d2de;font-size:13px}
input,select,textarea{width:100%;background:#111820;border:1px solid var(--line);color:var(--text);padding:10px;border-radius:7px;outline:none}textarea{resize:vertical}
.status-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.status-buttons button{background:#25303b;border:1px solid var(--line);color:var(--text);padding:10px 12px;border-radius:7px}.status-buttons button.current{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.admin-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}.admin-card{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:16px;margin-bottom:12px}.admin-card h3{margin:0 0 12px}
.admin-list{width:100%;border-collapse:collapse}.admin-list th,.admin-list td{text-align:left;padding:9px;border-bottom:1px solid #2b3742;font-size:13px}.admin-list th{color:var(--muted)}
.small-btn{background:#293644;border:1px solid var(--line);color:var(--text);padding:6px 9px;border-radius:6px}.danger{background:#4b2527;color:#ffc5c5}
dialog{width:min(720px,94vw);max-height:90vh;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:18px}dialog::backdrop{background:#000a}
.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
/* The head is space-between, so a THIRD child lands dead centre — which is where
   the ⚑ button ended up on both incident dialogs (BUGS-2026-09-07 F-010). Header
   buttons live in an actions container instead, pinned right, so anything added
   later joins the cluster beside the × rather than floating into the middle. */
.incident-head-actions{display:flex;align-items:center;gap:7px;margin-left:auto}.dialog-head h2{margin:0}.icon-btn{background:transparent;border:0;color:#c9d2db;font-size:26px}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.dialog-actions button:not(.primary){background:#27323d;border:1px solid var(--line);color:var(--text);padding:10px 14px;border-radius:7px}
.recommend-box{margin-top:14px;padding:12px;background:#111820;border:1px solid var(--line);border-radius:7px}.resource-line{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #29343f}.resource-line:last-child{border:0}
.incident-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}.detail{background:#111820;border:1px solid #2d3945;padding:10px;border-radius:7px}.detail small{display:block;color:var(--muted);margin-bottom:4px}
.assignment-row{display:flex;justify-content:space-between;align-items:center;padding:8px;border-bottom:1px solid #2e3944}.note{padding:8px 0;border-bottom:1px solid #2e3944}.note small{color:var(--muted)}
.toast{position:fixed;right:20px;bottom:20px;padding:10px 14px;background:#24303a;border:1px solid var(--line);border-radius:8px;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:none}
.empty{padding:20px;text-align:center;color:var(--muted)}.section-title{font-weight:800;margin:18px 0 8px}
@media(max-width:900px){.dispatch-grid{grid-template-columns:1fr}.topbar{height:auto;padding:12px;gap:10px;align-items:flex-start;flex-direction:column}nav{width:100%;overflow:auto}.form-grid.two,.incident-detail-grid{grid-template-columns:1fr}.unit-row{grid-template-columns:75px 1fr 105px}.unit-row .station{display:none}main{padding:14px}}

/* v0.2 additions */
.availability-banner{margin-top:12px;padding:10px 12px;background:#111820;border:1px solid var(--line);border-radius:7px}
.action-group{display:flex;gap:6px;flex-wrap:wrap}
.inactive-row{opacity:.55}
.card-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.cap-chip{display:inline-flex;gap:7px;align-items:center;background:#293644;border:1px solid var(--line);padding:5px 8px;border-radius:999px;margin:3px;font-size:12px}
.cap-chip button{border:0;background:transparent;color:#dce5ee;font-size:15px;line-height:1;padding:0;cursor:pointer}
.inline-form{display:flex;gap:8px;margin-top:10px;max-width:520px}
.form-grid.three{grid-template-columns:2fr .7fr 1fr}
.compact-form{margin-top:10px;margin-bottom:9px}
.shortage-box{margin-top:10px;padding:10px 12px;background:#352b1b;border:1px solid #67552d;border-radius:7px;color:#f0ce83;font-size:13px;display:grid;gap:5px}
@media(max-width:900px){.form-grid.three{grid-template-columns:1fr}.card-title-row{flex-direction:column}.inline-form{max-width:none}}


/* v0.3 additions */
.dispatch-status-select{
  min-width:150px;
  padding:7px 8px;
  font-size:12px;
}
.section-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:18px;
}
.section-title-row .section-title{
  margin:0;
}
.primary-inline{
  background:var(--accent);
  color:white;
  border-color:transparent;
  font-weight:700;
}
.progress-list{
  display:grid;
  gap:8px;
}
.requirement-progress{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
}
.requirement-progress.met{
  border-left:5px solid var(--good);
}
.requirement-progress.missing{
  border-left:5px solid var(--danger);
}
.requirement-progress.met .requirement-count{
  color:var(--good);
}
.requirement-progress.missing .requirement-count{
  color:#f0867d;
}
.requirement-count{
  font-weight:800;
  white-space:nowrap;
}
.note small{
  display:inline;
  margin-right:5px;
}
@media(max-width:900px){
  .dispatch-status-select{min-width:115px;width:100%}
  .section-title-row{align-items:flex-start}
  .requirement-progress{align-items:flex-start;flex-direction:column}
}


/* v0.4 layout and fulfillment refinements */
.unit-row{
  grid-template-columns:80px minmax(0,1fr) minmax(100px,150px) minmax(135px,165px);
}
.unit-row > *{min-width:0}
.dispatch-status-select{
  min-width:0;
  width:100%;
  max-width:100%;
}
.requirement-progress.over{
  border-left:5px solid var(--warn);
}
.requirement-progress.over .requirement-count{
  color:var(--warn);
}
@media(max-width:1100px){
  .unit-row{
    grid-template-columns:70px minmax(0,1fr) minmax(120px,150px);
  }
  .unit-row .station{display:none}
}


/* v0.5 global unit selector */
.topbar-left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}
.active-unit-button{
  min-width:155px;
  border:1px solid var(--line);
  background:#0c1117;
  color:var(--text);
  border-radius:9px;
  padding:8px 14px;
  text-align:left;
  display:grid;
  gap:1px;
}
.active-unit-button:hover{
  background:#19222c;
}
.active-unit-button.unit-selected{
  border-color:#596878;
}
.active-unit-kicker{
  color:var(--muted);
  font-size:10px;
  letter-spacing:.14em;
  font-weight:800;
}
.active-unit-name{
  font-size:22px;
  line-height:1;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.terminal-unit-identity{
  display:flex;
  align-items:center;
  gap:14px;
  padding:4px 0 8px;
}
.terminal-unit-short{
  min-width:80px;
  font-size:28px;
  font-weight:900;
  letter-spacing:.02em;
}
#customOosWrap small{
  text-align:right;
}
@media(max-width:900px){
  .topbar-left{
    width:100%;
  }
  .active-unit-button{
    min-width:125px;
  }
  .active-unit-name{
    font-size:18px;
  }
}


/* v0.6 selector placement and transport display */
.active-unit-button[hidden]{display:none !important}
.topbar-left .brand{flex:0 0 auto}
.topbar-left .active-unit-button{
  max-width:260px;
}
.active-unit-name{
  font-size:20px;
}
@media(max-width:900px){
  .topbar-left{
    flex-wrap:wrap;
  }
  .topbar-left .active-unit-button{
    max-width:100%;
  }
}


/* v0.7 compact admin lists and modal editors */
.clickable-table tbody tr{
  cursor:pointer;
}
.clickable-table tbody tr:hover{
  background:#202b36;
}
.admin-editor-dialog{
  width:min(850px,95vw);
}
.editor-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px;
}
.modal-add-row{
  margin-top:14px;
}
.editor-actions{
  border-top:1px solid var(--line);
  margin-top:22px;
  padding-top:14px;
}
@media(max-width:700px){
  .editor-summary{
    grid-template-columns:1fr;
  }
  .clickable-table th:nth-child(3),
  .clickable-table td:nth-child(3){
    display:none;
  }
}


/* v0.9 postal workflow */
.resolved-area-box{
  display:grid;
  gap:5px;
  background:#111820;
  border:1px solid var(--line);
  border-radius:7px;
  padding:10px;
  margin-bottom:12px;
}
.resolved-area-box small{color:var(--muted)}
.postal-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}


/* v0.10 incident lifecycle */
.incident-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.incident-status.pending{
  background:#5b4721;
  color:#ffe0a0;
}
.incident-status.active{
  background:#1f523c;
  color:#aef0ce;
}
.incident-status.closed{
  background:#39434e;
  color:#d0dae4;
}


/* v0.10.2 improved location system */
.form-grid .span-two{
  grid-column:1 / -1;
}
.location-access-box{
  margin-top:12px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#111820;
}
.location-access-box small{
  display:block;
  color:var(--muted);
  margin-bottom:6px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.location-access-box div{
  white-space:pre-wrap;
  line-height:1.45;
}
@media(max-width:700px){
  .form-grid .span-two{
    grid-column:auto;
  }
}


/* v0.10.3 Unit / Incident Timeline */
/* (the width that used to live here was overridden by the v0.10.5 rule below and
   is now --incident-dialog-width) */

.timeline-heading{
  margin-top:22px;
}

.incident-timeline{
  max-height:440px;
  overflow:auto;
  padding:6px 10px 6px 2px;
  background:#111820;
  border:1px solid var(--line);
  border-radius:9px;
  scrollbar-gutter:stable;
}

.timeline-event{
  display:grid;
  grid-template-columns:150px 18px minmax(0,1fr);
  gap:10px;
  min-height:58px;
  position:relative;
}

.timeline-stamp{
  color:var(--muted);
  font-size:12px;
  padding-top:12px;
  text-align:right;
  white-space:nowrap;
}

.timeline-marker{
  position:relative;
}

.timeline-marker::before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:8px;
  width:2px;
  background:#31404e;
}

.timeline-marker::after{
  content:"";
  position:absolute;
  top:15px;
  left:3px;
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--blue);
  border:2px solid #111820;
  box-shadow:0 0 0 1px #49647c;
}

.timeline-event:first-child .timeline-marker::before{
  top:15px;
}

.timeline-event:last-child .timeline-marker::before{
  bottom:calc(100% - 20px);
}

.timeline-content{
  padding:9px 10px 11px 0;
  border-bottom:1px solid #29343f;
  min-width:0;
}

.timeline-event:last-child .timeline-content{
  border-bottom:0;
}

.timeline-description{
  line-height:1.4;
  overflow-wrap:anywhere;
}

.timeline-content small{
  display:block;
  color:var(--muted);
  margin-top:4px;
}

.timeline-note-added .timeline-marker::after{
  background:var(--warn);
}

.timeline-unit-assigned .timeline-marker::after,
.timeline-unit-status .timeline-marker::after{
  background:var(--good);
}

.timeline-unit-cleared .timeline-marker::after{
  background:#9a7bd6;
}

.timeline-incident-closed .timeline-marker::after{
  background:var(--danger);
}

.timeline-incident-reopened .timeline-marker::after{
  background:var(--accent);
}

.timeline-incident-edit .timeline-marker::after{
  background:#d08a42;
}

.timeline-empty{
  padding:18px;
}

@media(max-width:700px){
  .timeline-event{
    grid-template-columns:1fr;
    gap:0;
    padding:10px 8px;
    border-bottom:1px solid #29343f;
  }
  .timeline-stamp{
    text-align:left;
    padding:0 0 4px;
  }
  .timeline-marker{
    display:none;
  }
  .timeline-content{
    padding:0;
    border:0;
  }
}


/* v0.10.3 Unit Timing Summary */
.unit-timing-list{
  display:grid;
  gap:10px;
}

.unit-timing-card{
  background:#111820;
  border:1px solid var(--line);
  border-radius:9px;
  padding:12px;
}

.unit-timing-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.unit-timing-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}

.unit-timing-grid > div{
  display:grid;
  gap:3px;
  background:#18212a;
  border-radius:6px;
  padding:8px;
}

.unit-timing-grid small,
.unit-duration-row small{
  color:var(--muted);
}

.unit-timing-grid span{
  font-size:12px;
}

.unit-duration-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  margin-top:10px;
  font-size:12px;
}

@media(max-width:800px){
  .unit-timing-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .unit-timing-head{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* v0.10.4 Incident detail tabs */
.incident-detail-tabs{
  display:flex;
  gap:4px;
  margin-top:22px;
  border-bottom:1px solid var(--line);
  overflow-x:auto;
}

.incident-detail-tab{
  appearance:none;
  background:transparent;
  border:0;
  border-bottom:3px solid transparent;
  border-radius:0;
  color:var(--muted);
  padding:10px 14px;
  white-space:nowrap;
  cursor:pointer;
  font-weight:600;
}

.incident-detail-tab:hover{
  color:var(--text);
  background:#18212a;
}

.incident-detail-tab.active{
  color:var(--text);
  border-bottom-color:var(--blue);
  background:#18212a;
}

.incident-tab-panel{
  display:none;
  padding-top:14px;
  min-height:120px;
}

.incident-tab-panel.active{
  display:block;
}

.incident-tab-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.incident-note-entry{
  display:flex;
  gap:8px;
  margin-top:12px;
}

/* Compact timing summary */
.compact-timing-table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:8px;
  background:#111820;
}

.compact-timing-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.compact-timing-table th,
.compact-timing-table td{
  padding:8px 10px;
  border-bottom:1px solid #29343f;
  text-align:left;
  white-space:nowrap;
}

.compact-timing-table th{
  position:sticky;
  top:0;
  background:#18212a;
  color:var(--muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.compact-timing-table tbody tr{
  cursor:pointer;
}

.compact-timing-table tbody tr:hover{
  background:#1a2530;
}

.compact-timing-table tbody tr:last-child td{
  border-bottom:0;
}

.compact-timing-table th:last-child,
.compact-timing-table td:last-child{
  width:1%;
  text-align:right;
}

.timing-detail-btn{
  padding:4px 8px;
  font-size:11px;
}

.compact-timing-hint{
  margin-top:8px;
  font-size:12px;
}

/* Full timing popup */
.unit-timing-dialog{
  width:min(760px,94vw);
}

.timing-detail-grid,
.timing-duration-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.timing-detail-grid > div,
.timing-duration-grid > div{
  display:grid;
  gap:4px;
  background:#111820;
  border:1px solid var(--line);
  border-radius:7px;
  padding:10px;
}

.timing-detail-grid small,
.timing-duration-grid small{
  color:var(--muted);
}

.timing-duration-grid{
  margin-top:8px;
}

@media(max-width:650px){
  .incident-detail-tabs{
    gap:0;
  }

  .incident-detail-tab{
    padding:9px 10px;
    font-size:12px;
  }

  .compact-timing-table th,
  .compact-timing-table td{
    padding:7px 8px;
  }

  .timing-detail-grid,
  .timing-duration-grid{
    grid-template-columns:1fr;
  }

  .incident-note-entry{
    flex-direction:column;
  }
}


/* v0.10.5 Compact incident detail density */
#incidentDialog{
  width:var(--incident-dialog-width);
}

#incidentDialog .dialog-head{
  padding-bottom:6px;
  margin-bottom:6px;
}

#incidentDialog .dialog-head h2{
  font-size:18px;
  margin:0;
}

#incidentDialog .incident-detail-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-bottom:8px;
}

#incidentDialog .detail{
  padding:7px 8px;
  min-height:auto;
}

#incidentDialog .detail small{
  font-size:10px;
  margin-bottom:2px;
}

#incidentDialog .detail,
#incidentDialog .detail strong{
  font-size:12px;
}

#incidentDialog .section-title{
  margin-top:12px;
  margin-bottom:6px;
  font-size:12px;
}

#incidentDialog .section-title-row{
  margin-top:12px;
  margin-bottom:6px;
}

#incidentDialog .incident-detail-tabs{
  margin-top:14px;
}

#incidentDialog .incident-detail-tab{
  padding:7px 10px;
  font-size:12px;
}

#incidentDialog .incident-tab-panel{
  padding-top:9px;
  min-height:90px;
}

#incidentDialog .incident-tab-heading{
  margin-bottom:6px;
}

#incidentDialog .note{
  padding:7px 8px;
  margin-bottom:5px;
  font-size:12px;
}

#incidentDialog .note small{
  font-size:10px;
}

#incidentDialog .incident-note-entry{
  margin-top:8px;
}

/* More compact incident timeline */
#incidentDialog .incident-timeline{
  max-height:390px;
  padding:2px 6px 2px 0;
}

#incidentDialog .timeline-event{
  grid-template-columns:126px 14px minmax(0,1fr);
  gap:6px;
  min-height:40px;
}

#incidentDialog .timeline-stamp{
  font-size:10px;
  padding-top:7px;
}

#incidentDialog .timeline-marker::before{
  left:6px;
  width:1px;
}

#incidentDialog .timeline-marker::after{
  top:9px;
  left:2px;
  width:8px;
  height:8px;
  border-width:1px;
}

#incidentDialog .timeline-event:first-child .timeline-marker::before{
  top:9px;
}

#incidentDialog .timeline-event:last-child .timeline-marker::before{
  bottom:calc(100% - 14px);
}

#incidentDialog .timeline-content{
  padding:5px 6px 6px 0;
}

#incidentDialog .timeline-description{
  font-size:12px;
  line-height:1.25;
}

#incidentDialog .timeline-content small{
  font-size:9px;
  margin-top:2px;
}

#incidentDialog .compact-timing-table th,
#incidentDialog .compact-timing-table td{
  padding:6px 8px;
  font-size:12px;
}

#incidentDialog .compact-timing-table th{
  font-size:10px;
}

@media(max-width:850px){
  #incidentDialog .incident-detail-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:650px){
  #incidentDialog .incident-detail-grid{
    grid-template-columns:1fr;
  }

  #incidentDialog .timeline-event{
    grid-template-columns:1fr;
    padding:6px 4px;
  }

  #incidentDialog .timeline-stamp{
    padding:0 0 2px;
  }
}


/* Additional v0.10.5 incident compaction */
#incidentDialog .location-access-box{
  margin:6px 0 8px;
  padding:7px 8px;
}

#incidentDialog .location-access-box small{
  font-size:10px;
  margin-bottom:2px;
}

#incidentDialog .location-access-box div{
  font-size:12px;
  line-height:1.3;
}

#incidentDialog .assignment-row{
  padding:5px 7px;
  font-size:12px;
}

#incidentDialog .assignment-row .pill{
  font-size:10px;
  padding:2px 5px;
}

#incidentDialog .recommend-box{
  margin-top:8px;
  padding:8px;
}

#incidentDialog .resource-line{
  padding:4px 0;
  font-size:12px;
}

#incidentDialog .dialog-actions{
  margin-top:10px;
  padding-top:8px;
}


/* v0.10.6 Unit Terminal taskbar + full-page assignment */
.topbar{
  display:grid;
  grid-template-columns:auto minmax(280px,1fr) auto;
  gap:16px;
}

.unit-status-button{
  min-width:145px;
  border:1px solid var(--line);
  background:#0c1117;
  color:var(--text);
  border-radius:9px;
  padding:8px 12px;
  text-align:left;
  display:grid;
  gap:1px;
}

.unit-status-button:hover:not(:disabled){
  background:#19222c;
}

.unit-status-button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.unit-status-current{
  font-size:14px;
  line-height:1.15;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:180px;
}

.unit-taskbar-center{
  min-width:0;
  display:flex;
  justify-content:center;
  align-items:center;
}

.unit-taskbar-center[hidden],
.unit-status-button[hidden]{
  display:none !important;
}

.unit-taskbar-identity{
  width:100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-align:center;
  font-size:14px;
  font-weight:800;
  color:#dce5ee;
}

.unit-taskbar-status-options{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:5px;
  overflow-x:auto;
  padding:2px 0;
}

.unit-taskbar-status-options[hidden]{
  display:none !important;
}

.taskbar-status-option{
  flex:0 0 auto;
  border:1px solid var(--line);
  background:#202a35;
  color:var(--text);
  border-radius:6px;
  padding:7px 9px;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
}

.taskbar-status-option:hover{
  background:#293745;
}

.taskbar-status-option.current{
  border-color:var(--accent);
  box-shadow:0 0 0 1px var(--accent);
}

.unit-terminal-page{
  min-height:calc(100vh - 120px);
}

.unit-assignment-workspace{
  min-height:calc(100vh - 120px);
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:10px;
  padding:16px;
}

.unit-assignment-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
  margin-bottom:10px;
}

.unit-assignment-header h1{
  margin:2px 0 0;
  font-size:21px;
}

.unit-assignment-kicker{
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  letter-spacing:.13em;
}

.unit-terminal-detail-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin-bottom:9px;
}

.unit-terminal-assigned-units{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px 10px;
}

.unit-terminal-assigned-units .assignment-row{
  border:1px solid #2e3944;
  border-radius:6px;
  padding:6px 8px;
}

.unit-terminal-tabs{
  margin-top:16px;
}

.unit-terminal-empty{
  min-height:calc(100vh - 175px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:var(--muted);
  text-align:center;
}

.unit-terminal-empty strong{
  color:var(--text);
  font-size:20px;
}

#page-unit .incident-tab-panel{
  min-height:180px;
}

#page-unit .incident-timeline{
  max-height:calc(100vh - 390px);
  min-height:220px;
}

@media(max-width:1200px){
  .topbar{
    grid-template-columns:auto minmax(180px,1fr) auto;
  }

  .unit-taskbar-identity{
    font-size:12px;
  }

  .taskbar-status-option{
    padding:6px 7px;
    font-size:10px;
  }

  .unit-terminal-detail-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .topbar{
    display:flex;
    height:auto;
    padding:12px;
    gap:10px;
    align-items:stretch;
    flex-direction:column;
  }

  .topbar-left{
    flex-wrap:wrap;
  }

  .unit-status-button{
    flex:1 1 140px;
  }

  .unit-taskbar-center{
    width:100%;
    order:2;
  }

  .unit-taskbar-status-options{
    justify-content:flex-start;
  }

  .unit-taskbar-identity{
    text-align:left;
    white-space:normal;
  }

  .unit-terminal-detail-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .unit-terminal-assigned-units{
    grid-template-columns:1fr;
  }
}

@media(max-width:600px){
  .unit-terminal-detail-grid{
    grid-template-columns:1fr;
  }

  .unit-assignment-workspace{
    padding:10px;
  }

  .unit-assignment-header h1{
    font-size:17px;
  }
}

.taskbar-status-option:disabled{
  opacity:.5;
  cursor:not-allowed;
}
.taskbar-status-option:disabled:hover{
  background:#202a35;
}


/* v0.10.7 Unit Terminal usability refinements */

/* Larger taskbar status buttons */
.taskbar-status-option{
  min-height:42px;
  padding:10px 14px;
  font-size:12px;
  border-radius:8px;
}

.unit-taskbar-status-options{
  gap:7px;
}

/* Smaller current-assignment detail boxes */
#page-unit .unit-terminal-detail-grid{
  gap:5px;
  margin-bottom:7px;
}

#page-unit .unit-terminal-detail-grid .detail{
  padding:5px 6px;
  min-height:auto;
  font-size:11px;
  line-height:1.2;
}

#page-unit .unit-terminal-detail-grid .detail small{
  font-size:9px;
  margin-bottom:1px;
}

#page-unit .location-access-box{
  padding:6px 7px;
  margin:5px 0 7px;
}

#page-unit .location-access-box small{
  font-size:9px;
}

#page-unit .location-access-box div{
  font-size:11px;
  line-height:1.25;
}

/* Selected unit timing summary shown above Assigned Units */
.selected-unit-timing{
  margin:8px 0 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#111820;
  padding:8px;
}

.selected-unit-timing-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
  font-size:12px;
}

.selected-unit-timing-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:5px;
}

.selected-unit-time-box{
  display:grid;
  gap:2px;
  min-width:0;
  padding:5px 6px;
  border:1px solid #2b3742;
  border-radius:6px;
  background:#18212a;
}

.selected-unit-time-box small{
  color:var(--muted);
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.03em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.selected-unit-time-box span{
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

.selected-unit-duration-row{
  display:flex;
  flex-wrap:wrap;
  gap:5px 12px;
  margin-top:6px;
  font-size:10px;
}

.selected-unit-duration-row small{
  color:var(--muted);
}

@media(max-width:1200px){
  .selected-unit-timing-grid{
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}

@media(max-width:800px){
  .taskbar-status-option{
    min-height:40px;
    padding:9px 12px;
    font-size:11px;
  }

  .selected-unit-timing-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:520px){
  .selected-unit-timing-grid{
    grid-template-columns:1fr 1fr;
  }

  .selected-unit-timing-head{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* v0.11 Authentication & Permissions */
.login-screen{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:#0a0f14;
}

.login-screen[hidden]{
  display:none !important;
}

.login-card{
  width:min(420px,94vw);
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:24px;
  box-shadow:0 18px 50px rgba(0,0,0,.35);
}

.login-card h1{
  margin:18px 0 4px;
}

.login-card form{
  display:grid;
  gap:14px;
  margin:18px 0 14px;
}

.login-brand{
  width:max-content;
}

.auth-submit{
  width:100%;
  min-height:44px;
  margin-top:4px;
}

.auth-error{
  min-height:18px;
  color:#ff9e9e;
  font-size:12px;
}

.auth-dialog{
  width:min(520px,94vw);
}

.topbar-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:0;
}

.account-controls{
  display:flex;
  align-items:center;
  gap:7px;
  border-left:1px solid var(--line);
  padding-left:10px;
}

.account-button{
  display:grid;
  gap:1px;
  text-align:right;
  background:transparent;
  border:0;
  color:var(--text);
  padding:5px 7px;
  min-width:130px;
}

.account-button:hover{
  background:#18212a;
}

.account-button span{
  font-size:12px;
  font-weight:800;
}

.account-button small{
  color:var(--muted);
  font-size:9px;
}

.permission-check{
  display:flex !important;
  align-items:center;
  gap:8px;
  min-height:40px;
  background:#111820;
  border:1px solid var(--line);
  border-radius:7px;
  padding:8px 10px;
}

.permission-check input{
  width:auto;
  margin:0;
}

.audit-table td{
  vertical-align:top;
  font-size:11px;
}

.audit-table td:last-child{
  white-space:normal;
  min-width:260px;
}

.master-only[hidden],
.permission-dispatch[hidden],
.permission-admin[hidden]{
  display:none !important;
}

@media(max-width:1000px){
  .topbar-right{
    flex-wrap:wrap;
  }

  .account-controls{
    border-left:0;
    padding-left:0;
  }

  .account-button{
    text-align:left;
  }
}


/* v0.11.1 Unit Terminal status usability */
.taskbar-status-option{
  min-height:48px;
  padding:12px 16px;
  font-size:13px;
}

.unit-taskbar-status-options{
  gap:8px;
}

/* v0.11.1 Dispatch Unit Board - spreadsheet layout */
.dispatch-unit-board-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
}

.dispatch-unit-board{
  width:100%;
  border-collapse:collapse;
  font-size:11px;
}

.dispatch-unit-board th,
.dispatch-unit-board td{
  padding:5px 7px;
  border-bottom:1px solid #29343f;
  text-align:left;
  white-space:nowrap;
}

.dispatch-unit-board th{
  position:sticky;
  top:0;
  z-index:1;
  background:#18212a;
  color:var(--muted);
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.dispatch-unit-board tbody tr:last-child td{
  border-bottom:0;
}

.dispatch-unit-board tbody tr:hover{
  background:#18222c;
}

.dispatch-unit-short{
  width:1%;
  font-size:12px;
}

.compact-status-select{
  min-width:128px;
  padding:4px 6px;
  min-height:28px;
  font-size:11px;
}

/* v0.11.1 type-to-dispatch Manual Assignment */
.manual-assignment-search{
  position:relative;
}

.manual-assignment-search input{
  width:100%;
}

.manual-assignment-results{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 4px);
  z-index:20;
  max-height:270px;
  overflow:auto;
  background:#10171f;
  border:1px solid var(--line);
  border-radius:7px;
  box-shadow:0 12px 28px rgba(0,0,0,.35);
}

.manual-assignment-results.open{
  display:block;
}

.manual-assignment-option{
  width:100%;
  display:grid;
  grid-template-columns:70px minmax(0,1fr);
  gap:2px 8px;
  align-items:center;
  border:0;
  border-bottom:1px solid #29343f;
  border-radius:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  padding:8px 10px;
}

.manual-assignment-option:last-child{
  border-bottom:0;
}

.manual-assignment-option:hover,
.manual-assignment-option.highlighted{
  background:#20303d;
}

.manual-assignment-option strong{
  grid-row:1 / span 2;
  font-size:12px;
}

.manual-assignment-option span{
  font-size:12px;
}

.manual-assignment-option small{
  color:var(--muted);
  font-size:9px;
}

.manual-assignment-empty{
  padding:10px;
  color:var(--muted);
  font-size:11px;
}

/* v0.11.1 Unit Terminal active incidents */
.unit-terminal-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding-bottom:9px;
  margin-bottom:10px;
  border-bottom:1px solid var(--line);
}

.unit-terminal-toolbar > div{
  display:grid;
  gap:1px;
}

.unit-terminal-toolbar small{
  font-size:9px;
}

.unit-active-incidents-btn{
  min-height:36px;
}

.unit-active-incidents-dialog{
  width:min(900px,95vw);
}

.unit-active-incident-list{
  display:grid;
  gap:7px;
}

.unit-active-incident-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
}

.unit-active-incident-main{
  min-width:0;
  display:grid;
  gap:4px;
}

.unit-active-incident-main > div:nth-child(2){
  font-size:12px;
}

.unit-active-incident-main small{
  font-size:9px;
}

.unit-active-incident-action{
  display:flex;
  justify-content:flex-end;
}

/* Admin unit rows are editable */
#adminContent .clickable-table tbody tr{
  cursor:pointer;
}

@media(max-width:760px){
  .unit-active-incident-row{
    grid-template-columns:1fr;
  }

  .unit-active-incident-action{
    justify-content:flex-start;
  }

  .taskbar-status-option{
    min-height:44px;
    padding:10px 12px;
    font-size:11px;
  }
}


/* v0.11.2 persistent Manual Assignment */
.manual-assignment-search input:focus{
  outline:2px solid rgba(80,150,210,.55);
  outline-offset:1px;
}

/* v0.11.2 Unit Terminal active incident detail affordance */
.unit-active-incident-row.clickable{
  cursor:pointer;
}

.unit-active-incident-row.clickable:hover{
  background:#18242f;
  border-color:#3a4b5b;
}

/* v0.11.2 status strip: keep controls large without horizontal scrolling */
.unit-taskbar-status-options{
  overflow:visible;
  flex-wrap:wrap;
  align-content:center;
  gap:5px;
}

.taskbar-status-option{
  flex:1 1 82px;
  min-width:0;
  min-height:42px;
  padding:8px 7px;
  font-size:10.5px;
  line-height:1.1;
  white-space:nowrap;
}

@media(max-width:1100px){
  .taskbar-status-option{
    flex-basis:74px;
    min-height:40px;
    padding:7px 5px;
    font-size:10px;
  }
}

@media(max-width:760px){
  .unit-taskbar-status-options{
    gap:4px;
  }

  .taskbar-status-option{
    flex:1 1 90px;
    min-height:40px;
    font-size:10px;
  }
}


/* v0.11.4 Assigned Unit Status Selector */
.assigned-unit-status-row{
  align-items:center;
  gap:10px;
}

.assigned-unit-identity{
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
}

.assigned-unit-actions{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
}

.assigned-unit-status-select{
  min-width:150px;
  max-width:190px;
  padding:5px 7px;
  min-height:31px;
  font-size:11px;
}

@media(max-width:700px){
  .assigned-unit-status-row{
    align-items:stretch;
    flex-direction:column;
  }

  .assigned-unit-actions{
    width:100%;
    margin-left:0;
  }

  .assigned-unit-status-select{
    flex:1;
    max-width:none;
  }
}


/* v0.12 Unit Staffing / Profiles */
.account-menu-wrap{
  position:relative;
}

.account-menu{
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  z-index:80;
  min-width:170px;
  background:#111820;
  border:1px solid var(--line);
  border-radius:8px;
  padding:5px;
  box-shadow:0 12px 28px rgba(0,0,0,.4);
}

.account-menu[hidden]{
  display:none !important;
}

.account-menu button{
  width:100%;
  border:0;
  background:transparent;
  color:var(--text);
  padding:9px 10px;
  text-align:left;
  border-radius:6px;
}

.account-menu button:hover{
  background:#1d2934;
}

.profile-dialog{
  width:min(720px,95vw);
}

.profile-readonly-grid,
.staffing-roster-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin-bottom:12px;
}

.profile-readonly-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.profile-agency-note{
  margin-top:8px;
}

.staffing-roster-dialog{
  width:min(760px,95vw);
}

.staffing-roster-list{
  display:grid;
  gap:6px;
}

.staffing-roster-row{
  display:grid;
  grid-template-columns:minmax(180px,1.6fr) minmax(100px,1fr) minmax(90px,.7fr);
  gap:10px;
  align-items:center;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
  padding:8px 10px;
}

.staffing-roster-row > div{
  display:grid;
  gap:2px;
  min-width:0;
}

.staffing-roster-row small{
  color:var(--muted);
  font-size:9px;
}

.staffing-count-button{
  min-width:48px;
  min-height:26px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#1a2630;
  color:var(--text);
  padding:3px 7px;
  font-size:10px;
  font-weight:800;
}

.staffing-count-button:hover{
  background:#253643;
}

.staffing-count-button.unstaffed{
  opacity:.68;
}

.staffing-count-button.understaffed{
  border-style:dashed;
}

.staffed-pill{
  opacity:.95;
}

.unstaffed-pill{
  opacity:.6;
}

.unit-terminal-toolbar-actions{
  display:flex;
  align-items:center;
  gap:7px;
}

@media(max-width:800px){
  .profile-readonly-grid,
  .staffing-roster-summary{
    grid-template-columns:1fr;
  }

  .staffing-roster-row{
    grid-template-columns:1fr;
  }

  .unit-terminal-toolbar{
    align-items:flex-start;
  }

  .unit-terminal-toolbar-actions{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
}


/* v0.12.1 taskbar / account refinements */
.unit-taskbar-action{
  min-height:40px;
  border:1px solid var(--line);
  background:#18232d;
  color:var(--text);
  border-radius:8px;
  padding:7px 11px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

.unit-taskbar-action:hover:not(:disabled){
  background:#23323f;
}

.unit-taskbar-action:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.unit-taskbar-action[hidden]{
  display:none !important;
}

.account-menu-logout{
  border-top:1px solid var(--line) !important;
  margin-top:4px;
  padding-top:10px !important;
}

.staffing-leave-actions{
  margin-top:14px;
  border-top:1px solid var(--line);
  padding-top:10px;
}

@media(max-width:1000px){
  .unit-taskbar-action{
    width:100%;
  }
}


/* v0.12.2 topbar navigation + single-row Unit status strip */
.panel-menu-wrap{
  position:relative;
  flex:0 0 auto;
}

.panel-menu-button{
  min-width:112px;
  min-height:42px;
  display:grid;
  gap:1px;
  padding:7px 10px;
  text-align:left;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0c1117;
  color:var(--text);
}

.panel-menu-button:hover{
  background:#19222c;
}

.panel-menu-button span{
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
}

.panel-menu-button strong{
  font-size:12px;
  line-height:1.1;
  white-space:nowrap;
}

.panel-menu{
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  z-index:90;
  width:180px;
  padding:5px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#111820;
  box-shadow:0 12px 28px rgba(0,0,0,.4);
}

.panel-menu[hidden]{
  display:none !important;
}

.panel-menu .nav-btn{
  width:100%;
  display:block;
  text-align:left;
  padding:9px 10px;
  border-radius:6px;
  color:var(--text);
}

.panel-menu .nav-btn:hover,
.panel-menu .nav-btn.active{
  background:#1d2934;
  border-color:transparent;
}

.unit-selector-secondary-actions{
  display:flex;
  justify-content:flex-start;
  margin-top:14px;
}

#activeUnitButton .active-unit-kicker{
  white-space:nowrap;
}

/* Use the space recovered from moving navigation into a menu. */
.topbar{
  grid-template-columns:auto minmax(500px,1fr) auto;
  gap:10px;
}

.topbar-left{
  gap:8px;
}

.topbar-right{
  gap:7px;
}

/* Status choices must always remain a single horizontal row on desktop. */
.unit-taskbar-status-options{
  flex-wrap:nowrap !important;
  overflow:visible !important;
  gap:4px !important;
  width:100%;
}

.taskbar-status-option{
  flex:1 1 0 !important;
  min-width:0 !important;
  min-height:40px !important;
  padding:7px 3px !important;
  font-size:clamp(8px,.7vw,10px) !important;
  line-height:1.05 !important;
  white-space:nowrap !important;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:1250px){
  .topbar{
    grid-template-columns:auto minmax(440px,1fr) auto;
    padding-left:12px;
    padding-right:12px;
  }

  .active-unit-button{
    min-width:132px;
    padding-left:9px;
    padding-right:9px;
  }

  .unit-status-button{
    min-width:122px;
    padding-left:8px;
    padding-right:8px;
  }

  .unit-taskbar-action{
    padding-left:8px;
    padding-right:8px;
    font-size:10px;
  }

  .account-button{
    padding-left:8px;
    padding-right:8px;
  }
}

/* On narrower displays keep one row and allow the buttons to shrink further.
   The overall topbar may become denser, but the status choices never wrap. */
@media(max-width:1100px){
  .topbar{
    grid-template-columns:auto minmax(360px,1fr) auto;
  }

  .taskbar-status-option{
    min-height:36px !important;
    padding:5px 2px !important;
    font-size:8px !important;
  }
}


/* v0.12.3 unified taskbar controls */
.cad-control-button{
  width:148px !important;
  min-width:148px !important;
  max-width:148px !important;
  min-height:44px !important;
  height:44px !important;
  display:grid !important;
  grid-template-rows:auto auto;
  align-content:center;
  gap:1px;
  padding:6px 10px !important;
  text-align:left !important;
  border:1px solid var(--line) !important;
  border-radius:8px !important;
  background:#0c1117 !important;
  color:var(--text) !important;
  box-sizing:border-box;
}

.cad-control-button:hover:not(:disabled){
  background:#19222c !important;
}

.cad-control-button:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.cad-control-button .active-unit-kicker,
.cad-control-button > span:first-child{
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.09em;
  line-height:1.05;
}

.cad-control-button .active-unit-name,
.cad-control-button .unit-status-current,
.cad-control-button > strong{
  color:var(--text);
  font-size:11px;
  font-weight:800;
  line-height:1.08;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.panel-menu-button.cad-control-button{
  display:grid !important;
}

.unit-taskbar-action.cad-control-button{
  justify-content:stretch;
}

/* Embedded staffing inside Current / Change Unit */
.unit-selector-staffing{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
}

.unit-selector-staffing[hidden]{
  display:none !important;
}

.unit-selector-staffing-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.unit-selector-staffing-head > div{
  display:grid;
  gap:2px;
}

.unit-selector-staffing-head small{
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
}

.unit-selector-staffing-list{
  display:grid;
  gap:5px;
}

.unit-selector-staffing-row{
  display:grid;
  grid-template-columns:minmax(160px,1.5fr) minmax(100px,1fr) minmax(90px,.7fr);
  gap:8px;
  align-items:center;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#111820;
  font-size:11px;
}

.unit-selector-staffing-row span{
  color:var(--muted);
}

.unit-selector-staffing-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:9px;
}

/* Global CAD clock */
.cad-clock{
  min-width:132px;
  height:44px;
  display:grid;
  align-content:center;
  justify-items:end;
  gap:1px;
  padding:5px 8px;
  border-left:1px solid var(--line);
  box-sizing:border-box;
}

.cad-clock strong{
  font-variant-numeric:tabular-nums;
  font-size:17px;
  line-height:1;
  letter-spacing:.04em;
}

.cad-clock small{
  max-width:132px;
  color:var(--muted);
  font-size:8px;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.cad-settings-time-preview{
  display:grid;
  gap:3px;
}

.cad-settings-time-preview strong{
  font-size:22px;
  font-variant-numeric:tabular-nums;
}

.cad-settings-time-preview span{
  color:var(--muted);
  font-size:10px;
}

/* Keep the strict one-row status strip from v0.12.2. */
.unit-taskbar-status-options{
  flex-wrap:nowrap !important;
}

@media(max-width:1300px){
  .cad-control-button{
    width:126px !important;
    min-width:126px !important;
    max-width:126px !important;
    padding-left:7px !important;
    padding-right:7px !important;
  }

  .cad-clock{
    min-width:112px;
  }

  .cad-clock small{
    max-width:112px;
  }
}

@media(max-width:900px){
  .cad-control-button{
    width:auto !important;
    min-width:120px !important;
    max-width:none !important;
  }

  .unit-selector-staffing-row{
    grid-template-columns:1fr;
    gap:3px;
  }

  .cad-clock{
    justify-items:start;
    border-left:0;
    border-top:1px solid var(--line);
    width:100%;
  }
}

/* v0.13 Advanced Response Logic */
.advanced-response-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:12px 0 8px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#101820;
}

.advanced-response-level{
  display:grid;
  gap:2px;
}

.advanced-response-level small,
.automatic-response-rules > small{
  color:var(--muted);
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}

.advanced-response-level strong{
  font-size:13px;
}

.advanced-response-upgrade{
  display:flex;
  gap:6px;
  align-items:center;
}

.advanced-response-upgrade select{
  min-width:150px;
}

.response-modifier-panel{
  margin:8px 0;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#111820;
}

.response-modifier-head{
  display:flex;
  align-items:baseline;
  gap:8px;
  margin-bottom:6px;
}

.response-modifier-head small{
  color:var(--muted);
  font-size:9px;
}

.response-modifier-options{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

.response-modifier-toggle{
  min-width:150px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:6px 8px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#151f28;
  cursor:pointer;
}

.response-modifier-toggle.applied{
  border-color:var(--accent);
}

.response-modifier-toggle span{
  display:grid;
  gap:1px;
}

.response-modifier-toggle strong{
  font-size:10px;
}

.response-modifier-toggle small{
  color:var(--muted);
  font-size:8px;
}

.automatic-response-rules{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  margin:7px 0 10px;
}

.rule-source-pill{
  opacity:.8;
}

.mutual-aid-pill{
  border-style:dashed;
}

.fallback-pill{
  opacity:.75;
}

.recommendation-fallback{
  opacity:.82;
}

.recommendation-info-btn{
  width:20px;
  height:20px;
  min-width:20px;
  padding:0;
  margin-left:3px;
  display:inline-grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:50%;
  background:#111820;
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  vertical-align:middle;
}

.recommendation-info-btn:hover{
  color:var(--text);
  border-color:var(--accent);
}

.recommendation-info-dialog{
  width:min(500px,94vw);
}

.recommendation-info-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}

.recommendation-reason-list{
  margin:8px 0 0;
  padding-left:20px;
  display:grid;
  gap:6px;
  font-size:11px;
}

.advanced-config-section{
  margin-top:18px;
  padding-top:4px;
  border-top:1px solid var(--line);
}

.sub-section-title{
  margin-top:14px;
}

.advanced-rule-card{
  margin:9px 0;
  padding:8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#101820;
}

.advanced-rule-card.inactive-rule{
  opacity:.65;
}

.advanced-rule-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:6px;
}

.advanced-rule-card-head > div{
  display:grid;
  gap:2px;
}

.advanced-rule-card-head small{
  color:var(--muted);
  font-size:9px;
}

.advanced-add-grid{
  display:grid;
  grid-template-columns:minmax(140px,1.4fr) 75px 115px auto;
  gap:5px;
  align-items:center;
  margin-top:6px;
}

.advanced-add-grid.specific-grid{
  grid-template-columns:minmax(170px,1.5fr) 145px 115px auto;
}

.advanced-add-grid.agency-grid{
  grid-template-columns:minmax(150px,1.2fr) minmax(150px,1.2fr) 75px 110px auto;
}

.advanced-inline-actions{
  display:flex;
  align-items:center;
  gap:6px;
}

.compact-select{
  min-height:28px;
  padding:3px 6px;
  font-size:10px;
}

@media(max-width:900px){
  .advanced-response-bar,
  .advanced-rule-card-head{
    align-items:stretch;
    flex-direction:column;
  }

  .advanced-response-upgrade{
    width:100%;
  }

  .advanced-response-upgrade select{
    flex:1;
  }

  .advanced-add-grid,
  .advanced-add-grid.specific-grid,
  .advanced-add-grid.agency-grid{
    grid-template-columns:1fr;
  }

  .recommendation-info-summary{
    grid-template-columns:1fr;
  }
}


/* v0.13.1 compact Dispatch response plan */
#incidentDialog .response-progress-title-row{
  justify-content:flex-start;
  gap:6px;
  margin-top:10px;
  margin-bottom:4px;
}

#incidentDialog .response-progress-info-btn{
  width:20px;
  height:20px;
  min-width:20px;
  padding:0;
  font-size:10px;
}

#incidentDialog .response-progress-compact{
  gap:3px;
}

#incidentDialog .response-progress-compact .requirement-progress{
  min-height:30px;
  padding:4px 7px;
  gap:6px;
  border-radius:5px;
  border-left-width:3px;
  font-size:10px;
}

#incidentDialog .response-progress-compact .requirement-progress-main{
  min-width:0;
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}

#incidentDialog .response-progress-compact .requirement-progress-main strong{
  font-size:11px;
}

#incidentDialog .response-progress-compact .pill{
  padding:2px 5px;
  font-size:8px;
}

#incidentDialog .response-progress-compact .requirement-count{
  font-size:11px;
  line-height:1;
}

#incidentDialog .manual-assignment-search{
  width:min(460px,100%);
  max-width:460px;
}

#incidentDialog .manual-assignment-search input{
  min-height:32px;
  padding:7px 9px;
  font-size:11px;
}

.response-progress-info-intro{
  display:grid;
  gap:6px;
  margin-bottom:12px;
}

.response-progress-info-intro p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.response-progress-info-intro small{
  color:var(--muted);
}

.response-progress-info-list{
  display:grid;
  gap:6px;
}

.response-progress-info-row{
  display:grid;
  gap:3px;
  padding:8px 9px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#111820;
  font-size:11px;
}

.response-progress-info-row small{
  color:var(--muted);
}

/* v0.13.1 configurable apparatus priority */
.recommendation-priority-order{
  margin:8px 0 12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
}

.recommendation-priority-order.disabled{
  opacity:.55;
}

.cad-recommendation-mode-note{
  margin:8px 0 12px;
  padding:8px 10px;
  border-left:3px solid var(--accent);
  background:#111820;
  color:var(--muted);
  font-size:11px;
  line-height:1.4;
}

.cad-recommendation-mode-note strong{
  color:var(--text);
}


/* v0.13.2 Dispatch staffing controls + Unit Board filters */
.dispatch-staffing-row{
  grid-template-columns:minmax(180px,1.6fr) minmax(100px,1fr) minmax(90px,.7fr) auto;
}

.staffing-roster-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

#unitBoardFilterButton.filter-active{
  border-color:var(--accent);
  box-shadow:0 0 0 1px var(--accent);
}

.unit-board-filter-dialog{
  width:min(520px,94vw);
}

.compact-empty{
  min-height:38px;
  padding:10px;
}

@media(max-width:800px){
  .dispatch-staffing-row{
    grid-template-columns:1fr;
  }

  .staffing-roster-actions{
    justify-content:flex-start;
  }
}


/* v0.13.3 multi-select Unit Board filters */
.unit-board-filter-dialog{
  width:min(680px,95vw);
}

.unit-board-filter-help{
  margin:0 0 10px;
}

.unit-board-filter-section{
  margin:9px 0;
  padding:9px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
}

.unit-board-filter-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:7px;
}

.unit-board-filter-section-head > span{
  display:flex;
  gap:5px;
}

.tiny-btn{
  min-height:24px;
  padding:3px 7px;
  border:1px solid var(--line);
  border-radius:5px;
  background:#18232d;
  color:var(--text);
  font-size:9px;
  font-weight:700;
}

.tiny-btn:hover{
  background:#23323f;
}

.unit-board-filter-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}

.unit-board-filter-status-options{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.unit-board-filter-choice{
  min-width:0;
  display:flex;
  align-items:center;
  gap:7px;
  padding:6px 7px;
  border:1px solid #2b3742;
  border-radius:6px;
  background:#18212a;
  cursor:pointer;
}

.unit-board-filter-choice:hover{
  background:#202c37;
}

.unit-board-filter-choice input{
  flex:0 0 auto;
  margin:0;
}

.unit-board-filter-choice span{
  min-width:0;
  display:grid;
  gap:1px;
}

.unit-board-filter-choice strong{
  font-size:10px;
  line-height:1.15;
}

.unit-board-filter-choice small{
  color:var(--muted);
  font-size:8px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:650px){
  .unit-board-filter-options,
  .unit-board-filter-status-options{
    grid-template-columns:1fr;
  }
}


/* v0.13.4 anchored Unit Board filter dropdown */
.unit-board-filter-menu-wrap{
  position:relative;
  z-index:45;
}

.unit-board-filter-menu{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  z-index:100;
  width:min(410px,calc(100vw - 40px));
  max-height:min(680px,76vh);
  overflow-y:auto;
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0f161d;
  box-shadow:0 18px 42px rgba(0,0,0,.5);
}

.unit-board-filter-menu[hidden]{
  display:none !important;
}

.unit-board-filter-menu-head{
  position:sticky;
  top:-10px;
  z-index:3;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:-10px -10px 8px;
  padding:10px;
  border-bottom:1px solid var(--line);
  background:#0f161d;
}

.unit-board-filter-menu-head > div{
  display:grid;
  gap:2px;
}

.unit-board-filter-menu-head strong{
  font-size:12px;
}

.unit-board-filter-menu-head small{
  color:var(--muted);
  font-size:9px;
}

.unit-board-filter-close{
  width:28px;
  height:28px;
}

.unit-board-filter-menu .unit-board-filter-section{
  margin:7px 0;
  padding:8px;
}

.unit-board-filter-menu .unit-board-filter-section-head{
  margin-bottom:6px;
}

.unit-board-filter-menu .unit-board-filter-options,
.unit-board-filter-menu .unit-board-filter-status-options{
  grid-template-columns:1fr;
  gap:4px;
}

.unit-board-filter-menu .unit-board-filter-choice{
  min-height:32px;
  padding:6px 8px;
}

.unit-board-filter-menu .unit-board-filter-choice strong{
  font-size:11px;
}

.unit-board-filter-menu .unit-board-filter-choice small{
  font-size:9px;
}

.unit-board-filter-menu-actions{
  position:sticky;
  bottom:-10px;
  z-index:3;
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin:9px -10px -10px;
  padding:9px 10px;
  border-top:1px solid var(--line);
  background:#0f161d;
}

.unit-board-filter-menu-actions button{
  flex:1 1 0;
}

@media(max-width:650px){
  .unit-board-filter-menu{
    position:fixed;
    top:70px;
    right:10px;
    left:10px;
    width:auto;
    max-height:calc(100vh - 90px);
  }
}


/* v0.13.5 filter options are full-button toggles */
.unit-board-filter-menu .unit-board-filter-options,
.unit-board-filter-menu .unit-board-filter-status-options{
  display:grid;
  grid-template-columns:1fr;
  gap:5px;
}

.unit-board-filter-toggle{
  width:100%;
  min-height:38px;
  display:grid;
  justify-items:start;
  align-content:center;
  gap:2px;
  padding:7px 10px;
  border:1px solid #2b3742;
  border-radius:6px;
  background:#18212a;
  color:var(--text);
  text-align:left;
  cursor:pointer;
  transition:background .12s ease,border-color .12s ease,box-shadow .12s ease;
}

.unit-board-filter-toggle:hover{
  background:#22303c;
  border-color:#435261;
}

.unit-board-filter-toggle strong{
  font-size:11px;
  line-height:1.15;
}

.unit-board-filter-toggle small{
  color:var(--muted);
  font-size:9px;
  line-height:1.15;
}

.unit-board-filter-toggle.active{
  background:var(--accent);
  border-color:var(--accent);
  color:#071018;
  box-shadow:0 0 0 1px var(--accent);
}

.unit-board-filter-toggle.active small{
  color:inherit;
  opacity:.8;
}

.unit-board-filter-toggle.active:hover{
  filter:brightness(1.08);
}


/* v0.14 Incident History & Search */
.history-page-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.history-search-panel{
  margin-bottom:14px;
}

.history-scope-banner{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#111820;
}

.history-scope-banner:empty{
  display:none;
}

.history-scope-banner strong{
  font-size:11px;
  white-space:nowrap;
}

.history-scope-banner span{
  color:var(--muted);
  font-size:10px;
}

.history-search-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(120px,1fr));
  gap:8px;
}

.history-search-grid label{
  min-width:0;
}

.history-search-wide{
  grid-column:span 2;
}

.history-search-grid input,
.history-search-grid select{
  width:100%;
  min-width:0;
}

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

.history-result-list{
  display:grid;
  gap:5px;
}

.history-result-row{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#111820;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}

.history-result-row:hover{
  background:#18232d;
}

.history-result-main{
  min-width:0;
  display:grid;
  gap:3px;
}

.history-result-title{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}

.history-result-main > span{
  font-size:11px;
}

.history-result-main > small{
  color:var(--muted);
  font-size:9px;
}

.history-result-time{
  flex:0 0 auto;
  display:grid;
  justify-items:end;
  gap:2px;
  text-align:right;
}

.history-result-time small{
  color:var(--muted);
  font-size:8px;
  letter-spacing:.08em;
}

.history-result-time strong{
  font-size:10px;
  font-variant-numeric:tabular-nums;
}

.history-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:10px;
}

.history-incident-dialog{
  width:min(1050px,96vw);
  max-height:92vh;
}

.history-incident-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
}

.history-summary-location,
.history-summary-modifiers{
  grid-column:span 2;
}

.history-initial-details{
  display:grid;
  gap:4px;
  margin-top:10px;
  padding:8px 10px;
  border-left:3px solid var(--accent);
  background:#111820;
}

.history-initial-details small{
  color:var(--muted);
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
}

.history-initial-details span{
  font-size:11px;
  white-space:pre-wrap;
}

.history-participant-list{
  display:grid;
  gap:4px;
}

.history-participant-row{
  display:grid;
  grid-template-columns:minmax(180px,1.4fr) minmax(170px,1fr) minmax(170px,1fr);
  gap:8px;
  align-items:center;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#111820;
}

.history-participant-row > div,
.history-participant-row > span{
  min-width:0;
  display:grid;
  gap:2px;
}

.history-participant-row small{
  color:var(--muted);
  font-size:8px;
}

.history-participant-row span{
  font-size:9px;
}

.history-detail-tabs{
  margin-top:12px;
}

.history-detail-panel{
  min-height:150px;
  max-height:330px;
  overflow:auto;
  padding-top:8px;
}

.history-note-list{
  display:grid;
  gap:5px;
}

.history-note-row{
  display:grid;
  gap:3px;
  padding:7px 9px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#111820;
}

.history-note-row small{
  color:var(--muted);
  font-size:8px;
}

.history-note-row span{
  font-size:11px;
  white-space:pre-wrap;
}

.history-timeline{
  max-height:300px;
  overflow:auto;
}

.history-timing-table-wrap{
  overflow:auto;
}

.history-timing-table{
  min-width:900px;
}

.history-reopen-actions{
  margin-top:10px;
}

.incident-management-card{
  max-width:850px;
}

.admin-incident-lookup-result{
  margin-top:12px;
}

.admin-incident-found{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
}

.admin-incident-found-main{
  min-width:0;
  display:grid;
  gap:3px;
}

.admin-incident-found-main span{
  font-size:11px;
}

.admin-incident-found-main small{
  color:var(--muted);
  font-size:9px;
}

@media(max-width:1100px){
  .history-search-grid{
    grid-template-columns:repeat(3,minmax(120px,1fr));
  }

  .history-incident-summary{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .history-search-grid{
    grid-template-columns:1fr 1fr;
  }

  .history-search-wide{
    grid-column:1 / -1;
  }

  .history-result-row,
  .admin-incident-found{
    align-items:flex-start;
    flex-direction:column;
  }

  .history-result-time{
    justify-items:start;
    text-align:left;
  }

  .history-incident-summary{
    grid-template-columns:1fr 1fr;
  }

  .history-summary-location,
  .history-summary-modifiers{
    grid-column:1 / -1;
  }

  .history-participant-row{
    grid-template-columns:1fr;
  }
}


/* v0.14.1 Historical Timeline + Unit Timing refinement */
#historyIncidentDialog .history-detail-panel{
  min-height:150px;
  max-height:none;
  overflow:visible;
}

#historyIncidentDialog .history-tab-heading{
  margin-bottom:7px;
}

#historyIncidentDialog .history-timeline{
  max-height:420px;
  overflow:auto;
  scrollbar-gutter:stable;
}

#historyIncidentDialog .history-timeline .timeline-event{
  grid-template-columns:132px 16px minmax(0,1fr);
  gap:7px;
  min-height:44px;
}

#historyIncidentDialog .history-timeline .timeline-stamp{
  padding-top:8px;
  font-size:10px;
}

#historyIncidentDialog .history-timeline .timeline-marker::before{
  left:7px;
}

#historyIncidentDialog .history-timeline .timeline-marker::after{
  top:10px;
  left:2px;
}

#historyIncidentDialog .history-timeline .timeline-content{
  padding:7px 8px 8px 0;
  font-size:11px;
}

#historyIncidentDialog .history-timeline .timeline-content small{
  margin-top:3px;
  font-size:9px;
}

#historyIncidentDialog .history-note-list{
  max-height:360px;
  overflow:auto;
  scrollbar-gutter:stable;
}

#historyIncidentDialog .history-compact-timing-wrap{
  max-height:340px;
  overflow:auto;
}

#historyIncidentDialog .history-compact-timing-table tbody tr{
  cursor:pointer;
}

#historyIncidentDialog .history-compact-timing-table tbody tr:hover{
  background:#1a2530;
}

.timing-detail-context{
  display:grid;
  gap:3px;
  margin-bottom:10px;
  padding:8px 10px;
  border-left:3px solid var(--accent);
  background:#111820;
}

.timing-detail-context small{
  color:var(--muted);
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
}

.timing-detail-context strong{
  font-size:11px;
}

@media(max-width:700px){
  #historyIncidentDialog .history-timeline .timeline-event{
    grid-template-columns:1fr;
    gap:0;
    min-height:auto;
  }

  #historyIncidentDialog .history-timeline .timeline-stamp{
    padding:0 0 4px;
    text-align:left;
  }

  #historyIncidentDialog .history-timeline .timeline-marker{
    display:none;
  }

  #historyIncidentDialog .history-timeline .timeline-content{
    padding:0 0 9px;
    border-bottom:1px solid #29343f;
  }
}


/* v0.15 Notifications & Quality of Life */

/* ---------- Top-bar notification center ---------- */
.notification-menu-wrap{
  position:relative;
  z-index:65;
}

.notification-button{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
}

.notification-bell{
  font-size:9px;
  color:var(--muted);
}

.notification-button.has-alerts .notification-bell{
  color:var(--warn);
}

.notification-button.has-urgent .notification-bell{
  color:var(--danger);
}

.notification-count{
  min-width:18px;
  height:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 5px;
  border-radius:999px;
  background:var(--danger);
  color:#fff;
  font-size:9px;
  font-weight:800;
}

.notification-menu{
  position:absolute;
  top:calc(100% + 6px);
  right:0;
  width:min(430px,calc(100vw - 36px));
  max-height:min(610px,76vh);
  overflow:auto;
  padding:8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0f161d;
  box-shadow:0 18px 42px rgba(0,0,0,.5);
}

.notification-menu[hidden]{
  display:none !important;
}

.notification-menu-head{
  position:sticky;
  top:-8px;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:-8px -8px 8px;
  padding:9px;
  border-bottom:1px solid var(--line);
  background:#0f161d;
}

.notification-menu-head > div{
  display:grid;
  gap:2px;
}

.notification-menu-head strong{
  font-size:11px;
}

.notification-menu-head small{
  color:var(--muted);
  font-size:9px;
}

.notification-list{
  display:grid;
  gap:5px;
}

.notification-item{
  position:relative;
  display:flex;
  align-items:stretch;
  border:1px solid var(--line);
  border-left-width:4px;
  border-radius:7px;
  overflow:hidden;
  background:#111820;
}

.notification-item.severity-info{
  border-left-color:var(--blue);
}

.notification-item.severity-attention{
  border-left-color:var(--warn);
}

.notification-item.severity-urgent{
  border-left-color:var(--danger);
}

.notification-main{
  flex:1 1 auto;
  min-width:0;
  display:grid;
  gap:4px;
  padding:8px 9px;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}

.notification-main:hover{
  background:#18232d;
}

.notification-main > span{
  font-size:10px;
  line-height:1.35;
}

.notification-main > small{
  color:var(--muted);
  font-size:8px;
}

.notification-item-title{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
}

.notification-item-title strong{
  font-size:10px;
}

.notification-dismiss{
  flex:0 0 30px;
  border:0;
  border-left:1px solid var(--line);
  background:#151f28;
  color:var(--muted);
  cursor:pointer;
  font-size:16px;
}

.notification-dismiss:hover{
  background:#26333e;
  color:var(--text);
}

/* ---------- Incident attention ---------- */
.incident-card-qol{
  display:grid;
  gap:5px;
}

.incident-attention-row{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}

.incident-attention-badge{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:2px 6px;
  border:1px solid var(--warn);
  border-radius:999px;
  background:#2b2416;
  color:#ffe0a0;
  font-size:8px;
  font-weight:800;
  letter-spacing:.04em;
}

.incident-card-actions{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  margin-top:2px;
}

/* ---------- Unacknowledged apparatus ---------- */
@keyframes cad-unacknowledged-flash{
  0%,100%{
    background:rgba(205,56,56,.22);
    box-shadow:inset 4px 0 0 var(--danger);
  }
  50%{
    background:rgba(214,164,45,.25);
    box-shadow:inset 4px 0 0 var(--warn);
  }
}

.unit-unacknowledged-flash{
  animation:cad-unacknowledged-flash 1s steps(1,end) infinite;
}

@media(prefers-reduced-motion:reduce){
  .unit-unacknowledged-flash{
    animation:none;
    background:rgba(214,164,45,.22);
    box-shadow:inset 4px 0 0 var(--warn);
  }
}

/* ---------- Current status timers ---------- */
.unit-status-with-timer{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.unit-status-elapsed{
  flex:0 0 auto;
  color:var(--muted);
  font-size:9px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}

.assigned-unit-identity{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
}

/* ---------- Unit assignment acknowledgement ---------- */
.unit-new-assignment-alert{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  padding:11px 12px;
  border:1px solid var(--danger);
  border-left:5px solid var(--danger);
  border-radius:8px;
  background:#281719;
}

.unit-new-assignment-alert > div:first-child{
  min-width:0;
  display:grid;
  gap:3px;
}

.unit-new-assignment-alert small{
  color:#ffb7b7;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}

.unit-new-assignment-alert strong{
  font-size:14px;
}

.unit-new-assignment-alert span{
  font-size:11px;
}

.unit-assignment-ack-actions{
  flex:0 0 auto;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

/* ---------- Call information changed ---------- */
.unit-call-information{
  position:relative;
  padding:2px;
  border-radius:8px;
}

.unit-call-information.information-updated{
  outline:2px solid var(--warn);
  background:rgba(214,164,45,.10);
}

.unit-information-updated-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
  padding:7px 9px;
  border-radius:6px;
  background:#302817;
  color:#ffe0a0;
}

.unit-information-updated-banner strong{
  font-size:10px;
}

.unit-information-updated-banner span{
  font-size:9px;
}

/* ---------- Dispatch command line shell ---------- */
.dispatch-command-line{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#0c1218;
}

.dispatch-command-prompt{
  color:var(--accent);
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-weight:900;
}

.dispatch-command-line input{
  flex:1 1 auto;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:11px;
}

/* ---------- CAD notification settings ---------- */
.cad-notification-settings{
  display:grid;
  gap:8px;
  margin-bottom:14px;
  padding:10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#111820;
}

.form-grid.four{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.form-grid.three{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.cad-settings-note{
  padding:8px 10px;
  border-left:3px solid var(--warn);
  background:#181f25;
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}

.cad-settings-note strong{
  color:var(--text);
}

.cad-sound-test{
  width:max-content;
  margin-top:5px;
}

@media(max-width:900px){
  .form-grid.four,
  .form-grid.three{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .unit-new-assignment-alert{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media(max-width:620px){
  .notification-menu{
    position:fixed;
    top:70px;
    right:10px;
    left:10px;
    width:auto;
    max-height:calc(100vh - 90px);
  }

  .form-grid.four,
  .form-grid.three{
    grid-template-columns:1fr;
  }

  .unit-assignment-ack-actions{
    width:100%;
  }

  .unit-assignment-ack-actions button{
    flex:1 1 100%;
  }

  .unit-information-updated-banner{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* v0.15.1 compact spreadsheet-style Active Incidents */
.active-incidents-sheet-wrap{
  width:100%;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:6px;
  background:#0e151c;
}

.active-incidents-sheet{
  width:100%;
  min-width:980px;
  border-collapse:collapse;
  table-layout:auto;
  font-size:10px;
}

.active-incidents-sheet th{
  position:sticky;
  top:0;
  z-index:2;
  padding:5px 7px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#151e26;
  color:var(--muted);
  text-align:left;
  font-size:8px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
  white-space:nowrap;
}

.active-incidents-sheet th:last-child{
  border-right:0;
}

.active-incidents-sheet td{
  padding:5px 7px;
  border-right:1px solid #26313b;
  border-bottom:1px solid #26313b;
  vertical-align:middle;
}

.active-incidents-sheet td:last-child{
  border-right:0;
}

.active-incidents-sheet tbody tr{
  cursor:pointer;
}

.active-incidents-sheet tbody tr:hover{
  background:#18232d;
}

.active-incidents-sheet tbody tr:last-child td{
  border-bottom:0;
}

.active-incidents-sheet td > strong,
.active-incidents-sheet td > small{
  display:block;
}

.active-incidents-sheet td > strong{
  font-size:10px;
  line-height:1.2;
}

.active-incidents-sheet td > small{
  margin-top:2px;
  color:var(--muted);
  font-size:8px;
  line-height:1.25;
}

.active-incident-number{
  white-space:nowrap;
}

.active-incident-call{
  min-width:220px;
}

.active-incident-call small{
  white-space:normal;
}

.active-incident-units{
  text-align:center;
  white-space:nowrap;
}

.active-incident-units strong{
  font-size:12px !important;
}

.active-incident-elapsed{
  display:block;
  margin-top:3px;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

.active-incident-attention-cell{
  min-width:150px;
}

.active-incident-attention-cell .incident-attention-row{
  gap:3px;
}

.active-incident-attention-cell .incident-attention-badge{
  min-height:18px;
  padding:1px 5px;
  font-size:7px;
}

.active-incident-no-alerts{
  font-size:9px;
}

.active-incident-actions{
  width:1%;
  white-space:nowrap;
}

.active-incident-actions .tiny-btn{
  margin-right:3px;
}

.active-incident-actions .tiny-btn:last-child{
  margin-right:0;
}

@media(max-width:760px){
  .active-incidents-sheet{
    min-width:900px;
  }
}


/* v0.15.2 Dispatch density, account Panel submenu, clock, and base response */

/* Use the full desktop workspace for Dispatch so the incident sheet never needs
   a left/right scrollbar under normal desktop use. */
main{
  max-width:1800px;
}

.dispatch-grid{
  grid-template-columns:1fr;
}

.active-incidents-sheet-wrap{
  overflow-x:visible;
}

.active-incidents-sheet{
  min-width:0;
  width:100%;
  table-layout:fixed;
}

.active-incidents-sheet th:nth-child(1),
.active-incidents-sheet td:nth-child(1){width:12%}
.active-incidents-sheet th:nth-child(2),
.active-incidents-sheet td:nth-child(2){width:24%}
.active-incidents-sheet th:nth-child(3),
.active-incidents-sheet td:nth-child(3){width:16%}
.active-incidents-sheet th:nth-child(4),
.active-incidents-sheet td:nth-child(4){width:6%}
.active-incidents-sheet th:nth-child(5),
.active-incidents-sheet td:nth-child(5){width:20%}
.active-incidents-sheet th:nth-child(6),
.active-incidents-sheet td:nth-child(6){width:13%}
.active-incidents-sheet th:nth-child(7),
.active-incidents-sheet td:nth-child(7){width:9%}

.active-incidents-sheet td,
.active-incidents-sheet th{
  overflow-wrap:anywhere;
}

.active-incident-status-pills{
  display:flex;
  align-items:center;
  gap:4px;
  flex-wrap:wrap;
}

.response-incomplete-status-pill{
  background:#392d18;
  border:1px solid var(--warn);
  color:#ffe1a0;
  font-size:7px;
  font-weight:900;
}

.active-incident-actions{
  white-space:normal;
}

.active-incident-actions .tiny-btn{
  margin:1px 2px 1px 0;
}

/* Panel navigation now lives inside the account dropdown. */
.account-menu{
  right:18px;
  min-width:184px;
  overflow:visible;
}

.account-panel-submenu-wrap{
  position:relative;
}

.account-panel-menu-trigger{
  display:flex !important;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.account-panel-menu-trigger strong{
  font-size:16px;
  line-height:1;
  color:var(--muted);
}

.account-panel-submenu{
  top:0;
  left:calc(100% + 6px);
  right:auto;
  width:154px;
  z-index:95;
}

.account-panel-submenu .nav-btn{
  min-width:0 !important;
  max-width:none !important;
  height:auto !important;
}

/* More prominent global CAD time with a smaller operational date. */
.cad-clock{
  min-width:154px;
  height:54px;
  gap:2px;
  padding:4px 8px 3px;
}

.cad-clock strong{
  font-size:23px;
  font-weight:900;
  letter-spacing:.055em;
}

.cad-clock > span{
  color:#d9e3ec;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  line-height:1;
}

.cad-clock small{
  max-width:154px;
  font-size:7px;
}

/* Call Type base-response name editor. */
.base-response-name-editor{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  align-items:end;
  gap:8px;
  margin:8px 0 12px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
}

@media(max-width:900px){
  .active-incidents-sheet{
    min-width:0;
    font-size:8px;
  }

  .active-incidents-sheet th,
  .active-incidents-sheet td{
    padding:4px;
  }

  .active-incidents-sheet th:nth-child(3),
  .active-incidents-sheet td:nth-child(3){
    width:14%;
  }

  .active-incidents-sheet th:nth-child(5),
  .active-incidents-sheet td:nth-child(5){
    width:22%;
  }

  .account-panel-submenu{
    position:absolute;
    left:auto;
    right:calc(100% + 6px);
  }

  .cad-clock{
    min-width:100%;
    height:auto;
  }

  .cad-clock strong{
    font-size:22px;
  }

  .base-response-name-editor{
    grid-template-columns:1fr;
  }
}


/* v0.15.3 Active Incidents status consolidation + readability */
.active-incidents-sheet{
  font-size:12px;
}

.active-incidents-sheet th{
  padding:7px 8px;
  font-size:9px;
}

.active-incidents-sheet td{
  padding:7px 8px;
}

.active-incidents-sheet td > strong{
  font-size:12px;
  line-height:1.25;
}

.active-incidents-sheet td > small{
  margin-top:3px;
  font-size:10px;
  line-height:1.3;
}

.active-incident-units strong{
  font-size:14px !important;
}

.active-incident-elapsed{
  margin-top:4px;
  font-size:10px !important;
}

.active-incident-status-pills{
  gap:5px;
}

.active-incident-status-pills .pill{
  min-height:21px;
  padding:2px 6px;
  font-size:8px;
}

.active-incident-status-flag{
  font-weight:900;
  letter-spacing:.02em;
}

.active-incident-flag-status-check{
  background:#3b1919;
  border:1px solid var(--danger);
  color:#ffc2c2;
}

.active-incident-flag-new-note{
  background:#182a38;
  border:1px solid var(--blue);
  color:#cce9ff;
}

.active-incident-flag-incident-update{
  background:#332a17;
  border:1px solid var(--warn);
  color:#ffe2a3;
}

.response-incomplete-status-pill{
  font-size:8px;
}

/* Six-column layout after removing the former Attention column. */
.active-incidents-sheet th:nth-child(1),
.active-incidents-sheet td:nth-child(1){width:13%}
.active-incidents-sheet th:nth-child(2),
.active-incidents-sheet td:nth-child(2){width:27%}
.active-incidents-sheet th:nth-child(3),
.active-incidents-sheet td:nth-child(3){width:18%}
.active-incidents-sheet th:nth-child(4),
.active-incidents-sheet td:nth-child(4){width:7%}
.active-incidents-sheet th:nth-child(5),
.active-incidents-sheet td:nth-child(5){width:25%}
.active-incidents-sheet th:nth-child(6),
.active-incidents-sheet td:nth-child(6){width:10%}

.active-incident-actions .tiny-btn{
  font-size:9px;
  min-height:24px;
  padding:3px 6px;
}

@media(max-width:900px){
  .active-incidents-sheet{
    font-size:10px;
  }

  .active-incidents-sheet th{
    font-size:8px;
  }

  .active-incidents-sheet td > strong{
    font-size:11px;
  }

  .active-incidents-sheet td > small,
  .active-incident-elapsed{
    font-size:9px !important;
  }
}


/* v0.15.5 Dispatch Command Line */
.dispatch-command-shell{
  position:relative;
  margin-top:12px;
}

.dispatch-command-shell .dispatch-command-line{
  margin-top:0;
  position:relative;
  z-index:4;
}

.dispatch-command-line input{
  font-size:12px;
  font-weight:600;
}

.dispatch-command-line input::placeholder{
  color:#71808d;
  font-weight:500;
}

.dispatch-command-help-btn{
  flex:0 0 auto;
}

.dispatch-command-suggestions{
  position:absolute;
  left:0;
  right:0;
  bottom:calc(100% + 5px);
  z-index:80;
  max-height:310px;
  overflow:auto;
  padding:5px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#0d141a;
  box-shadow:0 -14px 36px rgba(0,0,0,.45);
}

.dispatch-command-suggestions[hidden]{
  display:none !important;
}

.dispatch-command-suggestion{
  width:100%;
  display:grid;
  grid-template-columns:minmax(130px,.45fr) minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding:7px 9px;
  border:0;
  border-bottom:1px solid #24303a;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}

.dispatch-command-suggestion:last-child{
  border-bottom:0;
}

.dispatch-command-suggestion:hover,
.dispatch-command-suggestion.active{
  background:#192630;
}

.dispatch-command-suggestion strong{
  min-width:0;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:11px;
}

.dispatch-command-suggestion small{
  min-width:0;
  overflow:hidden;
  color:var(--muted);
  font-size:9px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dispatch-command-result{
  min-height:18px;
  padding:4px 8px 0 26px;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:9px;
  line-height:1.35;
}

.command-result-success{
  color:#a9e8b6;
}

.command-result-error{
  color:#ffaaaa;
}

.command-result-attention{
  color:#ffe0a0;
}

.command-result-info{
  color:var(--muted);
}

.dispatch-command-help-dialog{
  width:min(920px,94vw);
  max-height:90vh;
}

.dispatch-command-help-intro{
  display:grid;
  gap:5px;
  margin-bottom:10px;
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:7px;
  background:#111820;
  font-size:10px;
  line-height:1.45;
}

.dispatch-command-help-intro p{
  margin:0;
}

.dispatch-command-help-intro code,
.dispatch-command-examples code{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
}

.dispatch-command-help-table td:first-child{
  width:42%;
}

.dispatch-command-help-table td strong,
.dispatch-command-help-table td small{
  display:block;
}

.dispatch-command-help-table td strong{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:10px;
}

.dispatch-command-help-table td small{
  margin-top:2px;
  color:var(--muted);
  font-size:8px;
}

.dispatch-command-examples{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px;
}

.dispatch-command-examples code{
  padding:7px 8px;
  border:1px solid var(--line);
  border-radius:5px;
  background:#10171e;
  font-size:10px;
}

@media(max-width:700px){
  .dispatch-command-suggestion{
    grid-template-columns:1fr;
    gap:2px;
  }

  .dispatch-command-examples{
    grid-template-columns:1fr;
  }
}


/* v0.15.6 login screen hard isolation */
body.login-mode #appHeader,
body.login-mode #appMain{
  display:none !important;
}


/* v0.15.6 pinned incident notes */
.pinned-note-block{
  margin:0 0 9px;
  border:1px solid var(--warn);
  border-left:4px solid var(--warn);
  border-radius:7px;
  overflow:hidden;
  background:#2b2417;
}

.pinned-note-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 8px;
  border-bottom:1px solid rgba(255,224,160,.18);
}

.pinned-note-head strong{
  color:#ffe1a0;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}

.pinned-note-head small{
  color:#d2bd8b;
  font-size:8px;
}

.pinned-note-content{
  display:grid;
  gap:3px;
  padding:8px 9px;
}

.pinned-note-content small{
  color:#d2bd8b;
  font-size:8px;
}

.pinned-note-content span{
  color:#fff1c8;
  font-size:11px;
  line-height:1.35;
}

.incident-note-list{
  display:grid;
}

.incident-note-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}

.incident-note-text{
  min-width:0;
  display:grid;
  gap:2px;
}

.incident-note-text small{
  color:var(--muted);
}

.note-pin-button{
  flex:0 0 auto;
  margin-top:1px;
  font-size:8px;
  padding:3px 6px;
}

.timeline-note-pinned .timeline-marker::after{
  border-color:var(--warn);
  background:var(--warn);
}

@media(max-width:620px){
  .pinned-note-head{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* v0.15.7 Branding, Roboto, themes, squared UI, and operational status colors */

/* Roboto is the primary CAD face. Purpose-built monospace command/timing areas
   retain their existing specialist fonts. */
body{
  font-family:"Roboto","Segoe UI",Arial,sans-serif;
}

.brand{
  gap:10px;
}

.brand-logo{
  width:48px;
  height:48px;
  display:block;
  flex:0 0 48px;
  object-fit:contain;
}

.login-brand .brand-logo{
  width:64px;
  height:64px;
  flex-basis:64px;
}

.brand > div > strong{
  font-size:15px;
  font-weight:800;
}

.brand > div > small{
  font-size:10px;
  font-weight:500;
}

/* -------- Per-account browser theme -------- */
body[data-theme="light"]{
  --bg:#f2f4f7;
  --panel:#ffffff;
  --panel2:#f3f5f7;
  --line:#c6cdd5;
  --text:#18212a;
  --muted:#64717e;
  --accent:#b42318;
  --good:#18864b;
  --warn:#9d6900;
  --blue:#2368ad;
  --danger:#b42318;
  background:var(--bg);
  color:var(--text);
}

body[data-theme="light"] .topbar{
  background:#ffffff;
  border-bottom-color:var(--line);
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea,
body[data-theme="light"] .detail,
body[data-theme="light"] .recommend-box,
body[data-theme="light"] .availability-banner,
body[data-theme="light"] .requirement-progress,
body[data-theme="light"] .unit-board-filter-menu,
body[data-theme="light"] .notification-menu,
body[data-theme="light"] .account-menu,
body[data-theme="light"] .panel-menu,
body[data-theme="light"] .dispatch-command-line,
body[data-theme="light"] .dispatch-command-suggestions,
body[data-theme="light"] .base-response-name-editor,
body[data-theme="light"] .cad-notification-settings{
  background:#ffffff;
  color:var(--text);
}

body[data-theme="light"] .panel,
body[data-theme="light"] .admin-card,
body[data-theme="light"] dialog,
body[data-theme="light"] .incident-card{
  background:#ffffff;
  color:var(--text);
}

body[data-theme="light"] .small-btn,
body[data-theme="light"] .tiny-btn,
body[data-theme="light"] .status-buttons button,
body[data-theme="light"] .dialog-actions button:not(.primary),
body[data-theme="light"] .cad-control-button,
body[data-theme="light"] .account-button,
body[data-theme="light"] .notification-dismiss{
  background:#eef1f4;
  color:#202a34;
  border-color:#c6cdd5;
}

body[data-theme="light"] .nav-btn.active,
body[data-theme="light"] .admin-tab.active,
body[data-theme="light"] .dispatch-command-suggestion:hover,
body[data-theme="light"] .dispatch-command-suggestion.active{
  background:#e8edf2;
  color:#17212b;
}

body[data-theme="light"] label,
body[data-theme="light"] .icon-btn{
  color:#344250;
}

body[data-theme="light"] .admin-list th,
body[data-theme="light"] .admin-list td,
body[data-theme="light"] .assignment-row,
body[data-theme="light"] .note,
body[data-theme="light"] .resource-line,
body[data-theme="light"] .dispatch-unit-board td,
body[data-theme="light"] .dispatch-unit-board th,
body[data-theme="light"] .active-incidents-sheet td,
body[data-theme="light"] .active-incidents-sheet th{
  border-color:#d4dae0;
}

body[data-theme="light"] .active-incidents-sheet-wrap,
body[data-theme="light"] .dispatch-unit-board-wrap{
  background:#ffffff;
  border-color:#c6cdd5;
}

body[data-theme="light"] .active-incidents-sheet th,
body[data-theme="light"] .dispatch-unit-board th{
  background:#e9edf1;
  color:#4f5c68;
}

body[data-theme="light"] .active-incidents-sheet tbody tr:hover,
body[data-theme="light"] .dispatch-unit-board tbody tr:hover{
  background:#f2f5f8;
}

body[data-theme="light"] .notification-menu-head{
  background:#ffffff;
}

body[data-theme="light"] .notification-item{
  background:#ffffff;
}

body[data-theme="light"] .notification-main:hover{
  background:#f0f3f6;
}

body[data-theme="light"] .dispatch-command-suggestion{
  color:#17212b;
  border-bottom-color:#d6dce2;
}

body[data-theme="light"] .dispatch-command-examples code,
body[data-theme="light"] .dispatch-command-help-intro{
  background:#f7f9fb;
}

body[data-theme="light"] .pinned-note-block{
  background:#fff8e6;
}

body[data-theme="light"] .pinned-note-content span{
  color:#4d3600;
}

/* -------- Squarer, less bubble-like visual language -------- */
button,
input,
select,
textarea,
dialog,
.panel,
.admin-card,
.incident-card,
.detail,
.pill,
.status,
.primary,
.small-btn,
.tiny-btn,
.cad-control-button,
.account-button,
.account-menu,
.panel-menu,
.notification-menu,
.notification-item,
.notification-count,
.unit-board-filter-menu,
.staffing-count-button,
.recommend-box,
.availability-banner,
.requirement-progress,
.cap-chip,
.shortage-box,
.toast,
.dispatch-unit-board-wrap,
.active-incidents-sheet-wrap,
.dispatch-command-line,
.dispatch-command-suggestions,
.dispatch-command-suggestion,
.dispatch-command-help-intro,
.dispatch-command-examples code,
.base-response-name-editor,
.cad-notification-settings,
.location-access-box,
.pinned-note-block,
.unit-new-assignment-alert,
.unit-information-updated-banner,
.cad-settings-note{
  border-radius:3px !important;
}

/* Keep elements that are intentionally geometric dots/circles circular. */
.timeline-marker::after,
.notification-bell{
  border-radius:50% !important;
}

/* -------- Exact apparatus status colors -------- */
.unit-status-badge,
.unit-status-control{
  font-weight:900 !important;
  border-width:1px !important;
  border-style:solid !important;
  text-shadow:none !important;
}

.unit-status-dispatched{
  color:#FFFF00 !important;
  background:#FF0000 !important;
  border-color:#FF0000 !important;
}

.unit-status-responding{
  color:#FFFF00 !important;
  background:#000000 !important;
  border-color:#000000 !important;
}

.unit-status-on-scene{
  color:#FF0000 !important;
  background:#000000 !important;
  border-color:#000000 !important;
}

.unit-status-transporting{
  color:#00FF00 !important;
  background:#000000 !important;
  border-color:#000000 !important;
}

.unit-status-at-destination{
  color:#FFFFFF !important;
  background:#34a853 !important;
  border-color:#34a853 !important;
}

.unit-status-returning{
  color:#0000FF !important;
  background:#999999 !important;
  border-color:#999999 !important;
}

.unit-status-in-service{
  color:#000000 !important;
  background:#FFFFFF !important;
  border-color:#c3c3c3 !important;
}

.unit-status-in-quarters{
  color:#34a853 !important;
  background:#FFFFFF !important;
  border-color:#c3c3c3 !important;
}

.unit-status-out-of-service{
  color:#999999 !important;
  background:#0000FF !important;
  border-color:#0000FF !important;
}

.unit-status-badge{
  min-width:92px;
  padding:4px 7px;
  text-align:center;
}

.unit-status-control{
  min-width:150px;
}

/* Native option menus remain readable regardless of the current status color. */
.unit-status-control option{
  color:#111111;
  background:#ffffff;
  font-weight:600;
}

@media(max-width:900px){
  .brand-logo{
    width:42px;
    height:42px;
    flex-basis:42px;
  }

  .unit-status-control{
    min-width:115px;
  }
}

/* v0.15.8 Home workspace, agency access, and Fire/EMS incident menu */
.home-page{
  max-width:1180px;
  margin:0 auto;
}

.home-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}

.home-hero h1{
  margin:2px 0 3px;
  font-size:28px;
}

.home-hero p{
  margin:0;
  color:var(--muted);
}

.home-kicker{
  color:var(--accent);
  font-size:9px;
  font-weight:900;
  letter-spacing:.09em;
}

.home-workspace-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}

.home-workspace-card{
  min-height:132px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-end;
  gap:7px;
  padding:16px;
  border:1px solid var(--line);
  border-left:4px solid var(--accent);
  background:var(--panel);
  color:var(--text);
  text-align:left;
  cursor:pointer;
}

.home-workspace-card:hover{
  background:var(--panel2);
}

.home-workspace-card strong{
  font-size:18px;
  font-weight:900;
}

.home-workspace-card span{
  color:var(--muted);
  font-size:10px;
  line-height:1.4;
}

.home-agency-panel{
  margin-top:0;
}

.home-agency-memberships{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:12px;
}

.home-agency-membership{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 9px;
  border:1px solid var(--line);
  background:var(--panel2);
}

.home-agency-membership strong{
  font-size:10px;
}

.home-agency-membership span{
  color:var(--muted);
  font-size:9px;
  font-weight:800;
}

.home-permission-key-row{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  align-items:end;
  gap:8px;
  max-width:700px;
}

.agency-membership-selector{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  margin:8px 0 12px;
}

.agency-membership-selector .permission-check{
  margin:0;
  padding:7px 8px;
  border:1px solid var(--line);
  background:var(--panel2);
}

.agency-membership-selector small{
  color:var(--muted);
}

.unit-incidents-menu-wrap{
  position:relative;
}

.unit-incidents-menu{
  position:absolute;
  top:calc(100% + 5px);
  left:0;
  z-index:90;
  width:190px;
  padding:4px;
  border:1px solid var(--line);
  background:var(--panel);
  box-shadow:0 12px 28px rgba(0,0,0,.35);
}

.unit-incidents-menu[hidden]{
  display:none !important;
}

.unit-incidents-menu button{
  width:100%;
  display:block;
  padding:8px 9px;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  cursor:pointer;
}

.unit-incidents-menu button:hover{
  background:var(--panel2);
}

body[data-theme="light"] .home-workspace-card,
body[data-theme="light"] .unit-incidents-menu{
  background:#fff;
}

body[data-theme="light"] .home-workspace-card:hover,
body[data-theme="light"] .unit-incidents-menu button:hover,
body[data-theme="light"] .home-agency-membership,
body[data-theme="light"] .agency-membership-selector .permission-check{
  background:#f1f4f7;
}

.account-menu-home{
  font-weight:900 !important;
  border-bottom:1px solid var(--line) !important;
}

@media(max-width:850px){
  .home-workspace-grid{
    grid-template-columns:1fr;
  }

  .home-workspace-card{
    min-height:100px;
  }

  .home-permission-key-row,
  .agency-membership-selector{
    grid-template-columns:1fr;
  }

  .unit-incidents-menu{
    position:fixed;
    top:70px;
    left:10px;
    right:10px;
    width:auto;
  }
}


/* v0.15.9 status SECURE, note controls, preferences, and close workflow */
.status-secure-button{
  border-color:#d49b19 !important;
  background:#2d2410 !important;
  color:#ffe18a !important;
  font-weight:900 !important;
  letter-spacing:.04em;
}

.status-secure-button:hover{
  background:#3b2f13 !important;
}

.unit-status-check-alert{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 10px;
  padding:10px 12px;
  border:2px solid #d49b19;
  background:#241d0d;
}

.unit-status-check-alert > div{
  min-width:0;
  display:grid;
  gap:2px;
}

.unit-status-check-alert small{
  color:#ffe18a;
  font-weight:900;
  letter-spacing:.08em;
}

.unit-status-check-alert strong{
  color:#fff0b6;
}

.unit-status-check-alert span{
  color:#d7c897;
  font-size:10px;
}

.incident-note-heading-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  flex-wrap:wrap;
}

.note-order-toggle{
  min-width:92px;
  font-size:8px;
  font-weight:800;
}

.note-pin-button{
  min-width:29px;
  min-height:27px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 6px;
  font-size:14px;
  line-height:1;
}

.user-preferences-dialog{
  width:min(720px,94vw);
}

.preferences-section{
  display:grid;
  gap:9px;
  margin-bottom:12px;
  padding:12px;
  border:1px solid var(--line);
  background:#111820;
}

.preferences-section h3{
  margin:0;
  font-size:13px;
}

.preferences-notification-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px 12px;
}

.close-notes-dialog{
  width:min(620px,94vw);
}

.close-notes-dialog textarea{
  width:100%;
  resize:vertical;
  min-height:115px;
}

.history-return-button{
  font-weight:800;
}

body[data-theme="light"] .preferences-section{
  background:#f6f8fa;
}

body[data-theme="light"] .unit-status-check-alert{
  background:#fff6d9;
}

body[data-theme="light"] .unit-status-check-alert strong{
  color:#5d4300;
}

body[data-theme="light"] .unit-status-check-alert span{
  color:#6d5a24;
}

@media(max-width:650px){
  .preferences-notification-grid{
    grid-template-columns:1fr;
  }

  .unit-status-check-alert{
    align-items:stretch;
    flex-direction:column;
  }
}


.history-return-taskbar-button{
  min-height:42px;
  padding:7px 12px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}


/* v0.15.10 call-level Status Check, unpin, and comprehensive light-mode pass */
.call-status-check-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 10px;
  padding:10px 12px;
  border:2px solid #d49b19;
  background:#241d0d;
}

.call-status-check-banner > div{
  min-width:0;
  display:grid;
  gap:2px;
}

.call-status-check-banner small{
  color:#ffe18a;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
}

.call-status-check-banner strong{
  color:#fff0b6;
}

.call-status-check-banner span{
  color:#d7c897;
  font-size:10px;
}

.pinned-note-head > div{
  min-width:0;
  display:grid;
  gap:2px;
}

.note-unpin-button{
  flex:0 0 auto;
  opacity:.88;
}

.note-unpin-button:hover{
  opacity:1;
}

/* Light mode: taskbar / header controls */
body[data-theme="light"] .topbar-left .cad-control-button,
body[data-theme="light"] .topbar-right .cad-control-button,
body[data-theme="light"] .active-unit-button,
body[data-theme="light"] .unit-taskbar-action,
body[data-theme="light"] .unit-status-button,
body[data-theme="light"] .notification-button,
body[data-theme="light"] .history-return-taskbar-button,
body[data-theme="light"] .account-button{
  background:#edf1f4 !important;
  color:#17212b !important;
  border-color:#bdc7d0 !important;
}

body[data-theme="light"] .topbar-left .cad-control-button:hover,
body[data-theme="light"] .topbar-right .cad-control-button:hover,
body[data-theme="light"] .active-unit-button:hover,
body[data-theme="light"] .unit-taskbar-action:hover,
body[data-theme="light"] .unit-status-button:hover,
body[data-theme="light"] .notification-button:hover,
body[data-theme="light"] .history-return-taskbar-button:hover,
body[data-theme="light"] .account-button:hover{
  background:#dde4ea !important;
  color:#101820 !important;
}

body[data-theme="light"] .active-unit-kicker,
body[data-theme="light"] .current-user-permissions,
body[data-theme="light"] .unit-status-current{
  color:#53616d !important;
}

/* Light mode: Unit Board staffing controls */
body[data-theme="light"] .staffing-count-button{
  background:#eef2f5 !important;
  color:#17212b !important;
  border-color:#bdc7d0 !important;
}

body[data-theme="light"] .staffing-count-button.staffed{
  background:#e5f4ea !important;
  color:#176b38 !important;
  border-color:#98c9a9 !important;
}

body[data-theme="light"] .staffing-count-button.understaffed{
  background:#fff4d8 !important;
  color:#765300 !important;
  border-color:#d9bd6d !important;
}

body[data-theme="light"] .staffing-count-button.unstaffed{
  background:#fde9e9 !important;
  color:#8d2222 !important;
  border-color:#d7a1a1 !important;
}

/* Light mode: incident information / tabs / notes */
body[data-theme="light"] .location-access-box,
body[data-theme="light"] .unit-call-information,
body[data-theme="light"] .incident-tab-panel,
body[data-theme="light"] .incident-note-entry,
body[data-theme="light"] .history-note-row{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c9d1d8 !important;
}

body[data-theme="light"] .location-access-box small,
body[data-theme="light"] .incident-tab-heading,
body[data-theme="light"] .incident-note-text small{
  color:#596774 !important;
}

body[data-theme="light"] .incident-detail-tabs{
  background:#f5f7f9 !important;
  border-color:#c9d1d8 !important;
}

body[data-theme="light"] .incident-detail-tab{
  background:#eef2f5 !important;
  color:#40505e !important;
  border-color:transparent !important;
}

body[data-theme="light"] .incident-detail-tab:hover{
  background:#e0e6eb !important;
  color:#18212a !important;
}

body[data-theme="light"] .incident-detail-tab.active{
  background:#ffffff !important;
  color:#18212a !important;
  border-bottom-color:var(--accent) !important;
}

/* Light mode: Incident Timeline */
body[data-theme="light"] .incident-timeline{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c9d1d8 !important;
}

body[data-theme="light"] .timeline-content{
  border-bottom-color:#dce2e7 !important;
}

body[data-theme="light"] .timeline-marker::before{
  background:#b9c4cd !important;
}

body[data-theme="light"] .timeline-marker::after{
  border-color:#ffffff !important;
  box-shadow:0 0 0 1px #8495a4 !important;
}

/* Light mode: Unit Timing Summary */
body[data-theme="light"] .unit-timing-card,
body[data-theme="light"] .selected-unit-timing,
body[data-theme="light"] .compact-timing-table-wrap,
body[data-theme="light"] .timing-detail-grid > div,
body[data-theme="light"] .timing-duration-grid > div{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c9d1d8 !important;
}

body[data-theme="light"] .unit-timing-grid > div,
body[data-theme="light"] .selected-unit-time-box{
  background:#f1f4f6 !important;
  color:#18212a !important;
  border-color:#cbd3da !important;
}

body[data-theme="light"] .compact-timing-table th{
  background:#e8edf1 !important;
  color:#52616e !important;
}

body[data-theme="light"] .compact-timing-table td{
  background:#ffffff !important;
  color:#18212a !important;
  border-bottom-color:#dce2e7 !important;
}

body[data-theme="light"] .compact-timing-table tbody tr:hover td{
  background:#f1f5f7 !important;
}

/* Light mode: Admin navigation and dense configuration panels */
body[data-theme="light"] .admin-tabs{
  background:#f5f7f9 !important;
}

body[data-theme="light"] .admin-tab{
  background:#e9eef2 !important;
  color:#455562 !important;
  border-color:#cbd3da !important;
}

body[data-theme="light"] .admin-tab:hover{
  background:#dde5eb !important;
  color:#18212a !important;
}

body[data-theme="light"] .admin-tab.active{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#9eabb6 !important;
}

body[data-theme="light"] .admin-card,
body[data-theme="light"] .editor-summary .detail,
body[data-theme="light"] .resolved-area-box,
body[data-theme="light"] .response-modifier-panel,
body[data-theme="light"] .automatic-response-rules,
body[data-theme="light"] .response-progress-info-intro,
body[data-theme="light"] .response-progress-info-row,
body[data-theme="light"] .recommendation-info-summary .detail{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c9d1d8 !important;
}

body[data-theme="light"] .admin-list tbody tr:hover,
body[data-theme="light"] .clickable-table tbody tr:hover{
  background:#f1f5f7 !important;
}

body[data-theme="light"] .call-status-check-banner{
  background:#fff5d6 !important;
  border-color:#c79520 !important;
}

body[data-theme="light"] .call-status-check-banner strong{
  color:#5d4300 !important;
}

body[data-theme="light"] .call-status-check-banner small,
body[data-theme="light"] .call-status-check-banner span{
  color:#705a1a !important;
}

@media(max-width:650px){
  .call-status-check-banner{
    align-items:stretch;
    flex-direction:column;
  }
}


/* Additional V0.15.10 light-mode controls that previously retained dark fills */
body[data-theme="light"] .taskbar-status-option,
body[data-theme="light"] .unit-incidents-menu button,
body[data-theme="light"] .account-menu button,
body[data-theme="light"] .notification-menu button:not(.status-secure-button),
body[data-theme="light"] .unit-board-filter-menu button,
body[data-theme="light"] .filter-toggle-option,
body[data-theme="light"] #page-admin button:not(.primary):not(.danger){
  background:#edf1f4 !important;
  color:#18212a !important;
  border-color:#bdc7d0 !important;
}

body[data-theme="light"] .taskbar-status-option:hover,
body[data-theme="light"] .unit-incidents-menu button:hover,
body[data-theme="light"] .account-menu button:hover,
body[data-theme="light"] .notification-menu button:not(.status-secure-button):hover,
body[data-theme="light"] .unit-board-filter-menu button:hover,
body[data-theme="light"] .filter-toggle-option:hover,
body[data-theme="light"] #page-admin button:not(.primary):not(.danger):hover{
  background:#dce4ea !important;
  color:#101820 !important;
}

body[data-theme="light"] .taskbar-status-option.current,
body[data-theme="light"] .filter-toggle-option.selected{
  background:#d6e2eb !important;
  color:#13202a !important;
  border-color:#93a8b8 !important;
}

body[data-theme="light"] .section-title,
body[data-theme="light"] .panel-head,
body[data-theme="light"] .response-modifier-head,
body[data-theme="light"] .base-response-name-editor,
body[data-theme="light"] .cad-notification-settings,
body[data-theme="light"] .home-agency-membership,
body[data-theme="light"] .user-selector-section,
body[data-theme="light"] .unit-selector-current-staffing{
  color:#18212a !important;
}

body[data-theme="light"] .response-modifier-toggle,
body[data-theme="light"] .requirement-progress-row,
body[data-theme="light"] .recommendation-row,
body[data-theme="light"] .unit-active-incident-row,
body[data-theme="light"] .history-result-row{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c9d1d8 !important;
}

body[data-theme="light"] .response-modifier-toggle:hover,
body[data-theme="light"] .recommendation-row:hover,
body[data-theme="light"] .unit-active-incident-row:hover,
body[data-theme="light"] .history-result-row:hover{
  background:#f1f5f7 !important;
}

body[data-theme="light"] .response-modifier-toggle.applied{
  background:#e7f3ea !important;
  color:#174f2d !important;
  border-color:#9cc7aa !important;
}

body[data-theme="light"] .danger{
  background:#f8dddd !important;
  color:#8a2020 !important;
  border-color:#d5a0a0 !important;
}


/* v0.15.11 compact notification bell and strict portal-only controls */
#historyReturnButton[hidden],
#notificationMenuWrap[hidden]{
  display:none !important;
}

.notification-button{
  width:42px;
  min-width:42px;
  height:42px;
  justify-content:center;
  padding:0 !important;
  gap:0;
}

.notification-bell{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px !important;
  line-height:1;
  color:var(--text) !important;
}

.notification-button.has-alerts .notification-bell,
.notification-button.has-urgent .notification-bell{
  color:var(--text) !important;
}

.notification-count{
  position:absolute;
  top:-5px;
  right:-6px;
  min-width:18px;
  width:auto;
  height:18px;
  padding:0 4px;
  border:2px solid var(--panel);
  border-radius:999px !important;
  font-size:9px;
  line-height:14px;
  z-index:2;
}

/* v0.15.11 hybrid Status Check controls */
.individual-status-check-banner{
  border-color:#d49b19;
}

/* Light mode: current staffed unit identity must be fully readable. */
body[data-theme="light"] .unit-taskbar-identity{
  color:#000000 !important;
  font-weight:700;
}

/* Light mode: bottom-right transient notification/toast remains dark. */
body[data-theme="light"] .toast{
  background:#111111 !important;
  color:#ffffff !important;
  border-color:#303030 !important;
  box-shadow:0 8px 24px rgba(0,0,0,.24);
}

/* Light mode: Advanced Response / RESPONSE LEVEL block */
body[data-theme="light"] .advanced-response-bar,
body[data-theme="light"] .advanced-response-level,
body[data-theme="light"] .advanced-response-upgrade,
body[data-theme="light"] .response-modifier-panel,
body[data-theme="light"] .automatic-response-rules{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .advanced-response-level small,
body[data-theme="light"] .automatic-response-rules > small{
  color:#52616e !important;
}

body[data-theme="light"] .advanced-response-level strong{
  color:#111820 !important;
}

/* Light mode: pinned note becomes blue instead of yellow-on-white. */
body[data-theme="light"] .pinned-note-block{
  background:#eef5ff !important;
  border-color:#2368ad !important;
  border-left-color:#2368ad !important;
}

body[data-theme="light"] .pinned-note-head{
  border-bottom-color:#bed3ea !important;
}

body[data-theme="light"] .pinned-note-head strong,
body[data-theme="light"] .pinned-note-head small,
body[data-theme="light"] .pinned-note-content small{
  color:#2368ad !important;
}

body[data-theme="light"] .pinned-note-content span{
  color:#173b63 !important;
}

/* Light mode: additional Administration surface correction. */
body[data-theme="light"] #page-admin{
  color:#18212a !important;
}

body[data-theme="light"] #page-admin .panel,
body[data-theme="light"] #page-admin .admin-card,
body[data-theme="light"] #page-admin .detail,
body[data-theme="light"] #page-admin .recommend-box,
body[data-theme="light"] #page-admin .availability-banner,
body[data-theme="light"] #page-admin .resolved-area-box,
body[data-theme="light"] #page-admin .base-response-name-editor,
body[data-theme="light"] #page-admin .cad-notification-settings,
body[data-theme="light"] #page-admin .modal-add-row,
body[data-theme="light"] #page-admin .editor-summary,
body[data-theme="light"] #page-admin .response-modifier-panel,
body[data-theme="light"] #page-admin .automatic-response-rules{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] #page-admin .admin-list th{
  background:#e9eef2 !important;
  color:#455562 !important;
  border-color:#cbd3da !important;
}

body[data-theme="light"] #page-admin .admin-list td{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#d6dde3 !important;
}

body[data-theme="light"] #page-admin .admin-list tbody tr:hover td{
  background:#f0f4f7 !important;
}

body[data-theme="light"] #page-admin input,
body[data-theme="light"] #page-admin select,
body[data-theme="light"] #page-admin textarea{
  background:#ffffff !important;
  color:#111820 !important;
  border-color:#b9c5ce !important;
}

body[data-theme="light"] #page-admin input::placeholder,
body[data-theme="light"] #page-admin textarea::placeholder{
  color:#73808c !important;
}

body[data-theme="light"] #page-admin .pill:not(.unit-status-badge),
body[data-theme="light"] #page-admin .cap-chip{
  background:#e9eef2 !important;
  color:#283743 !important;
  border-color:#c4ced6 !important;
}

body[data-theme="light"] #page-admin .resource-line{
  color:#18212a !important;
  border-bottom-color:#d5dde3 !important;
}

body[data-theme="light"] #page-admin small,
body[data-theme="light"] #page-admin .muted{
  color:#60707d;
}

/* Light mode notification bell stays light-grey with readable glyph. */
body[data-theme="light"] .notification-button{
  background:#edf1f4 !important;
  color:#17212b !important;
  border-color:#bdc7d0 !important;
}

body[data-theme="light"] .notification-bell{
  color:#17212b !important;
}

body[data-theme="light"] .notification-count{
  border-color:#ffffff !important;
}


/* v0.15.12 mandatory Status Check visibility and flash states */
@keyframes cad-status-check-flash{
  0%,100%{
    background:rgba(220,40,40,.30);
    box-shadow:inset 5px 0 0 #ff0000;
  }
  50%{
    background:rgba(255,220,0,.28);
    box-shadow:inset 5px 0 0 #ffd400;
  }
}

@keyframes cad-status-check-dispatched-flash{
  0%,100%{
    background:rgba(230,25,25,.32);
    box-shadow:inset 5px 0 0 #ff0000;
  }
  50%{
    background:rgba(25,85,220,.34);
    box-shadow:inset 5px 0 0 #1757d5;
  }
}

.status-check-flash{
  animation:cad-status-check-flash 1s steps(1,end) infinite !important;
}

.status-check-flash-dispatched{
  animation:cad-status-check-dispatched-flash 1s steps(1,end) infinite !important;
}

@media(prefers-reduced-motion:reduce){
  .status-check-flash{
    animation:none !important;
    background:rgba(255,220,0,.24) !important;
    box-shadow:inset 5px 0 0 #ff0000 !important;
  }

  .status-check-flash-dispatched{
    animation:none !important;
    background:rgba(25,85,220,.24) !important;
    box-shadow:inset 5px 0 0 #ff0000 !important;
  }
}

/* v0.15.12 compact square taskbar icon buttons */
.notification-button,
.topbar-home-button{
  width:42px !important;
  min-width:42px !important;
  max-width:42px !important;
  height:42px !important;
  min-height:42px !important;
  flex:0 0 42px !important;
  box-sizing:border-box;
  padding:0 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.topbar-home-button{
  font-size:21px;
  font-weight:900;
  line-height:1;
}

/* v0.15.12 command autocomplete: on-demand, compact, max three visible rows */
.dispatch-command-suggestions{
  right:auto !important;
  width:min(560px,calc(100% - 10px)) !important;
  max-height:126px !important;
  padding:3px !important;
}

.dispatch-command-suggestion{
  grid-template-columns:minmax(100px,.38fr) minmax(0,1fr) !important;
  gap:7px !important;
  min-height:36px;
  padding:5px 7px !important;
}

.dispatch-command-suggestion strong{
  font-size:10px !important;
}

.dispatch-command-suggestion small{
  font-size:8px !important;
}

/* v0.15.12 notification overlays must remain above ordinary CAD shells */
.topbar{
  z-index:9000 !important;
}

.notification-menu-wrap{
  z-index:9200 !important;
}

.notification-menu{
  z-index:9300 !important;
}

.toast{
  z-index:20000 !important;
}

.dispatch-command-suggestions{
  z-index:5000 !important;
}

/* v0.15.12 User Preferences / Quick Note */
.quick-note-dialog{
  width:min(620px,94vw);
}

.quick-note-dialog textarea{
  width:100%;
  min-height:115px;
  resize:vertical;
}

.preferences-section-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.required-notification-option{
  border-left:3px solid var(--warn) !important;
}

/* v0.15.12 additional Light Mode corrections */
body[data-theme="light"] .user-preferences-dialog .preferences-section,
body[data-theme="light"] .user-preferences-dialog .permission-check,
body[data-theme="light"] #userEditorDialog .permission-check,
body[data-theme="light"] #staffingRosterDialog .staffing-roster-summary,
body[data-theme="light"] #staffingRosterDialog .staffing-roster-row,
body[data-theme="light"] #unitSelectorDialog .unit-selector-current-staffing,
body[data-theme="light"] #unitSelectorDialog .staffing-roster-row,
body[data-theme="light"] .history-scope-banner,
body[data-theme="light"] .recommendation-priority-order,
body[data-theme="light"] .cad-recommendation-mode-note,
body[data-theme="light"] .cad-settings-note{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .user-preferences-dialog .permission-check,
body[data-theme="light"] #userEditorDialog .permission-check{
  background:#f3f6f8 !important;
  color:#18212a !important;
  border:1px solid #cbd4db !important;
}

body[data-theme="light"] .user-preferences-dialog .required-notification-option{
  background:#fff7df !important;
  color:#5b4509 !important;
  border-left-color:#b88712 !important;
}

body[data-theme="light"] .user-preferences-dialog input[type="checkbox"],
body[data-theme="light"] #userEditorDialog input[type="checkbox"],
body[data-theme="light"] #page-admin input[type="checkbox"]{
  accent-color:#2368ad;
}

body[data-theme="light"] .history-scope-banner strong{
  color:#17212b !important;
}

body[data-theme="light"] .history-scope-banner span{
  color:#52616e !important;
}

body[data-theme="light"] .staffing-roster-row,
body[data-theme="light"] .staffing-roster-summary,
body[data-theme="light"] .unit-selector-current-staffing{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .staffing-roster-row small,
body[data-theme="light"] .staffing-roster-summary small,
body[data-theme="light"] .unit-selector-current-staffing small{
  color:#5c6b77 !important;
}

body[data-theme="light"] .recommendation-priority-order p,
body[data-theme="light"] .cad-recommendation-mode-note,
body[data-theme="light"] .cad-settings-note{
  color:#455562 !important;
}

body[data-theme="light"] .cad-recommendation-mode-note strong,
body[data-theme="light"] .cad-settings-note strong{
  color:#17212b !important;
}

body[data-theme="light"] #page-admin .permission-check{
  background:#f3f6f8 !important;
  color:#18212a !important;
  border:1px solid #cbd4db !important;
}

body[data-theme="light"] #page-admin .cad-notification-settings .permission-check{
  background:#f3f6f8 !important;
  color:#18212a !important;
}

body[data-theme="light"] #page-admin .recommendation-priority-order{
  background:#ffffff !important;
  border:1px solid #c7d0d8 !important;
}

body[data-theme="light"] .quick-note-dialog{
  background:#ffffff !important;
  color:#18212a !important;
}

/* Preserve operational flash colors in Light Mode rather than washing them out. */
body[data-theme="light"] .status-check-flash,
body[data-theme="light"] .status-check-flash-dispatched{
  color:#18212a;
}


body[data-theme="light"] .unit-selector-staffing-head,
body[data-theme="light"] .unit-selector-staffing-list,
body[data-theme="light"] .unit-selector-staffing-row{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .unit-selector-staffing-row span,
body[data-theme="light"] .unit-selector-staffing-head small{
  color:#5c6b77 !important;
}


/* v0.15.14 Home icon */
.topbar-home-icon{
  width:22px;
  height:22px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* v0.15.14 multiline Incident Notes */
.incident-note-entry textarea{
  min-height:62px;
  resize:vertical;
  line-height:1.35;
}

.incident-note-text span,
.pinned-note-content span,
.history-note-row span{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

/* v0.15.14 Dispatch Position taskbar */
.dispatch-position-menu-wrap{
  position:relative;
  z-index:120;
}

.dispatch-position-button{
  min-width:155px;
  border:1px solid var(--line);
  background:#0c1117;
  color:var(--text);
  padding:8px 12px;
  text-align:left;
  display:grid;
  gap:1px;
}

.dispatch-position-button:hover{
  background:#19222c;
}

.dispatch-position-button .active-unit-name{
  max-width:180px;
  font-size:14px;
  line-height:1.15;
}

.dispatch-position-menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:9400;
  width:min(310px,calc(100vw - 30px));
  display:grid;
  gap:8px;
  padding:10px;
  border:1px solid var(--line);
  background:#0f161d;
  box-shadow:0 18px 42px rgba(0,0,0,.5);
}

.dispatch-position-menu[hidden]{
  display:none !important;
}

.dispatch-position-menu strong{
  font-size:12px;
}

.dispatch-position-menu small{
  color:var(--muted);
  font-size:9px;
}

.dispatch-taskbar-center{
  min-width:0;
  display:flex;
  justify-content:center;
  align-items:center;
}

.dispatch-taskbar-center[hidden],
.dispatch-position-menu-wrap[hidden]{
  display:none !important;
}

.dispatch-taskbar-identity{
  width:100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-align:center;
  font-size:14px;
  font-weight:800;
  color:#dce5ee;
}

/* v0.15.14 Unit Board filters */
.unit-board-filter-menu-actions{
  justify-content:flex-start;
}

.unit-board-filter-menu-actions button{
  flex:0 0 auto;
}

body[data-theme="light"] .unit-board-filter-menu .unit-board-filter-section-head,
body[data-theme="light"] .unit-board-filter-menu .unit-board-filter-section-head strong{
  color:#18212a !important;
}

body[data-theme="light"] .unit-board-filter-menu .unit-board-filter-section-head{
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .unit-board-filter-toggle{
  background:#edf1f4 !important;
  color:#18212a !important;
  border-color:#bdc7d0 !important;
}

body[data-theme="light"] .unit-board-filter-toggle small{
  color:#5d6b77 !important;
}

body[data-theme="light"] .unit-board-filter-toggle:hover{
  background:#dce4ea !important;
  color:#101820 !important;
}

body[data-theme="light"] .unit-board-filter-toggle.active,
body[data-theme="light"] .unit-board-filter-toggle.active:hover{
  background:#2368ad !important;
  border-color:#2368ad !important;
  color:#ffffff !important;
  box-shadow:0 0 0 1px #2368ad !important;
}

body[data-theme="light"] .unit-board-filter-toggle.active small{
  color:#eaf3ff !important;
  opacity:1 !important;
}

/* v0.15.14 Dispatch Position light mode */
body[data-theme="light"] .dispatch-position-button{
  background:#edf1f4 !important;
  color:#17212b !important;
  border-color:#bdc7d0 !important;
}

body[data-theme="light"] .dispatch-position-button:hover{
  background:#dce4ea !important;
}

body[data-theme="light"] .dispatch-position-button .active-unit-kicker{
  color:#53616d !important;
}

body[data-theme="light"] .dispatch-position-menu{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
  box-shadow:0 18px 42px rgba(31,43,55,.18);
}

body[data-theme="light"] .dispatch-position-menu small{
  color:#5c6b77 !important;
}

body[data-theme="light"] .dispatch-taskbar-identity{
  color:#000000 !important;
}

@media(max-width:900px){
  .dispatch-taskbar-center{
    width:100%;
    order:2;
  }

  .dispatch-taskbar-identity{
    text-align:left;
    white-space:normal;
  }
}


body[data-theme="light"] .unit-board-filter-menu-head,
body[data-theme="light"] .unit-board-filter-menu-actions{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .unit-board-filter-menu .unit-board-filter-section{
  background:#f7f9fb !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}


/* v0.15.15 PENDING incidents require immediate Dispatch attention. */
.pending-incident-flash{
  animation:cad-status-check-flash 1s steps(1,end) infinite !important;
}

@media(prefers-reduced-motion:reduce){
  .pending-incident-flash{
    animation:none !important;
    background:rgba(255,220,0,.24) !important;
    box-shadow:inset 5px 0 0 #ff0000 !important;
  }
}


/* v0.15.18 PENDING Call Reminder escalation */
.pending-incident-reminder-flash{
  animation:cad-status-check-dispatched-flash 1s steps(1,end) infinite !important;
}

@media(prefers-reduced-motion:reduce){
  .pending-incident-reminder-flash{
    animation:none !important;
    background:rgba(25,85,220,.24) !important;
    box-shadow:inset 5px 0 0 #ff0000 !important;
  }
}


/* v0.15.19 taskbar user identity */
.account-button{
  min-width:150px;
  text-align:center;
  justify-items:center;
}

.account-button .account-login-label{
  display:block;
  color:var(--muted);
  font-size:8px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:none;
}

.account-button #currentUserName{
  display:block;
  font-size:15px;
  line-height:1.1;
  font-weight:900;
  color:var(--text);
}

/* v0.15.19 compact Home workspace cards with line icons */
.home-workspace-grid{
  gap:9px;
}

.home-workspace-card{
  min-height:104px;
  padding:12px 14px;
  justify-content:flex-end;
  gap:5px;
}

.home-workspace-icon{
  width:31px;
  height:31px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  color:var(--accent);
  margin-bottom:auto;
}

.home-workspace-card strong{
  font-size:16px;
}

.home-workspace-card span{
  font-size:9px;
  line-height:1.3;
}

/* v0.15.19 user sound preferences */
.preferences-sound-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.preferences-sound-grid > label{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:end;
  gap:6px;
}

.preferences-sound-grid > label > select{
  grid-column:1 / -1;
}

.preferences-sound-grid > label > button{
  grid-column:2;
  justify-self:end;
}

body[data-theme="light"] .preferences-sound-grid > label{
  color:#18212a !important;
}

body[data-theme="light"] .home-workspace-icon{
  color:#9b2018;
}

@media(max-width:850px){
  .home-workspace-grid{
    grid-template-columns:1fr;
  }

  .home-workspace-card{
    min-height:92px;
  }

  .preferences-sound-grid{
    grid-template-columns:1fr;
  }
}


/* v0.15.20 compact horizontal Home workspace cards */
.home-workspace-grid{
  gap:8px !important;
}

.home-workspace-card{
  min-height:0 !important;
  height:auto !important;
  padding:10px 12px !important;
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:11px !important;
  text-align:left !important;
}

.home-workspace-icon{
  width:30px !important;
  height:30px !important;
  flex:0 0 30px;
  margin:0 !important;
}

.home-workspace-copy{
  min-width:0;
  display:grid;
  gap:2px;
}

.home-workspace-copy strong{
  display:block;
  font-size:15px !important;
  line-height:1.15;
}

.home-workspace-copy > span{
  display:block;
  font-size:9px !important;
  line-height:1.25;
}

/* v0.15.20 simple account name */
.account-button{
  min-width:130px;
  justify-items:center;
  text-align:center;
}

.account-button #currentUserName{
  font-size:15px;
  line-height:1.1;
  font-weight:900;
}

/* v0.15.20 Light Mode clock contrast */
body[data-theme="light"] #cadClockDate,
body[data-theme="light"] #cadClockZone{
  color:#000000 !important;
  opacity:1 !important;
}

/* v0.15.20 CAD Settings access / branding */
.cad-settings-access-note{
  display:grid;
  gap:3px;
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-left:4px solid var(--accent);
  background:#111820;
}

.cad-settings-access-note strong{
  font-size:12px;
}

.cad-settings-access-note span{
  color:var(--muted);
  font-size:10px;
}

.cad-settings-access-note.read-only{
  border-left-color:#8b96a1;
}

.cad-settings-readonly-footer{
  margin-top:14px;
  padding:10px 12px;
  border:1px solid var(--line);
  background:#111820;
  color:var(--muted);
  font-size:10px;
  font-weight:700;
}

body[data-theme="light"] .cad-settings-access-note,
body[data-theme="light"] .cad-settings-readonly-footer{
  background:#f6f8fa !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .cad-settings-access-note{
  border-left-color:#b42318 !important;
}

body[data-theme="light"] .cad-settings-access-note.read-only{
  border-left-color:#7c8791 !important;
}

body[data-theme="light"] .cad-settings-access-note span,
body[data-theme="light"] .cad-settings-readonly-footer{
  color:#4e5c67 !important;
}

/* v0.15.20 Call Types & Responses editor readability */
.admin-editor-dialog.call-type-editor-dialog{
  width:min(1120px,96vw);
}

.call-type-response-editor{
  display:grid;
  gap:14px;
}

.call-type-response-editor .editor-summary{
  margin-bottom:0;
}

.call-type-response-editor .advanced-config-section{
  margin:0;
  padding:14px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#0f161d;
}

.call-type-response-editor .advanced-config-section > .section-title:first-child{
  margin:0 0 5px;
  font-size:14px;
}

.call-type-response-editor .advanced-config-section > p.muted{
  margin:0 0 12px;
  max-width:900px;
  line-height:1.45;
}

.call-type-response-editor .sub-section-title{
  margin:16px 0 6px;
  padding-top:12px;
  border-top:1px solid var(--line);
}

.call-type-response-editor .advanced-rule-card{
  margin:10px 0 14px;
  padding:12px;
}

.call-type-response-editor .resource-line{
  gap:12px;
  align-items:center;
  padding:7px 0;
}

.response-rule-add-block{
  margin-top:10px;
  padding:9px;
  border:1px solid #29343f;
  background:#0b1218;
}

.response-rule-add-title{
  display:block;
  margin-bottom:7px;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.call-type-response-editor .advanced-add-grid,
.call-type-response-editor .advanced-add-grid.specific-grid,
.call-type-response-editor .advanced-add-grid.agency-grid{
  grid-template-columns:repeat(3,minmax(120px,1fr)) auto;
  gap:8px;
  align-items:end;
}

.call-type-response-editor .advanced-add-grid.agency-grid{
  grid-template-columns:repeat(4,minmax(115px,1fr)) auto;
}

.call-type-response-editor .advanced-add-grid label{
  display:grid;
  gap:4px;
  min-width:0;
  color:var(--muted);
  font-size:9px;
  font-weight:700;
}

.call-type-response-editor .advanced-add-grid label select,
.call-type-response-editor .advanced-add-grid label input{
  width:100%;
  min-width:0;
}

.call-type-response-editor .advanced-add-grid > button{
  align-self:end;
  min-height:36px;
  white-space:nowrap;
}

body[data-theme="light"] .call-type-response-editor .advanced-config-section,
body[data-theme="light"] .response-rule-add-block{
  background:#f7f9fb !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .response-rule-add-title,
body[data-theme="light"] .call-type-response-editor .advanced-add-grid label{
  color:#4f5e69 !important;
}

@media(max-width:900px){
  .home-workspace-grid{
    grid-template-columns:1fr !important;
  }

  .call-type-response-editor .advanced-add-grid,
  .call-type-response-editor .advanced-add-grid.specific-grid,
  .call-type-response-editor .advanced-add-grid.agency-grid{
    grid-template-columns:1fr 1fr;
  }

  .call-type-response-editor .advanced-add-grid > button{
    width:100%;
  }
}

@media(max-width:600px){
  .call-type-response-editor .advanced-add-grid,
  .call-type-response-editor .advanced-add-grid.specific-grid,
  .call-type-response-editor .advanced-add-grid.agency-grid{
    grid-template-columns:1fr;
  }
}


/* v0.15.21 Admin primary groups + subtabs */
.admin-navigation{
  display:grid;
  gap:8px;
  margin-bottom:14px;
}

.admin-primary-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  padding:7px;
  border:1px solid var(--line);
  background:#0d141b;
}

.admin-primary-tab{
  min-width:118px;
  border:1px solid transparent;
  background:transparent;
  color:var(--muted);
  padding:9px 15px;
  font-weight:800;
}

.admin-primary-tab:hover{
  background:#17212b;
  color:var(--text);
}

.admin-primary-tab.active{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}

.admin-subtabs{
  margin:0 !important;
  padding:7px;
  border:1px solid var(--line);
  background:#111820;
}

.admin-subtabs .admin-subtab{
  padding:7px 11px;
  font-size:11px;
}

.admin-settings-card > .section-title{
  margin-top:20px;
}

body[data-theme="light"] .admin-primary-tabs,
body[data-theme="light"] .admin-subtabs{
  background:#f5f7f9 !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .admin-primary-tab{
  color:#4d5a66 !important;
}

body[data-theme="light"] .admin-primary-tab:hover{
  background:#e7ecf0 !important;
  color:#18212a !important;
}

body[data-theme="light"] .admin-primary-tab.active{
  background:#2368ad !important;
  border-color:#2368ad !important;
  color:#ffffff !important;
}

body[data-theme="light"] .admin-subtabs .admin-subtab{
  color:#384652 !important;
}

body[data-theme="light"] .admin-subtabs .admin-subtab.active{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#aeb9c3 !important;
}

@media(max-width:700px){
  .admin-primary-tabs{
    display:grid;
    grid-template-columns:repeat(3,1fr);
  }

  .admin-primary-tab{
    min-width:0;
    padding:9px 6px;
  }
}


/* v0.15.22 Home workspace order/color system */
.home-workspace-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
}

.home-workspace-card{
  border-left-width:4px !important;
}

.home-card-fire{
  background:#321313 !important;
  border-left-color:#d7372f !important;
}

.home-card-fire .home-workspace-icon,
.home-card-fire .home-workspace-copy strong{
  color:#f25a50 !important;
}

.home-card-dispatch{
  background:#342d0e !important;
  border-left-color:#e2b900 !important;
}

.home-card-dispatch .home-workspace-icon,
.home-card-dispatch .home-workspace-copy strong{
  color:#f0cf32 !important;
}

.home-card-admin,
.home-card-join{
  background:#07090b !important;
  border-left-color:#000000 !important;
}

.home-card-admin .home-workspace-icon,
.home-card-admin .home-workspace-copy strong,
.home-card-join .home-workspace-icon,
.home-card-join .home-workspace-copy strong{
  color:#ffffff !important;
}

.home-card-admin .home-workspace-copy > span,
.home-card-join .home-workspace-copy > span{
  color:#aeb8c2 !important;
}

.home-card-fire:hover{
  background:#431919 !important;
}

.home-card-dispatch:hover{
  background:#443a12 !important;
}

.home-card-admin:hover,
.home-card-join:hover{
  background:#15191d !important;
}

body[data-theme="light"] .home-card-fire{
  background:#fff1ef !important;
  border-color:#e1b2ad !important;
  border-left-color:#b42318 !important;
}

body[data-theme="light"] .home-card-fire .home-workspace-icon,
body[data-theme="light"] .home-card-fire .home-workspace-copy strong{
  color:#b42318 !important;
}

body[data-theme="light"] .home-card-dispatch{
  background:#fff8d8 !important;
  border-color:#dfcc75 !important;
  border-left-color:#c49a00 !important;
}

body[data-theme="light"] .home-card-dispatch .home-workspace-icon,
body[data-theme="light"] .home-card-dispatch .home-workspace-copy strong{
  color:#8b6a00 !important;
}

body[data-theme="light"] .home-card-admin,
body[data-theme="light"] .home-card-join{
  background:#080a0d !important;
  color:#ffffff !important;
  border-color:#080a0d !important;
}

body[data-theme="light"] .home-card-admin .home-workspace-icon,
body[data-theme="light"] .home-card-admin .home-workspace-copy strong,
body[data-theme="light"] .home-card-join .home-workspace-icon,
body[data-theme="light"] .home-card-join .home-workspace-copy strong{
  color:#ffffff !important;
}

body[data-theme="light"] .home-card-admin .home-workspace-copy > span,
body[data-theme="light"] .home-card-join .home-workspace-copy > span{
  color:#c8d0d7 !important;
}

.home-workspace-plus-icon{
  stroke-width:2.2;
}

/* v0.15.22 Join Agency dialog + profile memberships */
.join-agency-dialog{
  width:min(520px,94vw);
}

.profile-agency-access{
  margin-top:16px;
  padding-top:12px;
  border-top:1px solid var(--line);
}

.profile-agency-access .section-title{
  margin:0 0 4px;
}

.profile-agency-list{
  display:grid;
  gap:7px;
  margin-top:9px;
}

.profile-agency-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 10px;
  border:1px solid var(--line);
  background:#111820;
}

.profile-agency-item span{
  color:var(--muted);
  font-size:10px;
  font-weight:800;
}

body[data-theme="light"] .profile-agency-item{
  background:#f7f9fb !important;
  color:#18212a !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .profile-agency-item span{
  color:#54636f !important;
}

body[data-theme="light"] .join-agency-dialog{
  background:#ffffff !important;
  color:#18212a !important;
}

/* v0.15.22 equal-width Agency/Response Area addition rows */
.call-type-response-editor .advanced-add-grid.agency-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) 155px !important;
}

.call-type-response-editor .advanced-add-grid.agency-grid > button{
  width:155px;
  min-width:155px;
}

/* v0.15.22 larger Admin subtabs */
.admin-subtabs .admin-subtab{
  min-width:118px !important;
  padding:9px 15px !important;
  font-size:inherit !important;
  font-weight:800 !important;
}

body[data-theme="light"] .admin-primary-tab.active{
  background:#b42318 !important;
  border-color:#b42318 !important;
  color:#ffffff !important;
}

body[data-theme="light"] .admin-subtabs .admin-subtab{
  background:transparent !important;
  border-color:transparent !important;
  color:#47545f !important;
}

body[data-theme="light"] .admin-subtabs .admin-subtab:hover{
  background:#e6eaee !important;
  border-color:#c4ccd3 !important;
  color:#17212b !important;
}

body[data-theme="light"] .admin-subtabs .admin-subtab.active{
  background:#dfe4e8 !important;
  border-color:#aeb8c1 !important;
  color:#17212b !important;
}

@media(max-width:1100px){
  .home-workspace-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media(max-width:700px){
  .home-workspace-grid{
    grid-template-columns:1fr !important;
  }

  .admin-subtabs .admin-subtab{
    min-width:0 !important;
    flex:1 1 140px;
  }
}

@media(max-width:900px){
  .call-type-response-editor .advanced-add-grid.agency-grid{
    grid-template-columns:1fr 1fr !important;
  }

  .call-type-response-editor .advanced-add-grid.agency-grid > button{
    width:100%;
    min-width:0;
  }
}

@media(max-width:600px){
  .call-type-response-editor .advanced-add-grid.agency-grid{
    grid-template-columns:1fr !important;
  }
}


/* v0.15.23 interactive CAD brand + quick panel menu */
.brand-interactive{
  position:relative;
}

.brand-logo-link{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  padding:0;
  margin:0;
  border:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
}

.brand-logo-link .brand-logo{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.cad-name-menu-wrap{
  position:relative;
  z-index:9200;
}

.cad-name-menu-button{
  display:grid;
  gap:2px;
  min-width:180px;
  padding:5px 8px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  text-align:left;
}

.cad-name-menu-button:hover,
.cad-name-menu-button[aria-expanded="true"]{
  background:#1a232c;
  border-color:var(--line);
}

.cad-name-menu-button strong{
  display:block;
  font-size:14px;
  line-height:1.15;
}

.cad-name-menu-button small{
  display:block;
  margin:0;
  color:var(--muted);
  font-size:9px;
}

.cad-name-menu{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  z-index:9400;
  width:210px;
  padding:6px;
  border:1px solid var(--line);
  background:#0f161d;
  box-shadow:0 18px 42px rgba(0,0,0,.48);
}

.cad-name-menu[hidden]{
  display:none !important;
}

.cad-name-menu-head{
  padding:6px 8px 7px;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.cad-name-menu button{
  width:100%;
  padding:9px 10px;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  font-weight:800;
}

.cad-name-menu button:hover{
  background:#202b35;
}

body[data-theme="light"] .cad-name-menu-button{
  color:#17212b !important;
}

body[data-theme="light"] .cad-name-menu-button:hover,
body[data-theme="light"] .cad-name-menu-button[aria-expanded="true"]{
  background:#e8edf1 !important;
  border-color:#c4ccd3 !important;
}

body[data-theme="light"] .cad-name-menu{
  background:#ffffff !important;
  border-color:#c7d0d8 !important;
  box-shadow:0 18px 42px rgba(31,43,55,.18);
}

body[data-theme="light"] .cad-name-menu button{
  color:#17212b !important;
}

body[data-theme="light"] .cad-name-menu button:hover{
  background:#e9edf1 !important;
}

/* v0.15.23 Agency Leave profile workflow */
.profile-agency-item{
  gap:10px;
}

.profile-agency-copy{
  min-width:0;
  display:grid;
  gap:2px;
}

.profile-agency-copy strong{
  overflow-wrap:anywhere;
}

.profile-agency-leave{
  flex:0 0 auto;
  margin-left:auto;
  font-size:9px;
  font-weight:900;
  letter-spacing:.04em;
}

.leave-agency-dialog{
  width:min(560px,94vw);
}

.leave-agency-warning{
  padding:11px 12px;
  border:1px solid #7a3430;
  border-left:4px solid #c63b32;
  background:#281414;
  color:#f2c2bd;
  font-size:11px;
  line-height:1.45;
}

.leave-agency-actions .danger-confirm-button{
  background:#a32922;
  color:#ffffff;
  min-width:88px;
}

.leave-agency-actions .danger-confirm-button:hover{
  background:#c0352c;
}

body[data-theme="light"] .leave-agency-warning{
  background:#fff0ee !important;
  border-color:#d9aaa5 !important;
  border-left-color:#b42318 !important;
  color:#69231e !important;
}

/* v0.15.23 response-plan add row alignment */
.call-type-response-editor .equal-rule-grid{
  grid-template-columns:repeat(3,minmax(0,1fr)) 90px !important;
}

.call-type-response-editor .advanced-add-grid.agency-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) 90px !important;
}

.call-type-response-editor .equal-rule-grid > button,
.call-type-response-editor .advanced-add-grid.agency-grid > button{
  width:90px !important;
  min-width:90px !important;
  justify-self:end;
}

.response-inline-add-row{
  display:grid;
  gap:8px;
  align-items:end;
  margin-top:10px;
}

.response-inline-add-row-three{
  grid-template-columns:repeat(3,minmax(0,1fr)) 90px;
}

.response-inline-add-row-two{
  grid-template-columns:repeat(2,minmax(0,1fr)) 90px;
}

.response-inline-add-row label{
  min-width:0;
  display:grid;
  gap:4px;
  color:var(--muted);
  font-size:9px;
  font-weight:700;
}

.response-inline-add-row label input,
.response-inline-add-row label select{
  width:100%;
  min-width:0;
}

.response-inline-add-row > button{
  width:90px;
  min-width:90px;
  min-height:36px;
  justify-self:end;
}

/* Strong Light Mode pass for Response Levels / Modifiers / add blocks */
body[data-theme="light"] .call-type-response-editor .advanced-rule-card{
  background:#ffffff !important;
  color:#18212a !important;
  border-color:#bdc7d0 !important;
}

body[data-theme="light"] .call-type-response-editor .advanced-rule-card-head{
  border-color:#d1d8de !important;
}

body[data-theme="light"] .call-type-response-editor .advanced-rule-card-head strong{
  color:#17212b !important;
}

body[data-theme="light"] .call-type-response-editor .advanced-rule-card-head small,
body[data-theme="light"] .call-type-response-editor .response-rule-add-title,
body[data-theme="light"] .call-type-response-editor .response-inline-add-row label,
body[data-theme="light"] .call-type-response-editor .advanced-add-grid label{
  color:#4b5965 !important;
}

body[data-theme="light"] .call-type-response-editor .response-rule-add-block{
  background:#f3f6f8 !important;
  color:#18212a !important;
  border-color:#c5ced6 !important;
}

body[data-theme="light"] .call-type-response-editor .resource-line{
  color:#25313c !important;
  border-color:#d4dbe1 !important;
}

body[data-theme="light"] .call-type-response-editor input,
body[data-theme="light"] .call-type-response-editor select{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#b8c3cc !important;
}

body[data-theme="light"] .call-type-response-editor .section-title,
body[data-theme="light"] .call-type-response-editor .sub-section-title{
  color:#17212b !important;
  border-color:#cfd7de !important;
}

@media(max-width:900px){
  .call-type-response-editor .equal-rule-grid,
  .call-type-response-editor .advanced-add-grid.agency-grid,
  .response-inline-add-row-three,
  .response-inline-add-row-two{
    grid-template-columns:1fr 1fr !important;
  }

  .call-type-response-editor .equal-rule-grid > button,
  .call-type-response-editor .advanced-add-grid.agency-grid > button,
  .response-inline-add-row > button{
    width:100% !important;
    min-width:0 !important;
  }
}

@media(max-width:600px){
  .call-type-response-editor .equal-rule-grid,
  .call-type-response-editor .advanced-add-grid.agency-grid,
  .response-inline-add-row-three,
  .response-inline-add-row-two{
    grid-template-columns:1fr !important;
  }
}


/* v0.15.24 response-stage progress + enriched assigned units */
.response-plan-progress-panel{
  margin-top:12px;
}

.response-progress-title-actions{
  display:flex;
  align-items:center;
  gap:6px;
  margin-left:auto;
}

.response-total-pill{
  font-weight:900;
  letter-spacing:.03em;
}

.response-stage-tabs{
  margin-top:6px !important;
  margin-bottom:0 !important;
  flex-wrap:wrap;
}

.response-stage-tabs .incident-detail-tab{
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.response-stage-tabs .incident-detail-tab > span{
  display:inline-grid;
  place-items:center;
  min-width:20px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:rgba(255,255,255,.09);
  font-size:8px;
  font-weight:900;
}

.response-stage-panel{
  border:1px solid var(--line);
  border-top:0;
  background:#0e151c;
  padding:10px;
}

.response-stage-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:8px;
  margin-bottom:7px;
  border-bottom:1px solid var(--line);
}

.response-stage-heading strong{
  font-size:12px;
}

.response-stage-heading span{
  color:var(--muted);
  font-size:9px;
  font-weight:800;
}

.response-stage-unit-list{
  display:grid;
  gap:5px;
}

.response-stage-unit-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:7px 8px;
  border:1px solid #25303a;
  background:#111920;
}

.response-stage-unit-row > div{
  min-width:0;
  display:grid;
  gap:2px;
}

.response-stage-unit-row strong{
  font-size:11px;
}

.response-stage-unit-row small{
  color:var(--muted);
  font-size:8px;
  overflow-wrap:anywhere;
}

.assigned-unit-overview{
  min-width:0;
  flex:1 1 auto;
  display:grid;
  gap:5px;
}

.assigned-unit-board-meta{
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  min-width:0;
  color:var(--muted);
  font-size:9px;
}

.assigned-unit-board-meta > span:not(.pill){
  padding:2px 5px;
  border:1px solid #29343e;
  background:#10171e;
  white-space:nowrap;
  max-width:260px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.response-source-pill{
  display:inline-flex !important;
  align-items:center;
  gap:3px;
  border-color:#536577 !important;
  background:#192531 !important;
  color:#dbe9f6 !important;
  font-size:8px !important;
}

.response-source-icon{
  width:11px;
  height:11px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

#page-unit .response-plan-progress-panel{
  margin-bottom:12px;
}

body[data-theme="light"] .response-stage-panel{
  background:#f7f9fb !important;
  color:#17212b !important;
  border-color:#c5ced6 !important;
}

body[data-theme="light"] .response-stage-unit-row{
  background:#ffffff !important;
  color:#17212b !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .response-stage-heading{
  border-color:#cbd4db !important;
}

body[data-theme="light"] .response-stage-heading span,
body[data-theme="light"] .response-stage-unit-row small{
  color:#52616d !important;
}

body[data-theme="light"] .assigned-unit-board-meta{
  color:#475662 !important;
}

body[data-theme="light"] .assigned-unit-board-meta > span:not(.pill){
  background:#f0f3f6 !important;
  color:#26323c !important;
  border-color:#c4cdd5 !important;
}

body[data-theme="light"] .response-source-pill{
  background:#e5edf5 !important;
  color:#24425e !important;
  border-color:#aabac9 !important;
}

@media(max-width:800px){
  .assigned-unit-status-row{
    align-items:stretch;
  }

  .assigned-unit-actions{
    width:100%;
  }

  .assigned-unit-board-meta > span:not(.pill){
    max-width:100%;
  }

  .response-progress-title-row{
    align-items:flex-start;
  }

  .response-progress-title-actions{
    margin-left:0;
  }
}


/* v0.15.24 keep Unit Board-style metadata beside the unit name/status when space allows */
.assigned-unit-overview{
  display:flex !important;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}

.assigned-unit-overview .assigned-unit-identity{
  flex:0 1 auto;
}

.assigned-unit-overview .assigned-unit-board-meta{
  flex:1 1 320px;
}


/* v0.15.24 command-line focus keycap */
.dispatch-command-focus-btn{
  min-width:42px;
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  font-size:9px;
  font-weight:900;
  white-space:nowrap;
  border-style:outset;
}

body[data-theme="light"] .dispatch-command-focus-btn{
  background:#eef2f5 !important;
  color:#17212b !important;
  border-color:#b7c1ca !important;
}


/* v0.15.25 permission-hidden Home cards must never render */
.home-workspace-card[hidden]{
  display:none !important;
}


/* v0.15.26 unread Incident Notes counters */
.incident-notes-unread-badge{
  display:inline-grid;
  place-items:center;
  min-width:18px;
  height:18px;
  padding:0 5px;
  margin-left:5px;
  border-radius:999px;
  background:#c92d26;
  border:1px solid #ff766f;
  color:#ffffff;
  font-size:9px;
  font-weight:900;
  line-height:1;
  vertical-align:middle;
  box-shadow:0 0 0 1px rgba(0,0,0,.18);
}

.active-incident-flag-new-notes{
  background:#182a38;
  border:1px solid var(--blue);
  color:#cce9ff;
  font-weight:900;
}

body[data-theme="light"] .incident-notes-unread-badge{
  background:#b42318 !important;
  border-color:#8f1c14 !important;
  color:#ffffff !important;
  box-shadow:none;
}

body[data-theme="light"] .active-incident-flag-new-notes{
  background:#e5f1fb !important;
  border-color:#6d9fc7 !important;
  color:#173f5e !important;
}


/* v0.15.28 Master Audit Log pagination/export */
.master-audit-head{
  align-items:flex-start;
}

.master-audit-summary{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.master-audit-controls{
  display:grid;
  grid-template-columns:minmax(150px,210px) 1fr auto;
  gap:12px;
  align-items:end;
  margin:12px 0;
  padding:10px;
  border:1px solid var(--line);
  background:#10171e;
}

.master-audit-controls label{
  display:grid;
  gap:4px;
  color:var(--muted);
  font-size:9px;
  font-weight:800;
}

.master-audit-controls select{
  width:100%;
}

.master-audit-range{
  color:var(--muted);
  font-size:10px;
  padding-bottom:8px;
}

.master-audit-pagination{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:flex-end;
  white-space:nowrap;
}

.master-audit-pagination span{
  color:var(--muted);
  font-size:10px;
}

.master-audit-table-wrap{
  overflow-x:auto;
}

.master-audit-card .audit-table{
  min-width:900px;
}

body[data-theme="light"] .master-audit-controls{
  background:#f5f7f9 !important;
  border-color:#c7d0d8 !important;
}

body[data-theme="light"] .master-audit-controls label,
body[data-theme="light"] .master-audit-range,
body[data-theme="light"] .master-audit-pagination span{
  color:#4d5b67 !important;
}

/* v0.15.28 Dispatch staffing removal confirmation */
.dispatch-staffing-remove-dialog{
  width:min(560px,94vw);
}

.dispatch-staffing-remove-warning{
  padding:11px 12px;
  border:1px solid #7a3430;
  border-left:4px solid #c63b32;
  background:#281414;
  color:#f2c2bd;
  font-size:11px;
  line-height:1.45;
}

.dispatch-staffing-remove-actions .danger-confirm-button{
  min-width:88px;
  background:#a32922;
  color:#ffffff;
}

.dispatch-staffing-remove-actions .danger-confirm-button:hover{
  background:#c0352c;
}

body[data-theme="light"] .dispatch-staffing-remove-warning{
  background:#fff0ee !important;
  border-color:#d9aaa5 !important;
  border-left-color:#b42318 !important;
  color:#69231e !important;
}

@media(max-width:760px){
  .master-audit-controls{
    grid-template-columns:1fr;
    align-items:stretch;
  }

  .master-audit-pagination{
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  .master-audit-summary{
    justify-content:flex-start;
  }
}


/* v0.15.28.1 Admin Incident Delete confirmation */
.admin-incident-delete-dialog{
  width:min(600px,94vw);
}

.admin-incident-delete-warning{
  padding:11px 12px;
  border:1px solid #7a3430;
  border-left:4px solid #c63b32;
  background:#281414;
  color:#f2c2bd;
  font-size:11px;
  line-height:1.45;
}

.admin-incident-delete-actions .danger-confirm-button{
  min-width:88px;
  background:#a32922;
  color:#ffffff;
}

.admin-incident-delete-actions .danger-confirm-button:hover{
  background:#c0352c;
}

body[data-theme="light"] .admin-incident-delete-warning{
  background:#fff0ee !important;
  border-color:#d9aaa5 !important;
  border-left-color:#b42318 !important;
  color:#69231e !important;
}

/* v0.16 module-aware administration */
.admin-primary-tab.module-disabled:not(.active){
  opacity:.58;
  border-style:dashed;
}
.admin-primary-tab.module-disabled::after{
  content:" · Off";
  font-size:.72em;
  opacity:.75;
}

/* v0.17.10 · keep Fire Dispatch Active Incident actions on one row. */
.active-incidents-sheet th:nth-child(2),
.active-incidents-sheet td:nth-child(2){width:26%}
.active-incidents-sheet th:nth-child(5),
.active-incidents-sheet td:nth-child(5){width:23%}
.active-incidents-sheet th:nth-child(6),
.active-incidents-sheet td:nth-child(6){width:14%}
.active-incident-actions{white-space:nowrap}


/* v0.17.11.1 privacy search-input normalization */
input.cad-privacy-search::-webkit-search-cancel-button,
input.cad-privacy-search::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}


/* v0.17.13.1 · operational safety / toast legibility */
#toast,#toast[popover],#toast:popover-open{
  background:#101820 !important;color:#fff !important;border:1px solid #6f7d89 !important;
  box-shadow:0 10px 30px rgba(0,0,0,.72) !important;filter:none !important;
  backdrop-filter:none !important;-webkit-backdrop-filter:none !important;mix-blend-mode:normal !important;isolation:isolate;
}
#toast:not(.show){opacity:0 !important;}#toast.show{opacity:1 !important;}
body[data-theme="light"] #toast,body[data-theme="light"] #toast[popover],body[data-theme="light"] #toast:popover-open{
  background:#111820 !important;color:#fff !important;border-color:#73808a !important;
}
.preference-keybind-row{display:flex;gap:8px;align-items:center}.preference-keybind-row input{flex:1;min-width:0}
.dialog-actions .warning{border-color:#d59b25;color:#ffd36a}
body[data-theme="light"] .dialog-actions .warning{color:#704d00;border-color:#b67a00;background:#fff8df}

/* v0.17.12.2 · required-field visibility and top-layer toast reliability */
.cad-required-label{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
.cad-required-label > input,
.cad-required-label > select,
.cad-required-label > textarea{
  grid-column:1 / -1;
}
.cad-required-missing{
  border-color:#ef5350 !important;
  box-shadow:0 0 0 1px rgba(239,83,80,.4) !important;
}
.cad-required-tag{
  grid-column:2;
  grid-row:1;
  justify-self:end;
  display:inline-flex;
  align-items:center;
  padding:2px 7px;
  border-radius:999px;
  border:1px solid rgba(239,83,80,.7);
  background:rgba(160,35,35,.28);
  color:#ffb5b3;
  font-size:10px;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
}
body[data-theme="light"] .cad-required-tag{
  background:#fff0f0;
  color:#a61f1f;
  border-color:#d94b4b;
}
#toast[popover]{
  position:fixed;
  inset:auto 20px 20px auto;
  margin:0;
  width:auto;
  max-width:min(460px,calc(100vw - 40px));
}

/* v0.17.13.2 Dispatch services / coverage */
#dispatchPositionButton{display:none!important}
#dispatchPositionMenuWrap{min-width:0}
#dispatchPositionMenuWrap:not([hidden]) #dispatchPositionMenu{position:fixed;top:62px;left:18px;z-index:10020}
.fire-dispatch-services-menu-wrap{position:relative}
.dispatch-coverage-banner{position:sticky;top:calc(var(--v018-banner-top,72px) + var(--v018-banner-height,0px));z-index:1140;margin:0 auto;padding:5px 14px;text-align:center;font-size:12px;font-weight:900;letter-spacing:.08em;background:#f5b942;color:#171717;border-bottom:1px solid rgba(0,0,0,.25)}
.dispatch-coverage-banner[hidden]{display:none!important}

/* The four hardcoded offsets that used to live here (64/102/56/94) are gone: the
   calc above is driven by the measured topbar and banner-stack heights, so it is
   right at every width instead of at the two that happened to be checked. */

/* D-014 — the Call Taker card is a link (opens /calltaker/ in a new tab), styled like the button cards. */
a.home-workspace-card{color:inherit;text-decoration:none}

/* D-014 — the Call Taker code (e.g. BRE-1-01) beside the call type on boards and incident titles. */
.calltaker-code{display:inline-block;margin-left:6px;padding:1px 6px;border:1px solid var(--line);border-radius:3px;font-family:ui-monospace,Consolas,monospace;font-size:11px;font-weight:700;letter-spacing:.04em;line-height:1.5;vertical-align:middle;white-space:nowrap;color:inherit;background:rgba(127,127,127,.14)}
h1 .calltaker-code{font-size:13px}
