/* Use the guide's brand, controls and card styles from /style.css. */
.dispatch .auth{margin:28px auto 0}
.dispatch .auth .eyebrow{margin:0}
.dispatch .auth form button{width:100%}
.dispatch .admin-entry{border-top:1px solid var(--line);margin-top:18px;padding-top:15px;text-align:center}
.dispatch .admin-entry a{text-underline-offset:.2em}
.dispatch #loadMessage{text-align:center}
.dispatch .sub,.dispatch .compact{color:var(--muted)}
.dispatch .compact{font-size:.875rem}
.dispatch .hero,.dispatch .section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.dispatch .hero{padding-bottom:8px}
.dispatch .hero .date{min-width:155px;margin:0}
.dispatch .eyebrow,.dispatch .section-head h2{margin:0}
.dispatch .section-head>*{min-width:0}
.dispatch .stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:16px 0 20px}
.dispatch .stats.driver-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.dispatch .stat,.dispatch .panel{min-width:0}
.dispatch .stat b{display:block;font-size:clamp(20px,3vw,28px);line-height:1.3;color:var(--purple);margin-top:4px;overflow-wrap:anywhere}
.dispatch .field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
.dispatch .field-grid label,.dispatch .toolbar label{margin:0}
.dispatch label>input,.dispatch label>select{display:block;margin-top:5px}
.dispatch .file{margin-top:2px}
.dispatch .source,.dispatch .station{background:var(--bg);padding:11px 12px;border-radius:12px;margin:14px 0;font-size:.875rem}
.dispatch .source strong{display:block}
.dispatch .station{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#f4e9f4}
.dispatch .station b:last-child{color:var(--purple);white-space:nowrap}
.dispatch .message{font-size:.875rem;color:var(--purple)}
.dispatch .message:empty{display:none}
.dispatch .wide{margin-top:20px}
.dispatch .tablewrap{overflow-x:auto;margin-top:10px}
.dispatch table{width:100%;border-collapse:collapse;text-align:left;font-size:.875rem}
.dispatch th,.dispatch td{padding:10px;border-bottom:1px solid var(--line);white-space:nowrap}
.dispatch th{background:var(--bg);color:var(--muted)}
.dispatch .num{text-align:right;font-variant-numeric:tabular-nums}
.dispatch .tabs{flex-wrap:wrap;padding-bottom:0}
.dispatch .cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.dispatch .cards .card{display:flex;justify-content:space-between;align-items:center;gap:10px;min-width:0}
.dispatch .card b.qty{font-size:clamp(20px,4vw,26px);color:var(--purple);white-space:nowrap}
.dispatch dialog{width:min(800px,calc(100% - 26px));max-height:85vh;max-height:85dvh;border:1px solid var(--line);border-radius:18px;padding:20px;color:var(--ink)}
.dispatch dialog::backdrop{background:#30263475}
.dispatch dialog label input[type=checkbox]{display:inline-block;margin:0 5px 0 0;vertical-align:middle}
.dispatch dialog .tablewrap input{min-width:5rem}
@media(max-width:650px){
  .dispatch .auth{margin-top:16px}
  .dispatch :is(.stats,.stats.driver-stats){grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .dispatch .stat{padding:12px}
  .dispatch .stat small{font-size:.75rem}
  .dispatch .cards{grid-template-columns:1fr}
}
@media(max-width:375px){
  .dispatch .field-grid{grid-template-columns:1fr}
}

/* Compact driver cards with the district above the place name. */
.dispatch .cards .driver-place{display:block}
.dispatch .driver-place:has(.driver-place-details){grid-column:1/-1}
.dispatch .driver-place-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px}
.dispatch .driver-place-copy h3{margin:2px 0 5px;font-size:1rem;overflow-wrap:anywhere}
.dispatch .driver-place-copy small{overflow-wrap:anywhere}
.dispatch .driver-place-details{margin-top:9px;font-size:.85rem;color:var(--muted)}
.dispatch .driver-place-details summary{cursor:pointer;width:fit-content;padding:4px 0}
.dispatch .driver-place-details ul{list-style:none;margin:5px 0 0;padding:0;border-top:1px solid var(--line)}
.dispatch .driver-place-details li{display:flex;justify-content:space-between;gap:8px;padding:5px 0}
@media(max-width:375px){.dispatch .driver-place-summary{gap:8px}}

.driver-roster{list-style:none;margin:0;padding:0}
.driver-roster-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.driver-code-display{display:block;overflow-wrap:anywhere;font-size:.82rem;color:var(--muted);user-select:text}
.driver-roster-actions{display:flex;gap:6px;flex-wrap:wrap}
.driver-roster-actions button{padding:7px 10px}
@media(max-width:550px){.driver-roster-row{grid-template-columns:1fr}}

.dispatch thead th{background:#eee5ef}
.dispatch tbody tr:nth-child(even){background:#f7f1f8}
.dispatch .toolbar>button{flex:0 0 auto}
.dispatch .month-filters{margin:0}
.dispatch .month-filters label{flex:1 1 10rem}
.dispatch .month-filters select{width:100%}

.dispatch .month-details-heading{margin-top:16px}
.dispatch .month-details-heading h3,.dispatch .month-details-heading label{margin:0}
.dispatch .month-details-heading label{min-width:108px}
.dispatch .details-pagination{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 16px;
  margin-top:12px;
}
.dispatch .details-page-actions{display:flex;gap:8px}
.dispatch .details-page-actions button{padding-inline:12px}
.dispatch .details-page-actions button:disabled{cursor:default}

@media (hover:hover) and (pointer:fine){
  .dispatch tbody tr:hover{background-color:#f0e4f2}
  .dispatch .driver-place-details summary:hover{color:var(--purple)}
}
.dispatch tbody tr:focus-within{background-color:#f0e4f2}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .dispatch tbody tr{transition:background-color .16s ease}
}

.dispatch .hdx-review table{table-layout:fixed}
.dispatch .hdx-review th:first-child{width:33%}
.dispatch .hdx-review th:nth-child(2),.dispatch .hdx-review th:last-child{width:15%}
.dispatch .hdx-review :is(td,th){white-space:normal}
.dispatch .hdx-review td label{margin:0}
.dispatch .hdx-review td input{min-width:0;margin:0;padding-inline:8px}
.dispatch .hdx-review-source .badge{margin-inline-end:6px}
.dispatch .hdx-review-source img{max-width:46%;height:auto;vertical-align:middle;margin-block:2px}
.dispatch .hdx-mobile-label{display:none}
.dispatch .hdx-reference summary{width:fit-content;color:var(--purple);cursor:pointer}
.dispatch .hdx-reference>div{display:flex;gap:12px 32px;flex-wrap:wrap;margin-top:6px}
.dispatch .hdx-reference h3{margin:0}
.dispatch .hdx-reference ul{margin:4px 0 10px;padding:0;list-style:none}
.dispatch .hdx-reference li b{display:inline-block;min-width:2em;color:var(--purple)}
@media(max-width:600px){
  .dispatch .hdx-review table,.dispatch .hdx-review tbody{display:block}
  .dispatch .hdx-review thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .dispatch .hdx-review tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2.3fr) minmax(0,1fr);gap:6px;padding:8px 4px;border-bottom:1px solid var(--line)}
  .dispatch .hdx-review td{padding:0;border:0;min-width:0}
  .dispatch .hdx-review-source{grid-column:1/-1}
  .dispatch .hdx-mobile-label{display:block;color:var(--muted);font-size:.75rem}
  .dispatch .hdx-review-place input{font-size:.875rem}
}

.dispatch .station-actions{display:flex;gap:6px}
.dispatch .station-actions button{padding-inline:12px}
.dispatch .station-delete{color:#a02336;border-color:#ead3d8}
@media (hover:hover) and (pointer:fine){
  .dispatch .station-actions .station-delete:hover{background:#fff1f2;color:#841b2c;border-color:#bd5363}
}
.dispatch #driverReminders{margin-bottom:16px;background:#f4eaf6}
.dispatch #driverReminders p,.dispatch .reminder-preview p,.dispatch .reminder-row p{white-space:pre-wrap;overflow-wrap:anywhere}
.dispatch .reminder-row{border-bottom:1px solid var(--line);padding:12px 0}
.dispatch .reminder-row button{display:block;margin-top:8px}
.dispatch .reminder-preview{padding:12px;background:#f4eaf6;border-radius:12px}

/* Multi-station assignment uses a website dropdown with native, accessible checkboxes. */
.station-field{min-width:0;position:relative;display:flex;flex-direction:column;gap:6px;font-weight:600}
.station-picker{position:relative;font-weight:400;min-width:0}
.station-picker>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;min-height:48px;border:1px solid var(--line);border-radius:12px;padding:12px 16px;background:white;color:var(--ink);font-weight:600;transition:border-color .18s,box-shadow .18s}
.station-picker>summary::-webkit-details-marker{display:none}
.station-picker>summary:hover,.station-picker[open]>summary{border-color:var(--purple);box-shadow:0 2px 10px #8b268f15}
.station-picker>summary:focus-visible{outline:3px solid #8b268f55;outline-offset:2px}
.station-picker-menu{position:absolute;top:calc(100% + 8px);left:0;z-index:20;width:max(100%,320px);max-width:calc(100vw - 56px);border:1px solid var(--line);border-radius:16px;background:white;box-shadow:0 14px 40px #30263426;overflow:hidden}
.station-picker-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line);background:#faf6fb}
.station-picker-tools label,.station-option{display:flex;flex-direction:row;align-items:flex-start;gap:10px;cursor:pointer;margin:0}
.station-picker-tools label{align-items:center;min-height:44px}
.station-picker-tools button{padding:8px 10px;min-height:44px;white-space:nowrap}
.station-picker-options{max-height:min(360px,50dvh);overflow:auto;overscroll-behavior:contain}
.station-picker input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;accent-color:var(--purple);padding:0;margin:3px 0}
.station-option{padding:12px;min-height:48px;border-bottom:1px solid #f1ebf2;line-height:1.65;overflow-wrap:anywhere;transition:background .16s;font-size:.94rem;font-weight:400}
.station-option:hover{background:#fbf4fc}.station-option:has(input:checked){background:#f4e8f6}.station-option.is-assigned{background:#f7f7f8;color:var(--muted);cursor:default}
.station-option span{min-width:0}.station-option small{display:block;color:var(--muted);font-size:.8rem}.station-empty{padding:12px;line-height:1.7}
#match{display:block}#match:has(.station-selection){background:#faf4fb}#match>div{width:100%;min-width:0}
.station-selection{list-style:none;padding:0;margin:12px 0 0;max-height:250px;overflow:auto}
.station-selection li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.station-selection li>span{overflow-wrap:anywhere;min-width:0}.station-selection button{flex-shrink:0;min-height:40px;padding:6px 10px}
@media(max-width:600px){.station-picker-menu{width:100%;max-width:100%}.station-option{font-size:.9rem}.station-picker-tools{flex-wrap:wrap}}

.station-picker-done{width:100%;min-height:44px;border:0;border-top:1px solid var(--line);border-radius:0;background:#faf4fb;color:var(--purple);font-weight:700}
@media(max-width:600px){.dispatch #assign .station-field{grid-column:1/-1}}
