/* Scoped shuttle workspace and local driver preview. */
#main:has(#connected-shuttle) {
  max-width: 1800px;
}
#connected-shuttle {
  --sh-blue: #4059d8;
  --sh-ink: #243146;
  --sh-muted: #748095;
  --sh-line: #e3e8ef;
  color: var(--sh-ink);
}
#connected-shuttle .sh-nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--sh-line);
  margin: 0 0 18px;
}
#connected-shuttle .sh-nav a {
  padding: 10px 16px;
  color: #68758a;
  font-size: 13px;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
#connected-shuttle .sh-nav a.active {
  color: var(--sh-blue);
  border-color: var(--sh-blue);
  font-weight: 650;
}
#connected-shuttle .sh-layout {
  display: grid;
  gap: 18px;
  align-items: start;
}
#connected-shuttle .sh-booking {
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
}
#connected-shuttle .sh-dispatch {
  grid-template-columns: minmax(380px, 0.95fr) minmax(420px, 1.15fr);
}
#connected-shuttle .sh-card {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 14px;
  overflow: hidden;
}
#connected-shuttle .sh-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #eef1f5;
  gap: 12px;
}
#connected-shuttle .sh-card-head h2 {
  font-size: 16px;
  margin: 0 0 3px;
  line-height: 1.35;
}
#connected-shuttle .sh-muted {
  color: var(--sh-muted);
  font-size: 12px;
  line-height: 1.4;
}
#connected-shuttle .sh-form {
  padding: 18px;
  display: grid;
  gap: 13px;
}
#app #connected-shuttle .sh-form label.field,
#app #connected-shuttle .sh-route-builder label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 550;
  color: #667287;
}
#connected-shuttle .sh-fields {
  display: grid;
  gap: 10px;
}
#connected-shuttle .sh-two {
  grid-template-columns: 1fr 1fr;
}
#connected-shuttle .sh-options {
  grid-template-columns: 80px minmax(0, 1fr) 100px;
}
#app #connected-shuttle .sh-form input:not([type="checkbox"]),
#app #connected-shuttle .sh-form select,
#app #connected-shuttle .sh-route-builder select,
#connected-shuttle [data-search] {
  width: 100%;
  height: 37px;
  min-height: 0;
  border: 1px solid #dbe1ea;
  border-radius: 7px;
  padding: 7px 10px;
  background: #fff;
  color: #263349;
  font-size: 13px;
  box-sizing: border-box;
}
#connected-shuttle .sh-form input:focus,
#connected-shuttle .sh-form select:focus {
  outline: 2px solid #bcc8ff;
  outline-offset: 1px;
  border-color: #7287ee;
}
#app #connected-shuttle .sh-form label.sh-check {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin: 0;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
}
#connected-shuttle .sh-form-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #edf0f5;
}
#connected-shuttle .sh-form-footer .btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 9px 14px;
}
#connected-shuttle .sh-form-footer .sh-muted {
  flex: 1;
  font-size: 11px;
}
#connected-shuttle [hidden] {
  display: none !important;
}
#connected-shuttle .sh-matches:empty {
  display: none;
}
#connected-shuttle .sh-matches {
  display: grid;
  border: 1px solid #dce3f7;
  border-radius: 8px;
  overflow: hidden;
}
#connected-shuttle .sh-matches button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #f4f7ff;
  border: 0;
  padding: 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
#connected-shuttle .sh-toolbar {
  padding: 12px 16px 0;
}
#connected-shuttle .sh-tabs {
  display: flex;
  gap: 3px;
  margin-top: 10px;
  border-bottom: 1px solid #e9edf3;
}
#connected-shuttle .sh-tabs button {
  display: flex;
  gap: 5px;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 8px 9px;
  font-size: 12px;
  color: #6c788d;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
#connected-shuttle .sh-tabs button.active {
  color: var(--sh-blue);
  border-color: var(--sh-blue);
  font-weight: 650;
}
#connected-shuttle .sh-tabs button span {
  background: #eef1f6;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 10px;
}
#connected-shuttle .sh-trip-list {
  max-height: 590px;
  overflow: auto;
}
#connected-shuttle .sh-trip {
  padding: 13px 17px;
  border-bottom: 1px solid #edf0f5;
}
#connected-shuttle .sh-trip.selected {
  background: #f2f5ff;
  box-shadow: inset 3px 0 var(--sh-blue);
}
#connected-shuttle .sh-trip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
#connected-shuttle .sh-trip-title strong {
  font-size: 13px;
  flex: 1;
}
#connected-shuttle .sh-trip-title input {
  width: 16px;
  height: 16px;
  margin: 0;
}
#connected-shuttle .sh-seats {
  font-size: 11px;
  color: #7b8597;
  white-space: nowrap;
}
#connected-shuttle .sh-badge {
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 600;
  background: #edf0f4;
  color: #657287;
  white-space: nowrap;
}
#connected-shuttle .state-ready {
  background: #e6f5ed;
  color: #207b54;
}
#connected-shuttle .state-assigned,
#connected-shuttle .state-en_route {
  background: #ebefff;
  color: #4059cf;
}
#connected-shuttle .state-onboard,
#connected-shuttle .state-arrived {
  background: #fff1d8;
  color: #94701c;
}
#connected-shuttle .state-completed {
  background: #e8f5ee;
  color: #257b56;
}
#connected-shuttle .sh-address {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  margin: 4px 0;
  color: #4f5d73;
}
#connected-shuttle .sh-address > span {
  color: #6d82da;
  font-weight: 700;
}
#connected-shuttle .sh-trip-meta {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  color: #8490a2;
  font-size: 10px;
  margin-top: 7px;
}
#connected-shuttle .sh-confirmed {
  color: #24805b;
}
#connected-shuttle .sh-note {
  margin: 7px 0 0;
  font-size: 11px;
  color: #7e7664;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#connected-shuttle .sh-trip-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 9px;
}
#connected-shuttle .sh-small {
  min-height: 0;
  padding: 5px 9px;
  font-size: 11px;
  border-radius: 6px;
}
#connected-shuttle .sh-text-button {
  border: 0;
  background: none;
  padding: 5px 7px;
  color: #7e899a;
  font-size: 11px;
  cursor: pointer;
}
#connected-shuttle .sh-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 13px;
  color: #8390a4;
}
#connected-shuttle .sh-map-panel {
  position: sticky;
  top: 20px;
}
#connected-shuttle .sh-map {
  height: 590px;
  z-index: 0;
}
#connected-shuttle .sh-map-caption {
  font-size: 10px;
  color: #7c889a;
  padding: 9px 14px;
  background: #fafbfd;
}
#connected-shuttle .sh-route-builder {
  padding: 15px 17px;
  border-top: 1px solid var(--sh-line);
  background: #fafbfe;
}
#connected-shuttle .sh-route-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #718097;
  margin-top: 12px;
}
#connected-shuttle [data-stops] {
  padding-left: 22px;
  margin: 10px 0;
}
#connected-shuttle [data-stops] li {
  padding: 5px 0;
  font-size: 12px;
}
#connected-shuttle [data-stops] li > span {
  display: inline-block;
  width: 85%;
  vertical-align: middle;
}
#connected-shuttle [data-stops] small,
#connected-shuttle .sh-active-route small {
  display: block;
  font-size: 10px;
  color: #7b889b;
  margin-top: 2px;
}
#connected-shuttle .sh-active-route {
  margin: 12px 16px;
  padding: 12px;
  border: 1px solid #dce3fa;
  background: #f5f7ff;
  border-radius: 9px;
}
#connected-shuttle .sh-active-route summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  font-size: 12px;
}
#connected-shuttle .sh-active-route summary span {
  font-size: 10px;
  color: #7482a0;
}
#connected-shuttle .sh-active-route ol {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}
#connected-shuttle .sh-active-route li {
  display: flex;
  gap: 9px;
  font-size: 11px;
  margin: 7px 0;
}
#connected-shuttle .sh-stop-kind {
  color: #5f77c8;
  font-weight: 700;
}
#connected-shuttle [data-feedback]:empty {
  display: none;
}
#connected-shuttle [data-feedback]:not(:empty) {
  font-size: 12px;
}
/* Shared-device driver layout: large actions, compact manifest. */
.sh-driver-page {
  background: #eef1f6;
  min-height: 100vh;
  margin: 0;
  color: #25334a;
  font-family: Inter, system-ui, sans-serif;
}
.sh-driver-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px;
}
.sh-driver-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.sh-driver-top strong {
  font-size: 20px;
}
.sh-driver-top span {
  display: block;
  font-size: 12px;
  color: #7b889b;
  margin-top: 4px;
}
.sh-local-label {
  font-size: 10px;
  padding: 5px 8px;
  background: #fff0d4;
  color: #946b13;
  border-radius: 5px;
}
.sh-driver-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}
.sh-driver-card {
  border: 1px solid #e0e6ef;
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 14px;
}
.sh-driver-card h1 {
  font-size: 24px;
  margin: 10px 0;
  line-height: 1.25;
}
.sh-driver-card h2 {
  font-size: 15px;
  margin: 0 0 15px;
}
.sh-driver-card p {
  font-size: 13px;
  color: #6d7a91;
  line-height: 1.5;
}
.sh-driver-card label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: #6b7890;
  margin: 14px 0;
}
.sh-driver-card select,
.sh-driver-card input {
  height: 43px;
  border: 1px solid #dbe2ed;
  border-radius: 8px;
  padding: 10px;
}
.sh-driver-action {
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: #4059d8;
  color: white;
  font-size: 16px;
  font-weight: 650;
  padding: 16px;
  cursor: pointer;
  margin: 8px 0;
}
.sh-driver-action:disabled {
  background: #c8cfdf;
  cursor: not-allowed;
}
.sh-driver-secondary {
  width: 100%;
  padding: 10px;
  border: 1px solid #dce3ef;
  background: #f7f9fc;
  border-radius: 8px;
  font-size: 12px;
  color: #52617a;
  cursor: pointer;
  margin-top: 8px;
}
.sh-driver-status {
  font-size: 11px;
  color: #4d68cb;
  text-transform: uppercase;
  font-weight: 650;
  letter-spacing: 0.08em;
}
.sh-driver-meta {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  font-size: 12px;
  color: #6b7790;
  margin: 15px 0;
}
.sh-driver-route {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sh-driver-route li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f6;
  font-size: 12px;
}
.sh-driver-route li > b {
  background: #edf1fc;
  color: #526dce;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 11px;
}
.sh-driver-route small {
  display: block;
  color: #8590a4;
  font-size: 10px;
  margin-top: 3px;
}
.sh-driver-map {
  height: 520px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #dfe5ee;
  z-index: 0;
}
.sh-driver-map-note {
  font-size: 11px;
  color: #8994a7;
  margin: 10px;
}
.sh-driver-error {
  padding: 12px;
  background: #fff0dc;
  border-radius: 8px;
  font-size: 13px;
  color: #825d23;
}
.sh-driver-error:empty {
  display: none;
}
@media (max-width: 1100px) {
  #connected-shuttle .sh-dispatch {
    grid-template-columns: minmax(320px, 1fr) minmax(300px, 1fr);
  }
  #connected-shuttle .sh-booking {
    grid-template-columns: 350px minmax(0, 1fr);
  }
  #connected-shuttle .sh-trip-title {
    flex-wrap: wrap;
  }
  #connected-shuttle .sh-map {
    height: 560px;
  }
}
@media (max-width: 850px) {
  #connected-shuttle .sh-booking,
  #connected-shuttle .sh-dispatch {
    grid-template-columns: 1fr;
  }
  #connected-shuttle .sh-map-panel {
    position: static;
    grid-row: 1;
  }
  #connected-shuttle .sh-map {
    height: 330px;
  }
  #connected-shuttle .sh-nav {
    overflow-x: auto;
    white-space: nowrap;
  }
  #connected-shuttle .sh-trip-list {
    max-height: 480px;
  }
  .sh-driver-grid {
    grid-template-columns: 1fr;
  }
  .sh-driver-shell {
    padding: 14px;
    max-width: 500px;
  }
  .sh-driver-map {
    height: 300px;
  }
}
.sh-message-dialog {
  width: min(450px, 90vw);
  border: 1px solid #dbe2ef;
  border-radius: 16px;
  padding: 22px;
  color: #2d3b52;
}
.sh-message-dialog::backdrop {
  background: #14233866;
}
.sh-message-dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.sh-message-dialog h2 {
  margin: 0;
  font-size: 18px;
}
.sh-message-dialog header p {
  margin: 5px 0;
  color: #8b95a7;
  font-size: 11px;
}
.sh-message-dialog .sh-messages {
  display: grid;
  gap: 10px;
  max-height: 350px;
  overflow: auto;
  padding: 20px 0;
}
.sh-message-dialog .sh-message {
  padding: 12px;
  border-radius: 12px;
  background: #f1f3f7;
  margin-right: 30px;
}
.sh-message-dialog .sh-message.out {
  background: #edf1ff;
  margin-left: 30px;
  margin-right: 0;
}
.sh-message-dialog .sh-message p {
  font-size: 13px;
  line-height: 1.5;
  margin: 5px 0 0;
}
.sh-message-dialog .sh-message small {
  font-size: 10px;
  color: #8290a7;
}
.sh-message-dialog form {
  display: flex;
  gap: 10px;
  align-items: end;
}
.sh-message-dialog label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  flex: 1;
}
.sh-message-dialog input {
  width: 100%;
  padding: 9px;
  border: 1px solid #dbe3ed;
  border-radius: 7px;
}

/* List-first workspace, with booking kept out of the dispatch canvas. */
#connected-shuttle .sh-booking {
  grid-template-columns: minmax(0, 1fr);
}
#connected-shuttle .sh-dispatch {
  grid-template-columns: minmax(600px, 1.5fr) minmax(320px, 1fr);
}
#connected-shuttle .sh-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
#connected-shuttle .sh-header-actions .primary {
  padding: 8px 14px;
  font-size: 13px;
}
#connected-shuttle .sh-trip {
  display: grid;
  grid-template-columns:
    minmax(140px, 0.9fr) minmax(100px, 0.8fr) minmax(180px, 1.3fr)
    135px;
  gap: 16px;
  align-items: start;
  padding: 16px;
}
#connected-shuttle .sh-trip > div {
  min-width: 0;
}
#connected-shuttle .sh-trip-title {
  margin-bottom: 5px;
}
#connected-shuttle .sh-phone {
  font-size: 11px;
  color: #627088;
}
#connected-shuttle .sh-column-label {
  font-size: 11px;
  font-weight: 600;
  color: #65748e;
}
#connected-shuttle .sh-note {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.5;
  margin: 6px 0;
}
#connected-shuttle .sh-notes-cell .sh-text-button {
  padding-left: 0;
  color: var(--sh-blue);
}
#connected-shuttle .sh-address {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}
#connected-shuttle .sh-action-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
#connected-shuttle .sh-scheduled {
  font-size: 11px;
  color: #738198;
}
#connected-shuttle .sh-trip-actions {
  flex-wrap: wrap;
  gap: 3px;
  margin: 0;
}
#connected-shuttle .sh-trip-meta {
  line-height: 1.5;
  gap: 4px 10px;
}
#connected-shuttle .sh-trip-list {
  max-height: calc(100vh - 340px);
  min-height: 0;
}
#connected-shuttle .sh-book-dialog {
  padding: 0;
  border: 0;
  border-radius: 14px;
  width: min(580px, calc(100vw - 28px));
  max-height: calc(100dvh - 32px);
  box-shadow: 0 24px 90px #18284440;
  color: var(--sh-ink);
}
#connected-shuttle .sh-book-dialog::backdrop {
  background: #17243e66;
}
#connected-shuttle .sh-book-dialog .sh-new-trip {
  border: 0;
}
#connected-shuttle .sh-book-dialog [data-book-feedback]:empty {
  display: none;
}
#connected-shuttle .sh-book-dialog [data-book-feedback]:not(:empty) {
  margin: 12px 18px 0;
  padding: 10px;
  background: #fff4dd;
  font-size: 12px;
}
#connected-shuttle .sh-book-dialog .sh-form label.field:has([name="notes"]) {
  display: block;
}
#connected-shuttle .sh-book-dialog [name="notes"] {
  display: block;
  margin-top: 6px;
}
@media (max-width: 1250px) {
  #connected-shuttle .sh-dispatch {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  }
  #connected-shuttle .sh-trip {
    grid-template-columns: minmax(110px, 0.85fr) minmax(150px, 1.15fr) 120px;
    gap: 12px;
  }
  #connected-shuttle .sh-notes-cell {
    grid-column: 1 / 3;
    grid-row: 2;
  }
  #connected-shuttle .sh-action-cell {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}
@media (max-width: 850px) {
  #connected-shuttle .sh-dispatch {
    grid-template-columns: 1fr;
  }
  #connected-shuttle .sh-trip-list {
    max-height: 560px;
  }
}
@media (max-width: 500px) {
  #connected-shuttle .sh-trip {
    grid-template-columns: 1fr 120px;
  }
  #connected-shuttle .sh-route-cell {
    grid-column: 1;
    grid-row: 2;
  }
  #connected-shuttle .sh-notes-cell {
    grid-column: 1;
    grid-row: 3;
  }
  #connected-shuttle .sh-action-cell {
    grid-column: 2;
    grid-row: 1 / 4;
  }
  #connected-shuttle .sh-header-actions {
    gap: 4px;
  }
  #connected-shuttle .sh-card-head {
    padding: 12px;
  }
}

#connected-shuttle .sh-attention {
  font-size: 10px;
  line-height: 1.4;
  color: #956015;
  background: #fff4df;
  padding: 4px 6px;
  border-radius: 4px;
}
#connected-shuttle .sh-tabs {
  flex-wrap: wrap;
}

#connected-shuttle .sh-plan-dialog {
  width: min(720px, calc(100vw - 28px));
}
#connected-shuttle .sh-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#connected-shuttle .sh-ai {
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 12px;
}
#connected-shuttle .sh-ai summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
#connected-shuttle .sh-ai textarea {
  width: 100%;
  min-height: 65px;
  box-sizing: border-box;
  margin: 8px 0;
  border: 1px solid #dbe1ea;
  border-radius: 7px;
  padding: 8px;
  font: inherit;
  font-size: 13px;
}
#connected-shuttle .sh-plan-dialog button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#connected-shuttle .sh-plan-dialog [data-plan-result] {
  font-size: 13px;
  line-height: 1.65;
}
#connected-shuttle .sh-route-actions {
  flex-wrap: wrap;
  gap: 8px;
}
#connected-shuttle [data-plan-feedback]:empty {
  display: none;
}
@media (max-width: 500px) {
  #connected-shuttle .sh-three {
    grid-template-columns: 1fr;
  }
}

.sh-map-pin span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  font: 700 14px system-ui;
  box-shadow: 0 2px 5px #0005;
}

/* Compact portal workspace; native driver touch targets are unchanged. */
#main:has(#connected-shuttle) {
  padding-top: 20px;
}
#main:has(#connected-shuttle) .page-head {
  margin-bottom: 12px;
}
#connected-shuttle .sh-nav {
  margin-bottom: 12px;
}
#connected-shuttle .sh-nav a {
  padding: 8px 12px;
}
#connected-shuttle .sh-layout {
  gap: 14px;
}
#connected-shuttle .sh-card {
  border-radius: 10px;
}
#connected-shuttle .sh-card-head {
  padding: 12px 14px;
}
#connected-shuttle .sh-toolbar {
  padding: 10px 14px 0;
}
#connected-shuttle .sh-trip {
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.6fr) 125px;
  padding: 12px 14px;
  gap: 14px;
}
#connected-shuttle .sh-notes-cell {
  margin-top: 3px;
}
#connected-shuttle .sh-notes-cell .sh-text-button {
  padding: 4px 0;
}
#connected-shuttle .sh-note {
  margin: 4px 0;
}
#connected-shuttle .sh-address {
  margin-bottom: 4px;
}
#connected-shuttle .sh-route-builder {
  padding: 12px 14px;
}
#connected-shuttle .sh-route-options summary {
  cursor: pointer;
  padding: 6px;
}
#connected-shuttle .sh-route-options[open] {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#connected-shuttle .sh-map {
  height: clamp(360px, calc(100dvh - 290px), 660px);
}
#connected-shuttle .sh-form {
  padding: 14px;
  gap: 10px;
}
#connected-shuttle .sh-form-footer {
  padding-top: 10px;
}
@media (max-width: 1250px) {
  #connected-shuttle .sh-trip {
    grid-template-columns: minmax(130px, 1fr) minmax(160px, 1.2fr);
  }
  #connected-shuttle .sh-action-cell {
    grid-column: 1 / -1;
    grid-row: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}
@media (max-width: 850px) {
  #connected-shuttle .sh-map-panel {
    grid-row: auto;
  }
  #connected-shuttle .sh-map {
    height: 330px;
  }
}
@media (max-width: 500px) {
  #connected-shuttle .sh-trip {
    grid-template-columns: 1fr;
  }
  #connected-shuttle .sh-route-cell,
  #connected-shuttle .sh-action-cell {
    grid-column: 1;
    grid-row: auto;
  }
}

#connected-shuttle .sh-active-route summary::before {
  content: "\25b8";
  margin-right: 8px;
}
#connected-shuttle .sh-active-route[open] summary::before {
  content: "\25be";
}
#connected-shuttle .sh-active-route summary strong {
  flex: 1;
}

#connected-shuttle [data-address-note]:empty {
  display: none;
}

/* Booking: compact controls and an anchored, keyboard-accessible place picker. */
#connected-shuttle .sh-address-field {
  position: relative;
}
#connected-shuttle .sh-address-dropdown {
  position: absolute;
  top: calc(100% - 16px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 12px 30px #172b4d26;
  padding: 5px;
  max-height: 260px;
  overflow-y: auto;
}
#connected-shuttle .sh-address-option {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: white;
  color: #24334a;
  cursor: pointer;
}
#connected-shuttle .sh-address-option strong {
  font-size: 13px;
  font-weight: 600;
}
#connected-shuttle .sh-address-option span {
  font-size: 12px;
  color: #65748a;
}
#connected-shuttle .sh-address-option:hover,
#connected-shuttle .sh-address-option.suggestion-active {
  background: #edf3ff;
}
#connected-shuttle .sh-google-credit {
  display: block;
  text-align: right;
  font-size: 10px;
  color: #65748a;
  margin-top: 4px;
}
#connected-shuttle [data-address-note]:empty {
  display: none;
}
#connected-shuttle [data-address-note] {
  margin: 0;
}
#connected-shuttle .sh-book-dialog {
  max-width: 610px;
  border-radius: 18px;
}
#connected-shuttle .sh-book-dialog .sh-card-head {
  background: #f8faff;
  padding: 16px 20px;
  border-bottom: 1px solid #e6ecf5;
}
#connected-shuttle .sh-book-dialog .sh-card-head h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
#connected-shuttle .sh-book-dialog .sh-form {
  padding: 18px 20px;
  gap: 12px;
}
#connected-shuttle .sh-book-dialog .sh-form-footer {
  margin: 2px -20px -18px;
  padding: 14px 20px;
  background: #f8faff;
}
#connected-shuttle .sh-suggestion-credit {
  display: block;
  text-align: right;
  padding: 5px 10px;
  color: #65748a;
  font-size: 11px;
}

#connected-shuttle [data-feedback].sh-success {
  background: #edf9f2;
  border-color: #b8e2ca;
  color: #17653a;
}
#connected-shuttle .sh-message-dialog [data-message-feedback]:empty {
  display: none;
}
#connected-shuttle button:disabled {
  opacity: 0.5;
  cursor: default;
}
#connected-shuttle .sh-device-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e6ecf5;
}
#connected-shuttle .sh-device-status small {
  grid-column: 1/-1;
  color: #65748a;
}

/* Dispatch workspace: clear hierarchy, compact rows, deliberate focus states. */
#connected-shuttle {
  --sh-blue: #3653d9;
  --sh-muted: #65728a;
}
#connected-shuttle .sh-workspace-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 22px 0 24px;
  padding: 0 3px;
}
#connected-shuttle .sh-eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.6px;
  color: #687ab4;
}
#connected-shuttle .sh-workspace-intro h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin: 7px 0;
  color: #1e2d47;
}
#connected-shuttle .sh-workspace-intro p {
  font-size: 13px;
  color: var(--sh-muted);
  margin: 0;
}
#connected-shuttle .sh-store-chip {
  font-size: 12px;
  font-weight: 650;
  background: #eef2ff;
  border: 1px solid #dce3fa;
  color: #455c99;
  padding: 9px 13px;
  border-radius: 20px;
  white-space: nowrap;
}
#connected-shuttle .sh-nav {
  display: inline-flex;
  border: 1px solid #e2e7f0;
  border-radius: 12px;
  background: #eef1f7;
  padding: 4px;
  margin-bottom: 0;
}
#connected-shuttle .sh-nav a {
  border: 0;
  border-radius: 9px;
  padding: 8px 14px;
  transition:
    background 0.15s,
    color 0.15s;
}
#connected-shuttle .sh-nav a.active {
  background: white;
  box-shadow: 0 2px 5px #22304c10;
  color: #3048b8;
}
#connected-shuttle .sh-card {
  box-shadow: 0 5px 20px #20345b06;
  border-color: #dfe5ef;
  border-radius: 16px;
}
#connected-shuttle .sh-card-head {
  background: linear-gradient(110deg, #fff, #f8faff);
  padding: 17px 18px;
}
#connected-shuttle .sh-card-head h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
}
#connected-shuttle .sh-tabs {
  gap: 5px;
  flex-wrap: wrap;
  padding: 8px 0 2px;
  border: 0;
}
#connected-shuttle .sh-tabs button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f4f6fa;
  color: #647087;
  transition: background 0.15s;
}
#connected-shuttle .sh-tabs button.active {
  background: #e9eeff;
  color: #334ec7;
  box-shadow: inset 0 0 0 1px #d9e1ff;
}
#connected-shuttle .sh-trip {
  border-left: 3px solid transparent;
  transition: background 0.15s;
}
#connected-shuttle .sh-trip:hover {
  background: #f8faff;
}
#connected-shuttle .sh-trip.selected {
  background: #f0f4ff;
  border-left-color: #4564db;
}
#connected-shuttle .sh-trip-title strong {
  font-size: 14px;
  letter-spacing: -0.15px;
}
#connected-shuttle .sh-address > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background: #eef2ff;
  color: #5269ad;
  flex-shrink: 0;
}
#connected-shuttle .sh-route-heading {
  margin: 0 0 14px;
}
#connected-shuttle .sh-route-heading h3 {
  font-size: 16px;
  margin: 4px 0 0;
  color: #263956;
  letter-spacing: -0.25px;
}
#connected-shuttle .sh-route-builder {
  background: #f8faff;
  border-top: 1px solid #e0e7f4;
  padding: 18px;
}
#connected-shuttle .sh-route-builder ol {
  background: white;
  border: 1px solid #e3e9f4;
  border-radius: 11px;
  padding-top: 6px;
  padding-bottom: 6px;
}
#connected-shuttle .sh-route-builder ol:empty {
  display: none;
}
#connected-shuttle .sh-active-route {
  background: #f4f7ff;
  border: 1px solid #dfe6f7;
  border-radius: 10px;
  margin: 10px 14px;
  padding: 9px 12px;
}
#connected-shuttle .sh-active-route > button {
  margin: 0 0 5px 12px;
}
#connected-shuttle .sh-book-dialog {
  border-radius: 18px;
  box-shadow: 0 24px 80px #18294730;
}
#connected-shuttle .sh-book-dialog::backdrop {
  background: #17264270;
  backdrop-filter: blur(3px);
}
#connected-shuttle .btn.primary {
  background: #3653d9;
  border-color: #3653d9;
  box-shadow: 0 3px 7px #3653d922;
}
#connected-shuttle button:focus-visible,
#connected-shuttle a:focus-visible {
  outline: 3px solid #a9baff;
  outline-offset: 3px;
}
#connected-shuttle .sh-empty {
  padding: 40px 22px;
  background: linear-gradient(#fff, #fafbfe);
  color: #748198;
}
@media (max-width: 700px) {
  #connected-shuttle .sh-workspace-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0;
  }
  #connected-shuttle .sh-workspace-intro h1 {
    font-size: 24px;
  }
  #connected-shuttle .sh-nav {
    display: flex;
    overflow: auto;
  }
  #connected-shuttle .sh-nav a {
    white-space: nowrap;
    padding: 8px 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #connected-shuttle * {
    transition: none !important;
  }
}
#connected-shuttle .sh-workspace-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
#connected-shuttle .sh-confirm-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(440px, calc(100vw - 32px));
  height: fit-content;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid #dfe5ef;
  border-radius: 18px;
  padding: 26px;
  background: #fff;
  color: #243146;
  box-shadow: 0 24px 80px #18294730;
}
#connected-shuttle .sh-confirm-dialog::backdrop {
  background: #17264270;
  backdrop-filter: blur(3px);
}
#connected-shuttle .sh-confirm-dialog h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
  margin: 0 0 12px;
}
#connected-shuttle .sh-confirm-dialog p {
  font-size: 14px;
  line-height: 1.6;
  color: #65728a;
  margin: 0 0 24px;
}
#connected-shuttle .sh-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
#app:has(#connected-shuttle.sh-focused) > .sidebar,
#app:has(#connected-shuttle.sh-focused) > .menu-scrim,
#app:has(#connected-shuttle.sh-focused) .workspace > .topbar,
#app:has(#connected-shuttle.sh-focused) .workspace > .workspace-footer,
#main:has(#connected-shuttle.sh-focused) > .page-head {
  display: none;
}
#app:has(#connected-shuttle.sh-focused) {
  grid-template-columns: 1fr;
}
#app:has(#connected-shuttle.sh-focused) > .workspace {
  margin-left: 0;
  width: 100%;
}
#main:has(#connected-shuttle.sh-focused) {
  max-width: none;
  width: 100%;
  padding: 22px 26px;
}
#connected-shuttle.sh-focused .sh-map {
  min-height: 500px;
  height: calc(100vh - 280px);
  max-height: 900px;
}
@media (max-width: 700px) {
  #connected-shuttle .sh-workspace-bar {
    align-items: stretch;
    flex-direction: column;
  }
  #connected-shuttle .sh-workspace-bar > button {
    align-self: flex-end;
  }
  #main:has(#connected-shuttle.sh-focused) {
    padding: 14px;
  }
  #connected-shuttle.sh-focused .sh-map {
    min-height: 300px;
    height: 45vh;
  }
}

.sh-session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 0 0 12px;
  font-size: 13px;
  color: #475569;
}
.sh-session-bar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.sh-session-bar input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.sh-session-bar .sh-session-stale {
  color: #92400e;
  background: #fff4d6;
  border-radius: 6px;
  padding: 5px 8px;
  font-weight: 600;
}

#connected-shuttle .sh-when {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #dbe1ea;
  border-radius: 9px;
  background: #f2f4f8;
}
#connected-shuttle .sh-when button {
  flex: 1;
  min-height: 31px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #526079;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
#connected-shuttle .sh-when button[aria-pressed="true"] {
  background: #fff;
  color: #354cc8;
  font-weight: 650;
  box-shadow: 0 1px 4px #1728491a;
}
#connected-shuttle .sh-when button:focus-visible {
  outline: 2px solid #4664df;
  outline-offset: 2px;
}

/* Keep guest information and actions together on wide dispatch desks. */
#connected-shuttle .sh-booking {
  max-width: 1440px;
  margin-inline: auto;
}
#connected-shuttle .sh-trip {
  grid-template-columns: minmax(190px, 0.85fr) minmax(260px, 1.3fr) minmax(
      210px,
      0.75fr
    );
  gap: 18px;
  padding: 14px 16px;
}
#connected-shuttle .sh-trip-title strong {
  font-size: 15px;
}
#connected-shuttle .sh-phone,
#connected-shuttle .sh-trip-meta,
#connected-shuttle .sh-scheduled {
  font-size: 13px;
}
#connected-shuttle .sh-address {
  font-size: 14px;
  margin-bottom: 5px;
}
#connected-shuttle .sh-trip-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
#connected-shuttle .sh-trip-actions .btn,
#connected-shuttle .sh-message {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #263349;
}
#connected-shuttle .sh-trip-actions .primary {
  background: #354fda;
  border-color: #354fda;
  color: #fff;
}
#connected-shuttle .sh-trip-actions .sh-edit {
  color: #2943b4;
  background: #eef2ff;
  border-color: #cbd5fc;
}
#connected-shuttle .sh-trip-actions .sh-cancel {
  color: #a32d36;
  border-color: #eccbd0;
}
#connected-shuttle .sh-notes-cell .sh-message {
  margin-top: 5px;
}
@media (max-width: 1100px) {
  #connected-shuttle .sh-trip {
    grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1.2fr);
  }
  #connected-shuttle .sh-action-cell {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  #connected-shuttle .sh-trip-actions {
    margin: 0;
  }
}
@media (max-width: 600px) {
  #connected-shuttle .sh-trip {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Compact shared workspace chrome and dispatch controls. */
#connected-shuttle .sh-workspace-intro {
  margin: 8px 0 4px;
  padding: 0;
  min-height: 0;
}
#connected-shuttle .sh-workspace-intro h1 {
  font-size: 20px;
  margin: 0;
}
#connected-shuttle .sh-session-bar {
  margin: 0 0 8px;
  padding: 0;
  font-size: 12px;
}
#connected-shuttle [data-feedback]:empty {
  display: none;
}
#connected-shuttle [data-feedback] {
  margin: 6px 0;
  padding: 8px 12px;
}
#connected-shuttle .sh-card-head {
  padding: 9px 14px;
}
#connected-shuttle [data-updated] {
  display: none;
}
#connected-shuttle .sh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
#connected-shuttle .sh-toolbar [data-search] {
  flex: 1;
  min-width: 180px;
}
#connected-shuttle .sh-toolbar .sh-tabs {
  margin: 0;
  padding: 0;
}
#connected-shuttle .sh-route-builder {
  padding: 12px 14px;
}
#connected-shuttle .sh-route-actions {
  margin: 8px 0;
  gap: 8px;
}
#connected-shuttle .sh-dispatch {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
}
#connected-shuttle .sh-dispatch .sh-trip {
  grid-template-columns: minmax(140px, 0.8fr) minmax(180px, 1.2fr);
  gap: 10px;
}
#connected-shuttle .sh-dispatch .sh-action-cell {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
}
#connected-shuttle .sh-dispatch .sh-trip-actions {
  margin: 0;
}
#connected-shuttle .sh-map {
  min-height: 380px;
  height: calc(100vh - 220px);
}
@media (max-width: 900px) {
  #connected-shuttle .sh-dispatch {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  #connected-shuttle .sh-dispatch .sh-trip {
    grid-template-columns: minmax(0, 1fr);
  }
}

#connected-shuttle .sh-mobile-views {
  display: none;
}
#connected-shuttle [data-owner] {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 9px;
  background: white;
  color: #263349;
}
@media (min-width: 901px) {
  #connected-shuttle:has(.sh-dispatch) {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 170px);
    min-height: 0;
    overflow: hidden;
  }
  #connected-shuttle.sh-focused:has(.sh-dispatch) {
    height: calc(100dvh - 44px);
  }
  #connected-shuttle .sh-dispatch {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
  }
  #connected-shuttle .sh-dispatch .sh-queue {
    min-height: 0;
    overflow-y: auto;
  }
  #connected-shuttle .sh-dispatch .sh-trip-list {
    max-height: none;
    overflow: visible;
  }
  #connected-shuttle .sh-map-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: static;
  }
  #connected-shuttle .sh-map,
  #connected-shuttle.sh-focused .sh-map {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
  }
}
@media (max-width: 900px) {
  #connected-shuttle .sh-mobile-views:not([hidden]) {
    display: flex;
    gap: 8px;
    margin: 6px 0;
  }
  #connected-shuttle .sh-mobile-views button {
    padding: 8px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: white;
  }
  #connected-shuttle .sh-mobile-views button[aria-pressed="true"] {
    background: #354fda;
    color: white;
  }
  #connected-shuttle .sh-map-panel {
    display: none;
  }
  #connected-shuttle.sh-show-map .sh-map-panel {
    display: block;
  }
  #connected-shuttle.sh-show-map .sh-dispatch .sh-queue {
    display: none;
  }
  #connected-shuttle.sh-show-map .sh-map {
    height: calc(100dvh - 250px);
    min-height: 220px;
  }
}
@media (max-width: 900px) {
  #connected-shuttle.sh-show-map {
    height: calc(100dvh - 180px);
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  #connected-shuttle.sh-focused.sh-show-map {
    height: calc(100dvh - 28px);
  }
  #connected-shuttle.sh-show-map .sh-layout {
    flex: 1;
    min-height: 0;
    display: flex;
  }
  #connected-shuttle.sh-show-map .sh-map-panel {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  #connected-shuttle.sh-show-map .sh-map {
    flex: 1;
    height: auto;
    min-height: 0;
  }
}
@media (max-width: 900px) {
  #connected-shuttle.sh-show-map .sh-layout {
    align-items: stretch;
  }
  #connected-shuttle.sh-show-map .sh-map-panel {
    position: static;
  }
}

.sidebar [data-shuttle-navigation] {
  display: contents;
}

.sh-fleet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
}
.sh-fleet-row > div {
  flex: 1;
  display: grid;
  gap: 4px;
}
.sh-fleet-row span,
.sh-fleet-row small {
  color: #64748b;
}
.sh-fleet-row .btn {
  flex-shrink: 0;
}
.sh-removed {
  margin: 12px 0;
}
.sh-dispatch-mode {
  margin: 0;
  padding: 8px 14px;
  background: #f1f5ff;
  font-size: 13px;
  color: #334155;
}
.sh-assignment-hint {
  margin: 4px 0;
  font-size: 12px;
  color: #64748b;
}
.sh-assignment-hint:empty {
  display: none;
}
@media (max-width: 600px) {
  .sh-fleet-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Trip state is the row's primary visual indicator, not a small metadata badge. */
#connected-shuttle .sh-trip-status {
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  border-radius: 9px;
  background: #fff0ce;
  color: #714b00;
}
#connected-shuttle .sh-trip-status.state-en_route {
  background: #e2edff;
  color: #194d99;
}
#connected-shuttle .sh-trip-status.state-arrived {
  background: #eae3ff;
  color: #583496;
}
#connected-shuttle .sh-trip-status.state-onboard,
#connected-shuttle .sh-trip-status.is-confirmed {
  background: #d9f3e5;
  color: #176140;
}
#connected-shuttle .sh-confirmed {
  font-size: 14px;
  font-weight: 700;
  color: #176140;
}
#connected-shuttle .sh-confirm-phone {
  background: #e0f2e7;
  color: #176140;
  border-color: #9dceb1;
  min-height: 42px;
}
#connected-shuttle .sh-action-cell .sh-trip-status {
  order: -1;
}
#connected-shuttle .sh-customer-cell > .sh-trip-status {
  margin-bottom: 10px;
  width: fit-content;
  max-width: 100%;
}
#connected-shuttle .sh-manual-dispatch > summary {
  padding: 14px 18px;
  color: #2454b5;
  font-weight: 650;
  cursor: pointer;
  border-top: 1px solid #e1e8f2;
}
#connected-shuttle .sh-manual-dispatch[open] > summary {
  background: #f2f6ff;
}

/* Dense queue rows: details expand only when needed. */
#connected-shuttle .sh-trip,
#connected-shuttle .sh-dispatch .sh-trip {
  gap: 6px 14px;
  padding: 10px 14px;
}
#connected-shuttle .sh-customer-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
#connected-shuttle .sh-customer-cell > .sh-trip-status {
  margin: 0;
  padding: 4px 8px;
  font-size: 13px;
  border-radius: 5px;
}
#connected-shuttle .sh-trip-title {
  flex-basis: 100%;
  margin: 0;
}
#connected-shuttle .sh-trip-meta {
  margin: 0;
}
#connected-shuttle .sh-notes-cell {
  display: flex;
  align-items: start;
  gap: 10px;
  flex-wrap: wrap;
}
#connected-shuttle .sh-notes-cell .sh-message {
  margin: 0;
  min-height: 32px;
  padding: 4px 9px;
}
#connected-shuttle .sh-note-details {
  font-size: 13px;
  max-width: 100%;
}
#connected-shuttle .sh-note-details summary {
  cursor: pointer;
  padding: 7px 0;
  color: #2943b4;
  font-weight: 600;
}
#connected-shuttle .sh-note-details[open] {
  flex-basis: 100%;
}
#connected-shuttle .sh-action-cell {
  gap: 4px 10px;
}
#connected-shuttle .sh-assignment-hint {
  margin: 0;
  font-size: 12px;
}
#connected-shuttle .sh-assignment-hint:empty,
#connected-shuttle .sh-trip-meta:empty,
#connected-shuttle .sh-trip-actions:empty {
  display: none;
}
#connected-shuttle .sh-address {
  margin: 0 0 3px;
  line-height: 1.35;
}
#connected-shuttle .sh-trip-actions {
  gap: 6px;
}
#connected-shuttle .sh-options > .field {
  align-self: start;
}
#connected-shuttle .sh-options .sh-when {
  margin-top: 0;
  min-height: 40px;
}

/* Keep the three booking controls on the same baseline and height. */
#connected-shuttle .sh-options > .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
#connected-shuttle .sh-options .sh-when {
  height: 37px;
  min-height: 37px;
  box-sizing: border-box;
}
#connected-shuttle .sh-options .sh-when button {
  min-height: 0;
}

#connected-shuttle .sh-manual-dispatch[hidden] {
  display: none !important;
}
#connected-shuttle .sh-row-menu {
  position: relative;
}
#connected-shuttle .sh-row-menu > summary {
  cursor: pointer;
  color: #253b80;
  border: 1px solid #ccd6eb;
}
#connected-shuttle .sh-row-menu[open] .sh-trip-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 170px;
  padding: 8px;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: white;
}
#connected-shuttle .sh-row-menu .btn {
  text-align: left;
}
#connected-shuttle .sh-row-menu[open] .sh-trip-actions {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 4px);
  width: 230px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 8px 24px #17264726;
}
#connected-shuttle .sh-row-menu[open] {
  z-index: 21;
}

#connected-shuttle .sh-inbox-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e7ef;
}
#connected-shuttle .sh-inbox-row p {
  margin: 5px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#connected-shuttle .sh-inbox-row small {
  color: #64748b;
}
#connected-shuttle .sh-inbox-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
#connected-shuttle .sh-sms-review > summary {
  padding: 12px 16px;
  font-weight: 650;
  cursor: pointer;
  color: #854d0e;
  background: #fffbeb;
}
#connected-shuttle .sh-inbox-row .sh-attention {
  display: block;
}
@media (max-width: 600px) {
  #connected-shuttle .sh-inbox-row {
    flex-direction: column;
    gap: 8px;
  }
  #connected-shuttle .sh-inbox-actions {
    justify-content: flex-end;
  }
}

#connected-shuttle .sh-sms-review[open] {
  max-height: 280px;
  overflow: auto;
}

#connected-shuttle .sh-book-dialog .sh-form-footer {
  flex-wrap: wrap;
}
#connected-shuttle .sh-book-dialog .sh-form-footer .sh-muted {
  flex-basis: 100%;
}
#connected-shuttle .sh-book-dialog .field {
  min-width: 0;
}
@media (max-width: 500px) {
  #connected-shuttle .sh-book-dialog .sh-two {
    grid-template-columns: minmax(0, 1fr);
  }
  #connected-shuttle .sh-book-dialog .sh-options {
    grid-template-columns: 80px minmax(0, 1fr);
  }
  #connected-shuttle .sh-book-dialog .sh-options > :nth-child(2) {
    grid-column: 1/-1;
    grid-row: 2;
  }
  #connected-shuttle .sh-book-dialog .sh-form-footer .btn {
    flex: 1 1 100%;
    white-space: normal;
  }
}

#connected-shuttle .sh-return-ops {
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid #3651d4;
  background: #fff;
  color: #243dac;
  font-weight: 700;
  box-shadow: 0 2px 6px #22336618;
}
#connected-shuttle .sh-dispatch-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  border: 1px solid #e6b34d;
  border-radius: 10px;
  background: #fff5dc;
  color: #654700;
}
#connected-shuttle .sh-dispatch-alert p {
  margin: 4px 0 0;
}

/* Keep controls in their own column and expand them within the row. */
#connected-shuttle .sh-trip-list {
  padding: 8px 12px;
  background: #f0f3f8;
}
#connected-shuttle .sh-trip,
#connected-shuttle .sh-dispatch .sh-trip {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) 130px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #aabbd3;
  border-radius: 9px;
  margin: 0 0 8px;
  background: white;
  padding: 12px;
  gap: 12px;
}
#connected-shuttle .sh-trip.selected {
  background: #edf4ff;
  border-color: #4168c7;
}
#connected-shuttle .sh-action-cell,
#connected-shuttle .sh-dispatch .sh-action-cell {
  grid-column: auto;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}
#connected-shuttle .sh-row-menu > summary {
  text-align: center;
  min-height: 36px;
}
#connected-shuttle .sh-row-menu[open] .sh-trip-actions {
  position: static;
  width: auto;
  min-width: 0;
  max-height: none;
  overflow: visible;
  box-shadow: none;
  padding: 6px 0;
  border: 0;
}
#connected-shuttle .sh-row-menu .btn {
  white-space: normal;
  overflow-wrap: anywhere;
}
#connected-shuttle [data-active] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  padding: 8px 14px;
}
#connected-shuttle .sh-active-route {
  margin: 0;
  min-width: 0;
}
#connected-shuttle .sh-active-route summary {
  flex-wrap: wrap;
  gap: 4px 10px;
}
@media (max-width: 650px) {
  #connected-shuttle .sh-trip,
  #connected-shuttle .sh-dispatch .sh-trip {
    grid-template-columns: minmax(0, 1fr) 120px;
  }
  #connected-shuttle .sh-route-cell {
    grid-column: 1;
    grid-row: 2;
  }
  #connected-shuttle .sh-action-cell,
  #connected-shuttle .sh-dispatch .sh-action-cell {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

#connected-shuttle .sh-shift-notices {
  margin: 8px 14px;
  border: 1px solid #edc578;
  border-radius: 8px;
  background: #fff7e3;
}
#connected-shuttle .sh-shift-notices > summary {
  cursor: pointer;
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: #705015;
}
#connected-shuttle .sh-shift-notices .sh-dispatch-alert {
  margin: 0;
  border: 0;
  border-top: 1px solid #edc578;
  border-radius: 0;
}

/* Status and next actions are part of each compact booking row. */
#connected-shuttle .sh-trip {
  border-left: 5px solid #c58b22;
  border-bottom: 2px solid #d8e0ed;
  margin-bottom: 6px;
  border-radius: 8px;
  background: #fff;
}
#connected-shuttle .sh-trip[data-state="en_route"],
#connected-shuttle .sh-trip[data-state="assigned"] {
  border-left-color: #3575d5;
}
#connected-shuttle .sh-trip[data-state="onboard"],
#connected-shuttle .sh-trip[data-state="completed"] {
  border-left-color: #21805e;
}
#connected-shuttle .sh-trip[data-state="cancelled"],
#connected-shuttle .sh-trip[data-state="no_show"] {
  border-left-color: #b53636;
}
#connected-shuttle .sh-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}
#connected-shuttle .sh-primary-actions .btn {
  min-height: 38px;
  font-weight: 650;
  white-space: normal;
}
#connected-shuttle .sh-primary-actions .sh-confirm-phone {
  background: #e4f4eb;
  color: #155c3b;
  border-color: #9fcdb2;
}
#connected-shuttle .sh-row-menu > summary {
  font-size: 22px;
  letter-spacing: 2px;
  min-width: 44px;
  text-align: center;
}
#connected-shuttle .sh-dialog-header,
#connected-shuttle .sh-message-dialog > header {
  position: sticky;
  top: 0;
  background: var(--surface, #fff);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #d8e0ed;
}
@media (max-width: 700px) {
  #connected-shuttle .sh-primary-actions {
    justify-content: flex-start;
  }
}

#connected-shuttle .sh-trip,
#connected-shuttle .sh-dispatch .sh-trip {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(180px, 0.65fr);
  border-left-color: #c58b22;
}
#connected-shuttle .sh-dispatch .sh-trip[data-state="en_route"],
#connected-shuttle .sh-dispatch .sh-trip[data-state="assigned"] {
  border-left-color: #3575d5;
}
#connected-shuttle .sh-dispatch .sh-trip[data-state="onboard"],
#connected-shuttle .sh-dispatch .sh-trip[data-state="completed"] {
  border-left-color: #21805e;
}
#connected-shuttle .sh-dispatch .sh-trip[data-state="cancelled"],
#connected-shuttle .sh-dispatch .sh-trip[data-state="no_show"] {
  border-left-color: #b53636;
}
#connected-shuttle .sh-action-cell,
#connected-shuttle .sh-dispatch .sh-action-cell {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  justify-content: flex-end;
}
#connected-shuttle .sh-action-cell .sh-assignment-hint {
  flex-basis: 100%;
  margin: 0;
}
#connected-shuttle .sh-action-cell .sh-primary-actions {
  display: contents;
}
@media (max-width: 1000px) {
  #connected-shuttle .sh-trip,
  #connected-shuttle .sh-dispatch .sh-trip {
    grid-template-columns: minmax(0, 1fr);
  }
  #connected-shuttle .sh-route-cell {
    grid-column: 1;
    grid-row: auto;
  }
  #connected-shuttle .sh-action-cell,
  #connected-shuttle .sh-dispatch .sh-action-cell {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    border-top: 1px solid #e1e7f0;
    padding-top: 8px;
  }
}

#connected-shuttle .sh-shift-summary {
  padding: 10px 14px;
  border-bottom: 1px solid #dce3ef;
}
#connected-shuttle .sh-shift-summary h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
#connected-shuttle .sh-shift-summary h3 span {
  color: #52617a;
  margin-left: 6px;
}
#connected-shuttle .sh-shift-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#connected-shuttle .sh-shift-card {
  flex: 1 1 180px;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  padding: 10px 12px;
  border: 1px solid #bed9cc;
  border-left: 4px solid #22805c;
  border-radius: 10px;
  background: #f3faf6;
}
#connected-shuttle .sh-shift-card strong {
  overflow-wrap: anywhere;
}
#connected-shuttle .sh-shift-card small {
  grid-column: 1 / -1;
  color: #52617a;
}
#connected-shuttle .sh-shift-state {
  font-size: 12px;
  font-weight: 700;
  color: #176545;
}
#connected-shuttle .sh-shift-offline {
  background: #fff8e7;
  border-color: #e6ca83;
}
#connected-shuttle .sh-shift-offline .sh-shift-state {
  color: #805807;
}
#connected-shuttle .sh-shift-cards p {
  margin: 0;
  color: #52617a;
}

/* Keep trip actions out of row layout and above scrolling containers. */
#connected-shuttle .sh-row-menu {
  flex: 0 0 40px;
  width: 40px;
}
#connected-shuttle .sh-row-menu > summary {
  min-width: 40px;
  width: 40px;
  padding: 3px;
  min-height: 36px;
}
#connected-shuttle .sh-row-menu [popover]:not(:popover-open) {
  display: none;
}
#connected-shuttle .sh-row-menu[open] .sh-trip-actions:popover-open {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 220px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 5px;
  gap: 2px;
  background: #fff;
  border: 1px solid #d8e0ed;
  border-radius: 10px;
  box-shadow: 0 8px 28px #172b4d26;
}
#connected-shuttle .sh-row-menu .sh-trip-actions .btn {
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 14px;
}
#connected-shuttle .sh-row-menu .sh-trip-actions .btn:hover {
  background: #edf3ff;
}
#connected-shuttle .sh-matches:empty {
  display: none;
}
#connected-shuttle .sh-matches:not(:empty) {
  background: #edf4ff;
  border: 1px solid #83a9e8;
  border-radius: 9px;
  padding: 10px;
}
#connected-shuttle .sh-match-heading {
  color: #244c88;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}
#connected-shuttle .sh-matches [data-customer] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  width: 100%;
  background: white;
  color: #223451;
  border: 1px solid #c1d4f1;
  border-radius: 6px;
  padding: 10px;
  text-align: left;
}
#connected-shuttle .sh-match-use {
  margin-left: auto;
  color: #245ac3;
  font-weight: 650;
}
#connected-shuttle .sh-matches [data-forget-customer] {
  background: transparent;
  font-size: 12px;
  min-height: 28px;
  padding: 4px;
  color: #66738a;
}

/* Fleet setup: compact forms and stable, independently collapsible sections. */
.sh-fleet-settings {
  max-width: 1120px;
  margin: 20px auto;
}
.sh-fleet-section {
  --section-accent: #526178;
  background: #fff;
  border: 1px solid #dce3ee;
  border-left: 4px solid var(--section-accent);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.sh-fleet-phones {
  --section-accent: #275cc5;
}
.sh-fleet-vehicles {
  --section-accent: #26766b;
}
.sh-fleet-area {
  --section-accent: #805ea7;
}
.sh-fleet-section > summary {
  cursor: pointer;
  padding: 18px 22px;
  font-size: 18px;
  font-weight: 650;
  color: #26364c;
  background: #f8fafc;
}
.sh-fleet-body {
  padding: 4px 22px 22px;
}
.sh-fleet-settings .connected-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.sh-fleet-settings > .connected-form {
  display: block;
  margin: 0;
}
.sh-fleet-settings .form-grid,
.sh-fleet-settings [data-pair] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}
.sh-fleet-settings [data-pair] > p,
.sh-fleet-settings [data-pair] > button {
  grid-column: 1 / -1;
}
.sh-fleet-settings .field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}
.sh-fleet-settings .field input,
.sh-fleet-settings .field select {
  min-height: 42px;
  padding: 9px 12px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfd9e7;
  border-radius: 8px;
  font-size: 15px;
}
.sh-fleet-settings .btn {
  justify-self: start;
  min-height: 38px;
}
.sh-fleet-settings p {
  font-size: 14px;
  line-height: 1.5;
  margin: 10px 0;
}
.sh-fleet-settings h3 {
  font-size: 16px;
  margin: 20px 0 8px;
}
.sh-fleet-settings .sh-fleet-row {
  padding: 14px 0;
  gap: 10px;
  font-size: 14px;
}
.sh-fleet-settings .sh-fleet-row strong {
  font-size: 15px;
}
.sh-fleet-settings .sh-fleet-row small {
  font-size: 12px;
}
.sh-fleet-settings .sh-add-shuttle {
  margin-top: 18px;
}
.sh-fleet-settings .sh-add-shuttle > summary {
  cursor: pointer;
  color: #24675e;
  font-weight: 600;
}
.sh-field-error {
  color: #a42d32;
}
.sh-fleet-settings input[aria-invalid="true"] {
  border-color: #b64248;
}
.sh-fleet-settings [data-area-editor] {
  max-width: 760px;
}
.sh-fleet-settings [data-area-editor] > h3 {
  display: none;
}
@media (max-width: 680px) {
  .sh-fleet-settings .form-grid,
  .sh-fleet-settings [data-pair] {
    grid-template-columns: 1fr;
  }
  .sh-fleet-body {
    padding: 4px 14px 18px;
  }
  .sh-fleet-section > summary {
    padding: 16px 14px;
  }
}
.sh-fleet-settings > form.connected-form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.sh-fleet-settings .sh-fleet-body form.connected-form {
  padding: 0;
}
.sh-fleet-settings > form.connected-form > details {
  grid-column: 1 / -1;
}

/* Use full header colours and a form-neutral wrapper so all cards align. */
#connected-shuttle .sh-config-form {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
}
#connected-shuttle .sh-fleet-section > summary {
  background: var(--section-accent);
  color: #fff;
  padding: 14px 20px;
}
#connected-shuttle .sh-fleet-general {
  --section-accent: #57657c;
}
#connected-shuttle .sh-fleet-settings .form-grid,
#connected-shuttle .sh-fleet-settings [data-pair] {
  grid-template-columns: repeat(2, minmax(0, 300px));
  max-width: 620px;
}
#connected-shuttle .sh-fleet-settings input[type="number"] {
  width: 100px;
  max-width: 100%;
}
#connected-shuttle .sh-fleet-settings [data-area-mode] {
  max-width: 300px;
}
#connected-shuttle .sh-simple-settings {
  display: grid;
  gap: 20px;
  margin: 18px 0;
}
#connected-shuttle .sh-simple-settings p {
  max-width: 480px;
  margin-top: 6px;
}
#connected-shuttle .sh-auto-routing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid #b6d9ca;
  background: #e9f6ef;
  color: #175740;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
}
#connected-shuttle .sh-auto-routing strong {
  font-size: 19px;
}
#connected-shuttle .sh-auto-routing p {
  margin: 6px 0 0;
  max-width: 580px;
}
#connected-shuttle .sh-auto-routing.is-off {
  background: #fff4dd;
  border-color: #e8d2a1;
  color: #6e4c12;
}
#connected-shuttle .sh-auto-routing .btn {
  min-height: 46px;
  white-space: nowrap;
}
@media (max-width: 680px) {
  #connected-shuttle .sh-fleet-settings .form-grid,
  #connected-shuttle .sh-fleet-settings [data-pair] {
    grid-template-columns: minmax(0, 300px);
  }
  #connected-shuttle .sh-auto-routing {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Balanced trip cards; the action icon must never wrap or stretch with the row. */
#connected-shuttle .sh-trip .sh-route-cell {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 560px;
}
#connected-shuttle .sh-trip .sh-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 8px;
}
#connected-shuttle .sh-trip .sh-route-cell .sh-trip-meta {
  justify-content: center;
  text-align: center;
}
#connected-shuttle .sh-trip .sh-action-cell {
  align-items: center;
  align-self: center;
}
#app #connected-shuttle .sh-row-menu > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  box-sizing: border-box;
  white-space: nowrap;
  letter-spacing: normal;
  line-height: 1;
}
#connected-shuttle .sh-row-menu > summary svg {
  flex: 0 0 20px;
}
@media (max-width: 1000px) {
  #connected-shuttle .sh-trip .sh-route-cell {
    padding: 12px 0;
  }
}

.launch-message,
.launch-trip {
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 0;
}
.launch-message small {
  display: block;
  color: #64748b;
  margin-top: 4px;
}
.launch-message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.launch-trip summary {
  cursor: pointer;
  padding: 8px 0;
}

@media (min-width: 901px) and (pointer: fine) {
  .sh-workspace-intro {
    margin: 12px 0 8px;
  }
  .sh-workspace-intro h1 {
    font-size: 24px;
  }
  .sh-card-head {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .sh-toolbar {
    padding: 10px 14px;
    gap: 10px;
  }
  .sh-nav a {
    padding: 9px 12px;
  }
  .sh-map-panel .sh-card-head .sh-header-actions {
    flex-wrap: wrap;
  }
  .sh-dispatch-mode {
    padding: 10px 14px;
  }
  .sh-fleet-settings .connected-form {
    margin-top: 12px;
  }
}

/* Compact shuttles keep identity, occupancy and disconnected state visible. */
#connected-shuttle .sh-shift-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  align-items: start;
}
#connected-shuttle .sh-shift-card {
  display: block;
  padding: 0;
}
#connected-shuttle .sh-shift-card summary {
  cursor: pointer;
  min-height: 72px;
  box-sizing: border-box;
  padding: 8px 10px;
  display: block;
  list-style: none;
}
#connected-shuttle .sh-shift-card summary::-webkit-details-marker {
  display: none;
}
#connected-shuttle .sh-shift-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}
#connected-shuttle .sh-shift-heading strong {
  flex: 1;
  font-size: 13px;
  line-height: 18px;
}
#connected-shuttle .sh-shift-chevron {
  font-size: 20px;
  line-height: 18px;
}
#connected-shuttle .sh-shift-card[open] .sh-shift-chevron {
  transform: rotate(180deg);
}
#connected-shuttle .sh-shift-line {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  justify-content: space-between;
  margin-top: 3px;
  line-height: 16px;
}
#connected-shuttle .sh-shift-line .sh-shift-state,
#connected-shuttle .sh-shift-line small {
  font-size: 11px;
}
#connected-shuttle .sh-shift-warning {
  display: block;
  font-size: 10px;
  line-height: 14px;
  color: #805807;
}
#connected-shuttle .sh-shift-card summary:focus-visible {
  outline: 2px solid #3451dc;
  outline-offset: 4px;
}
#connected-shuttle .sh-shift-details {
  border-top: 1px solid #bed9cc;
  margin-top: 0;
  padding: 10px;
  overflow-wrap: anywhere;
}
#connected-shuttle .sh-shift-details ol {
  padding-left: 20px;
}
#connected-shuttle .sh-shift-details small {
  display: block;
}
#connected-shuttle .sh-route-details {
  font-size: 0.85rem;
  margin-top: 8px;
}
#connected-shuttle .sh-route-details summary {
  cursor: pointer;
  min-height: 32px;
}
#connected-shuttle .sh-address {
  flex-wrap: wrap;
}
#connected-shuttle .sh-pickup-eta {
  font-weight: 600;
  color: #345c85;
}
#connected-shuttle [data-direction] {
  max-width: 180px;
}
#connected-shuttle .sh-tabs {
  flex-wrap: wrap;
}
#connected-shuttle .sh-trip .sh-address {
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  text-align: left;
}
#connected-shuttle .sh-trip .sh-address > span {
  display: block;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: inherit;
  font-weight: 400;
}
#connected-shuttle .sh-trip .sh-address > span:first-child {
  font-size: 11px;
  color: #64748b;
}
#connected-shuttle .sh-trip .sh-route-cell {
  align-self: center;
}
#connected-shuttle .sh-trip .sh-route-cell .sh-trip-meta {
  justify-content: flex-start;
  text-align: left;
}
#connected-shuttle .sh-expand-hint {
  font-size: 11px;
  color: #52617a;
}
#connected-shuttle .sh-shift-card[open] .sh-expand-hint {
  display: none;
}
#connected-shuttle [data-events] pre {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Staff dispatch cards: stable top anchors and one cohesive action row. */
#connected-shuttle .sh-queue {
  container-type: inline-size;
}
#connected-shuttle .sh-trip,
#connected-shuttle .sh-dispatch .sh-trip {
  align-items: start;
  grid-template-columns: minmax(150px, 0.85fr) minmax(170px, 1fr) minmax(
      270px,
      1.15fr
    );
}
#connected-shuttle .sh-trip > .sh-customer-cell,
#connected-shuttle .sh-trip > .sh-route-cell,
#connected-shuttle .sh-trip > .sh-action-cell {
  align-self: start;
  justify-self: stretch;
  min-width: 0;
}
#connected-shuttle .sh-trip > .sh-action-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 5px;
}
#connected-shuttle .sh-action-buttons {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}
#connected-shuttle .sh-action-buttons .sh-primary-actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
#connected-shuttle .sh-action-buttons .sh-primary-actions .btn {
  flex: 0 1 auto;
  width: auto;
  min-height: 40px;
  padding: 8px 10px;
}
#connected-shuttle .sh-action-buttons .sh-row-menu {
  flex: 0 0 40px;
  margin: 0;
}
#connected-shuttle .sh-route-details {
  margin-top: 6px;
}
#connected-shuttle .sh-route-details > summary {
  min-height: 28px;
  line-height: 28px;
  padding: 0;
  text-align: left;
}
#connected-shuttle .sh-route-details > div {
  padding: 3px 0;
}
#connected-shuttle .sh-trip-group {
  margin: 12px 4px 4px;
  font-size: 13px;
  color: #52617a;
}
#connected-shuttle .sh-retained-return {
  display: block;
  color: #805807;
  font-size: 12px;
  margin-top: 5px;
}
#connected-shuttle .sh-destructive {
  background: #b32632;
  color: white;
  border-color: #b32632;
}
#connected-shuttle .sh-cancel {
  color: #b32632;
  border-color: #d8a7ad;
}
#connected-shuttle .sh-linked-cancel-detail {
  padding: 10px;
  background: #f5f7fa;
  border-radius: 8px;
}
#connected-shuttle .sh-confirm-dialog .sh-confirm-actions {
  flex-wrap: wrap;
  gap: 8px;
}
body:has(dialog:modal) [inert] {
  pointer-events: none !important;
}
#connected-shuttle dialog::backdrop {
  background: #14233880;
}
@container (max-width: 720px) {
  #connected-shuttle .sh-trip,
  #connected-shuttle .sh-dispatch .sh-trip {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  #connected-shuttle .sh-trip > .sh-action-cell {
    grid-column: 1 / -1;
    align-items: flex-start;
    width: 100%;
  }
  #connected-shuttle .sh-action-buttons,
  #connected-shuttle .sh-action-buttons .sh-primary-actions {
    justify-content: flex-start;
  }
  #connected-shuttle .sh-trip > .sh-route-cell {
    padding: 0;
  }
}
@container (max-width: 420px) {
  #connected-shuttle .sh-trip,
  #connected-shuttle .sh-dispatch .sh-trip {
    grid-template-columns: minmax(0, 1fr);
  }
  #connected-shuttle .sh-trip > .sh-action-cell,
  #connected-shuttle .sh-trip > .sh-route-cell {
    grid-column: 1;
  }
}

/* Compact staff conversation: history scrolls, composer stays in place. */
#connected-shuttle .sh-message-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 24px));
  height: min(660px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  overflow: hidden;
  padding: 16px;
  gap: 8px;
}
#connected-shuttle .sh-message-dialog > header {
  position: static;
  flex: 0 0 auto;
  padding: 0 0 10px;
  gap: 12px;
}
#connected-shuttle .sh-message-dialog h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
}
#connected-shuttle .sh-message-dialog header p {
  font-size: 12px;
  line-height: 1.4;
  margin: 4px 0 0;
}
#connected-shuttle .sh-message-dialog .sh-messages {
  flex: 1 1 auto;
  min-height: 100px;
  max-height: none;
  overflow: auto;
  padding: 4px;
  gap: 8px;
  display: flex;
  flex-direction: column;
}
#connected-shuttle .sh-message-dialog .sh-message {
  flex: 0 0 auto;
  padding: 9px 11px;
  border: 0;
  box-shadow: none;
  font-weight: 400;
}
#connected-shuttle .sh-message-dialog .sh-message p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#connected-shuttle .sh-message-dialog .sh-message small {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}
#connected-shuttle .sh-message-dialog .sh-message-confirm {
  flex: 0 0 auto;
  font-size: 12px;
}
#connected-shuttle .sh-message-dialog .sh-message-confirm:empty {
  display: none;
}
#connected-shuttle .sh-message-dialog .sh-message-confirm p {
  margin: 2px 0;
  font-size: 12px;
}
#connected-shuttle .sh-message-dialog [data-staff-reply] {
  flex: 0 0 auto;
  border-top: 1px solid #d8e0ed;
  padding-top: 10px;
}
#connected-shuttle .sh-message-dialog textarea {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  min-height: 58px;
  padding: 8px;
  font: inherit;
  font-size: 14px;
  border: 1px solid #bbc8d9;
  border-radius: 6px;
}
#connected-shuttle
  .sh-message-dialog
  :is(input, textarea, button):focus-visible {
  outline: 2px solid #3e60b8;
  outline-offset: 2px;
  box-shadow: none;
}
#connected-shuttle .sh-action-buttons .sh-retained-actions {
  display: grid;
  gap: 6px;
}
#connected-shuttle
  .sh-retained-actions
  :is(.sh-primary-row, .sh-secondary-row) {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
}
#connected-shuttle .sh-retained-actions .sh-secondary-row .btn {
  font-size: 11px;
  padding-inline: 7px;
  white-space: nowrap;
}

/* Fleet status shares the navigation row; details open without moving the page. */
#connected-shuttle .sh-workspace-bar:has(.sh-header-fleet) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
#connected-shuttle .sh-header-fleet {
  min-width: 0;
}
#connected-shuttle .sh-header-fleet .sh-shift-summary {
  padding: 0;
  border: 0;
}
#connected-shuttle .sh-header-fleet .sh-shift-cards {
  display: flex;
  flex-wrap: nowrap;
  justify-content: safe center;
  gap: 6px;
  overflow-x: auto;
  padding: 3px;
}
#connected-shuttle .sh-header-fleet .sh-shift-card {
  flex: 0 0 260px;
  max-width: 100%;
  display: block;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #dce3ef;
  border-radius: 7px;
}
#connected-shuttle .sh-compact-identity {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 12px;
  line-height: 17px;
  white-space: nowrap;
}
#connected-shuttle .sh-compact-identity > :first-child {
  max-width: 40%;
}
#connected-shuttle .sh-compact-identity > :first-child,
#connected-shuttle .sh-compact-identity > :last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
#connected-shuttle .sh-compact-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  line-height: 16px;
  color: #52617a;
}
#connected-shuttle .sh-compact-status strong {
  color: #176545;
}
#connected-shuttle .sh-compact-status small {
  flex-shrink: 0;
  font-size: inherit;
}
#connected-shuttle .sh-shift-offline .sh-compact-status strong {
  color: #805807;
}
#connected-shuttle .sh-header-fleet .sh-shift-offline {
  border-color: #e6ca83;
  background: #fffcf4;
}
#connected-shuttle .sh-header-fleet .sh-shift-cards > p {
  font-size: 12px;
  padding: 0;
}
@media (max-width: 1200px) {
  #connected-shuttle .sh-workspace-bar:has(.sh-header-fleet) {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  #connected-shuttle .sh-header-fleet {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  #connected-shuttle .sh-header-fleet .sh-shift-cards {
    justify-content: flex-start;
  }
}
@media (max-width: 700px) {
  #connected-shuttle .sh-workspace-bar:has(.sh-header-fleet) {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  #connected-shuttle .sh-header-fleet {
    grid-row: auto;
  }
  #connected-shuttle .sh-workspace-bar > .sh-return-ops {
    justify-self: end;
  }
}

.sh-map-driver-label,
.sh-map-driver {
  background: white;
  border: 1px solid #dce3ef;
  border-radius: 5px;
  padding: 4px 7px;
  box-shadow: 0 1px 4px #17264722;
  white-space: nowrap;
  font-size: 12px;
}
.sh-map-driver {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: #172647;
}

#connected-shuttle button.sh-shift-card {
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
#connected-shuttle button.sh-shift-card:hover {
  border-color: #8197d5;
}
#connected-shuttle button.sh-shift-card:focus-visible {
  outline: 2px solid #3451dc;
  outline-offset: 2px;
}
.sh-shuttle-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid #dce3ef;
  border-radius: 10px;
  padding: 12px;
  background: white;
  color: #172647;
  box-shadow: 0 8px 30px #17264726;
  font-size: 13px;
}
.sh-shuttle-popover header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sh-shuttle-popover header button {
  border: 0;
  background: transparent;
  color: #52617a;
  font-size: 23px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.sh-shuttle-popover .sh-plan-current {
  margin: 8px 0 12px;
}
.sh-plan-scroll {
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sh-plan-scroll ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sh-plan-scroll li {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid #edf0f5;
  overflow-wrap: anywhere;
}
.sh-plan-step,
.sh-plan-scroll small {
  font-size: 12px;
  color: #52617a;
}
.sh-plan-note {
  font-size: 11px;
  color: #64748b;
  margin: 10px 0 0;
}

.sh-text-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.sh-text-controls p {
  margin: 0;
}
.sh-contact-status {
  display: block;
  font-size: 12px;
  color: var(--muted, #59677c);
  margin-top: 4px;
}

/* Keep the scheduled time beside the status, above expandable card content. */
#connected-shuttle .sh-schedule-heading {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 8px;
  max-width: 100%;
  color: #172d50;
}
#connected-shuttle .sh-schedule-heading strong {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 750;
}
#connected-shuttle .sh-schedule-heading small {
  font-size: 13px;
  color: #52617a;
}

/* Booking choices describe what will happen before staff submit. */
#connected-shuttle .sh-form label.sh-return-choice {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 2px solid #bec9ee;
  border-radius: 10px;
  background: #f3f6ff;
  cursor: pointer;
}
#connected-shuttle .sh-return-choice:has(input:checked) {
  border-color: #465ed7;
}
#connected-shuttle .sh-return-choice input {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: 1px 0 0;
  accent-color: #3651d4;
}
#connected-shuttle .sh-return-choice strong {
  display: block;
  color: #253455;
  font-size: 15px;
}
#connected-shuttle .sh-return-choice small {
  display: block;
  margin-top: 5px;
  color: #475569;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
#connected-shuttle .sh-book-choices {
  display: grid;
  gap: 12px;
  width: 100%;
}
#connected-shuttle .sh-book-choices.has-pickup-choices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#connected-shuttle .has-pickup-choices .sh-book-choice {
  padding: 12px;
  background: #fff;
  border: 1px solid #d7deeb;
  border-radius: 10px;
}
#connected-shuttle .sh-book-choice .btn {
  width: 100%;
  min-height: 44px;
  white-space: normal;
  line-height: 1.4;
}
#connected-shuttle .sh-book-choice p {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}
@media (max-width: 650px) {
  #connected-shuttle .sh-book-choices.has-pickup-choices {
    grid-template-columns: minmax(0, 1fr);
  }
}
