
/* Driver web rails must override light colors injected by older native shells. */
html[data-theme='dark'] body :is(.app-screen:not(.manager-view), .level-2-fleet-view) .bottom-nav {
  border-color: #45464d !important;
  background: rgba(28, 28, 30, .94) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
html[data-theme='dark'] body :is(.app-screen:not(.manager-view), .level-2-fleet-view) .bottom-nav::before {
  border-color: #505159 !important;
  background: #34353b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}
html[data-theme='dark'] body :is(.app-screen:not(.manager-view), .level-2-fleet-view) .bottom-nav button {
  color: #b9bdc7 !important;
  background: transparent !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme='dark'] body :is(.app-screen:not(.manager-view), .level-2-fleet-view) .bottom-nav button.active {
  color: #51adff !important;
}

/* Maintenance keeps its existing vehicle layout and task-state colors. */
html[data-theme='dark'] body .patrol-fleet-page .patrol-root {
  color: #f5f7fa !important;
  background: transparent !important;
  color-scheme: dark;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root .vehicle-card {
  border-color: #3d4048 !important;
  background: #1b1d22 !important;
  color: #f5f7fa !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root .vehicle-identity :is(h3, .plate) {
  color: #f5f7fa !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root .bonus-progress {
  border-color: #36556b !important;
  background: #172635 !important;
  color: #f5f7fa !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root .bonus-title :is(strong, b) {
  color: #f5f7fa !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root :is(.bonus-title small, .bonus-breakdown small, .bonus-breakdown p) {
  color: #bac8d5 !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root .bonus-breakdown strong {
  color: #f5f7fa !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root .progress-track {
  background: #344756 !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root .progress-explain {
  color: #8bcaff !important;
  background: transparent !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root :is(.tire-button, .plate-toggle) {
  border-color: #5fa9d1 !important;
  background: #182b3a !important;
  color: #a4d9ff !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root :is(.tire-button, .plate-toggle).saved {
  border-color: #5d9e88 !important;
  background: #153a30 !important;
  color: #92e4c6 !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root :is(.tire-button, .plate-toggle).returned {
  border-color: #ab8844 !important;
  background: #3d3019 !important;
  color: #ffdc8e !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root :is(.tire-button, .plate-toggle).upload-failed {
  border-color: #b96868 !important;
  background: #3d2327 !important;
  color: #ffb5b5 !important;
}
html[data-theme='dark'] body .patrol-fleet-page .patrol-root :is(.tire-button, .plate-toggle) :is(span, strong, svg) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Maintenance slots retain burgundy even when the native shell themes chips. */
html[data-theme='dark'] body .manager-view .slot-chip.maintenance:not(.disabled),
html[data-theme='dark'] body .fee-patrol-schedule .slot-chip.maintenance:not(.disabled) {
  border-color: #bc7f98 !important;
  background: #3c1f2e !important;
  color: #f6dbe7 !important;
  -webkit-text-fill-color: currentColor !important;
}
html[data-theme='dark'] body .manager-view .slot-chip.maintenance:not(.disabled) :is(span, strong, em),
html[data-theme='dark'] body .fee-patrol-schedule .slot-chip.maintenance:not(.disabled) :is(span, strong, em) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}
