.goat-platform {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 20px;
  padding: 10px clamp(14px, 3vw, 40px);
  background: #0f2a5c;
  color: #fff;
  font: 600 14px/1.35 Inter, ui-sans-serif, system-ui, sans-serif;
}
.goat-brand, .goat-platform-nav, .goat-platform-account {
  display: flex;
  align-items: center;
  gap: 8px;
}
.goat-brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .07em;
}
.goat-platform-nav { justify-content: center; }
.goat-platform-nav a, .goat-platform-nav span, .goat-platform-account summary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.goat-platform-account { min-width: 0; justify-content: flex-end; }
.goat-platform-account .header-context { max-width: 160px; overflow-wrap: anywhere; }
.goat-platform-account details { position: relative; margin: 0; }
.goat-platform-account summary { border-color: #8094b8; cursor: pointer; }
.goat-platform-account summary::-webkit-details-marker { display: none; }
.goat-platform-nav [aria-current="page"] { background: #fff; color: #0f2a5c; }
.goat-platform-nav a:hover, .goat-platform-account summary:hover { background: #264577; }
.goat-platform :focus-visible { outline: 2px solid #8ed7ff; outline-offset: 2px; }
.goat-platform-account .goat-account-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 8px;
  width: min(270px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid #cbd5e5;
  border-radius: 10px;
  background: #fff;
  color: #0f2a5c;
  box-shadow: 0 8px 24px #0f2a5c22;
  overflow-wrap: anywhere;
}
.goat-platform-account .goat-account-panel button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cbd5e5;
  border-radius: 8px;
  background: #f2f4f9;
  color: #0f2a5c;
  text-align: left;
  white-space: normal;
}
.goat-platform-account .goat-account-panel button:hover { background: #e4ebf7; }
.goat-platform-account .goat-account-panel :focus-visible { outline-color: #1664b0; }
@media (max-width: 640px) {
  .goat-platform { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; }
  .goat-platform-account { grid-column: 2; grid-row: 1; }
  .goat-platform-nav { grid-column: 1 / -1; justify-content: stretch; }
  .goat-platform-nav > * { flex: 1; }
}


.delivery-entry-dialog {width:min(42rem,94vw);max-height:90dvh;padding:0;border:0;border-radius:1rem;color:#16314d;box-shadow:0 1rem 4rem #12283e44}
.delivery-entry-dialog::backdrop {background:#10283d77}
.delivery-entry-dialog #formPanel {display:block;margin:0;padding:1.25rem;max-width:none}
.delivery-entry-dialog #formPanel > p,.delivery-entry-dialog fieldset > legend,.delivery-entry-dialog .address-suggestions > button {display:none}
.delivery-entry-dialog #deliveryForm {display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
.delivery-entry-dialog #deliveryForm > fieldset,.delivery-entry-dialog #entrySaveFeedback {grid-column:1/-1;margin:0;padding:0;border:0;min-width:0}
.delivery-entry-dialog #deliveryForm label,.delivery-entry-dialog .customer-book {margin:.2rem 0}
.delivery-entry-dialog .customer-book {border:0;padding:0}
.delivery-entry-dialog .customer-book p:empty {display:none}
.delivery-entry-dialog .address-suggestions {border:0;padding:0;margin:0}
.delivery-entry-dialog #entryPharmacy {margin:.25rem 0}
.delivery-entry-dialog #deliveryForm details {margin:.4rem 0}
.delivery-entry-dialog #deliveryForm details > summary {cursor:pointer}
.delivery-entry-dialog #deliveryForm input:not([type=checkbox]),.delivery-entry-dialog select {width:100%;min-width:0}

@media (min-width: 640px) {
  .delivery-entry-dialog #deliveryForm > fieldset:first-of-type,
  .delivery-entry-dialog #deliveryForm > fieldset:last-of-type {
    display:grid;
    grid-template-columns:minmax(0, 2fr) minmax(0, 1fr);
    align-items:start;
    column-gap:1rem;
  }
  .delivery-entry-dialog #deliveryForm > fieldset:first-of-type .customer-book {grid-column:1/-1;grid-row:2}
  .delivery-entry-dialog #entryPharmacy,
  .delivery-entry-dialog #deliveryForm > fieldset:last-of-type > details {grid-column:1/-1}
  .delivery-entry-dialog .checks {align-self:end}
}
.delivery-entry-dialog #formPanel > h2 {margin:0 0 .6rem}
.delivery-entry-dialog #deliveryForm .customer-book {gap:.15rem}
.delivery-entry-dialog .customer-book > div:empty {display:none}
.delivery-entry-dialog #formPanel {height:auto;min-height:0}
.delivery-entry-dialog #closeDeliveryEntry {margin:0}

.delivery-entry-dialog.entry-saved #formPanel {display:none}
.delivery-entry-dialog .entry-confirmation {margin:1rem;padding:1rem 1.25rem;background:#e8f6ef;color:#14543b;border-left:4px solid #24744c;border-radius:.5rem;font-weight:650}
body:not(:has(.driver-layout)) .staff-list-controls {display:flex;align-items:flex-end;flex-wrap:wrap;gap:.5rem 1rem;margin:.5rem 0}
.staff-list-controls #staffDeliveryPeriod,.staff-list-controls #staffListTools,.staff-list-controls .dashboard-filters {margin:0}
.staff-list-controls #staffListTools {flex:1 1 15rem;max-width:32rem;min-width:0}
.staff-list-controls .dashboard-filters[open] {flex-basis:100%}
.staff-list-controls .dashboard-filters summary {display:list-item;padding:.45rem .25rem;min-height:36px}
.staff-list-controls .route-toolbar,#staffDeliveryWindow {align-items:end;gap:.45rem .65rem;padding:.25rem 0;margin:.25rem 0 .5rem}
#staffWindowLabel {align-self:center;font-variant-numeric:tabular-nums}
#staffUpcomingNote {margin:.25rem 0}
.staff-list-controls :is(input,select),#staffDeliveryWindow :is(button,input) {min-height:36px;border-radius:8px}
.staff-review {width:fit-content;max-width:100%;margin:.2rem 0;color:#794108;background:#fff3d7;border-radius:5px}
.staff-review > summary {display:list-item;cursor:pointer;min-height:0;padding:.2rem .5rem;font-size:.8rem;font-weight:600}
.staff-review .pharmacy-review {margin:0;padding:.35rem .5rem;white-space:normal}
@media(min-width:701px){
 .staff-delivery-table td:first-child {width:23%}
 .staff-delivery-table td:nth-child(3) {width:12%}
 .staff-delivery-table td:last-child {width:6rem}
 .staff-delivery-table :is(th,td) {padding:.45rem .65rem}
 .staff-delivery-date {display:block;font-variant-numeric:tabular-nums}
 .staff-delivery-table .staff-action-trigger {min-height:34px;padding:.3rem .75rem;border-radius:8px}
}
@media(max-width:700px){
 .staff-list-controls #staffListTools {flex-basis:100%;max-width:none}
 #staffDeliveryWindow {flex-wrap:wrap}
 .staff-review > summary {min-height:32px;align-content:center}
}
/* Driver route: compact, touch-sized controls and bounded date fields. */
.street-map{height:360px;position:relative;border-radius:12px;overflow:hidden;background:#eef1ec;isolation:isolate}
.street-map[hidden],.map-fallback[hidden]{display:none}
.street-map button{min-width:44px;min-height:44px}
.street-map .maplibregl-ctrl-group button{width:44px;height:44px}
.street-stop{border:3px solid #fff;border-radius:50%;background:#006d77;color:white;font-weight:800;padding:4px;box-shadow:0 2px 6px #1236;cursor:pointer;min-width:44px;min-height:44px}
.street-stop-start{background:#3158a0}.street-stop-finish{background:#7c3d92}.street-stop-pickup{background:#8a4c00}
.street-stop:focus-visible,.map-fit:focus-visible{outline:3px solid #e88b00;outline-offset:3px}
.map-fit{position:absolute;bottom:12px;left:12px;z-index:2;background:#fff;color:#123;padding:8px 12px;border:1px solid #bac5cb;border-radius:8px}
.map-attribution{font-size:12px;margin:4px 0;text-align:right}.map-attribution a{color:#24536b}
.map-status:empty{display:none}.map-status,.map-legend{margin:6px 0}
.route-metrics{font-weight:650;margin:8px 0}.run-completion{padding:10px 12px;background:#edf7f2;border-radius:10px;margin-bottom:12px}
.run-completion p{margin:6px 0}.route-details{margin:10px 0}.next-destination{margin:10px 0;padding:14px}
.next-destination h3{margin:4px 0}.next-destination p{margin:6px 0}.next-destination button{min-height:48px;margin:4px 6px 4px 0}
.route-toolbar label{min-width:0;max-width:100%}#runDate{box-sizing:border-box;max-width:100%;min-width:0;width:100%;min-height:44px}
@media(max-width:430px){.street-map{height:310px}.route-toolbar{gap:8px}.route-toolbar>*{min-width:0;max-width:100%}.route-toolbar label{flex:1 1 100%}.route-toolbar button{flex:1 1 42%;padding:8px;font-size:14px;min-height:44px}.driver-layout .panelhead{gap:8px;flex-wrap:wrap}.filter-label{max-width:100%}.filter-label select{min-width:0;max-width:100%;min-height:44px}.next-destination{padding:12px}.next-destination h3,.next-destination p{overflow-wrap:anywhere}.map-legend{font-size:12px}}

.street-stop.stop-complete{background:#536167;border-style:dashed}.street-stop.stop-next{outline:4px solid #ffb900;outline-offset:2px}
