:root {
  --canvas: #f7f9fc;
  --surface: #ffffff;
  --text: #101828;
  --muted: #5f697b;
  --line: #dbe3ee;
  --line-strong: #cbd7e6;
  --quiet: #f2f5fa;
  --accent: #155eef;
  --accent-hover: #0f4fd1;
  --accent-soft: #edf3ff;
  --green: #159447;
  --amber: #c66500;
  --red: #dc2f25;
  --danger: #a11a12;
  --danger-line: #c92a1d;
  --surface-subtle: #fbfcfe;
  --placeholder: #8a96a8;
  --line-hover: #aebdd0;
  --message-line: #cddcff;
  --accent-icon-filter: brightness(0) saturate(100%) invert(31%) sepia(100%) saturate(3533%) hue-rotate(219deg) brightness(94%) contrast(100%);
  --radius: 8px;
  --content-gutter: 24px;
  --control-height: 50px;
  --panel-shadow: 0 1px 2px rgb(16 24 40 / 3%);
  --floating-shadow: 0 18px 44px rgb(15 23 42 / 14%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: var(--accent);
}

.skip-link {
  position: fixed;
  z-index: 20;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  padding: 10px 14px;
  background: var(--text);
  color: #fff;
  border-radius: var(--radius);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  min-height: 100vh;
  direction: rtl;
}

.shell aside {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(120px, 200px) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.shell aside nav { grid-column: 2; grid-row: 1; }
.shell aside .company-identity { grid-column: 3; grid-row: 1; }
.shell aside > form { grid-column: 4; grid-row: 1; }

#dashboard-page { scroll-margin-top: 80px; }

.shell aside h1,
.login h1 {
  direction: ltr;
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.shell aside h1 b,
.login h1 b {
  color: var(--accent);
}

.shell aside h1 { font-size: 20px; white-space: nowrap; }
.shell aside .pilot-wordmark { display: block; width: 180px; height: 32px; }

.company-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  font-size: 12px;
}

.company-identity > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-identity span,
header p,
.section-heading p,
.device-list span,
.device-list small,
.plain-list span,
.driver-profile span,
.driver-profile small {
  color: var(--muted);
}

aside nav {
  display: flex;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}

aside a,
aside .link {
  flex-shrink: 0;
  min-height: 40px;
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  text-align: right;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

aside a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius);
  font-weight: 700;
}

.shell aside > form {
  margin: 0;
}

aside a:hover,
aside .link:hover {
  background: var(--quiet);
  border-radius: var(--radius);
}

aside a.active:hover {
  background: var(--accent-soft);
}

main {
  min-width: 0;
  padding: 16px var(--content-gutter) 36px;
  background: var(--canvas);
}

header {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

h2 {
  margin: 0;
  font-size: clamp(27px, 2.3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3,
h4 {
  line-height: 1.3;
}

header p,
.section-heading p {
  margin: 5px 0 0;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.report-date-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-date-form label {
  margin: 0;
}

.report-date-form input {
  min-width: 190px;
}

.search-field {
  position: relative;
  display: block;
}

.search-field img {
  position: absolute;
  inset-inline-start: 13px;
  top: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-hover);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.search-field input {
  min-width: 330px;
  padding-inline-start: 42px;
}

.button,
button {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.button:hover,
button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.outline {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
}

.outline:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

button.danger {
  background: var(--surface);
  color: var(--danger);
  border-color: var(--danger-line);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.outline .icon {
  filter: var(--accent-icon-filter);
}

aside a.active .icon {
  filter: var(--accent-icon-filter);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 26px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.metrics span {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.metrics span:last-child {
  border-left: 0;
}

.metrics b {
  font-size: 22px;
}

.metrics .waiting b {
  color: var(--red);
}

.metrics .assigned b {
  color: var(--accent);
}

.metrics .in-progress b {
  color: var(--amber);
}

.metrics .completed b,
.metrics .drivers b {
  color: var(--green);
}

.overview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.overview-actions {
  display: grid;
  gap: 6px;
  width: 170px;
  flex-shrink: 0;
}

.overview-actions > .button {
  flex-shrink: 0;
  padding-inline: 12px;
  white-space: nowrap;
}

.metrics.overview-metrics {
  flex: 1;
  min-width: 0;
  grid-template-columns: repeat(5, minmax(124px, 1fr));
  gap: 0;
  padding: 10px 0;
  overflow-x: auto;
}

.metrics.overview-metrics > span,
.metrics.overview-metrics > a {
  min-height: 0;
  display: grid;
  gap: 4px;
  padding: 0 8px;
  border-inline-end: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
  text-decoration: none;
}

.metrics.overview-metrics > :last-child {
  border-inline-end: 0;
}

.overview-metrics > a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.overview-metrics b {
  font-size: 20px;
  line-height: 24px;
}

.compact-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 16px;
  padding: 0;
}

.compact-map > [data-pilot-map-insertion] { min-height: 390px; }

.compact-map-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.compact-map h3,
.compact-map p {
  margin: 0;
}

.compact-map p {
  color: var(--muted);
}

.compact-live-map,
.compact-map-fallback {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.compact-map-fallback {
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 20px;
  background: var(--quiet);
  text-align: center;
}

.compact-driver-list {
  position: absolute;
  grid-area: 1 / 1;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: min(320px, calc(100% - 76px));
  display: grid;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius) 0 0 var(--radius);
}

.map-driver-picker {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin: 0;
}

.compact-driver-list[hidden] { display: none; }

.compact-driver-list article { position: relative; }

.compact-driver-list .driver-details-close {
  position: absolute;
  top: 2px;
  left: 2px;
  min-height: 36px;
  width: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
}

.compact-driver-list article {
  display: grid;
  align-content: start;
  min-height: 100%;
  gap: 4px;
  padding: 12px;
  padding-inline-end: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.compact-map > .live-poll-status { padding: 4px 12px; }
.compact-map > .live-poll-status:empty { display: none; }

.compact-driver-list small,
.compact-map-fallback span,
.live-poll-status {
  color: var(--muted);
}

.live-poll-status {
  grid-column: 1 / -1;
  min-height: 1.3em;
}

.panel {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
  direction: rtl;
}

.work {
  min-height: calc(100vh - 280px);
  display: grid;
  grid-template-columns: minmax(340px, 46fr) minmax(0, 54fr);
  gap: 16px;
  margin-top: 20px;
  direction: ltr;
}

.panel nav {
  display: flex;
  gap: 22px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.panel nav a {
  min-height: var(--control-height);
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.panel nav a.current {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  font-weight: 700;
}

.job {
  min-height: 92px;
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr);
  gap: 5px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  transition: background 120ms ease;
}

.job:hover {
  background: var(--quiet);
}

.job small {
  grid-column: 2;
  color: var(--muted);
}

.job.selected {
  background: var(--accent-soft);
  border-right: 3px solid var(--accent);
}

.detail {
  padding: 22px;
  overflow-wrap: anywhere;
}

.detail details {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.detail summary {
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.detail h3 {
  margin-top: 0;
}

.detail form {
  margin: 12px 0;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.event {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
  margin: 12px 0;
}

.latin {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.message {
  padding: 10px 12px;
  border: 1px solid var(--message-line);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.dashboard-toast {
  position: fixed;
  z-index: 1200;
  top: 72px;
  left: 50%;
  width: max-content;
  min-width: min(300px, calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
  box-sizing: border-box;
  margin: 0;
  padding: 12px 16px;
  color: #17436f;
  background: #f4f8ff;
  border-color: #b8cff5;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(20, 44, 80, .16);
  text-align: center;
  pointer-events: none;
  animation: dashboard-toast-in 220ms cubic-bezier(.2, .8, .2, 1) both;
}

.dashboard-toast.success {
  color: #176b4b;
  background: #f0faf5;
  border-color: #a9dec8;
}

.dashboard-toast.error {
  color: #a4261d;
  background: #fff5f4;
  border-color: #f2b8b3;
}

.dashboard-toast.warning {
  color: #8a4b08;
  background: #fff9ed;
  border-color: #f2cf8f;
}

.dashboard-toast.is-leaving {
  animation: dashboard-toast-out 180ms ease-in both;
}

@keyframes dashboard-toast-in {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes dashboard-toast-out {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -10px); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-toast { animation: none; transform: translateX(-50%); }
  .dashboard-toast.is-leaving { opacity: 0; }
}

.simple,
.login {
  max-width: 480px;
  margin: 80px auto;
}

.simple form,
.login form {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--panel-shadow);
}

.link {
  color: var(--text) !important;
}

.login {
  padding: 24px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 22px;
}

.settings-card {
  padding: 22px;
}

.plan-card,
.devices-card {
  grid-column: 1 / -1;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h3,
.settings-card h3 {
  margin-top: 0;
}

.plan-code {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}

.usage-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.usage-list div,
.device-list div,
.plain-list li {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.usage-list dt {
  color: var(--muted);
}

.usage-list dd {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.plain-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.eyebrow {
  color: var(--accent);
  font-weight: 700;
}

.pagination {
  overflow-x: auto;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(21 94 239 / 30%);
  outline-offset: 2px;
}

.form-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px;
}

.form-intro {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.form-intro h3,
.form-intro p {
  margin: 0;
}

.form-intro p {
  margin-top: 6px;
  color: var(--muted);
}

.form-panel form {
  max-width: 680px;
  margin-top: 20px;
}

.coordinate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.issued-confirmation {
  max-width: 720px;
  margin: 10vh auto 0;
  padding: 34px;
}

.issued-confirmation h2,
.issued-confirmation .eyebrow {
  margin-top: 0;
}

.issued-link {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--quiet);
  overflow-wrap: anywhere;
}

.errorlist {
  margin: 4px 0 0;
  padding: 0;
  color: var(--red);
  list-style: none;
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 0;
  }

  .metrics span {
    border-left: 0;
  }

  .work {
    grid-template-columns: minmax(280px, 40fr) minmax(0, 60fr);
  }

  .usage-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  #dashboard-page { scroll-margin-top: 124px; }

  .shell aside {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 14px;
  }

  .shell aside h1 {
    font-size: 18px;
  }

  .shell aside .company-identity {
    grid-column: 2;
  }

  .shell aside > form {
    grid-column: 3;
  }

  .shell aside nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 700px) {
  .compact-driver-list { font-size: 13px; }

  .shell main {
    padding: 12px 14px 24px;
  }

  header {
    min-height: 0;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px 0;
  }

  h2 {
    font-size: 26px;
  }

  .head-actions {
    width: 100%;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .report-date-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .report-date-form label {
    grid-column: 1 / -1;
  }

  .report-date-form input {
    min-width: 0;
  }

  .head-actions form,
  .head-actions input,
  .head-actions .button,
  .search-field,
  .search-field input,
  .actions form,
  .actions button,
  .detail form button {
    width: 100%;
  }

  .search-field input {
    min-width: 0;
  }

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

  .metrics span {
    min-height: 68px;
    padding: 0 8px;
  }

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

  .compact-map-heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-map {
    grid-template-columns: 1fr;
  }

  .compact-map-heading,
  .live-poll-status {
    grid-column: auto;
  }

  .work {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .panel {
    min-height: auto;
  }

  .panel nav {
    gap: 12px;
  }

  .panel nav a {
    padding: 0 5px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .job {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .plan-card,
  .devices-card {
    grid-column: auto;
  }

  .coordinate-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-panel,
  .issued-confirmation {
    margin-top: 16px;
    padding: 20px;
  }
}

/* Explicit display styles must respect the hidden attribute. */
.button[hidden],
button[hidden],
#pilot-map-park[hidden],
[data-live-update-notice][hidden] { display: none; }
[data-live-update-notice]{position:fixed;left:50%;bottom:16px;z-index:120;width:auto;max-width:calc(100vw - 32px);min-height:38px;transform:translateX(-50%);padding:8px 14px;border:1px solid #b8cdf8;border-radius:9px;background:#fff;color:#1557ff;box-shadow:0 8px 24px #10274a22;font-size:12px;white-space:nowrap;}
[data-live-update-notice]:disabled{opacity:1;background:#f6f8fc;color:#65758d;cursor:default;white-space:normal;}
[data-live-connection] { color: var(--muted); font-size: 0.85rem; }
#dashboard-page[data-active-page="settings"]:focus { outline: none; }

/* Compact home workspace and centered account navigation. */
.shell aside { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.shell aside h1 { grid-column: 1; grid-row: 1; justify-self: start; }
.shell aside nav { grid-column: 2; grid-row: 1; justify-self: center; }
.shell aside .company-menu { grid-column: 3; grid-row: 1; justify-self: end; position: relative; min-width: 0; max-width: 220px; }
.company-menu summary { cursor: pointer; list-style: none; }
.company-menu summary::-webkit-details-marker { display: none; }
.company-menu summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-menu > form { position: absolute; left: 0; top: calc(100% + 10px); min-width: 170px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--floating-shadow); }
body:has(#dashboard-page[data-active-page="today"]) { overflow: hidden; }
.shell:has(#dashboard-page[data-active-page="today"]) { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
.shell:has(#dashboard-page[data-active-page="today"]) > main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px var(--content-gutter); }
main > [hx-history-elt]:has(#dashboard-page[data-active-page="today"]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#dashboard-page[data-active-page="today"] { flex: 1; min-height: 0; display: flex; flex-direction: column; scroll-margin-top: 0; }
.overview-toolbar { justify-content: space-between; gap: 12px; flex-shrink: 0; }
.overview-actions { display: flex; align-items: center; width: auto; gap: 8px; }
.overview-actions .map-driver-picker { width: 160px; }
.metrics.overview-metrics { flex: 0 1 auto; width: max-content; grid-template-columns: repeat(5, minmax(110px, 1fr)); padding: 6px 0; margin: 0; }
#dashboard-page[data-active-page="today"] .compact-map { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; margin-top: 12px; }
#dashboard-page[data-active-page="today"] [data-pilot-map-insertion] { min-height: 0; height: 100%; }
#dashboard-page[data-active-page="today"] .live-map,
#dashboard-page[data-active-page="today"] .map-fallback { height: 100%; min-height: 0; }
@media (max-width: 900px) {
  .shell aside { grid-template-columns: 1fr 1fr; gap: 6px; }
  .shell aside .company-menu { grid-column: 2; grid-row: 1; max-width: 180px; }
  .shell aside nav { grid-column: 1 / -1; grid-row: 2; max-width: 100%; overflow-x: auto; }
  .overview-toolbar { flex-wrap: wrap; gap: 8px; }
  .metrics.overview-metrics { width: 100%; }
  .overview-actions { width: 100%; }
  .overview-actions .map-driver-picker { flex: 1; }
}

.overview-actions .map-order-picker { width: 170px; min-width: 0; min-height: 36px; margin: 0; }
.selection-tabs { display: flex; gap: 6px; margin-top: 26px; }
.selection-tabs button { min-height: 32px; padding: 4px 12px; }
.selection-tabs button[aria-pressed="false"] { background: var(--quiet); color: var(--text); }
.order-detail p { margin-block: 8px; overflow-wrap: anywhere; }
@media(max-width:900px) { .overview-actions { flex-wrap: wrap; } .overview-actions .map-order-picker { flex: 1; } }

.search-picker { position: relative; width: 180px; min-width: 0; }
.search-picker summary { list-style: none; cursor: pointer; display: grid; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 10px; background: var(--surface); }
.search-picker summary > span { font-size: 11px; color: var(--muted); }
.search-picker summary > strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-options { position: absolute; z-index: 12; top: calc(100% + 4px); left: 0; width: min(320px, 85vw); padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--floating-shadow); }
.overview-actions .picker-options select { width: 100%; height: 170px; margin-top: 6px; }
.picker-options input { width: 100%; min-width: 0; min-height: 36px; }
.selection-context { display: grid; gap: 4px; padding-top: 22px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.selection-tabs { margin-top: 4px; }
.follow-driver { min-height: 36px; margin-top: 12px; }
.follow-driver[aria-pressed="false"] { color: var(--text); background: var(--quiet); }
@media(max-width:600px) {
 .overview-actions .search-picker { flex: 1; }
 .picker-options { width: min(280px, 80vw); }
 #dashboard-page .compact-driver-list { grid-area: 1 / 1; top: auto; bottom: 24px; left: 0; width: 100%; height: 46%; border-radius: 12px 12px 0 0; }
}
@media(min-width:601px) {
 #dashboard-page .compact-map:has(.compact-driver-list:not([hidden])) [data-pilot-map-insertion] { margin-left: 0; width: 100%; }
}

.demo-label { font-size: 11px; color: #854d0e; background: #fef3c7; padding: 4px 8px; border-radius: 6px; max-width: 130px; }

.driver-marker-label { transform: translateY(24px); background: #fff; padding: 2px 6px; border: 1px solid #dbe3ee; border-radius: 4px; box-shadow: 0 1px 3px #0002; }

.overview-actions > .button { order: 10; }
.metrics.overview-metrics > span,
.metrics.overview-metrics > a { text-align: center; justify-items: center; }

.map-appearance { position: absolute; z-index: 2; top: 12px; right: 12px; font-size: 13px; }
.map-appearance summary { cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--panel-shadow); }
.map-appearance > div { position: absolute; right: 0; top: calc(100% + 4px); min-width: 180px; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--floating-shadow); }
.map-appearance label { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.map-appearance input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; }

.map-appearance > div { min-width: 275px; max-height: calc(100dvh - 230px); overflow-y: auto; }
.map-appearance select { width: 125px; min-height: 32px; margin: 0; padding: 4px; }
.map-appearance button { min-height: 34px; padding: 6px 10px; }
.map-filter-notice { position: absolute; top: 12px; right: 205px; z-index: 2; padding: 6px 10px; background: #fff4d6; color: #854d0e; border-radius: 6px; font-size: 12px; }
.map-filter-notice[hidden] { display: none; }

.selected-place { padding: 10px; border: 2px solid var(--accent); border-radius: 6px; color: var(--text); background: var(--accent-soft); }

#pilot-live-map.graphite-vehicles img[src*="vehicle-markers-c"] { filter: saturate(0.15) brightness(1.85) drop-shadow(0 0 1px #ffffff); }

/* Keep toolbar choices legible without stacking open panels. */
.search-picker[open] { z-index: 20; }
.search-picker[open] summary { border-color: #155eef; background: #f5f8ff; }
.overview-actions .picker-options { padding: 12px; width: 340px; }
.overview-actions .picker-options select { height: 230px; border: 0; background: white; padding: 4px; }
.overview-actions .picker-options option { padding: 10px 8px; border-radius: 4px; }

.overview-actions .search-picker { width: 225px; flex: 0 0 225px; }
.overview-actions .picker-options { width: 100%; box-sizing: border-box; }

/* Desktop operations: counters left, selected details right. */
#dashboard-page[data-active-page="today"] { display: grid; grid-template-columns: 190px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 12px; }
#dashboard-page[data-active-page="today"] .overview-toolbar { display: contents; }
#dashboard-page[data-active-page="today"] .overview-actions { grid-column: 1 / -1; grid-row: 1; justify-content: flex-end; }
#dashboard-page[data-active-page="today"] .overview-metrics { grid-column: 1; grid-row: 2; align-self: start; width: 100%; display: flex; flex-direction: column; padding: 4px 12px; }
#dashboard-page[data-active-page="today"] .overview-metrics > span { display: flex; align-items: center; justify-content: space-between; text-align: right; gap: 8px; width: 100%; min-width: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); }
#dashboard-page[data-active-page="today"] .overview-metrics > span:last-child { border-bottom: 0; }
#dashboard-page[data-active-page="today"] .compact-map { grid-column: 2; grid-row: 2; margin-top: 0; }
#dashboard-page[data-active-page="today"] .compact-driver-list { left: auto; right: 0; width: 320px; border-radius: 0 var(--radius) var(--radius) 0; }
#dashboard-page[data-active-page="today"] .compact-map:has(.compact-driver-list:not([hidden])) [data-pilot-map-insertion] { margin: 0; width: 100%; }
#dashboard-page[data-active-page="today"] .compact-map:has(.compact-driver-list:not([hidden])) .map-appearance { right: 332px; }

/* Compact counters outside; selected details overlay the full map. */
#dashboard-page[data-active-page="today"] { grid-template-columns: 150px minmax(0, 1fr); }
#dashboard-page[data-active-page="today"] .overview-metrics { grid-column: 1; grid-row: 2; width: 150px; margin: 0; padding: 2px 8px; }
#dashboard-page[data-active-page="today"] .overview-metrics > span { padding: 9px 0; font-size: 11px; }
#dashboard-page[data-active-page="today"] .overview-metrics b { font-size: 16px; }
#dashboard-page[data-active-page="today"] .compact-map:has(.compact-driver-list:not([hidden])) [data-pilot-map-insertion] { margin: 0; width: 100%; }

#dashboard-page[data-active-page="today"] .overview-actions { justify-content: flex-start; }
#dashboard-page[data-active-page="today"] .overview-actions > .button { margin-inline-start: auto; }

#dashboard-page[data-active-page="today"] .overview-actions [data-picker-kind="group"] { width: 210px; flex-shrink: 0; }
#dashboard-page[data-active-page="today"] .overview-actions [data-picker-kind="group"] summary { min-height: 44px; padding: 8px 12px; }

.group-selector { margin: 0; flex: 0 0 auto; max-width: 100%; font-size: 13px; }
.group-selector label { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.group-selector select { min-height: 44px; width: 170px; max-width: 100%; margin: 0; }
/* Keep the home filter with the account controls without covering either. */
@media (min-width: 1200px) {
  .shell:has(.group-selector) aside nav { max-width: 100%; }
  .shell:has(.group-selector) aside .company-menu { max-width: 145px; }
  .shell:has(.group-selector) aside .company-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .group-selector { position: fixed; top: 8px; left: 184px; width: 170px; z-index: 11; }
  .group-selector label { font-size: 0; gap: 0; }
  .group-selector select { min-height: 40px; font-size: 13px; }
}
@media (min-width: 1200px) and (max-width: 1400px) {
  .shell aside nav a { padding-inline: 6px; gap: 4px; }
}
#shift-requests { position: relative; }
#shift-requests .shift-inbox-trigger { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; list-style: none; white-space: nowrap; font-size: 13px; }
.shift-inbox-trigger::-webkit-details-marker { display: none; }
#shift-requests .shift-inbox-trigger.has-pending { background: #fee2e2; border-color: #fca5a5; }
.shift-inbox-trigger svg { color: #155eef; flex-shrink: 0; }
.shift-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 12px; background: #edf3ff; color: #155eef; font-weight: 700; }
#shift-requests details[open] > summary { border-color: #155eef; }
.shift-inbox-content { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-height: 400px; overflow: auto; padding: 16px; background: var(--surface); z-index: 40; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--floating-shadow); }
.shift-inbox-content h3 { font-size: 15px; margin: 0 0 12px; }
.shift-inbox-content article { padding: 12px 0; border-top: 1px solid var(--line); }
.shift-inbox-content form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.shift-inbox-content input { width: 100%; }
.shift-empty { text-align: center; padding: 24px 8px; margin: 0; font-size: 14px; }
.shift-empty small { display: block; color: var(--muted); margin-top: 8px; font-size: 12px; }

.map-appearance > .map-settings-panel { width: 350px; min-width: 0; padding: 16px; gap: 16px; max-height: min(580px, calc(100dvh - 220px)); }
.map-settings-heading { display: flex; justify-content: space-between; align-items: center; }
.map-settings-heading button { background: transparent; color: var(--text); border: 0; min-width: 32px; font-size: 22px; }
.map-settings-panel fieldset { margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.map-settings-panel legend { padding: 0 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.map-settings-panel .map-setting-row { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0 0 12px; white-space: normal; }
.map-settings-panel select { width: 100%; min-height: 38px; padding: 6px 10px; }
.map-settings-panel .map-toggle-row { justify-content: space-between; min-height: 36px; white-space: normal; }
.map-settings-panel input[type="checkbox"] { accent-color: #155eef; width: 18px; height: 18px; }
.compact-map .map-setting-hint { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.map-settings-panel [hidden] { display: none; }

.map-appearance > .map-settings-panel { width: 400px; padding: 20px; gap: 18px; border-radius: 12px; }
.map-settings-panel .map-settings-heading { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.map-settings-panel .map-settings-heading button { background: transparent; color: #172b4d; box-shadow: none; }
.map-settings-panel fieldset { border: 0; padding: 0; }
.map-settings-panel legend { color: #172b4d; font-size: 14px; margin-bottom: 12px; }
.map-choice-block { margin-bottom: 14px; }
.map-choice-title { display: block; font-size: 12px; margin-bottom: 8px; }
.map-segments, .map-swatches { display: flex; width: 100%; }
.map-settings-panel .map-segments label, .map-settings-panel .map-swatches label { position: relative; flex: 1; min-width: 0; display: block; }
.map-segments input, .map-swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.map-segments label > span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 6px 3px; border: 1px solid var(--line); font-size: 12px; cursor: pointer; }
.map-segments label:first-child > span { border-radius: 7px 0 0 7px; border-radius: 0 7px 7px 0; }
.map-segments label:last-child > span { border-radius: 7px 0 0 7px; }
.map-segments input:checked + span { background: #155eef; border-color: #155eef; color: white; }
.map-swatches { border: 0; padding: 4px 0; gap: 8px; }
.map-swatches label { position: relative; flex: 1; min-width: 0; }
.map-swatches label > span { display: grid; justify-items: center; gap: 8px; padding: 2px 0; font-size: 11px; cursor: pointer; white-space: nowrap; }
.map-swatches .swatch { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 5px; border: 1px solid #d6dfeb; background-image: url("map-style-previews.af47f4f50d3d.png"); background-size: 500% 100%; background-repeat: no-repeat; }
.swatch-google { background-position: 0% 50%; }
.swatch-slate { background-position: 25% 50%; }
.swatch-graphite { background-position: 50% 50%; }
.swatch-blue-gray { background-position: 75% 50%; }
.swatch-satellite { background-position: 100% 50%; }
.map-swatches input:checked + span .swatch { outline: 2px solid #155eef; outline-offset: 3px; }
.map-segments input:focus-visible + span, .map-swatches input:focus-visible + span { outline: 2px solid #155eef; outline-offset: 2px; }
.map-settings-panel .map-toggle-row { min-height: 44px; border-bottom: 1px solid #eef1f5; }
.map-settings-panel input[type="checkbox"] { appearance: none; width: 36px; height: 21px; border-radius: 14px; background: #c9d1dd; border: 0; cursor: pointer; position: relative; flex-shrink: 0; }
.map-settings-panel input[type="checkbox"]:checked { background: #155eef; }
.map-settings-panel input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: white; transition: transform .12s; }
.map-settings-panel input[type="checkbox"]:checked::after { transform: translateX(15px); }
.map-settings-panel [data-map-fit] { width: 100%; background: #155eef; color: white; border: 0; min-height: 40px; }

.map-settings-panel .map-section-title { color: #172b4d; font-size: 14px; font-weight: 600; margin: 16px 0 12px; }

@media (max-width: 600px) {
  #dashboard-page[data-active-page="today"] .compact-driver-list {
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 12px 12px 0 0;
    overflow-wrap: anywhere;
  }
  #dashboard-page[data-active-page="today"] .compact-map:has(.compact-driver-list:not([hidden])) .map-appearance {
    right: 12px;
  }
  .map-appearance > .map-settings-panel {
    position: fixed;
    top: 110px;
    right: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 124px);
    overflow: auto;
  }
}

/* Shift requests: fixed heading and a complete scrollable inbox. */
#shift-requests .shift-inbox-content { width: 255px; max-width: calc(100vw - 40px); max-height: none; overflow: hidden; padding: 0; border-radius: 14px; color: #142544; }
.shift-inbox-header { min-height: 0; display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; border-bottom: 1px solid var(--line); }
.shift-inbox-header h3 { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 0; }
.shift-inbox-header p { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
#shift-requests .shift-close { background: transparent; border: 0; color: #142544; padding: 0; width: 32px; min-height: 32px; font-size: 26px; line-height: 1; }
.shift-request-list { max-height: min(460px, calc(100vh - 240px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cbd3df transparent; padding: 0 16px; }
.shift-inbox-content .shift-request-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 142px; padding: 22px 0; border-top: 0; border-bottom: 1px solid var(--line); }
.shift-request-row:last-child { border-bottom: 0; }
.shift-request-info { display: grid; gap: 5px; text-align: right; }
.shift-request-info strong { font-size: 17px; line-height: 1.5; }
.shift-inbox-header small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.shift-capacity-error { margin: 0; padding: 10px 16px; background: #fff4e5; color: #8a4b00; font-size: 12px; }
.shift-reserved { color: #137a44; font-size: 12px !important; }
.shift-request-branch { font-size: 14px; }
.shift-request-info time, .shift-request-age { font-size: 13px; color: var(--muted); }
.shift-request-info time { margin-top: 4px; }
.shift-demo-actions { display: flex; gap: 8px; }
#shift-requests .shift-approve, #shift-requests .shift-reject { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 66px; min-height: 44px; padding: 8px 12px; border-radius: 7px; font-size: 14px; }
#shift-requests .shift-approve { background: #155eef; border: 1px solid #155eef; color: white; }
#shift-requests .shift-reject { background: white; border: 1px solid #d92d20; color: #b42318; }
.shift-inbox-content .shift-request-row form { grid-column: 1 / -1; margin: 0; }

#shift-requests .shift-inbox-trigger { gap: 12px; font-size: 15px; color: #102347; }
.shift-bell { position: relative; display: inline-flex; align-items: center; margin-inline-start: 6px; }
#shift-requests .shift-bell svg { width: 30px; height: 30px; color: #102347; }
#shift-requests .shift-bell .shift-count { position: absolute; top: -7px; right: -9px; min-width: 20px; height: 20px; border: 2px solid white; border-radius: 50%; background: #155eef; color: white; font-size: 11px; }
.shift-inbox-header > div { flex: 1; }
.shift-inbox-header h3 .shift-count { min-width: 36px; height: 28px; font-size: 16px; }
.shift-inbox-header p { margin-top: 14px; font-size: 13px; }

.shift-inbox-content .shift-request-row { grid-template-columns: 1fr; gap: 12px; min-height: 0; padding: 16px 0; }
.shift-request-identity, .shift-request-timing { white-space: nowrap; }
.shift-request-info strong { font-size: 14px; }
.shift-request-branch { font-size: 12px; }
.shift-request-timing, .shift-request-info time, .shift-request-age { font-size: 12px; color: var(--muted); }
.shift-demo-actions { justify-content: flex-end; }
.shift-inbox-header h3 { font-size: 17px; }

/* Approved B: acceptance is primary; rejection expands only when needed. */
#shift-requests .shift-demo-actions, #shift-requests .shift-request-row form { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
#shift-requests .shift-approve { width: 100%; min-height: 36px; border-radius: 5px; padding: 6px 12px; }
#shift-requests .shift-reject { align-self: flex-end; width: fit-content; min-width: 0; min-height: 28px; padding: 2px 0; border: 0; border-radius: 0; background: transparent; color: #ad4055; font-size: 12px; font-weight: 400; list-style: none; cursor: pointer; }
#shift-requests .shift-reject::-webkit-details-marker { display: none; }
#shift-requests .shift-reject:hover { text-decoration: underline; }
.shift-rejection { display: flex; text-align: left; }
.shift-rejection > summary { margin-right: auto; }
.shift-rejection-fields { display: grid; gap: 8px; padding-top: 8px; text-align: right; }
#shift-requests .shift-reject-confirm { background: #b42318; border-color: #b42318; min-height: 36px; font-size: 13px; }
.shift-inbox-header > div { text-align: right; }
.shift-inbox-header h3 { justify-content: flex-start; }

#shift-requests .shift-demo-actions, #shift-requests .shift-request-row form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 14px; }
#shift-requests .shift-reject { align-self: center; min-height: 36px; white-space: nowrap; }
.shift-rejection { display: block; }
.shift-rejection[open] { grid-column: 1 / -1; }
.shift-rejection[open] > summary { width: fit-content; }

/* Approved summary A: one quiet panel, navy counts and clear section spacing. */
#dashboard-page[data-active-page="today"] .overview-metrics { background: #fff; padding: 8px 10px; border: 1px solid #d7dfeb; border-radius: 8px; box-shadow: 0 2px 5px rgb(16 35 71 / 5%); }
#dashboard-page[data-active-page="today"] .overview-metrics > strong { font-size: 14px; line-height: 1.6; text-align: right; padding: 12px 0 8px; color: #102347; }
#dashboard-page[data-active-page="today"] .overview-metrics > span { padding: 12px 0; border-bottom-color: #e3e8ef; color: #102347; }
#dashboard-page[data-active-page="today"] .overview-metrics b { color: #102347; font-size: 17px; font-variant-numeric: tabular-nums; }
#dashboard-page[data-active-page="today"] .overview-metrics > span:has(+ strong) { padding-bottom: 18px; margin-bottom: 6px; }
#dashboard-page[data-active-page="today"] .overview-metrics > .driver-workload { margin-inline-start: 0; width: 100%; }

/* A1: readable Arabic labels with restrained icons on the RTL leading edge. */
#dashboard-page[data-active-page="today"] { grid-template-columns: 190px minmax(0, 1fr); }
#dashboard-page[data-active-page="today"] .overview-metrics { width: 190px; }
#dashboard-page[data-active-page="today"] .overview-metrics > strong { font-size: 16px; text-align: center; }
#dashboard-page[data-active-page="today"] .overview-metrics > span { display: grid; grid-template-columns: 18px minmax(0, 1fr) 22px; gap: 7px; justify-items: start; text-align: right; font-size: 13px; padding: 11px 0; }
#dashboard-page[data-active-page="today"] .overview-metrics b { justify-self: end; font-size: 18px; }
.summary-icon { flex-shrink: 0; color: #365c95; }
.summary-icon-clock { color: #bd7100; }
.summary-icon-truck { color: #155eef; }
.summary-icon-duty { color: #16849a; }
.summary-icon-success { color: #298044; }
.summary-icon-warning { color: #c83748; }
.summary-icon-off, .summary-icon-empty, .summary-icon-work, .summary-icon-cancel { color: #667085; }
#dashboard-page[data-active-page="today"] .overview-metrics .summary-icon { color: #526b91; }
#dashboard-page[data-active-page="today"] .overview-metrics .return-required .summary-icon { color: #d92d20; }

/* Selected restrained rail: one neutral icon tone, with red reserved for returns. */
#dashboard-page[data-active-page="today"] .overview-metrics .summary-icon { color: #526b91; }
#dashboard-page[data-active-page="today"] .overview-metrics .return-required .summary-icon { color: #d92d20; }

/* Operational summary filters retain RTL icon, label, count alignment. */
#dashboard-page .overview-metrics > button { display:grid; grid-template-columns:18px minmax(0,1fr) 22px; gap:7px; align-items:center; width:100%; padding:11px 0; padding-inline:8px; border:0; border-bottom:1px solid #e2e8f0; border-radius:0; background:transparent; color:#10274a; text-align:right; font-size:13px; font-weight:400; cursor:pointer; }
#dashboard-page .overview-metrics > button b {font-size:18px; justify-self:end; color:#10274a;}
#dashboard-page .overview-metrics > button:hover {background:#f0f5ff;}
#dashboard-page .overview-metrics > button[aria-pressed="true"] {background:#eaf1ff; box-shadow:inset -3px 0 #2463eb;}
#dashboard-page .overview-metrics > button:focus-visible, .overview-result:focus-visible {outline:2px solid #2463eb; outline-offset:2px;}
#dashboard-page .overview-metrics > button[hidden] {display:none;}
.overview-search {width:min(390px,100%);}
.overview-search input {width:100%;font-size:14px;}
.overview-reset {min-inline-size:112px;background:white;color:#245bcc;border:1px solid #d8e2f0;}
.overview-reset:hover {background:#eef4ff;color:#245bcc;border-color:#a9c0ee;}
.overview-results {max-height:65vh;overflow:auto;}
.order-next-actions {display:flex;flex-wrap:wrap;gap:8px;margin-block:12px;}
/* Selected order panel: grouped information and a separate cancellation entry. */
#dashboard-page .compact-driver-list .order-selection {padding:12px;gap:12px;background:var(--surface);}
.order-selection .selection-context {display:flex;align-items:center;border:0;padding:0;padding-inline-end:36px;min-height:36px;gap:8px;}
.order-selection .selection-context > strong {font-size:18px;overflow-wrap:anywhere;min-width:0;}
.order-selection .selection-context > .result-status {flex-shrink:0;white-space:nowrap;}
.order-selection .result-status {display:inline-block;font-size:12px;padding:3px 10px;border-radius:9px;background:var(--quiet);color:var(--text);}
.order-selection .result-status[data-status="ready"] {background:#fff2e2;color:#985000;border:1px solid #ffdbac;}
.order-selection .selection-tabs {display:flex;gap:0;margin:0;min-height:40px;border:1px solid var(--accent);border-radius:9px;overflow:hidden;}
.order-selection .selection-tabs button {flex:1;min-height:38px;border:0;border-radius:0;}
.order-selection .selection-tabs button:only-child {text-align:center;}
.order-selection .order-detail {display:grid;gap:10px;min-width:0;}
.order-detail-group,.order-selection .order-next-actions {border:1px solid var(--line);border-radius:10px;background:var(--surface-subtle);overflow:hidden;}
.order-detail-row {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;}
.order-detail-row + .order-detail-row {border-top:1px solid var(--line);}
.order-detail-value {display:grid;gap:3px;min-width:0;}
.order-detail-value > span {font-size:13px;color:var(--muted);}
.order-detail-value > strong {font-size:14px;font-weight:600;overflow-wrap:anywhere;}
.order-detail-value > strong[dir="ltr"],.trip-selected-address > strong[dir="ltr"]{text-align:right;}
.order-detail-row > .icon {width:20px;height:22px;flex-shrink:0;object-fit:contain;}
.order-selection .order-next-actions {display:grid;gap:8px;margin:0;padding:12px;}
.order-selection .button {display:flex;align-items:center;justify-content:center;min-height:42px;padding:8px 10px;text-align:center;font-size:14px;}
#dashboard-page .order-selection .driver-details-close {top:10px;left:10px;}
#cancel-order {scroll-margin-top:90px;}
.assignment-panel h3,.assignment-panel p {margin:0;}
.assignment-panel > .outline {justify-self:start;min-height:36px;padding:4px 16px;}
.assignment-panel form {display:grid;gap:12px;}
.assignment-choices {border:0;padding:0;margin:0;display:grid;gap:8px;}
.assignment-choices legend {font-size:13px;color:var(--muted);margin-bottom:8px;}
.assignment-choice {display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--line);border-radius:8px;cursor:pointer;}
.assignment-choice:has(:checked) {border-color:var(--accent);background:var(--accent-soft);}
.assignment-choice input {width:18px;min-height:18px;flex-shrink:0;accent-color:var(--accent);}
#cancel-order:target {outline:2px solid var(--danger-line);outline-offset:8px;border-radius:4px;}
@media(max-width:600px) {
  #dashboard-page[data-active-page="today"] .compact-driver-list:has(.order-selection) {position:fixed;top:auto;bottom:12px;left:12px;right:12px;width:auto;height:auto;max-height:75dvh;z-index:30;border-radius:12px;box-shadow:var(--floating-shadow);}
  #dashboard-page .compact-driver-list .order-selection {min-height:0;grid-auto-rows:max-content;}
}
.source-map {height:320px;min-height:240px;border:1px solid #dbe3ee;border-radius:10px;}
.overview-results .overview-result {display:flex;flex-direction:column;align-items:stretch;text-align:right;width:100%;background:white;color:#10274a;border:0;border-bottom:1px solid #e2e8f0;border-radius:0;padding:12px;gap:5px;}
.overview-results .overview-result:hover {background:#f0f5ff;}
.overview-result-count {color:#667085;font-size:13px;}
/* Compact map settings, anchored to the left edge of the map. */
#dashboard-page[data-active-page="today"] .compact-map .map-appearance {left:12px;right:auto;}
#dashboard-page[data-active-page="today"] .compact-map:has(.compact-driver-list:not([hidden])) .map-appearance {left:12px;right:auto;}
.map-appearance > .map-settings-panel {left:0;right:auto;width:370px;max-width:calc(100vw - 48px);padding:12px;gap:10px;}
.map-settings-panel .map-settings-heading {padding:0 0 4px;min-height:32px;}
.map-settings-panel .map-settings-heading button {padding:0;min-height:32px;height:32px;}
.map-settings-panel .map-inline-choice {display:grid;grid-template-columns:85px minmax(0,1fr);align-items:center;gap:6px;margin:0 0 10px;}
.map-settings-panel .map-inline-choice .map-choice-title {margin:0;font-size:13px;}
.map-settings-panel fieldset:first-of-type {display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;}
.map-settings-panel fieldset:first-of-type > .map-choice-block {grid-column:1 / -1;}
.map-settings-panel [data-map-road-settings]:not([hidden]) {display:contents;}
.map-settings-panel [data-map-road-settings] > .map-choice-block {grid-column:1 / -1;}
.map-settings-panel .map-toggle-row {margin:0;}
@media(max-width:600px) {.map-appearance > .map-settings-panel {left:12px;right:auto;}.map-settings-panel .map-inline-choice {grid-template-columns:85px minmax(0,1fr);gap:4px;}}

.map-settings-panel .map-inline-choice .map-segments label {min-width:0;}
.map-settings-panel .map-inline-choice .map-segments label > span {padding-inline:4px;font-size:12px;}
#shift-requests .shift-inbox-header {gap:8px;}
#shift-requests .shift-inbox-header h3 {font-size:15px;gap:6px;white-space:nowrap;}
#shift-requests .shift-approve-all {margin:0;display:block;}
#shift-requests .shift-approve-all button, #shift-requests .shift-approve-all-demo {padding:4px;min-height:30px;background:transparent;color:#155eef;border:0;font-size:12px;white-space:nowrap;}

#shift-requests .shift-inbox-header {padding-inline:8px;gap:4px;}
#shift-requests .shift-inbox-header > div {min-width:0;}
#shift-requests .shift-inbox-header h3 {font-size:13px;white-space:normal;gap:4px;}
#shift-requests .shift-inbox-header h3 .shift-count {min-width:22px;height:24px;font-size:13px;}
#shift-requests .shift-close {width:24px;flex-shrink:0;}
/* Selected design A: content-sized overlay with compact status rows. */
#dashboard-page[data-active-page="today"] .compact-driver-list:has(> .overview-results) {bottom:auto;height:auto;max-height:100%;}
#dashboard-page .compact-driver-list .overview-results {min-height:0;max-height:none;padding:12px;gap:0;border-radius:var(--radius);}
@media(max-width:600px){#dashboard-page[data-active-page="today"] .compact-driver-list:has(> .overview-results){top:auto;bottom:24px;height:auto;}}
.overview-results > strong {padding-inline-end:36px;font-size:16px;}
.overview-results .overview-result-count {margin:6px 0 12px;padding-inline-end:36px;}
#dashboard-page .overview-results .overview-result {display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:76px;padding:12px 4px;border-top:1px solid #e2e8f0;border-bottom:0;}
#dashboard-page .overview-results .supervisor-result {grid-template-columns:minmax(0,1fr) auto;}
.overview-result .result-icon {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.overview-result .result-identity {display:flex;flex-direction:column;gap:5px;min-width:0;}
.overview-result .result-identity strong {font-size:14px;overflow-wrap:anywhere;}
.overview-result .result-identity small {font-size:13px;}
.overview-result .result-status {font-size:11px;line-height:1.5;padding:4px 6px;border-radius:6px;background:#f0f5ff;color:#25456c;max-width:112px;}
.overview-result .result-status[data-status="accepted"],.overview-result .result-status[data-status="completed"] {background:#edf7f0;color:#286146;}
#dashboard-page .overview-results .overview-result:hover,#dashboard-page .overview-results .overview-result:focus-visible {background:#edf4ff;}
/* Design A header: balanced white title bar and a fine divider. */
#dashboard-page .overview-results > strong {display:flex;align-items:center;min-height:44px;padding:8px 0 12px;padding-inline-end:40px;margin-bottom:0;font-size:16px;line-height:1.5;background:#fff;}
#dashboard-page .overview-results > .driver-details-close {top:16px;left:12px;width:32px;min-height:32px;height:32px;display:flex;align-items:center;justify-content:center;line-height:1;}

.map-appearance > summary {display:flex;align-items:center;gap:7px;list-style:none;}
.map-appearance > summary::-webkit-details-marker {display:none;}
.map-appearance > summary::after {content:'▶';font-size:10px;}
.map-appearance[open] > summary::after {content:'▼';}
.company-setup-panel{max-width:680px;margin:0 auto}.setup-owner{display:flex;flex-wrap:wrap;gap:8px 20px;padding:0 0 18px;border-bottom:1px solid #dbe3ee;margin-bottom:18px}.setup-contacts{display:grid;grid-template-columns:1fr 1fr;gap:16px}.company-setup-panel .setup-return{display:flex;align-items:center;gap:8px}.company-setup-panel .setup-return input{width:18px;min-height:18px;height:18px;margin:0}.company-setup-panel p{color:#5f697b;font-size:13px;line-height:1.7}.company-setup-panel small{font-weight:400}.company-setup-panel .setup-skip{margin-top:12px}@media(max-width:540px){.setup-contacts{grid-template-columns:1fr}}

.operation-links {position:relative;flex:none;}
.operation-links > summary {cursor:pointer;color:#155eef;padding:10px;border:1px solid #d4def0;border-radius:7px;background:white;white-space:nowrap;}
.operation-links > div {position:absolute;top:100%;inset-inline-end:0;z-index:30;min-width:230px;padding:6px;border:1px solid #d4def0;border-radius:7px;background:#fff;box-shadow:0 6px 18px #10274a15;}
.operation-links a {display:block;padding:10px;white-space:nowrap;}

.assignment-choice > span {min-width:0;display:grid;gap:4px;}
.assignment-choice small {overflow-wrap:anywhere;}

#dashboard-page .compact-driver-list .driver-compact-card{padding:14px;min-height:0;display:flex;flex-direction:column;gap:10px;background:#fff;}
#dashboard-page[data-active-page="today"] .compact-driver-list:has(> .driver-compact-card){bottom:auto;height:auto;max-height:100%;}
.driver-card-toolbar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dce6f5;margin:-4px -14px 0;padding:0 14px 8px;}
#dashboard-page .driver-card-toolbar button{background:transparent;border:0;color:#1557ff;min-height:32px;padding:0;font-size:16px;}
#dashboard-page .driver-card-toolbar .driver-card-close{font-size:28px;color:#0b1f3a;}
.driver-card-identity{display:flex;align-items:center;gap:12px;}.driver-card-identity strong{font-size:19px;color:#0b1f3a;}
.driver-card-avatar{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;background:#eef4ff;border-radius:50%;}.driver-card-avatar img{width:28px;height:28px;}
.driver-card-meta{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding-bottom:10px;border-bottom:1px solid #dce6f5;font-size:12px;}
.driver-card-group{color:#61708a;font-size:13px;padding-inline-end:7px;border-inline-end:1px solid #dce6f5;}.driver-card-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:20px;background:#f0f2f5;color:#61708a;}.driver-card-chip.active{background:#e8f6ee;color:#087d4c;}
.driver-card-connection{color:#52637b;}
.driver-card-last-location{color:#52637b;direction:rtl;}
.driver-shift-close{display:grid;gap:6px;}
.driver-shift-close small:empty{display:none;}
.driver-shift-confirm{border:1px solid #dbe5f3;border-radius:8px;background:#f7faff;padding:10px;display:grid;gap:6px;}
.driver-shift-confirm[hidden]{display:none;}
.driver-shift-confirm p{margin:0;font-weight:700;color:#102347;font-size:13px;}
.driver-shift-confirm small{color:#53657e;font-size:12px;}
.driver-shift-confirm button{min-height:38px;}
.driver-card-work{display:flex;align-items:flex-start;gap:10px;background:#f7f9fc;border:1px solid #e2e8f0;border-radius:10px;padding:11px;}.driver-card-work img{width:30px;height:30px;}.driver-card-work>div{display:grid;gap:4px;}.driver-card-work strong{font-size:16px;color:#0b1f3a;}.driver-card-work small{color:#61708a;font-size:13px;line-height:1.65;}
.driver-live-route{display:grid;gap:5px;padding:11px;border:1px solid #dce6f5;border-radius:10px;background:#f8fbff;color:#334155;line-height:1.55}.driver-live-route span,.driver-live-route small{font-size:12px}.driver-live-route-stop{font-weight:600}.driver-route-toggle{width:100%;min-height:36px;border:1px solid #cdddf9;border-radius:7px;background:#fff;color:#155eef;font:inherit;font-weight:600;cursor:pointer}.driver-route-toggle:hover,.driver-route-toggle[aria-pressed="true"]{background:#edf3ff}.driver-route-toggle:disabled{cursor:wait;opacity:.65}
#dashboard-page .driver-card-assign{width:100%;min-height:42px;background:#1557ff;border-radius:8px;font-size:15px;font-weight:700;}
#dashboard-page .driver-card-assign:disabled{background:#eef2f7;color:#61708a;cursor:not-allowed;}
.driver-result-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;min-height:76px;border-top:1px solid #e2e8f0;}
#dashboard-page .overview-results .driver-result-row .overview-result{grid-template-columns:20px minmax(0,1fr);min-height:60px;border:0;border-radius:8px;}
#dashboard-page .driver-result-row .driver-card-assign{width:auto;min-height:36px;padding:7px 12px;font-size:13px;white-space:nowrap;}
#dashboard-page .driver-card-job{background:#fff;color:#1557ff;border:1px solid #dce6f5;min-height:36px;}
@media(max-width:600px){#dashboard-page .compact-driver-list:has(.driver-compact-card){position:fixed;top:auto;bottom:12px;left:12px;right:12px;width:auto;max-height:75dvh;}#dashboard-page .compact-driver-list .driver-compact-card{min-height:0;}}

.driver-card-avatar img,.driver-card-work img{filter:invert(28%) sepia(96%) saturate(4231%) hue-rotate(220deg) brightness(101%) contrast(104%);}

.driver-card-chip::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor;}
.driver-card-work{min-height:0;}
@media(max-width:480px){.driver-card-identity strong{font-size:20px;}.driver-card-meta{gap:7px;font-size:12px;}.driver-card-group{font-size:14px;}.driver-card-chip{padding:5px 8px;}.driver-card-work strong{font-size:20px;}}

#dashboard-page .driver-card-results > .driver-compact-card {border:0;border-bottom:1px solid #dce5f2;border-radius:0;margin:0;padding:14px 0;}
#dashboard-page .driver-card-results > .driver-compact-card:last-child{border-bottom:0;}



/* Trip assignment: compact groups with an anchored action area. */
#dashboard-page .compact-driver-list:has(.trip-entry-panel){top:10px;right:10px;bottom:auto;width:min(390px,calc(100% - 20px));height:auto;max-height:calc(100% - 20px);border-radius:14px;box-shadow:0 8px 28px #0b1f3a18;background:#fff;scroll-padding-bottom:74px;}
#dashboard-page .trip-entry-panel{position:relative;padding:18px;background:#fff;}
#dashboard-page .trip-entry-panel>button{position:absolute;left:18px;top:18px;background:#f3f6fb;border:0;border-radius:7px;color:#1557ff;padding:4px 10px;min-height:32px;font-size:13px;}
.trip-entry-panel>p:empty{display:none;}
#dashboard-page .trip-entry-header{display:block;min-height:0;padding:0 0 14px;border:0;border-bottom:1px solid #edf0f5;margin:0 0 14px;background:none;}
#dashboard-page .trip-entry-header h3{margin:0;font-size:20px;line-height:28px;padding-inline-end:65px;color:#0b1f3a;}
#dashboard-page .trip-entry-header p{margin:5px 0 0;font-size:13px;color:#61708a;text-align:start;}
#dashboard-page .trip-entry-panel form{gap:10px;}
#dashboard-page .trip-entry-blocked,#dashboard-page [data-driver-work-conflict]{margin:0;padding:10px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f7f9fc;color:#52637b;font-size:13px;line-height:1.65;}
#dashboard-page .trip-entry-workload{display:grid;gap:6px;margin:0 0 14px;padding:10px 12px;border:1px solid #e0e6ef;border-radius:9px;background:#fafbfd;}
#dashboard-page .trip-entry-workload h4{margin:0 0 2px;font-size:14px;color:#142c4d;}
#dashboard-page .trip-entry-workload a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;padding:8px 9px;border:1px solid #dce4ef;border-radius:7px;background:#fff;color:#1557ff;text-decoration:none;}
#dashboard-page .trip-entry-workload a:hover{border-color:#1557ff;background:#f5f8ff;}
#dashboard-page .trip-entry-workload a strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#dashboard-page .trip-entry-workload a span{font-size:12px;color:#53657e;white-space:nowrap;}
#dashboard-page .trip-entry-workload a small{grid-column:1 / -1;color:#936016;font-size:11px;}
#dashboard-page .trip-entry-workload>p{margin:0;color:#61708a;font-size:12px;}
#dashboard-page .trip-entry-search{display:flex;gap:8px;margin-bottom:2px;}
#dashboard-page .trip-entry-search input{min-width:0;flex:1;min-height:40px;font-size:13px;background:#f8fafd;border:1px solid #dce4ef;border-radius:8px;padding:8px 10px;}
#dashboard-page .trip-entry-search button{white-space:nowrap;background:#fff;border:1px solid #dce4ef;border-radius:8px;color:#1557ff;font-size:12px;padding:6px 9px;min-height:40px;}
.trip-entry-jobs{max-height:min(350px,43vh);overflow:auto;scrollbar-width:thin;}
.trip-entry-jobs [data-pickup-group]{border:1px solid #e0e6ef;border-radius:10px;overflow:hidden;margin:0 0 10px;}
.trip-entry-jobs [data-pickup-group]:last-of-type{margin-bottom:0;}
.trip-entry-jobs h4{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;line-height:22px;padding:8px 10px;background:#f3f6fb;color:#263d60;margin:0;}
.trip-entry-jobs h4 span{display:grid;place-items:center;min-width:24px;height:24px;border-radius:12px;background:#e5ecf8;color:#47648f;font-size:12px;}
#dashboard-page .trip-entry-job{display:flex;align-items:center;gap:10px;padding:10px 12px;margin:0;border:0;border-top:1px solid #edf0f5;cursor:pointer;min-height:60px;box-sizing:border-box;transition:background .12s;}
#dashboard-page .trip-entry-job:hover{background:#f6f9ff;}
#dashboard-page .trip-entry-job:has(input:checked){background:#edf4ff;box-shadow:inset -3px 0 #1557ff;}
#dashboard-page .trip-entry-job:focus-within{outline:2px solid #1557ff;outline-offset:-2px;}
.trip-entry-job input{width:18px;height:18px;flex-shrink:0;accent-color:#1557ff;}
.trip-entry-job span{min-width:0;}.trip-entry-job strong{display:block;font-size:14px;line-height:22px;color:#142c4d;}.trip-entry-job small{display:block;color:#6a7890;font-size:12px;line-height:19px;overflow-wrap:anywhere;}
#dashboard-page .trip-entry-panel [hidden]{display:none!important;}
.trip-entry-return{border:1px solid #e0e6ef;border-radius:9px;margin:2px 0 0;padding:12px;background:#fafbfd;font-size:13px;}
.trip-entry-return select{min-height:38px;font-size:13px;}
.supervisor-picker-target{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;}
#dashboard-page .supervisor-picker-target label{display:grid;gap:5px;margin:0;font-size:13px;}
.supervisor-picker-target select{min-width:0;width:100%;min-height:40px;font-size:13px;}
.trip-entry-eta{display:grid;gap:8px;padding-top:4px;min-width:0;}
#dashboard-page .trip-entry-eta [data-trip-eta-text]{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;margin:0;font-size:13px;color:#53657e;}
.trip-entry-eta [data-trip-eta-text] strong{font-size:17px;color:#0b1f3a;white-space:nowrap;}
.trip-entry-eta [data-trip-eta-text] small{margin-inline-start:auto;font-size:11px;color:#61708a;}
.trip-entry-eta-arrivals{list-style:none;margin:0;padding:7px 10px;border-radius:7px;background:#f7f9fc;max-height:104px;overflow-y:auto;scrollbar-width:thin;}
.trip-entry-eta-arrivals li{display:flex;align-items:baseline;justify-content:space-between;gap:10px;line-height:24px;font-size:12px;color:#61708a;}
.trip-entry-eta-arrivals li span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.trip-entry-eta-arrivals strong{font-weight:500;white-space:nowrap;color:#344968;}
.journey-legs{list-style:none;margin:0;padding:0;max-height:210px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;}
.trip-entry-eta-arrivals.journey-legs{padding:0 9px;max-height:190px;}
.journey-legs .journey-leg{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #e3eaf4;line-height:1.5;font-size:12px;}
.journey-legs .journey-leg:last-child{border-bottom:0;}
.journey-legs .journey-leg-path{display:grid;grid-template-columns:14px 1fr;gap:2px 5px;flex:1;min-width:0;white-space:normal;}
.journey-leg-path>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.journey-leg-path>span:first-child{grid-column:2;color:#738298;}
.journey-leg-path>.journey-leg-arrow{grid-column:1;grid-row:1 / 3;align-self:center;color:#8da1bd;}
.journey-leg-path>span:last-child{grid-column:2;color:#0b1f3a;font-weight:500;}
.journey-legs .journey-leg strong{font-size:12px;white-space:nowrap;color:#155eef;}
.journey-legs .journey-location-warning{display:block;padding:8px 0;color:#876119;font-size:11px;line-height:1.6;white-space:normal;}
.journey-total{display:flex;align-items:center;justify-content:space-between;gap:8px;}
#dashboard-page .trip-entry-eta>label{margin:2px 0 0;font-size:13px;}
.trip-entry-time-controls{display:flex;align-items:center;gap:8px;min-width:0;}
#dashboard-page .trip-entry-time-controls input{width:68px;flex:0 0 68px;min-width:0;min-height:40px;margin:0;padding:6px;border-radius:7px;text-align:center;box-sizing:border-box;}
.trip-entry-multipliers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;flex:1;min-width:0;}
#dashboard-page .trip-entry-multipliers button{padding:6px 2px;min-width:0;min-height:40px;border:1px solid #dce4ef;border-radius:7px;background:#fff;color:#53657e;font-size:12px;font-weight:600;white-space:nowrap;}
#dashboard-page .trip-entry-multipliers button:hover:not(:disabled){border-color:#1557ff;color:#1557ff;}
#dashboard-page .trip-entry-multipliers button[aria-pressed="true"]{border-color:#1557ff;background:#edf3ff;color:#1557ff;}
#dashboard-page .trip-entry-multipliers button:focus-visible{outline:2px solid #1557ff;outline-offset:2px;}
#dashboard-page .trip-entry-multipliers button:disabled{opacity:.45;cursor:not-allowed;}
.trip-entry-footer{position:sticky;bottom:0;display:flex;align-items:center;gap:14px;padding:14px 0 0;background:#fff;border-top:1px solid #edf0f5;font-size:13px;}
.trip-entry-footer>span{white-space:nowrap;color:#53657e;}
#dashboard-page .trip-entry-footer button{flex:1;min-height:44px;padding:8px 16px;border-radius:8px;font-size:15px;font-weight:700;background:#1557ff;color:#fff;}
#dashboard-page .trip-entry-footer button:disabled{background:#e6ecf5;color:#71829d;cursor:not-allowed;}
@media(max-width:600px){#dashboard-page .compact-driver-list:has(.trip-entry-panel){position:fixed;top:auto;bottom:12px;left:12px;right:12px;width:auto;max-height:85dvh;}}

/* Each checkbox assigns a complete pickup and delivery. */
#dashboard-page .trip-entry-job{display:flex;flex-direction:column;align-items:stretch;gap:4px;border:1px solid #dce4ef;border-radius:8px;padding:8px 10px;margin:0 0 7px;min-height:0;background:#fff;}
#dashboard-page .trip-entry-job:last-of-type{margin-bottom:0;}
#dashboard-page .trip-entry-job:has(input:checked){border-color:#12b76a;background:#f0fdf6;box-shadow:0 0 0 1px #12b76a,0 0 8px #12b76a1a;}
#dashboard-page .trip-entry-job:has(input:checked):focus-within{outline-color:#079669;}
.trip-entry-job input:checked{accent-color:#079669;}
.trip-entry-job .trip-order-heading{display:flex;align-items:center;gap:9px;padding-bottom:9px;border-bottom:1px solid #dce4ef;}
.trip-order-heading strong{flex:1;}.trip-order-heading small{direction:ltr;}
.trip-entry-job .trip-order-stop{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:21px;color:#243b5b;overflow-wrap:anywhere;}
.trip-order-stop b{font-weight:700;}
.trip-stop-pin{position:relative;display:inline-block;width:13px;height:16px;flex:0 0 13px;border:2px solid #7749d4;border-radius:8px 8px 8px 0;transform:rotate(-45deg);margin:3px 3px 0;}
.trip-stop-pin:after{content:"";position:absolute;width:3px;height:3px;border-radius:50%;background:#7749d4;left:3px;top:4px;}
.destination .trip-stop-pin{border-color:#13834e;}.destination .trip-stop-pin:after{background:#13834e;}
.trip-entry-jobs{max-height:min(420px,48vh);padding:1px;}

#dashboard-page .trip-entry-job .trip-order-heading{min-height:0;height:auto;padding:0 0 4px;line-height:22px;}
#dashboard-page .trip-entry-job .trip-order-heading strong,#dashboard-page .trip-entry-job .trip-order-heading small{margin:0;padding:0;min-height:0;}
#dashboard-page .trip-entry-job .trip-order-stop{min-height:0;margin:0;padding:0;}

#dashboard-page .trip-entry-job input[type="checkbox"]{width:18px;height:18px;min-height:18px;min-width:18px;padding:0;margin:0;flex:0 0 18px;}

.summary-trip-card{border:1px solid #dce4ef;border-radius:8px;padding:10px;margin-top:8px;}.summary-trip-card summary{cursor:pointer;font-weight:700;}.summary-trip-card a{display:block;margin-top:8px;}
#dashboard-page .overview-metrics{overflow-y:auto;scrollbar-width:thin;}

#dashboard-page .summary-trip-card .overview-result{display:block;width:100%;text-align:start;min-height:38px;padding:8px;font-size:13px;white-space:normal;}
#dashboard-page .overview-metrics{max-height:calc(100dvh - 180px);}
#dashboard-page .overview-metrics button{min-height:34px;padding-block:6px;}
#dashboard-page .overview-metrics>strong{padding-block:7px;}

#dashboard-page[data-active-page="today"]{grid-template-rows:auto auto minmax(0,1fr);}
#dashboard-page[data-active-page="today"] .overview-metrics{grid-row:2 / 4;}
#dashboard-page[data-active-page="today"] .compact-map{grid-row:3;}
#dashboard-page .today-outcomes{grid-column:2;grid-row:2;display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:#fff;border:1px solid #dce4ef;border-radius:8px;padding:5px 10px;}
.today-outcomes>strong{font-size:12px;color:#61708a;margin-inline-end:auto;}
#dashboard-page .today-outcomes button{display:inline-flex;align-items:center;gap:6px;background:transparent;border:0;color:#344968;border-radius:6px;padding:5px 9px;min-height:30px;font-size:12px;}
.today-outcomes svg{width:15px;height:15px;}.today-outcomes b{font-size:14px;}
#dashboard-page .today-outcomes button:hover,#dashboard-page .today-outcomes button[aria-pressed="true"]{background:#edf3ff;color:#1557ff;}

/* Results first, operational actions immediately above the map. */
#dashboard-page[data-active-page="today"] .today-outcomes{grid-column:1 / -1;grid-row:1;}
#dashboard-page[data-active-page="today"] .overview-actions{grid-column:2;grid-row:2;display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 10px;background:#fff;border:1px solid #dce4ef;border-radius:8px;}
#dashboard-page[data-active-page="today"] .overview-metrics{grid-row:2 / 4;}
#dashboard-page[data-active-page="today"] .compact-map{grid-row:3;}

/* One shared top panel for daily results and operational controls. */
#dashboard-page[data-active-page="today"] .today-outcomes{grid-column:1 / -1;grid-row:1;border-radius:8px 8px 0 0;border-bottom:0;margin-bottom:-12px;padding-bottom:8px;}
#dashboard-page[data-active-page="today"] .overview-actions{grid-column:1 / -1;grid-row:2;border-radius:0 0 8px 8px;border-top:1px solid #edf0f5;padding:8px 10px;}
#dashboard-page[data-active-page="today"] .overview-metrics{grid-row:3;}
#dashboard-page[data-active-page="today"] .compact-map{grid-row:3;}

#dashboard-page[data-active-page="today"]{grid-template-rows:auto minmax(0,1fr);}
#dashboard-page[data-active-page="today"] .overview-actions{grid-row:1;flex-wrap:nowrap;border:1px solid #dce4ef;border-radius:8px;gap:8px;}
#dashboard-page[data-active-page="today"] .overview-metrics,#dashboard-page[data-active-page="today"] .compact-map{grid-row:2;}
#dashboard-page[data-active-page="today"] .overview-actions .today-outcomes{display:flex;flex-wrap:nowrap;flex-shrink:0;gap:2px;border:0;border-inline-start:1px solid #e3e9f2;border-radius:0;margin:0;padding:0 8px;background:transparent;}
#dashboard-page .overview-actions .today-outcomes>strong{margin:0 0 0 6px;font-size:12px;}
#dashboard-page .overview-actions .today-outcomes button{white-space:nowrap;padding:4px 5px;font-size:11px;}
#dashboard-page .overview-actions .overview-search{flex:1 1 220px;width:auto;min-width:140px;margin:0;}
#dashboard-page .overview-actions>.button,#dashboard-page .overview-actions>.overview-reset,#dashboard-page .overview-actions>.operation-links{flex-shrink:0;white-space:nowrap;margin:0;}
#dashboard-page .overview-actions input,#dashboard-page .overview-actions>.button,#dashboard-page .overview-actions>.overview-reset,#dashboard-page .overview-actions summary{min-height:38px;font-size:12px;}
@media(max-width:1000px){#dashboard-page[data-active-page="today"] .overview-actions{flex-wrap:wrap;}}

#dashboard-page .compact-driver-list:has(.trip-detail-panel){width:min(clamp(500px,33vw,544px),calc(100% - 20px));top:10px;bottom:10px;height:calc(100% - 20px);max-height:none;background:#fff;border:1px solid var(--line);border-radius:10px;scroll-padding-bottom:28px;}
#dashboard-page .compact-map:has(.trip-detail-panel) .map-appearance{right:calc(clamp(500px,33vw,544px) + 12px);}
#dashboard-page .compact-driver-list .trip-detail-panel{display:block;height:max-content;min-height:100%;padding:14px 18px 28px;border:0;box-shadow:none;}
.trip-detail-header{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:0;padding-bottom:10px;border-bottom:1px solid var(--line);}
.trip-detail-heading{display:flex;align-items:center;gap:9px;min-width:0;flex:1;}.trip-detail-heading h3{margin:0;font-size:18px;line-height:1.35;color:#102347;white-space:nowrap;}.trip-detail-heading p{min-width:0;margin:0;font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.trip-detail-heading .trip-state{flex-shrink:0;}
#dashboard-page .trip-detail-header .trip-detail-back{position:static;min-height:32px;padding:2px 4px;border:0;background:none;color:var(--accent);font-size:14px;white-space:nowrap;}
.trip-state{display:inline-block;padding:3px 11px;border-radius:16px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600;}.trip-state.review{background:#fff0cf;color:#936016;}
.trip-detail-progress{padding:15px 0 14px;border-bottom:1px solid var(--line);}.trip-detail-progress h4{margin:0 0 10px;font-size:16px;color:#102347;}
.trip-progress-track{display:flex;gap:3px;height:8px;overflow:hidden;border-radius:8px;background:#dce4ef;}.trip-progress-track span{flex-basis:0;min-width:0;}.trip-progress-delivered{background:var(--green);}.trip-progress-custody{background:var(--accent);}.trip-progress-waiting{background:#dce4ef;}
.trip-detail-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px;text-align:center;}.trip-detail-metrics>div+div{border-inline-start:1px solid var(--line);}.trip-detail-metrics strong,.trip-detail-metrics small{display:block;}.trip-detail-metrics strong{font-size:18px;line-height:1.2;color:#102347;}.trip-detail-metrics small{margin-top:3px;font-size:11px;color:var(--muted);}
.trip-detail-panel .trip-detail-warning{margin:10px 0;background:#fff7e7;border:1px solid #f1d8a7;border-radius:8px;padding:10px;color:#825312;font-size:13px;}
.trip-driver-choice{display:grid;gap:4px;margin:12px 0;padding:10px 12px;border:1px solid #b9d0ff;border-radius:9px;background:#f5f8ff;color:#102347;font-size:12px;}
.trip-driver-choice span{line-height:1.5;}.trip-driver-choice small{color:#536783;}
.trip-deliveries-workspace>h4,.trip-selected-delivery>h4{margin:16px 0 11px;font-size:16px;color:#102347;}
.trip-delivery-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:10px;}.trip-delivery-filters button{min-height:42px;padding:6px;border:1px solid transparent;border-radius:15px;background:#f0f2f7;color:#53657e;font-size:14px;font-weight:600;}.trip-delivery-filters button[aria-pressed="true"]{background:var(--accent);color:#fff;}.trip-delivery-filters button:focus-visible,.trip-detail-job-select:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.trip-detail-jobs{max-height:218px;overflow:auto;border-top:1px solid var(--line);border-bottom:1px solid var(--line);}.trip-jobs-empty{margin:12px 0;color:var(--muted);font-size:13px;}
.trip-detail-job{position:relative;border-bottom:1px solid var(--line);}.trip-detail-job:last-child{border-bottom:0;}.trip-detail-job[data-selected="true"]{background:var(--accent-soft);border-radius:8px;}.trip-detail-job::before{position:absolute;right:8px;top:25px;width:8px;height:8px;border-radius:50%;background:#7f8ca1;content:"";}.trip-detail-job[data-stage="delivery"]::before{background:var(--accent);}.trip-detail-job[data-stage="completed"]::before{background:var(--green);}
.trip-detail-job-select{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 8px;width:100%;min-height:68px;padding:8px 24px 8px 46px;border:0;border-radius:8px;background:transparent;text-align:right;color:#102347;}.trip-detail-job-select strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.trip-detail-job-select small{grid-column:1/-1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--muted);}.trip-job-state{padding:3px 8px;border-radius:12px;background:#eef1f6;color:#596a81;font-size:10px;white-space:nowrap;}.trip-detail-job[data-stage="delivery"] .trip-job-state{background:#eaf1ff;color:var(--accent);}.trip-detail-job[data-stage="completed"] .trip-job-state{background:#e7f7ee;color:#158144;}
#dashboard-page .trip-detail-job-select:hover{background:#edf4ff;border-color:transparent;color:#102347;}
#dashboard-page .trip-detail-job[data-selected="true"] .trip-detail-job-select:hover{background:#e4edff;}
.trip-selected-delivery{padding-top:2px;}.trip-selected-delivery>h4{margin-bottom:9px;}.trip-selected-head{display:flex;align-items:center;gap:9px;min-height:41px;padding-bottom:7px;}.trip-selected-head>strong{font-size:14px;color:#102347;}.trip-selected-status{padding:3px 9px;border-radius:14px;background:#eef1f6;color:#596a81;font-size:11px;white-space:nowrap;}.trip-selected-delivery[data-stage="delivery"] .trip-selected-status{background:#eaf1ff;color:var(--accent);}.trip-selected-delivery[data-stage="completed"] .trip-selected-status{background:#e7f7ee;color:#158144;}
.trip-selected-address{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;align-items:start;padding:14px 2px;border-top:1px solid var(--line);font-size:12px;}.trip-selected-address>span{color:#53657e;}.trip-selected-address>strong{font-weight:500;color:#273b57;overflow-wrap:anywhere;}
.trip-selected-delivery>.trip-recovery-form{margin-top:10px;}
.trip-return-cancel{min-width:0;}
.trip-return-cancel>summary{display:flex;align-items:center;justify-content:center;min-height:42px;box-sizing:border-box;cursor:pointer;list-style:none;text-align:center;font-weight:700;color:var(--red);background:#fff;border:1px solid var(--red);border-radius:8px;padding:8px 10px;font-size:13px;}
.trip-return-cancel>summary:hover{background:#fff0f1;}
.trip-return-cancel>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.trip-return-cancel>summary::-webkit-details-marker{display:none;}
.trip-return-cancel>form{display:grid;gap:10px;margin-top:10px;padding:12px;border:1px solid #f3c2c7;border-radius:8px;background:#fff8f8;}
.trip-return-form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.trip-return-form-actions>button{min-height:38px;padding:6px;font-size:13px;}
.trip-return-cancel [role="status"]{margin:0;font-size:12px;line-height:1.6;}.trip-return-cancel [role="status"]:empty{display:none;}
.trip-return-cancel input{width:100%;box-sizing:border-box;}.trip-detail-actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap;}.trip-detail-actions a{font-size:12px;flex:1;padding:8px;}
.trip-reassign-actions{margin-top:14px;border:1px solid #dbe5f2;border-radius:9px;padding:10px;background:#f8fbff;}.trip-reassign-actions summary{cursor:pointer;font-weight:700;color:#173d72;}.trip-reassign-form{display:grid;gap:8px;margin-top:10px;}.trip-reassign-form label{display:grid;gap:4px;font-size:12px;color:#4b5f7a;}.trip-reassign-form select,.trip-reassign-form textarea{width:100%;border:1px solid #c9d5e5;border-radius:6px;padding:8px;font:inherit;background:#fff;color:#10274a;}.trip-reassign-form button{justify-self:start;}.trip-reassign-notice{margin:0;font-size:12px;}
#dashboard-page .trip-open-button{display:block;width:100%;text-align:start;background:#fff;color:#102347;font-size:14px;}

.delivery-quick-editor{width:100%}.delivery-quick-editor form{display:grid;gap:8px}.delivery-quick-editor input,.delivery-quick-editor textarea{max-width:100%;box-sizing:border-box}.delivery-quick-editor label{display:grid;gap:4px}
.trip-detail-job{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 8px;padding-inline-end:8px;}
.trip-detail-job-select{min-width:0;padding-inline-end:0;}
.trip-detail-job-select .trip-job-identity{white-space:normal;overflow-wrap:anywhere;}
.trip-detail-job .order-cancel-action,.trip-detail-job .order-cancel-options{display:contents;}
#dashboard-page .trip-detail-job .order-cancel-options>button.outline.danger{width:auto;min-height:34px;padding:6px 8px;margin:0;box-sizing:border-box;font-size:11px;}
.trip-detail-jobs{max-height:264px;}
.trip-detail-jobs:has(.delivery-quick-editor:not(:empty):not([hidden])){max-height:none;overflow:visible;}
.trip-detail-job .delivery-quick-editor{grid-column:1/-1;width:auto;margin:0 8px 12px 0;}
.delivery-quick-editor:not(:empty){padding:12px;box-sizing:border-box;border:1px solid #f3c2c7;border-radius:8px;background:#fff8f8;font-size:12px;}
.delivery-quick-editor:empty,.delivery-quick-editor[hidden]{display:none;}
.delivery-cancel-identity{display:grid;gap:3px;margin:8px 0 12px;color:#273b57;overflow-wrap:anywhere;}.delivery-cancel-identity bdi{font-weight:700;justify-self:start;}.delivery-cancel-identity small{color:var(--muted);}
.delivery-cancel-form-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}.delivery-cancel-form-actions button{min-height:36px;padding:6px;font-size:12px;}.delivery-cancel-form-actions button[type="submit"]{background:var(--red);border-color:var(--red);color:white;}
.delivery-quick-editor [role="status"]:empty{display:none;}
.trip-detail-job[data-stage="cancelled"]::before{background:var(--red);}.trip-detail-job[data-stage="cancelled"] .trip-job-state{background:#fff0f1;color:var(--red);}
.trip-detail-job[data-stage="failed"]::before{background:#d97706;}.trip-detail-job[data-stage="failed"] .trip-job-state{background:#fff7e7;color:#825312;}
.trip-return-actions-row{margin-top:20px;padding-top:14px;border-top:1px solid var(--line);}.trip-return-actions-row h4{margin:0 0 10px;font-size:14px;}
.trip-selected-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);align-items:start;gap:10px;margin-top:16px;}.trip-selected-actions>*{min-width:0;}.trip-selected-actions .button{width:100%;box-sizing:border-box;min-height:42px;font-size:13px;}.trip-selected-actions .order-cancel-options>button{width:100%;box-sizing:border-box;min-height:42px;font-size:13px;}
.map-style-row { display: grid; grid-template-columns: 45px minmax(0, 1fr); align-items: center; gap: 8px; }
.map-style-row > .map-choice-title { margin: 0; }
.map-style-row .map-swatches { gap: 6px; }
.map-style-row .map-swatches label > span { font-size: 10px; white-space: normal; text-align: center; }
.settings-content [data-trip-ending-location][hidden], [data-trip-ending-location][hidden] { display: none; }

.delivery-supervisor{display:flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid #dce6f5;border-radius:8px;background:#f7faff;color:#344968;font-size:13px;}
.delivery-supervisor::before{content:"";width:7px;height:7px;border-radius:50%;background:#1557ff;flex:0 0 7px;}
.delivery-supervisor-control{display:grid;gap:10px;margin:14px 0;padding:12px;border:1px solid #dce6f5;border-radius:10px;background:#f8fbff;}
.delivery-supervisor-control h4,.delivery-supervisor-control p{margin:0;}
.delivery-supervisor-control form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;}
.delivery-supervisor-control form label{display:grid;gap:4px;margin:0;}
.delivery-supervisor-control details{padding-top:8px;border-top:1px solid #e2e9f3;}
.delivery-supervisor-control summary{cursor:pointer;color:#1557ff;font-size:13px;font-weight:600;}

.map-settings-panel .map-behavior-toggles{display:grid;grid-template-columns:1fr 1fr;gap:12px}.map-settings-panel .map-behavior-toggles .map-toggle-row{gap:6px;font-size:12px}

/* Approved driver list option 01. */
#dashboard-page .driver-card-results{padding:0 16px 8px;background:#fff;border-radius:12px;}
#dashboard-page .driver-card-results>.driver-results-heading{gap:12px;min-height:62px;border-bottom:1px solid #e6edf5;font-size:18px;}
.driver-results-count{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#eaf1ff;color:#155eef;font-size:15px;}

#dashboard-page .driver-card-results{position:relative;}
#dashboard-page .driver-card-results>.driver-details-close{position:absolute;left:12px;right:auto;top:14px;background:transparent;color:#0b1f3a;border:0;box-shadow:none;padding:0;font-size:23px;}

.order-selection .order-cancel-options>button.outline.danger{display:flex;align-items:center;justify-content:center;width:100%;box-sizing:border-box;min-height:42px;border-radius:7px;margin:0;text-align:center;}

#location-confirmation{padding:16px;margin-block:16px}#location-confirmation h3{font-size:17px;margin:0 0 8px}#location-confirmation p{font-size:14px;line-height:1.7}#location-confirmation summary{cursor:pointer;color:var(--blue,#155eef)}#location-confirmation form{display:grid;gap:12px}#location-confirmation textarea{min-height:80px}

.trip-detail-driver{min-width:0;min-height:32px;padding:4px 6px;border:0;background:transparent;color:var(--accent);font-size:12px;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.trip-detail-driver:hover{text-decoration:underline;}
