:root {
  color-scheme: dark;
  --bg: #070a0f;
  --panel: rgba(14, 21, 32, 0.78);
  --panel-strong: rgba(18, 29, 44, 0.92);
  --line: rgba(142, 180, 213, 0.18);
  --text: #edf7ff;
  --muted: #92a8ba;
  --soft: #cfe8f6;
  --cyan: #56d9ff;
  --green: #54f0a6;
  --amber: #ffc66d;
  --red: #ff6f7d;
  --violet: #9b8cff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Absolute final overrides for the unified 20260713 UI pass. */
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-week-tabs,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-corner .mini,
body.light.planner-shell .schedule-hours {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.68) !important;
}

body.light.planner-shell .planner-view-menu summary,
body.light.planner-shell .planner-round,
body.light.planner-shell .planner-transfer-toggle,
body.light.planner-shell .planner-theme-toggle,
body.light.planner-shell .planner-date-pill {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.78) !important;
}

body.light.planner-shell .planner-transfer-toggle.active,
body.light.planner-shell .planner-new-ride,
body.light.planner-shell .planner-primary,
body.light.planner-shell .planner-week-tabs button.active {
  color: #ffffff !important;
  border-color: rgba(0, 119, 168, 0.38) !important;
  background: #0f6aa6 !important;
}

body.light.planner-shell .schedule-task.transfer {
  color: #102033 !important;
  border-color: rgba(0, 166, 128, 0.46) !important;
  border-left-color: #00a87c !important;
  background:
    repeating-linear-gradient(135deg, rgba(0, 168, 124, 0.38) 0 12px, rgba(15, 76, 129, 0.20) 12px 24px),
    rgba(255, 255, 255, 0.62) !important;
}

body.light.planner-shell .schedule-task.transfer .card-price {
  color: #be123c !important;
}

.schedule-vehicle-head {
  position: relative !important;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center !important;
}

.schedule-vehicle-head > strong {
  width: 100%;
  text-align: center;
  transition: transform 0.16s ease;
}

.schedule-vehicle-head .planner-order-tools {
  position: absolute !important;
  right: 0;
  top: 50%;
  transform: translate(8px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.schedule-vehicle:hover .schedule-vehicle-head > strong,
.schedule-vehicle:focus-within .schedule-vehicle-head > strong {
  transform: translateX(-10px);
}

.schedule-vehicle:hover .planner-order-tools,
.schedule-vehicle:focus-within .planner-order-tools {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(0, -50%);
}

.action-delete,
button[data-delete] {
  color: #ffd6dd !important;
  border-color: rgba(255, 92, 119, 0.58) !important;
  background: rgba(255, 92, 119, 0.12) !important;
}

body.light .action-delete,
body.light button[data-delete] {
  color: #be123c !important;
  border-color: rgba(225, 29, 72, 0.38) !important;
  background: rgba(225, 29, 72, 0.10) !important;
}

.action-edit {
  color: #d9f6ff !important;
  border-color: rgba(86, 217, 255, 0.42) !important;
  background: rgba(86, 217, 255, 0.10) !important;
}

body.light .action-edit {
  color: #075985 !important;
  border-color: rgba(14, 165, 233, 0.36) !important;
  background: rgba(14, 165, 233, 0.10) !important;
}

.action-success,
.dispatcher-alert-resolve {
  color: #061016 !important;
  border-color: rgba(66, 232, 213, 0.70) !important;
  background: linear-gradient(135deg, #42e8d5, #47f0a5) !important;
  font-weight: 950;
}

.tacho-day-row:hover,
.tacho-review-row:hover,
.tacho-attendance-admin-row:hover,
.tacho-segment-row:hover {
  transform: translateY(-1px);
  border-color: rgba(86, 217, 255, 0.34) !important;
  background: rgba(86, 217, 255, 0.075) !important;
}

body.light .tacho-day-row:hover,
body.light .tacho-review-row:hover,
body.light .tacho-attendance-admin-row:hover,
body.light .tacho-segment-row:hover {
  background: rgba(14, 165, 233, 0.10) !important;
}

/* Planner skin close to the original TMS harmonogram. */
.planner-console {
  border-color: #21314c;
  background: #0b1220;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.planner-toolbar {
  min-height: 74px;
  background: #101827;
}

.planner-toolbar h2 {
  color: #f8fbff;
}

.planner-week-tabs {
  background: #101827;
}

.planner-week-tabs button {
  min-height: 38px;
  border-color: #2a3855;
  background: #131c2e;
  color: #d7e3f8;
}

.planner-week-tabs button.active {
  color: #ffffff;
  border-color: #28b8ed;
  background: linear-gradient(180deg, #168bd0, #106aa3);
  box-shadow: 0 0 0 2px rgba(40,184,237,.16);
}

.schedule-grid {
  grid-template-columns: 200px minmax(0, 1fr);
  background: #0b1220;
}

.schedule-left {
  background: #0a111d;
}

.schedule-corner {
  height: 66px;
  justify-content: space-between;
  padding: 0 16px;
  color: #b9d4f3;
  font-size: 14px;
}

.schedule-corner .mini {
  color: #e8f4ff;
  border-color: #3d4f68;
  background: #1d2a3b;
}

.schedule-vehicle {
  justify-items: center;
  text-align: center;
  background: #0c1422;
}

.schedule-vehicle strong {
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0;
}

.schedule-vehicle > span {
  font-size: 12px;
}

.vehicle-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.vehicle-status.free {
  color: #00e197;
  border: 1px solid #00b875;
  background: rgba(0,184,117,.14);
}

.vehicle-status.busy {
  color: #ffb32b;
  border: 1px solid #ffb32b;
  background: rgba(255,179,43,.12);
}

.schedule-shifts {
  height: 36px;
  color: #ffffff;
  letter-spacing: 0;
}

.schedule-shifts .shift-night {
  background: #294898;
}

.schedule-shifts .shift-morning {
  background: #20b8d0;
}

.schedule-shifts .shift-afternoon {
  background: #f6a313;
}

.schedule-shifts .shift-evening {
  background: #e9292f;
}

.schedule-hours {
  height: 30px;
  background: #0d1524;
  color: #ffffff;
  font-weight: 950;
}

.schedule-body {
  background-color: #0b1220;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size:
    var(--planner-hour-width, 84px) 100%,
    var(--planner-quarter-width, 21px) 100%;
}

.schedule-row {
  border-bottom: 1px solid #24324a;
}

.schedule-task {
  border: 1px solid #25344e;
  border-left: 5px solid #10b981;
  border-radius: 8px;
  color: #ffffff;
  background: #101827;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.schedule-task .task-headline strong {
  color: #ffffff;
}

.schedule-task .task-headline span {
  color: #dbeafe;
  background: rgba(255,255,255,.08);
}

.schedule-task.transfer {
  border-color: #07936f;
  border-left-color: #00c083;
  background:
    repeating-linear-gradient(135deg, rgba(0,194,160,.34) 0 12px, rgba(239,42,62,.28) 12px 24px),
    #0d2230;
}

/* Harmonogram final polish: keep this after legacy planner rules. */
.planner-console {
  position: relative;
  overflow: visible;
  background: rgba(11, 18, 32, 0.62);
  backdrop-filter: blur(14px);
}

.planner-toolbar,
.planner-toolbar-original,
.planner-week-tabs {
  position: relative;
  z-index: 40;
  overflow: visible;
  background: rgba(13, 22, 37, 0.42);
  backdrop-filter: blur(18px);
}

.planner-toolbar-original {
  flex-wrap: wrap;
  border-bottom-color: rgba(86, 217, 255, 0.16);
}

.planner-view-menu {
  z-index: 90;
}

.planner-view-menu[open] summary {
  border-color: rgba(86, 217, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.12);
}

.planner-view-menu .planner-controls {
  z-index: 320;
  color: var(--text);
}

.schedule-task.dragging {
  z-index: 70;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(86, 217, 255, 0.45);
}

.stop-row {
  grid-template-columns: 148px minmax(180px, 1.2fr) 156px 112px 38px;
}

body.light .planner-console {
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 20px 70px rgba(36, 56, 76, 0.15);
}

body.light .planner-toolbar,
body.light .planner-toolbar-original,
body.light .planner-week-tabs {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.38);
}

body.light .planner-title h2 {
  color: #102033;
}

body.light .planner-view-menu summary,
body.light .planner-round,
body.light .planner-primary,
body.light .planner-transfer-toggle,
body.light .planner-theme-toggle,
body.light .planner-date-pill {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 24px rgba(36, 56, 76, 0.10);
}

body.light .planner-primary,
body.light .planner-week-tabs button.active {
  color: #ffffff;
  border-color: rgba(0, 119, 168, 0.38);
  background: #0f4f88;
}

body.light .planner-date-pill input {
  color: #102033;
}

body.light .planner-view-menu .planner-controls {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

body.light .schedule-grid {
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(239, 246, 255, 0.66);
}

body.light .schedule-left {
  background: rgba(255, 255, 255, 0.52);
}

body.light .schedule-corner {
  color: #dbeafe;
  background: #0f172a;
}

body.light .schedule-vehicle {
  color: #102033;
  background: rgba(255, 255, 255, 0.66);
}

body.light .schedule-vehicle strong {
  color: #102033;
}

body.light .schedule-vehicle span,
body.light .schedule-vehicle small {
  color: #42556b;
}

body.light .schedule-row {
  border-bottom-color: rgba(15, 23, 42, 0.28);
}

body.light .schedule-body {
  background-color: rgba(235, 244, 255, 0.78);
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.12) 1px, transparent 1px),
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

body.light .schedule-hours {
  color: #dbeafe;
  background: #0f172a;
}

body.light .schedule-task {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.18);
  border-left-color: #0f9f6e;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(36, 56, 76, 0.14);
}

body.light .schedule-task .task-headline strong,
body.light .schedule-task time,
body.light .schedule-task .card-price {
  color: #102033;
}

body.light .schedule-task small {
  color: #42556b;
}

/* Current final UI fixes: must stay after the legacy harmonogram skin. */
body.planner-shell .planner-console {
  border-color: rgba(86, 217, 255, 0.16) !important;
  background: rgba(7, 12, 22, 0.12) !important;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 70px rgba(0, 0, 0, 0.22);
}

body.planner-shell .planner-toolbar,
body.planner-shell .planner-toolbar-original {
  background: rgba(9, 15, 27, 0.24) !important;
  backdrop-filter: blur(18px);
}

body.planner-shell .planner-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

body.planner-shell .planner-title .planner-logo {
  width: 52px;
  height: 52px;
}

body.planner-shell .planner-title h2 {
  margin: 0;
  line-height: 1.05;
}

body.planner-shell .planner-new-ride {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(86, 217, 255, 0.2);
}

body.planner-shell .schedule-grid {
  background: rgba(4, 10, 20, 0.04) !important;
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle,
body.planner-shell .schedule-body {
  background-color: rgba(5, 11, 22, 0.11) !important;
}

body.planner-shell .schedule-hours {
  background: rgba(7, 13, 25, 0.70) !important;
  backdrop-filter: blur(12px);
}

body.planner-shell .schedule-body {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px) !important;
}

body.planner-shell .schedule-row {
  background: rgba(4, 10, 20, 0.03) !important;
}

body.planner-shell .schedule-task {
  background: rgba(14, 23, 38, 0.76) !important;
  backdrop-filter: blur(10px);
}

body.light.planner-shell .planner-console {
  border-color: rgba(15, 23, 42, 0.18) !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-toolbar-original {
  background: rgba(255, 255, 255, 0.22) !important;
}

body.light.planner-shell .schedule-grid {
  background: rgba(255, 255, 255, 0.08) !important;
}

body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle,
body.light.planner-shell .schedule-body {
  background-color: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(14px);
}

body.light.planner-shell .schedule-body {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.13) 1px, transparent 1px),
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px) !important;
}

body.light.planner-shell .schedule-hours {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.84) !important;
}

body.light.planner-shell .schedule-row {
  background: rgba(255, 255, 255, 0.04) !important;
}

body.light.planner-shell .schedule-task {
  background: rgba(255, 255, 255, 0.76) !important;
}

.stats-chart,
.stats-chart-panel,
.stats-chart-layout {
  overflow: visible !important;
}

.stats-hover-tooltip {
  z-index: 9999 !important;
  background: rgba(7, 12, 22, 0.98);
  transform: none !important;
}

.stats-hover-tooltip.visible {
  transform: none !important;
}

body.light .stats-hover-tooltip {
  background: rgba(255, 255, 255, 0.98);
}

dialog[data-editor-collection="rides"],
dialog[data-editor-collection="orders"] {
  width: min(1240px, calc(100vw - 28px)) !important;
}

dialog[data-editor-collection="orders"] .form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

dialog[data-editor-collection="orders"] .order-customer-side {
  grid-column: 1;
  border-left: 3px solid rgba(86, 217, 255, 0.45);
  padding-left: 10px;
}

dialog[data-editor-collection="orders"] .order-supplier-side {
  grid-column: 2;
  border-left: 3px solid rgba(84, 240, 166, 0.42);
  padding-left: 10px;
}

.stop-row {
  grid-template-columns: 78px 130px minmax(170px, 1fr) 144px 112px 38px !important;
  align-items: center;
}

.stop-move-tools {
  display: inline-grid;
  grid-template-columns: repeat(2, 34px);
  gap: 4px;
}

.stop-move-tools .mini {
  min-width: 34px;
  padding: 0;
}

@media (max-width: 860px) {
  dialog[data-editor-collection="orders"] .form-grid,
  dialog[data-editor-collection="rides"] .form-grid {
    grid-template-columns: 1fr;
  }

  dialog[data-editor-collection="orders"] .order-customer-side,
  dialog[data-editor-collection="orders"] .order-supplier-side {
    grid-column: 1;
  }

  .stop-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .tacho-compare-list .tacho-review-row,
  .dispatcher-alert {
    grid-template-columns: 1fr;
  }

  .dispatcher-alert .mini,
  .tacho-compare-list .mini {
    width: 100%;
  }
}

/* Final overrides for the current planner/editor pass. */
.stats-chart,
.stats-chart-panel {
  overflow: visible;
}

.stats-hover-tooltip {
  z-index: 9999;
  background: rgba(7, 12, 22, 0.98);
  transform: none;
}

.stats-hover-tooltip.visible {
  transform: none;
}

body.planner-shell .planner-console {
  background: rgba(7, 12, 22, 0.18) !important;
  backdrop-filter: blur(12px);
}

body.planner-shell .planner-toolbar,
body.planner-shell .planner-toolbar-original {
  background: rgba(9, 15, 27, 0.28) !important;
}

body.planner-shell .schedule-grid {
  background: rgba(4, 10, 20, 0.06) !important;
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle {
  background-color: rgba(5, 11, 22, 0.14) !important;
}

body.planner-shell .schedule-body {
  background-color: rgba(5, 11, 22, 0.10) !important;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.13) 1px, transparent 1px) !important;
}

body.planner-shell .schedule-row {
  background: rgba(4, 10, 20, 0.04);
}

body.planner-shell .schedule-task {
  background: rgba(14, 23, 38, 0.74) !important;
}

body.light.planner-shell .planner-console {
  background: rgba(255, 255, 255, 0.28) !important;
}

body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .schedule-grid,
body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle {
  background-color: rgba(255, 255, 255, 0.26) !important;
}

body.light.planner-shell .schedule-body {
  background-color: rgba(235, 244, 255, 0.18) !important;
}

body.light.planner-shell .schedule-task {
  background: rgba(255, 255, 255, 0.78) !important;
}

dialog[data-editor-collection="rides"],
dialog[data-editor-collection="orders"] {
  width: min(1180px, calc(100vw - 28px));
}

dialog[data-editor-collection="orders"] .form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

dialog[data-editor-collection="orders"] .order-customer-side {
  grid-column: 1;
  border-left: 3px solid rgba(86, 217, 255, 0.45);
  padding-left: 10px;
}

dialog[data-editor-collection="orders"] .order-supplier-side {
  grid-column: 2;
  border-left: 3px solid rgba(84, 240, 166, 0.42);
  padding-left: 10px;
}

.stop-row {
  grid-template-columns: 78px 130px 140px 104px minmax(0, 1fr) 38px;
}

.stop-move-tools {
  display: inline-grid;
  grid-template-columns: repeat(2, 34px);
  gap: 4px;
}

.stop-move-tools .mini {
  min-width: 34px;
  padding: 0;
}

/* Current visual pass */
.planner-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.planner-title .planner-logo {
  width: 52px;
  height: 52px;
}

.planner-title h2 {
  line-height: 1.05;
}

.stats-chart,
.stats-chart-panel {
  overflow: visible;
}

.stats-hover-tooltip {
  z-index: 9999;
  background: rgba(7, 12, 22, 0.98);
  transform: none;
}

.stats-hover-tooltip.visible {
  transform: none;
}

body.planner-shell .planner-console {
  background: rgba(7, 12, 22, 0.18) !important;
  backdrop-filter: blur(12px);
}

body.planner-shell .planner-toolbar,
body.planner-shell .planner-toolbar-original {
  background: rgba(9, 15, 27, 0.28) !important;
}

body.planner-shell .schedule-grid {
  background: rgba(4, 10, 20, 0.06) !important;
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle {
  background-color: rgba(5, 11, 22, 0.14) !important;
}

body.planner-shell .schedule-body {
  background-color: rgba(5, 11, 22, 0.10) !important;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.13) 1px, transparent 1px) !important;
}

body.planner-shell .schedule-row {
  background: rgba(4, 10, 20, 0.04);
}

body.planner-shell .schedule-task {
  background: rgba(14, 23, 38, 0.74) !important;
}

body.light.planner-shell .planner-console {
  background: rgba(255, 255, 255, 0.28) !important;
}

body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .schedule-grid,
body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle {
  background-color: rgba(255, 255, 255, 0.26) !important;
}

body.light.planner-shell .schedule-body {
  background-color: rgba(235, 244, 255, 0.18) !important;
}

body.light.planner-shell .schedule-task {
  background: rgba(255, 255, 255, 0.78) !important;
}

dialog[data-editor-collection="rides"],
dialog[data-editor-collection="orders"] {
  width: min(1180px, calc(100vw - 28px));
}

dialog[data-editor-collection="orders"] .form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

dialog[data-editor-collection="orders"] .order-customer-side {
  grid-column: 1;
  border-left: 3px solid rgba(86, 217, 255, 0.45);
  padding-left: 10px;
}

dialog[data-editor-collection="orders"] .order-supplier-side {
  grid-column: 2;
  border-left: 3px solid rgba(84, 240, 166, 0.42);
  padding-left: 10px;
}

.stop-row {
  grid-template-columns: 78px 130px 140px 104px minmax(0, 1fr) 38px;
}

.stop-move-tools {
  display: inline-grid;
  grid-template-columns: repeat(2, 34px);
  gap: 4px;
}

.stop-move-tools .mini {
  min-width: 34px;
  padding: 0;
}

@media (max-width: 760px) {
  dialog[data-editor-collection="orders"] .form-grid,
  dialog[data-editor-collection="rides"] .form-grid {
    grid-template-columns: 1fr;
  }

  dialog[data-editor-collection="orders"] .order-customer-side,
  dialog[data-editor-collection="orders"] .order-supplier-side {
    grid-column: 1;
  }

  .stop-row {
    grid-template-columns: 1fr;
  }
}

/* Route stop editor polish. */
.stop-row {
  grid-template-columns: 42px 124px minmax(320px, 2fr) 126px 96px 38px !important;
  align-items: center;
}

.stop-drag-handle {
  width: 42px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  cursor: grab;
}

.stop-drag-handle::before {
  content: "";
  width: 18px;
  height: 14px;
  background: repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 6px);
  opacity: 0.8;
}

.stop-drag-handle:active {
  cursor: grabbing;
}

.stop-row.dragging-stop {
  opacity: 0.62;
  transform: scale(0.995);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.stop-address {
  min-width: 220px;
}

.stop-date {
  max-width: 126px;
}

.stop-time {
  max-width: 96px;
}

dialog[data-editor-collection="orders"] .form-grid {
  grid-auto-flow: row dense;
}

dialog[data-editor-collection="orders"] .order-helper,
dialog[data-editor-collection="orders"] .order-calc-summary {
  min-height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

dialog[data-editor-collection="orders"] .order-calc-summary {
  grid-template-columns: 1fr;
  gap: 8px;
}

dialog[data-editor-collection="orders"] .order-calc-summary div {
  padding: 8px;
}

body.light .stop-drag-handle,
body.light dialog[data-editor-collection="orders"] .order-helper,
body.light dialog[data-editor-collection="orders"] .order-calc-summary {
  background: rgba(255, 255, 255, 0.74);
}

@media (max-width: 860px) {
  .stop-row {
    grid-template-columns: 42px 1fr !important;
  }

  .stop-row .stop-type,
  .stop-row .stop-address,
  .stop-row .stop-date,
  .stop-row .stop-time,
  .stop-row [data-remove-stop] {
    grid-column: 2;
    max-width: none;
  }
}

/* Dispatcher alerts and ride detail final polish. */
.dispatcher-alert-panel {
  transition: background 160ms ease, border-color 160ms ease;
}

.dispatcher-alert-panel.is-collapsed .dispatcher-alert-list {
  display: none;
}

.dispatcher-alert-tools,
.dispatcher-alert-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dispatcher-alert-toggle {
  min-width: 108px;
}

.dispatcher-alert-toggle span {
  display: inline-block;
  margin-right: 4px;
  font-size: 18px;
  line-height: 1;
}

.dispatcher-alert-actions .mini {
  white-space: nowrap;
}

dialog[data-editor-collection="rideDetail"],
dialog[data-editor-collection="orderDetail"] {
  width: min(1280px, calc(100vw - 24px));
}

dialog[data-editor-collection="rideDetail"] .dialog-card,
dialog[data-editor-collection="orderDetail"] .dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 28px);
  padding: 16px;
}

dialog[data-editor-collection="rideDetail"] #editorFields,
dialog[data-editor-collection="orderDetail"] #editorFields {
  overflow: auto;
  max-height: calc(100vh - 150px);
}

.ride-detail-view {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ride-detail-hero,
.ride-detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ride-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 12px;
  align-items: start;
  padding: 16px;
}

.ride-detail-hero h3 {
  margin: 3px 0 0;
  font-size: clamp(22px, 2.4vw, 34px);
}

.ride-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.ride-detail-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.ride-detail-side {
  display: grid;
  gap: 12px;
}

.ride-detail-resolve {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(255, 184, 74, 0.32);
  background: rgba(255, 184, 74, 0.065);
}

.ride-detail-documents {
  display: grid;
  gap: 8px;
}

.ride-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-schedule div {
  grid-template-columns: 150px 96px minmax(0, 1fr);
  padding: 10px 0;
}

.compact-schedule strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

@media (max-width: 900px) {
  .ride-detail-hero,
  .ride-detail-grid,
  .ride-detail-resolve {
    grid-template-columns: 1fr;
  }

  .dispatcher-alert-actions {
    justify-content: flex-start;
  }
}

/* Last UI guard: keep action buttons round after all legacy planner rules. */
body:not([data-module="attendance"]) #newItemButton,
body.planner-shell .planner-new-ride {
  width: 54px !important;
  min-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

body:not([data-module="attendance"]) #newItemButton::before,
body.planner-shell .planner-new-ride::before {
  content: "+" !important;
  width: 30px !important;
  height: 30px !important;
  display: inline-grid !important;
  place-items: center;
  border-radius: 50%;
  color: #061016 !important;
  background: rgba(255, 255, 255, 0.86) !important;
  font-size: 24px !important;
  font-weight: 950;
  line-height: 1;
}

body:not([data-module="attendance"]) #newItemButton::after,
body.planner-shell .planner-new-ride::after {
  content: "" !important;
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(6, 16, 22, 0.22);
  border-top-color: rgba(255, 255, 255, 0.82);
  background: transparent !important;
  animation: newActionOrbit 4.2s linear infinite;
}

body.planner-shell .planner-transfer-toggle {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

body.planner-shell .planner-transfer-toggle::before {
  content: "\2194" !important;
  font-size: 21px !important;
  font-weight: 950;
  line-height: 1;
}

.brand {
  padding-top: 4px;
}

.brand-menu-button {
  transform: translateY(-8px);
}

body.sidebar-collapsed .brand-menu-button {
  transform: translateY(-6px);
}

@media (max-width: 760px) {
  body:not([data-module="attendance"]) #newItemButton,
  body.planner-shell .planner-new-ride {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  body.planner-shell .planner-transfer-toggle {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .brand-menu-button {
    transform: translateY(-4px);
  }
}

/* Final override: round action buttons must win over older planner skins. */
body:not([data-module="attendance"]) #newItemButton,
body.planner-shell .planner-new-ride {
  width: 54px !important;
  min-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  color: #061016 !important;
  border-color: rgba(66, 232, 213, 0.82) !important;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.20) 18%, transparent 34%),
    linear-gradient(135deg, #42e8d5, #47f0a5) !important;
  box-shadow: 0 15px 34px rgba(66, 232, 213, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.24) !important;
}

body:not([data-module="attendance"]) #newItemButton::before,
body.planner-shell .planner-new-ride::before {
  content: "+" !important;
  position: relative;
  z-index: 2;
  width: 32px !important;
  height: 32px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  color: #061016 !important;
  background: rgba(255, 255, 255, 0.88) !important;
  font-size: 25px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  box-shadow: 0 8px 18px rgba(6, 16, 22, 0.18);
  animation: newActionPlusPulse 3.8s ease-in-out infinite;
}

body:not([data-module="attendance"]) #newItemButton::after,
body.planner-shell .planner-new-ride::after {
  content: "🚚  ▤" !important;
  position: absolute !important;
  inset: auto !important;
  left: -58px !important;
  bottom: 7px !important;
  width: 76px !important;
  height: 18px !important;
  display: block !important;
  color: rgba(6, 16, 22, 0.78) !important;
  background: transparent !important;
  font-size: 13px !important;
  line-height: 18px !important;
  letter-spacing: 0 !important;
  opacity: 0;
  transform: translateX(0);
  animation: newActionCourier 4.8s ease-in-out infinite !important;
}

body.planner-shell .planner-transfer-toggle {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 21px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  color: var(--soft) !important;
  border-color: rgba(142, 180, 213, 0.32) !important;
  background: rgba(16, 27, 42, 0.66) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16) !important;
}

body.planner-shell .planner-transfer-toggle:hover {
  color: #061016 !important;
  border-color: rgba(86, 217, 255, 0.72) !important;
  background: linear-gradient(135deg, var(--cyan), var(--green)) !important;
}

body.planner-shell .planner-transfer-toggle.active {
  color: rgba(207, 232, 246, 0.55) !important;
  border-color: rgba(142, 180, 213, 0.22) !important;
  background: rgba(16, 27, 42, 0.38) !important;
}

body.light.planner-shell .planner-transfer-toggle {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  background: rgba(255, 255, 255, 0.80) !important;
}

body.light.planner-shell .planner-transfer-toggle.active {
  color: rgba(16, 32, 51, 0.45) !important;
  background: rgba(255, 255, 255, 0.52) !important;
}

/* 20260714 unified top controls and dialogs */
.top-actions {
  flex: 1 1 auto;
  margin-left: auto;
}

.module-filter-tools {
  order: 10;
}

.top-actions .search {
  order: 20;
}

.top-icon-actions {
  order: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#newItemButton {
  order: 100;
  position: relative;
  min-height: 46px;
  padding: 0 18px 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border-radius: 999px;
  border-color: rgba(66, 232, 213, 0.76);
  background: linear-gradient(135deg, #42e8d5, #47f0a5);
  box-shadow: 0 14px 34px rgba(66, 232, 213, 0.18);
}

#loginButton {
  order: 110;
}

.top-icon-actions .icon-only {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
}

body:not([data-module="attendance"]) #newItemButton::before,
.planner-new-ride::before {
  content: "+";
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #061016;
  background: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

#newItemButton::after,
.planner-new-ride::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 35%, rgba(255, 255, 255, 0.34) 45%, transparent 56% 100%);
  transform: translateX(-130%);
  animation: newActionSweep 4.8s ease-in-out infinite;
}

@keyframes newActionSweep {
  0%, 58% { transform: translateX(-130%); }
  78%, 100% { transform: translateX(130%); }
}

.top-mail-button,
.planner-mail-toggle {
  position: relative;
  overflow: visible;
}

.top-mail-button.has-mail-badge::after,
.planner-mail-toggle.has-mail-badge::after {
  content: attr(data-mail-count);
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border: 2px solid rgba(7, 10, 15, 0.94);
  border-radius: 999px;
  color: #ffffff;
  background: #f43f5e;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.32);
}

body.light .top-mail-button.has-mail-badge::after,
body.light .planner-mail-toggle.has-mail-badge::after {
  border-color: rgba(240, 249, 255, 0.96);
}

dialog .dialog-head .icon-button,
.auth-dialog .dialog-head .icon-button,
.panel-close-button {
  color: #ffffff !important;
  border-color: rgba(248, 113, 113, 0.68) !important;
  background: rgba(225, 29, 72, 0.18) !important;
  font-size: 22px;
  font-weight: 950;
}

dialog .dialog-head .icon-button:hover,
.auth-dialog .dialog-head .icon-button:hover,
.panel-close-button:hover {
  color: #ffffff !important;
  background: #e11d48 !important;
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.28);
}

.dialog-actions:empty {
  display: none;
  margin: 0;
}

.view-options-panel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(420px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 38px);
  overflow: auto;
  z-index: 520;
}

.view-options-head {
  align-items: flex-start;
}

.view-options-head .panel-close-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

body.planner-shell .planner-actionbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.planner-shell .planner-round,
body.planner-shell .planner-date-pill,
body.planner-shell .planner-week-tabs {
  order: 10;
}

body.planner-shell .planner-transfer-toggle {
  order: 30;
  margin-left: 8px;
}

body.planner-shell .planner-view-menu {
  order: 90;
}

body.planner-shell .planner-mail-toggle {
  order: 91;
}

body.planner-shell .planner-theme-toggle {
  order: 92;
}

body.planner-shell .planner-new-ride {
  order: 100;
  position: relative;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  border-color: rgba(66, 232, 213, 0.76) !important;
  color: #061016 !important;
  background: linear-gradient(135deg, #42e8d5, #47f0a5) !important;
}

body.planner-shell .planner-view-menu summary,
body.planner-shell .planner-mail-toggle,
body.planner-shell .planner-theme-toggle {
  width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
}

body.planner-shell .planner-view-menu summary svg,
.top-icon-actions svg,
body.planner-shell .planner-mail-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.planner-shell .planner-view-menu .planner-controls {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(420px, calc(100vw - 32px)) !important;
  z-index: 560 !important;
}

.planner-controls-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
}

.planner-controls-head .panel-close-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
}

.day-off-popup-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 500 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px;
  pointer-events: auto;
}

.day-off-popup {
  width: min(460px, calc(100vw - 36px)) !important;
  max-width: min(460px, calc(100vw - 36px)) !important;
  justify-self: center !important;
  align-self: center !important;
  pointer-events: auto;
}

.day-off-popup .day-off-popup-list,
.day-off-popup [data-dismiss-day-off-popup] {
  width: 100% !important;
}

/* 20260714 airy round action buttons */
body:not([data-module="attendance"]) #newItemButton,
body.planner-shell .planner-new-ride {
  width: 54px !important;
  min-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  gap: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  line-height: 1 !important;
  overflow: hidden !important;
  border-color: rgba(66, 232, 213, 0.82) !important;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.20) 18%, transparent 34%),
    linear-gradient(135deg, #42e8d5, #47f0a5) !important;
  box-shadow: 0 15px 34px rgba(66, 232, 213, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.24) !important;
}

body:not([data-module="attendance"]) #newItemButton::before,
body.planner-shell .planner-new-ride::before {
  content: "+" !important;
  position: relative;
  z-index: 2;
  width: 32px !important;
  height: 32px !important;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #061016 !important;
  background: rgba(255, 255, 255, 0.88) !important;
  font-size: 25px !important;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(6, 16, 22, 0.18);
  animation: newActionPlusPulse 3.8s ease-in-out infinite;
}

body:not([data-module="attendance"]) #newItemButton::after,
body.planner-shell .planner-new-ride::after {
  content: "" !important;
  position: absolute;
  inset: auto;
  left: -58px;
  bottom: 7px;
  width: 76px;
  height: 18px;
  display: block;
  color: rgba(6, 16, 22, 0.78);
  background: transparent !important;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0;
  opacity: 0;
  transform: translateX(0);
  animation: newActionCourier 4.8s ease-in-out infinite;
}

@keyframes newActionPlusPulse {
  0%, 52%, 100% { transform: scale(1); }
  12% { transform: scale(1.10); }
  72% { transform: scale(0.92); }
}

@keyframes newActionCourier {
  0%, 42% { opacity: 0; transform: translateX(0); }
  48% { opacity: 0.82; }
  74% { opacity: 0.82; transform: translateX(92px); }
  82%, 100% { opacity: 0; transform: translateX(112px); }
}

body.planner-shell .planner-transfer-toggle {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 21px !important;
  font-weight: 950;
  line-height: 1;
  color: var(--soft) !important;
  border-color: rgba(142, 180, 213, 0.32) !important;
  background: rgba(16, 27, 42, 0.66) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

body.planner-shell .planner-transfer-toggle:hover {
  color: #061016 !important;
  border-color: rgba(86, 217, 255, 0.72) !important;
  background: linear-gradient(135deg, var(--cyan), var(--green)) !important;
}

body.planner-shell .planner-transfer-toggle.active {
  color: rgba(207, 232, 246, 0.55) !important;
  border-color: rgba(142, 180, 213, 0.22) !important;
  background: rgba(16, 27, 42, 0.38) !important;
}

body.light.planner-shell .planner-transfer-toggle {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  background: rgba(255, 255, 255, 0.80) !important;
}

body.light.planner-shell .planner-transfer-toggle.active {
  color: rgba(16, 32, 51, 0.45) !important;
  background: rgba(255, 255, 255, 0.52) !important;
}

/* Final correction: clean round action buttons without decorative glyphs. */
body:not([data-module="attendance"]) #newItemButton,
body.planner-shell .planner-new-ride {
  width: 54px !important;
  min-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

body:not([data-module="attendance"]) #newItemButton::before,
body.planner-shell .planner-new-ride::before {
  content: "+" !important;
  position: relative;
  z-index: 2;
  width: 30px !important;
  height: 30px !important;
  display: inline-grid !important;
  place-items: center;
  border-radius: 50%;
  color: #061016 !important;
  background: rgba(255, 255, 255, 0.86) !important;
  font-size: 24px !important;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(6, 16, 22, 0.18);
  animation: newActionPlusPulse 3.8s ease-in-out infinite;
}

body:not([data-module="attendance"]) #newItemButton::after,
body.planner-shell .planner-new-ride::after {
  content: "" !important;
  position: absolute;
  inset: 6px;
  display: block;
  border-radius: 50%;
  border: 1px solid rgba(6, 16, 22, 0.22);
  border-top-color: rgba(255, 255, 255, 0.82);
  background: transparent !important;
  opacity: 0.76;
  animation: newActionOrbit 4.2s linear infinite;
}

@keyframes newActionOrbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

body.planner-shell .planner-transfer-toggle {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  overflow: hidden !important;
}

body.planner-shell .planner-transfer-toggle::before {
  content: "\2194" !important;
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
}

.brand {
  padding-top: 4px;
}

.brand-menu-button {
  transform: translateY(-8px);
}

body.sidebar-collapsed .brand-menu-button {
  transform: translateY(-6px);
}

@media (max-width: 760px) {
  body:not([data-module="attendance"]) #newItemButton,
  body.planner-shell .planner-new-ride {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  body.planner-shell .planner-transfer-toggle {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .brand-menu-button {
    transform: translateY(-4px);
  }
}

/* Absolute last overrides for the 20260713 UI pass. */
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-week-tabs,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-corner .mini,
body.light.planner-shell .schedule-hours {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.68) !important;
}

body.light.planner-shell .planner-view-menu summary,
body.light.planner-shell .planner-round,
body.light.planner-shell .planner-transfer-toggle,
body.light.planner-shell .planner-theme-toggle,
body.light.planner-shell .planner-date-pill {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.78) !important;
}

body.light.planner-shell .planner-transfer-toggle.active,
body.light.planner-shell .planner-new-ride,
body.light.planner-shell .planner-primary,
body.light.planner-shell .planner-week-tabs button.active {
  color: #ffffff !important;
  border-color: rgba(0, 119, 168, 0.38) !important;
  background: #0f6aa6 !important;
}

body.light.planner-shell .schedule-task.transfer {
  color: #102033 !important;
  border-color: rgba(0, 166, 128, 0.46) !important;
  border-left-color: #00a87c !important;
  background:
    repeating-linear-gradient(135deg, rgba(0, 168, 124, 0.38) 0 12px, rgba(15, 76, 129, 0.20) 12px 24px),
    rgba(255, 255, 255, 0.62) !important;
}

body.light.planner-shell .schedule-task.transfer .card-price {
  color: #be123c !important;
}

.schedule-vehicle-head {
  position: relative !important;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center !important;
}

.schedule-vehicle-head > strong {
  width: 100%;
  text-align: center;
  transition: transform 0.16s ease;
}

.schedule-vehicle-head .planner-order-tools {
  position: absolute !important;
  right: 0;
  top: 50%;
  transform: translate(8px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.schedule-vehicle:hover .schedule-vehicle-head > strong,
.schedule-vehicle:focus-within .schedule-vehicle-head > strong {
  transform: translateX(-10px);
}

.schedule-vehicle:hover .planner-order-tools,
.schedule-vehicle:focus-within .planner-order-tools {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(0, -50%);
}

.action-delete,
button[data-delete] {
  color: #ffd6dd !important;
  border-color: rgba(255, 92, 119, 0.58) !important;
  background: rgba(255, 92, 119, 0.12) !important;
}

body.light .action-delete,
body.light button[data-delete] {
  color: #be123c !important;
  border-color: rgba(225, 29, 72, 0.38) !important;
  background: rgba(225, 29, 72, 0.10) !important;
}

.action-edit {
  color: #d9f6ff !important;
  border-color: rgba(86, 217, 255, 0.42) !important;
  background: rgba(86, 217, 255, 0.10) !important;
}

body.light .action-edit {
  color: #075985 !important;
  border-color: rgba(14, 165, 233, 0.36) !important;
  background: rgba(14, 165, 233, 0.10) !important;
}

.action-success,
.dispatcher-alert-resolve {
  color: #061016 !important;
  border-color: rgba(66, 232, 213, 0.70) !important;
  background: linear-gradient(135deg, #42e8d5, #47f0a5) !important;
  font-weight: 950;
}

.tacho-day-row:hover,
.tacho-review-row:hover,
.tacho-attendance-admin-row:hover,
.tacho-segment-row:hover {
  transform: translateY(-1px);
  border-color: rgba(86, 217, 255, 0.34) !important;
  background: rgba(86, 217, 255, 0.075) !important;
}

body.light .tacho-day-row:hover,
body.light .tacho-review-row:hover,
body.light .tacho-attendance-admin-row:hover,
body.light .tacho-segment-row:hover {
  background: rgba(14, 165, 233, 0.10) !important;
}

/* Absolute final overrides for the unified 20260713 UI pass. */
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-week-tabs,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-corner .mini,
body.light.planner-shell .schedule-hours {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.68) !important;
}

body.light.planner-shell .planner-view-menu summary,
body.light.planner-shell .planner-round,
body.light.planner-shell .planner-transfer-toggle,
body.light.planner-shell .planner-theme-toggle,
body.light.planner-shell .planner-date-pill {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.78) !important;
}

body.light.planner-shell .planner-transfer-toggle.active,
body.light.planner-shell .planner-new-ride,
body.light.planner-shell .planner-primary,
body.light.planner-shell .planner-week-tabs button.active {
  color: #ffffff !important;
  border-color: rgba(0, 119, 168, 0.38) !important;
  background: #0f6aa6 !important;
}

body.light.planner-shell .schedule-task.transfer {
  color: #102033 !important;
  border-color: rgba(0, 166, 128, 0.46) !important;
  border-left-color: #00a87c !important;
  background:
    repeating-linear-gradient(135deg, rgba(0, 168, 124, 0.38) 0 12px, rgba(15, 76, 129, 0.20) 12px 24px),
    rgba(255, 255, 255, 0.62) !important;
}

body.light.planner-shell .schedule-task.transfer .card-price {
  color: #be123c !important;
}

.schedule-vehicle-head {
  position: relative !important;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center !important;
}

.schedule-vehicle-head > strong {
  width: 100%;
  text-align: center;
  transition: transform 0.16s ease;
}

.schedule-vehicle-head .planner-order-tools {
  position: absolute !important;
  right: 0;
  top: 50%;
  transform: translate(8px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.schedule-vehicle:hover .schedule-vehicle-head > strong,
.schedule-vehicle:focus-within .schedule-vehicle-head > strong {
  transform: translateX(-10px);
}

.schedule-vehicle:hover .planner-order-tools,
.schedule-vehicle:focus-within .planner-order-tools {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(0, -50%);
}

.action-delete,
button[data-delete] {
  color: #ffd6dd !important;
  border-color: rgba(255, 92, 119, 0.58) !important;
  background: rgba(255, 92, 119, 0.12) !important;
}

body.light .action-delete,
body.light button[data-delete] {
  color: #be123c !important;
  border-color: rgba(225, 29, 72, 0.38) !important;
  background: rgba(225, 29, 72, 0.10) !important;
}

.action-edit {
  color: #d9f6ff !important;
  border-color: rgba(86, 217, 255, 0.42) !important;
  background: rgba(86, 217, 255, 0.10) !important;
}

body.light .action-edit {
  color: #075985 !important;
  border-color: rgba(14, 165, 233, 0.36) !important;
  background: rgba(14, 165, 233, 0.10) !important;
}

.action-success,
.dispatcher-alert-resolve {
  color: #061016 !important;
  border-color: rgba(66, 232, 213, 0.70) !important;
  background: linear-gradient(135deg, #42e8d5, #47f0a5) !important;
  font-weight: 950;
}

.tacho-day-row:hover,
.tacho-review-row:hover,
.tacho-attendance-admin-row:hover,
.tacho-segment-row:hover {
  transform: translateY(-1px);
  border-color: rgba(86, 217, 255, 0.34) !important;
  background: rgba(86, 217, 255, 0.075) !important;
}

body.light .tacho-day-row:hover,
body.light .tacho-review-row:hover,
body.light .tacho-attendance-admin-row:hover,
body.light .tacho-segment-row:hover {
  background: rgba(14, 165, 233, 0.10) !important;
}

/* Final UI consistency pass. Keep this layer last so older planner rules cannot leak through. */
.action-delete,
button[data-delete] {
  color: #ffd6dd !important;
  border-color: rgba(255, 92, 119, 0.58) !important;
  background: rgba(255, 92, 119, 0.12) !important;
}

.action-delete:hover,
button[data-delete]:hover {
  color: #ffffff !important;
  background: rgba(255, 92, 119, 0.28) !important;
}

.action-edit {
  color: #d9f6ff !important;
  border-color: rgba(86, 217, 255, 0.42) !important;
  background: rgba(86, 217, 255, 0.10) !important;
}

.action-edit:hover {
  background: rgba(86, 217, 255, 0.22) !important;
}

.action-success,
.dispatcher-alert-resolve {
  color: #061016 !important;
  border-color: rgba(66, 232, 213, 0.70) !important;
  background: linear-gradient(135deg, #42e8d5, #47f0a5) !important;
  font-weight: 950;
}

.action-export {
  color: #eafaff !important;
  border-color: rgba(126, 236, 255, 0.34) !important;
  background: rgba(126, 236, 255, 0.08) !important;
}

body.light .action-edit {
  color: #075985 !important;
  border-color: rgba(14, 165, 233, 0.36) !important;
  background: rgba(14, 165, 233, 0.10) !important;
}

body.light .action-export {
  color: #155e75 !important;
  border-color: rgba(8, 145, 178, 0.28) !important;
  background: rgba(8, 145, 178, 0.08) !important;
}

body.light .action-delete,
body.light button[data-delete] {
  color: #be123c !important;
  border-color: rgba(225, 29, 72, 0.38) !important;
  background: rgba(225, 29, 72, 0.10) !important;
}

.dispatcher-alert[data-dispatcher-alert-id] {
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.dispatcher-alert[data-dispatcher-alert-id]:hover {
  transform: translateY(-1px);
  border-color: rgba(86, 217, 255, 0.28);
  background: rgba(86, 217, 255, 0.075);
}

body.planner-shell .planner-toolbar-original {
  background: rgba(9, 15, 27, 0.22) !important;
}

body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-week-tabs {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.10) !important;
  background: rgba(255, 255, 255, 0.34) !important;
  backdrop-filter: blur(18px);
}

body.light.planner-shell .planner-view-menu summary,
body.light.planner-shell .planner-round,
body.light.planner-shell .planner-transfer-toggle,
body.light.planner-shell .planner-theme-toggle,
body.light.planner-shell .planner-date-pill {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.76) !important;
  box-shadow: 0 10px 26px rgba(36, 56, 76, 0.10);
}

body.light.planner-shell .planner-transfer-toggle.active,
body.light.planner-shell .planner-new-ride,
body.light.planner-shell .planner-primary,
body.light.planner-shell .planner-week-tabs button.active {
  color: #ffffff !important;
  border-color: rgba(0, 119, 168, 0.38) !important;
  background: #0f6aa6 !important;
}

body.light.planner-shell .schedule-corner {
  color: #102033 !important;
  background: rgba(255, 255, 255, 0.38) !important;
}

body.light.planner-shell .schedule-corner .mini {
  color: #102033 !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  background: rgba(255, 255, 255, 0.76) !important;
}

body.light.planner-shell .schedule-hours {
  color: #243447 !important;
  background: rgba(255, 255, 255, 0.70) !important;
}

body.light.planner-shell .schedule-task.transfer {
  color: #102033 !important;
  border-color: rgba(0, 166, 128, 0.46) !important;
  border-left-color: #00a87c !important;
  background:
    repeating-linear-gradient(135deg, rgba(0, 168, 124, 0.38) 0 12px, rgba(15, 76, 129, 0.20) 12px 24px),
    rgba(255, 255, 255, 0.62) !important;
}

body.light.planner-shell .schedule-task.transfer .card-price {
  color: #be123c !important;
}

.schedule-vehicle-head {
  position: relative;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
}

.schedule-vehicle-head > strong {
  width: 100%;
  text-align: center;
  transition: transform 0.16s ease;
}

.schedule-vehicle-head .planner-order-tools {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(8px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.schedule-vehicle:hover .schedule-vehicle-head > strong,
.schedule-vehicle:focus-within .schedule-vehicle-head > strong {
  transform: translateX(-10px);
}

.schedule-vehicle:hover .planner-order-tools,
.schedule-vehicle:focus-within .planner-order-tools {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.tacho-day-row,
.tacho-review-row,
.tacho-attendance-admin-row,
.tacho-segment-row {
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.tacho-day-row:hover,
.tacho-review-row:hover,
.tacho-attendance-admin-row:hover,
.tacho-segment-row:hover {
  transform: translateY(-1px);
  border-color: rgba(86, 217, 255, 0.34);
  background: rgba(86, 217, 255, 0.075);
}

body.light .tacho-day-row:hover,
body.light .tacho-review-row:hover,
body.light .tacho-attendance-admin-row:hover,
body.light .tacho-segment-row:hover {
  background: rgba(14, 165, 233, 0.10);
}

/* Absolute final overrides. */
.top-module-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-module-filters[hidden] {
  display: none;
}

.top-module-filters label {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
}

.top-module-filters input,
.top-module-filters select {
  height: 30px;
  min-width: 112px;
  max-width: 138px;
  border: 0;
  outline: 0;
  color: var(--text);
  font-weight: 850;
  background: transparent;
}

.top-module-filters select {
  min-width: 132px;
}

.module-panel,
.ops-card,
.person-card,
.vehicle-card,
.stat,
.table-wrap,
.filter-panel,
.order-editor-panel,
.order-editor-shipping {
  border-color: rgba(142, 180, 213, 0.20);
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.075), transparent 46%),
    rgba(14, 21, 32, 0.70);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

body.light .top-module-filters label,
body.light .module-panel,
body.light .ops-card,
body.light .person-card,
body.light .vehicle-card,
body.light .stat,
body.light .table-wrap,
body.light .filter-panel,
body.light .order-editor-panel,
body.light .order-editor-shipping {
  border-color: rgba(15, 23, 42, 0.13);
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 60px rgba(36, 56, 76, 0.16);
}

body.light .top-module-filters input,
body.light .top-module-filters select {
  color: #102033;
}

body.planner-shell .planner-console {
  border-color: rgba(142, 180, 213, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.07), transparent 38%),
    rgba(7, 12, 22, 0.34) !important;
  backdrop-filter: blur(18px);
}

body.planner-shell .schedule-grid {
  background: rgba(7, 12, 22, 0.16) !important;
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle,
body.planner-shell .schedule-body {
  background-color: rgba(7, 12, 22, 0.22) !important;
  backdrop-filter: blur(14px);
}

body.light.planner-shell .planner-console {
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.34) !important;
}

body.light.planner-shell .schedule-grid {
  background: rgba(255, 255, 255, 0.16) !important;
}

body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle,
body.light.planner-shell .schedule-body {
  background-color: rgba(255, 255, 255, 0.24) !important;
}

dialog[data-editor-collection="orders"] .order-editor-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 14px;
  width: 100%;
}

dialog[data-editor-collection="orders"] .order-editor-panel {
  align-content: start;
}

dialog[data-editor-collection="orders"] .order-editor-pair {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px;
}

dialog[data-editor-collection="orders"] .order-editor-panel .field,
dialog[data-editor-collection="orders"] .order-editor-shipping .field {
  width: 100%;
  min-width: 0;
  grid-column: auto !important;
  border-left: 0 !important;
  padding-left: 0 !important;
}

dialog[data-editor-collection="orders"] .order-editor-panel .field.wide,
dialog[data-editor-collection="orders"] .order-editor-shipping .field.wide {
  grid-column: 1 / -1 !important;
}

dialog[data-editor-collection="orders"] .order-editor-panel input,
dialog[data-editor-collection="orders"] .order-editor-panel select,
dialog[data-editor-collection="orders"] .order-editor-panel textarea,
dialog[data-editor-collection="orders"] .order-editor-shipping input,
dialog[data-editor-collection="orders"] .order-editor-shipping select,
dialog[data-editor-collection="orders"] .order-editor-shipping textarea {
  width: 100%;
}

@media (max-width: 1120px) {
  .top-actions {
    justify-content: flex-start;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  dialog[data-editor-collection="orders"] .order-editor-layout,
  dialog[data-editor-collection="orders"] .order-editor-pair {
    grid-template-columns: 1fr !important;
  }

  .top-module-filters label,
  .top-module-filters input,
  .top-module-filters select,
  .search {
    width: 100%;
    max-width: none;
  }
}

/* Final shared polish for the new shell. Keep this at the end so older skins cannot override it. */
.top-module-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-module-filters[hidden] {
  display: none;
}

.top-module-filters label {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(16px);
}

.top-module-filters input,
.top-module-filters select {
  height: 30px;
  min-width: 112px;
  max-width: 138px;
  border: 0;
  outline: 0;
  color: var(--text);
  font-weight: 850;
  background: transparent;
}

.top-module-filters select {
  min-width: 132px;
}

body.light .top-module-filters label {
  background: rgba(255, 255, 255, 0.72);
}

body.light .top-module-filters input,
body.light .top-module-filters select {
  color: #102033;
}

.module-panel,
.ops-card,
.person-card,
.vehicle-card,
.stat,
.table-wrap,
.filter-panel,
.order-editor-panel,
.order-editor-shipping {
  border-color: rgba(142, 180, 213, 0.20);
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.075), transparent 46%),
    rgba(14, 21, 32, 0.70);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

body.light .module-panel,
body.light .ops-card,
body.light .person-card,
body.light .vehicle-card,
body.light .stat,
body.light .table-wrap,
body.light .filter-panel,
body.light .order-editor-panel,
body.light .order-editor-shipping {
  border-color: rgba(15, 23, 42, 0.13);
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 60px rgba(36, 56, 76, 0.16);
}

body.planner-shell .planner-console {
  border-color: rgba(142, 180, 213, 0.24) !important;
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.07), transparent 38%),
    rgba(7, 12, 22, 0.34) !important;
  backdrop-filter: blur(18px);
}

body.planner-shell .schedule-grid {
  background: rgba(7, 12, 22, 0.16) !important;
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle,
body.planner-shell .schedule-body {
  background-color: rgba(7, 12, 22, 0.22) !important;
  backdrop-filter: blur(14px);
}

body.light.planner-shell .planner-console {
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.34) !important;
}

body.light.planner-shell .schedule-grid {
  background: rgba(255, 255, 255, 0.16) !important;
}

body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle,
body.light.planner-shell .schedule-body {
  background-color: rgba(255, 255, 255, 0.24) !important;
}

dialog[data-editor-collection="orders"] .order-editor-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 14px;
  width: 100%;
}

dialog[data-editor-collection="orders"] .order-editor-panel {
  align-content: start;
}

dialog[data-editor-collection="orders"] .order-editor-pair {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px;
}

dialog[data-editor-collection="orders"] .order-editor-panel .field,
dialog[data-editor-collection="orders"] .order-editor-shipping .field {
  width: 100%;
  min-width: 0;
  grid-column: auto !important;
  border-left: 0 !important;
  padding-left: 0 !important;
}

dialog[data-editor-collection="orders"] .order-editor-panel .field.wide,
dialog[data-editor-collection="orders"] .order-editor-shipping .field.wide {
  grid-column: 1 / -1 !important;
}

dialog[data-editor-collection="orders"] .order-editor-panel input,
dialog[data-editor-collection="orders"] .order-editor-panel select,
dialog[data-editor-collection="orders"] .order-editor-panel textarea,
dialog[data-editor-collection="orders"] .order-editor-shipping input,
dialog[data-editor-collection="orders"] .order-editor-shipping select,
dialog[data-editor-collection="orders"] .order-editor-shipping textarea {
  width: 100%;
}

@media (max-width: 1120px) {
  .top-actions {
    justify-content: flex-start;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  dialog[data-editor-collection="orders"] .order-editor-layout,
  dialog[data-editor-collection="orders"] .order-editor-pair {
    grid-template-columns: 1fr !important;
  }

  .top-module-filters label,
  .top-module-filters input,
  .top-module-filters select,
  .search {
    width: 100%;
    max-width: none;
  }
}

/* Order editor: paired customer/supplier entry flow. */
dialog[data-editor-collection="orders"] .form-grid {
  grid-template-columns: 1fr;
}

.order-editor-layout {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.order-editor-panel,
.order-editor-shipping {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.order-editor-shipping {
  grid-column: 1 / -1;
  border-top-color: rgba(86, 217, 255, 0.32);
}

.order-editor-title {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.order-editor-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-editor-title strong {
  color: var(--text);
}

.order-editor-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.order-editor-panel .field,
.order-editor-shipping .field {
  min-width: 0;
  grid-column: auto;
  border-left: 0;
  padding-left: 0;
}

.order-editor-panel .field.wide,
.order-editor-shipping .field.wide {
  grid-column: 1 / -1;
}

.order-editor-panel .order-calc-summary {
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.order-editor-panel .order-calc-summary div {
  padding: 10px;
}

dialog[data-order-currency="CZK"] .field-key-purchasePriceForeign,
dialog[data-order-currency="CZK"] .field-key-exchangeRate {
  display: none;
}

dialog[data-order-currency="EUR"] .order-currency-row {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
}

.field-key-exchangeRate input[data-loading="1"] {
  border-color: rgba(86, 217, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.12);
}

body.light .order-editor-panel,
body.light .order-editor-shipping {
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 900px) {
  .order-editor-layout,
  .order-editor-pair {
    grid-template-columns: 1fr;
  }

  .order-editor-shipping {
    grid-column: 1;
  }
}

body.planner-shell .planner-console {
  background: rgba(7, 12, 22, 0.24);
  backdrop-filter: blur(16px);
}

body.planner-shell .planner-toolbar,
body.planner-shell .planner-toolbar-original {
  background: rgba(9, 15, 27, 0.38);
}

body.planner-shell .schedule-grid {
  background: rgba(4, 10, 20, 0.12);
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle {
  background-color: rgba(5, 11, 22, 0.28);
}

body.planner-shell .schedule-body {
  background-color: rgba(5, 11, 22, 0.18);
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
}

body.planner-shell .schedule-row {
  background: rgba(4, 10, 20, 0.08);
}

body.planner-shell .schedule-task {
  background: rgba(14, 23, 38, 0.78);
}

body.light.planner-shell .planner-console {
  background: rgba(255, 255, 255, 0.34);
}

body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .schedule-grid,
body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle {
  background-color: rgba(255, 255, 255, 0.34);
}

body.light.planner-shell .schedule-body {
  background-color: rgba(235, 244, 255, 0.30);
}

body.light.planner-shell .schedule-row {
  background: rgba(255, 255, 255, 0.08);
}

body.light.planner-shell .schedule-task {
  background: rgba(255, 255, 255, 0.82);
}

body.planner-shell .planner-console {
  background: rgba(7, 12, 22, 0.24);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

body.planner-shell .planner-toolbar,
body.planner-shell .planner-toolbar-original {
  background: rgba(9, 15, 27, 0.34);
  backdrop-filter: blur(18px);
}

body.planner-shell .schedule-grid {
  background: rgba(4, 10, 20, 0.10);
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle,
body.planner-shell .schedule-body {
  background-color: rgba(5, 11, 22, 0.18);
}

body.planner-shell .schedule-hours {
  background: rgba(7, 13, 25, 0.72);
  backdrop-filter: blur(12px);
}

body.planner-shell .schedule-task {
  background: rgba(14, 23, 38, 0.76);
  backdrop-filter: blur(10px);
}

body.light.planner-shell .planner-console {
  background: rgba(255, 255, 255, 0.34);
}

body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .schedule-grid,
body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle,
body.light.planner-shell .schedule-body {
  background-color: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(18px);
}

body.light.planner-shell .schedule-hours {
  background: rgba(241, 247, 252, 0.52);
}

body.light.planner-shell .schedule-task {
  background: rgba(255, 255, 255, 0.78);
}

/* Planner polish: transparent toolbar, visible view menu, readable light mode. */
.planner-console {
  position: relative;
  overflow: visible;
  background: rgba(11, 18, 32, 0.62);
  backdrop-filter: blur(14px);
}

.planner-toolbar-original {
  position: relative;
  z-index: 40;
  flex-wrap: wrap;
  overflow: visible;
  border-bottom-color: rgba(86, 217, 255, 0.16);
  background: rgba(13, 22, 37, 0.48);
  backdrop-filter: blur(18px);
}

.planner-week-tabs {
  overflow: visible;
}

.planner-view-menu {
  z-index: 80;
}

.planner-view-menu[open] summary {
  border-color: rgba(86, 217, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.12);
}

.planner-view-menu .planner-controls {
  z-index: 300;
  color: var(--text);
}

.schedule-task.dragging {
  z-index: 60;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(86, 217, 255, 0.45);
}

.stop-row {
  grid-template-columns: 148px minmax(180px, 1.2fr) 156px 112px 38px;
}

body.light .planner-console {
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 20px 70px rgba(36, 56, 76, 0.15);
}

body.light .planner-toolbar-original {
  border-bottom-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.36);
}

body.light .planner-title h2 {
  color: #102033;
}

body.light .planner-view-menu summary,
body.light .planner-round,
body.light .planner-primary,
body.light .planner-transfer-toggle,
body.light .planner-theme-toggle,
body.light .planner-date-pill {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 24px rgba(36, 56, 76, 0.10);
}

body.light .planner-primary,
body.light .planner-week-tabs button.active {
  color: #ffffff;
  border-color: rgba(0, 119, 168, 0.38);
  background: #0f4f88;
}

body.light .planner-date-pill input {
  color: #102033;
}

body.light .planner-view-menu .planner-controls {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

body.light .schedule-grid {
  border-color: rgba(15, 23, 42, 0.22);
  background: rgba(239, 246, 255, 0.66);
}

body.light .schedule-left {
  background: rgba(255, 255, 255, 0.52);
}

body.light .schedule-corner {
  color: #dbeafe;
  background: #0f172a;
}

body.light .schedule-vehicle {
  color: #102033;
  background: rgba(255, 255, 255, 0.66);
}

body.light .schedule-vehicle strong {
  color: #102033;
}

body.light .schedule-vehicle span,
body.light .schedule-vehicle small {
  color: #42556b;
}

body.light .schedule-row {
  border-bottom-color: rgba(15, 23, 42, 0.28);
}

body.light .schedule-body {
  background-color: rgba(235, 244, 255, 0.78);
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.12) 1px, transparent 1px),
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

body.light .schedule-hours {
  color: #dbeafe;
  background: #0f172a;
}

body.light .schedule-task {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.18);
  border-left-color: #0f9f6e;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(36, 56, 76, 0.14);
}

body.light .schedule-task .task-headline strong,
body.light .schedule-task time,
body.light .schedule-task .card-price {
  color: #102033;
}

body.light .schedule-task small {
  color: #42556b;
}

@media (max-width: 980px) {
  .schedule-grid {
    grid-template-columns: 122px minmax(0, 1fr);
  }
}

.planner-toolbar-original {
  min-height: 76px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 14px;
  border-bottom: 1px solid #20314b;
  background: #101827;
  overflow-x: auto;
}

.planner-title {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 330px;
}

.planner-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: 26px;
}

.planner-logo {
  width: 58px;
  height: 42px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 0 20px rgba(25,151,224,.3);
}

.planner-view-menu {
  position: relative;
  flex: 0 0 auto;
}

.planner-view-menu summary,
.planner-round,
.planner-primary,
.planner-transfer-toggle,
.planner-theme-toggle,
.planner-date-pill {
  min-height: 42px;
  border: 1px solid #3a485e;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #eef6ff;
  background: #202a39;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.planner-view-menu summary {
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.planner-view-menu summary::-webkit-details-marker {
  display: none;
}

.planner-view-menu .planner-controls {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  width: 310px;
  display: grid;
  padding: 14px;
  border: 1px solid #32435c;
  border-radius: 8px;
  background: #111a2a;
  box-shadow: 0 18px 46px rgba(0,0,0,.35);
}

.planner-round,
.planner-theme-toggle {
  width: 46px;
  padding: 0;
  font-weight: 950;
}

.planner-date-pill {
  width: 164px;
  border-radius: 12px;
  padding: 0 10px;
}

.planner-date-pill input {
  width: 100%;
  border: 0;
  color: #eef6ff;
  background: transparent;
  font-weight: 900;
  outline: 0;
}

.planner-week-tabs {
  flex: 1 1 auto;
  min-width: 420px;
  display: flex;
  gap: 8px;
  padding: 0;
  border: 0;
  overflow-x: auto;
  background: transparent;
}

.planner-week-tabs button {
  min-width: 72px;
  min-height: 38px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  border: 1px solid #283750;
  border-radius: 8px;
  color: #cbd6e8;
  background: #131c2e;
  font-weight: 900;
}

.planner-week-tabs button.active {
  border-color: #38bdf8;
  color: #ffffff;
  background: linear-gradient(180deg, #1699d5, #0d6ea8);
  box-shadow: 0 0 0 2px rgba(56,189,248,.16);
}

.planner-primary {
  flex: 0 0 auto;
  min-width: 138px;
  border-color: #174b86;
  color: #ffffff;
  background: #0f3768;
  font-weight: 950;
}

.planner-transfer-toggle {
  flex: 0 0 auto;
  min-width: 128px;
  font-weight: 950;
}

.planner-transfer-toggle.active {
  color: #ffc66d;
}

.planner-hide-transfers .schedule-task.transfer {
  display: none;
}

.planner-console .schedule-grid {
  margin: 14px 20px 20px;
  border: 1px solid #263653;
  border-radius: 8px;
  overflow: hidden;
}

.planner-console .schedule-corner {
  height: 66px;
  background: #0b1322;
}

.planner-console .schedule-corner .mini {
  min-width: 110px;
  min-height: 48px;
  border-radius: 10px;
  color: #cfe8ff;
  background: #1c2939;
  font-weight: 950;
}

.planner-console .schedule-hours {
  height: 30px;
}

.planner-console .schedule-task {
  min-height: 104px;
  padding: 12px 13px;
  border-left-width: 5px;
}

.planner-console .task-headline {
  gap: 8px;
}

.planner-console .task-headline strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.planner-console .task-tools {
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #ffd15c;
  background: transparent;
}

.planner-console .task-tools b {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #32445f;
  border-radius: 8px;
  color: #d6deec;
  background: #182234;
  font-style: normal;
}

.planner-console .task-tools i {
  font-style: normal;
}

.planner-console .schedule-task time {
  margin-top: 8px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

.planner-console .schedule-task small {
  color: #e6f0ff;
  font-size: 14px;
}

.planner-console .schedule-task .card-price {
  color: #ffffff;
  font-weight: 900;
}

.planner-console .schedule-task.transfer .card-price {
  color: #ff334f;
}

.schedule-task.transfer .task-headline span {
  color: #ff4f66;
}

body.planner-shell .topbar {
  display: none;
}

body.planner-shell .main {
  padding-top: 14px;
}

.main {
  background:
    radial-gradient(circle at 15% 4%, rgba(86, 217, 255, 0.10), transparent 34rem),
    radial-gradient(circle at 88% 0%, rgba(84, 240, 166, 0.08), transparent 30rem);
}

body.light .main {
  background:
    radial-gradient(circle at 15% 4%, rgba(14, 165, 233, 0.12), transparent 34rem),
    radial-gradient(circle at 88% 0%, rgba(16, 185, 129, 0.10), transparent 30rem),
    linear-gradient(145deg, #f7fbff 0%, #edf5fb 100%);
}

.settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.settings-fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.settings-editor.is-locked .form-grid {
  opacity: 0.72;
}

.settings-editor.is-locked input,
.settings-editor.is-locked select,
.settings-editor.is-locked textarea {
  cursor: not-allowed;
}

.save-feedback {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(86, 217, 255, 0.08);
  font-weight: 800;
}

.save-feedback.saved {
  color: #bfffe3;
  border-color: rgba(84, 240, 166, 0.45);
  background: rgba(84, 240, 166, 0.12);
}

.pdf-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pdf-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(18, 29, 44, 0.92), rgba(10, 17, 28, 0.9));
  box-shadow: var(--shadow);
}

.pdf-preview-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pdf-preview-title span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pdf-preview-title b {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 12px;
}

.pdf-preview-select {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdf-preview-select select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 850;
}

.pdf-preview-paper {
  min-height: 250px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 6px;
  color: #111827;
  background:
    linear-gradient(90deg, var(--preview-primary) 0 12px, transparent 12px),
    linear-gradient(180deg, #ffffff, var(--preview-secondary));
}

.pdf-preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 3px solid #0ea5e9;
}

.pdf-preview-mark {
  width: 42px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #0ea5e9;
  font-weight: 950;
}

.pdf-preview-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.pdf-preview-head strong,
.pdf-preview-total strong {
  display: block;
}

.pdf-preview-head small {
  color: #64748b;
}

.pdf-preview-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pdf-preview-boxes span {
  min-height: 54px;
  padding: 10px;
  border: 1px solid #dbe7ef;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.pdf-preview-lines {
  display: grid;
  gap: 7px;
}

.pdf-preview-lines i {
  height: 8px;
  border-radius: 99px;
  background: #dbe7ef;
}

.pdf-preview-lines i:nth-child(2) {
  width: 82%;
}

.pdf-preview-lines i:nth-child(3) {
  width: 64%;
}

.pdf-preview-total {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  font-size: 14px;
}

.pdf-preview-stamp {
  width: fit-content;
  justify-self: end;
  padding: 8px 14px;
  border: 2px solid rgba(220, 38, 38, 0.6);
  border-radius: 6px;
  color: #b91c1c;
  transform: rotate(-6deg);
  font-weight: 950;
}

.pdf-preview-executive .pdf-preview-paper {
  color: #172033;
  background:
    linear-gradient(180deg, #111827 0 56px, #ffffff 56px),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.pdf-preview-executive .pdf-preview-head {
  color: #ffffff;
  border-bottom-color: #c8a24a;
}

.pdf-preview-executive .pdf-preview-head small {
  color: #cbd5e1;
}

.pdf-preview-executive .pdf-preview-mark,
.pdf-preview-executive .pdf-preview-badge {
  color: #111827;
  background: #f6d365;
}

.pdf-preview-cargo .pdf-preview-paper {
  background:
    repeating-linear-gradient(135deg, rgba(15, 118, 110, 0.12) 0 12px, transparent 12px 24px),
    linear-gradient(180deg, #ffffff, #ecfeff);
}

.pdf-preview-cargo .pdf-preview-head {
  border-bottom-color: #0f766e;
}

.pdf-preview-cargo .pdf-preview-mark,
.pdf-preview-cargo .pdf-preview-badge {
  background: #0f766e;
  color: #ffffff;
}

.pdf-preview-blueprint .pdf-preview-paper {
  color: #dff6ff;
  background-color: #073b5d;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}

.pdf-preview-blueprint .pdf-preview-head {
  border-bottom-color: #7dd3fc;
}

.pdf-preview-blueprint .pdf-preview-boxes span,
.pdf-preview-blueprint .pdf-preview-lines i {
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(224, 242, 254, 0.12);
}

.pdf-preview-blueprint .pdf-preview-mark,
.pdf-preview-blueprint .pdf-preview-badge {
  color: #073b5d;
  background: #7dd3fc;
}

.pdf-preview-stripe .pdf-preview-paper {
  background:
    linear-gradient(90deg, #ef4444 0 16px, #f97316 16px 26px, transparent 26px),
    linear-gradient(180deg, #ffffff, #fff7ed);
}

.pdf-preview-stripe .pdf-preview-head {
  border-bottom-color: #ef4444;
}

.pdf-preview-stripe .pdf-preview-mark,
.pdf-preview-stripe .pdf-preview-badge {
  background: #ef4444;
  color: #ffffff;
}

.pdf-preview-cards .pdf-preview-paper {
  background: #f8fafc;
}

.pdf-preview-cards .pdf-preview-boxes span,
.pdf-preview-cards .pdf-preview-total {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pdf-preview-minimal .pdf-preview-paper {
  gap: 16px;
  color: #111827;
  background: #ffffff;
}

.pdf-preview-minimal .pdf-preview-head {
  border-bottom: 1px solid #111827;
}

.pdf-preview-minimal .pdf-preview-mark,
.pdf-preview-minimal .pdf-preview-badge {
  color: #111827;
  background: #f3f4f6;
}

.pdf-preview-neon .pdf-preview-paper {
  color: #e6fbff;
  background:
    radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.28), transparent 35%),
    linear-gradient(180deg, #07111f, #0f172a);
}

.pdf-preview-neon .pdf-preview-head {
  border-bottom-color: #22d3ee;
}

.pdf-preview-neon .pdf-preview-boxes span,
.pdf-preview-neon .pdf-preview-lines i {
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(8, 47, 73, 0.55);
}

.pdf-preview-neon .pdf-preview-mark,
.pdf-preview-neon .pdf-preview-badge {
  color: #07111f;
  background: #22d3ee;
}

.pdf-preview-classic .pdf-preview-paper,
.pdf-preview-bubble .pdf-preview-paper {
  background:
    radial-gradient(circle at 90% 8%, rgba(14, 165, 233, 0.13), transparent 30%),
    linear-gradient(180deg, #ffffff, var(--preview-secondary));
}

.settings-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.settings-modules {
  margin-top: 14px;
}

.stats-chart-panel .settings-editor-head strong {
  font-size: 24px;
}

.split-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.stat-ledger {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.stat-ledger.transport {
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.14), transparent 42%),
    var(--panel);
}

.stat-ledger.spedition {
  background:
    linear-gradient(135deg, rgba(84, 240, 166, 0.14), transparent 42%),
    var(--panel);
}

.ledger-number {
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.amount-row span {
  color: var(--soft);
  font-weight: 850;
}

.amount-row strong {
  text-align: right;
}

.amount-row small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.order-helper,
.order-calc-summary {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.order-helper {
  display: grid;
  gap: 4px;
}

.order-helper span,
.order-calc-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.order-helper strong,
.order-calc-summary strong {
  color: var(--text);
}

.order-helper small,
.order-calc-summary small {
  color: var(--muted);
  line-height: 1.4;
}

.order-calc-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.order-calc-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(86, 217, 255, 0.07);
}

.stats-chart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 18px;
}

.stats-chart {
  position: relative;
  height: 270px;
  display: grid;
  grid-template-columns: repeat(31, minmax(10px, 1fr));
  align-items: end;
  gap: 6px;
  padding: 18px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.stats-bar {
  position: relative;
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 7px;
  align-items: end;
}

.stats-bar b {
  display: none;
}

.stats-bar span {
  width: 100%;
  min-height: 4px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--cyan), var(--green));
  box-shadow: 0 0 18px rgba(86, 217, 255, 0.22);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.stats-bar.weekend span {
  background: linear-gradient(180deg, #fbbf24, #54f0a6);
}

.stats-bar.has-value:hover span {
  filter: saturate(1.15);
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(86, 217, 255, 0.26);
}

.stats-bar small {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.stats-hover-tooltip {
  position: fixed;
  z-index: 500;
  width: 218px;
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid rgba(86, 217, 255, 0.28);
  border-radius: 8px;
  color: var(--text);
  background: rgba(9, 15, 26, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .12s ease, transform .12s ease;
}

.stats-hover-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.stats-hover-tooltip strong {
  font-size: 13px;
  color: var(--soft);
}

.stats-hover-tooltip span {
  font-size: 19px;
  font-weight: 950;
}

.stats-hover-tooltip small {
  color: var(--muted);
  line-height: 1.35;
}

.stats-filter {
  justify-content: space-between;
}

.stats-scope-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.stats-scope-switch button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--soft);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.stats-scope-switch button.active {
  color: #06111f;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 10px 22px rgba(86, 217, 255, 0.20);
}

.chart-note {
  margin-top: 10px;
}

.daily-amounts {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.daily-amounts h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.daily-amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 14px;
}

.daily-amounts .amount-row {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.status-matrix {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.status-matrix .status {
  gap: 8px;
  min-height: 34px;
}

.status-matrix strong {
  color: inherit;
}

body.light .pdf-preview-card,
body.light .stats-chart {
  background: rgba(255, 255, 255, 0.82);
}

body.light .stats-scope-switch {
  background: rgba(255, 255, 255, 0.72);
}

body.light .stats-scope-switch button {
  color: #334155;
}

body.light .stats-scope-switch button.active {
  color: #ffffff;
  background: #0f4f88;
}

body.light .stats-hover-tooltip {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(36, 56, 76, 0.20);
}

body.light .stats-hover-tooltip strong,
body.light .stats-hover-tooltip span {
  color: #102033;
}

body.light .save-feedback {
  color: #075985;
  background: rgba(14, 165, 233, 0.10);
}

@media (max-width: 980px) {
  .pdf-preview-grid,
  .settings-stats,
  .split-stats,
  .stats-chart-layout {
    grid-template-columns: 1fr;
  }

  .order-calc-summary {
    grid-template-columns: 1fr;
  }

  .stats-chart {
    overflow-x: auto;
    grid-template-columns: repeat(31, 18px);
  }
}

body.light .planner-console,
body.light .schedule-grid,
body.light .schedule-body {
  background: #eef4fb;
}

body.light .schedule-left,
body.light .schedule-vehicle,
body.light .planner-toolbar,
body.light .planner-week-tabs {
  background: #f8fbff;
}

body.light .schedule-task {
  color: #102033;
  background: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% -10%, rgba(86, 217, 255, 0.15), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(84, 240, 166, 0.12), transparent 30rem),
    linear-gradient(145deg, #070a0f 0%, #0c1119 45%, #090d13 100%);
}

body.loading .app-loader {
  opacity: 1;
  pointer-events: auto;
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  color: var(--soft);
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.app-loader span {
  color: var(--muted);
  font-weight: 850;
}

body.light {
  color-scheme: light;
  --bg: #f6f9fc;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(43, 73, 98, 0.16);
  --text: #0a1724;
  --muted: #627487;
  --soft: #26394a;
  --cyan: #0077a8;
  --green: #008f63;
  --amber: #9b6500;
  --red: #bd2434;
  --violet: #5e54d8;
  --shadow: 0 18px 60px rgba(36, 56, 76, 0.16);
  background:
    radial-gradient(circle at 20% -10%, rgba(0, 119, 168, 0.14), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(0, 143, 99, 0.10), transparent 30rem),
    linear-gradient(145deg, #f6f9fc 0%, #eef5f8 48%, #fbfdff 100%);
}

body.light .sidebar {
  background: rgba(255, 255, 255, 0.74);
}

body.light .brand-mark,
body.light .primary {
  color: #ffffff;
}

body.light input,
body.light select,
body.light textarea {
  color: var(--text);
  background-color: rgba(255, 255, 255, 0.88);
}

body.light option {
  color: #0a1724;
  background: #ffffff;
}

body:not(.light) option {
  color: #edf7ff;
  background: #101827;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.58;
}

.shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.18s ease;
}

body.sidebar-collapsed .shell {
  grid-template-columns: 74px minmax(0, 1fr);
}

body.driver-mode .shell {
  grid-template-columns: 1fr;
}

body.driver-mode .sidebar,
body.driver-mode #menuButton,
body.driver-mode .search {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: width 0.18s ease, transform 0.18s ease, padding 0.18s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-copy {
  min-width: 0;
}

.brand-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(86, 217, 255, 0.38);
  border-radius: 8px;
  color: #061016;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 950;
  box-shadow: 0 0 30px rgba(86, 217, 255, 0.26);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-size: 21px;
}

.logo-letter {
  position: relative;
  z-index: 2;
  line-height: 1;
}

.brand-menu-button,
.logo-menu-button {
  border: 0;
  padding: 0;
  background: transparent;
}

.brand-menu-button {
  flex: 0 0 auto;
}

.logo-menu-button {
  display: none;
  flex: 0 0 auto;
  place-items: center;
}

.top-logo-mark {
  width: 60px;
  height: 60px;
  font-size: 22px;
}

.logo-menu-button:focus-visible,
.brand-menu-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.animated-logo::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  opacity: 0.9;
  z-index: 0;
}

.animated-logo::after {
  content: "";
  position: absolute;
  width: 70%;
  height: 180%;
  left: -95%;
  top: -40%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  animation: logoSweep 2.4s ease-in-out infinite;
  z-index: 1;
}

@keyframes logoSweep {
  0%, 35% {
    left: -95%;
  }
  70%, 100% {
    left: 125%;
  }
}

body.sidebar-collapsed .sidebar {
  padding-left: 12px;
  padding-right: 12px;
}

body.sidebar-collapsed .brand {
  padding-left: 0;
  padding-right: 0;
  justify-content: center;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .brand-actions,
body.sidebar-collapsed .nav button span:nth-child(2),
body.sidebar-collapsed .nav button small,
body.sidebar-collapsed .side-panel {
  display: none;
}

body.sidebar-collapsed .nav button {
  grid-template-columns: 1fr;
  justify-items: center;
  padding-left: 0;
  padding-right: 0;
}

.brand strong,
.side-panel strong {
  display: block;
}

.brand span,
.side-panel small,
.muted {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
}

.nav button {
  border: 0;
  width: 100%;
  color: var(--soft);
  background: transparent;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--cyan);
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav button:hover,
.nav button.active {
  color: var(--text);
  background: rgba(86, 217, 255, 0.1);
}

.nav button.active {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.side-panel,
.hero-strip,
.stat,
.table-wrap,
.module-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.side-panel {
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.top-title {
  flex: 0 0 clamp(180px, 16vw, 260px);
  min-width: 0;
}

.module-filter-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.view-options-wrap {
  position: relative;
  align-self: center;
  flex: 0 0 auto;
}

.view-options-button {
  white-space: nowrap;
}

.view-options-button.active {
  color: #061016;
  border-color: rgba(86, 217, 255, 0.76);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 900;
}

.view-options-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 220;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 44px));
  padding: 14px;
  border: 1px solid rgba(86, 217, 255, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 18, 30, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.view-options-panel[hidden] {
  display: none;
}

.view-options-head,
.view-option-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.view-options-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.view-option-line {
  display: flex !important;
  justify-content: flex-start;
}

.view-option-line input {
  width: auto;
}

.view-options-panel select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

body.light .view-options-panel {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.14);
  background:
    linear-gradient(135deg, rgba(86, 217, 255, 0.18), transparent 44%),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(36, 56, 76, 0.18);
}

body.light .view-options-panel label,
body.light .view-stat-list > strong {
  color: #516275;
}

body.light .view-options-panel select {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.78);
}

body.light .view-stat-list {
  border-top-color: rgba(15, 23, 42, 0.10);
}

.view-stat-list {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.view-stat-list > strong {
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 15px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search {
  height: 42px;
  min-width: min(360px, 38vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.hero-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: center;
}

.hero-strip small {
  grid-column: 2;
  color: var(--muted);
}

.pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(84, 240, 166, 0.1), 0 0 26px rgba(84, 240, 166, 0.8);
}

.primary,
.ghost,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 42px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.primary {
  border-color: rgba(86, 217, 255, 0.5);
  color: #061016;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 900;
}

.ghost:hover,
.icon-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.icon-button.active {
  color: #061016;
  border-color: transparent;
  background: var(--cyan);
}

.icon-button {
  width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
}

.only-mobile {
  display: none;
}

.content {
  display: grid;
  gap: 18px;
}

.content.view-hide-overview > .ops-overview,
.content.view-hide-overview > .mail-stats,
.content.view-hide-overview > .finance-stats {
  display: none !important;
}

.content[data-view-density="compact"] {
  gap: 10px;
}

.content[data-view-density="compact"] .module-panel,
.content[data-view-density="compact"] .ops-card,
.content[data-view-density="compact"] .person-card,
.content[data-view-density="compact"] .vehicle-card,
.content[data-view-density="compact"] .stat {
  padding: 10px;
}

.content[data-view-density="compact"] .stat strong {
  margin-top: 4px;
  font-size: 22px;
}

.content[data-view-density="roomy"] {
  gap: 24px;
}

.content[data-view-density="roomy"] .module-panel,
.content[data-view-density="roomy"] .ops-card,
.content[data-view-density="roomy"] .person-card,
.content[data-view-density="roomy"] .vehicle-card,
.content[data-view-density="roomy"] .stat {
  padding: 20px;
}

.content[data-view-layout="wide"] .ops-overview,
.content[data-view-layout="wide"] .mail-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content[data-view-layout="focus"] .ops-overview,
.content[data-view-layout="focus"] .mail-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  border-radius: 8px;
  padding: 16px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.grid-two {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
}

.module-panel {
  border-radius: 8px;
  padding: 16px;
}

.table-wrap {
  border-radius: 8px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.04);
}

tr:hover td {
  background: rgba(86, 217, 255, 0.05);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.status.done,
.status.invoiced,
.status.paid,
.status.active {
  color: var(--green);
  background: rgba(84, 240, 166, 0.1);
}

.status.new,
.status.pending {
  color: var(--amber);
  background: rgba(255, 198, 109, 0.1);
}

.status.cancelled,
.status.disabled {
  color: var(--red);
  background: rgba(255, 111, 125, 0.1);
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.mini {
  min-height: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 13px;
}

dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
}

dialog[data-editor-collection="rides"],
dialog[data-editor-collection="orders"] {
  width: min(1180px, calc(100vw - 28px));
}

dialog[data-editor-collection="tachoDetail"] {
  width: min(1540px, calc(100vw - 24px));
}

dialog[data-editor-collection="tachoDetail"] .dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 28px);
  padding: 16px;
}

dialog[data-editor-collection="tachoDetail"] #editorFields {
  display: block;
  overflow: auto;
  max-height: calc(100vh - 150px);
}

dialog[data-editor-collection="tachoDetail"] .dialog-actions {
  flex: 0 0 auto;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(10px);
}

.dialog-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-actions {
  margin: 18px 0 0;
  padding: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

dialog[data-editor-collection="orders"] .form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

dialog[data-editor-collection="orders"] .order-customer-side {
  grid-column: 1;
}

dialog[data-editor-collection="orders"] .order-supplier-side {
  grid-column: 2;
}

.field {
  display: grid;
  gap: 6px;
}

.field.wide {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
}

.field select {
  appearance: none;
  background-color: rgba(18, 29, 44, 0.96);
}

body.light .field select {
  background-color: rgba(255, 255, 255, 0.96);
}

.dispatcher-filter .wide-filter {
  flex: 1 1 280px;
}

.dispatcher-filter .dispatcher-new-ride {
  margin-left: auto;
}

.dispatcher-card {
  background: rgba(8, 14, 22, 0.54);
  backdrop-filter: blur(16px);
}

body.light .dispatcher-card {
  background: rgba(255, 255, 255, 0.72);
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.filter-panel label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.filter-panel input,
.filter-panel select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.stops-editor {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.stops-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.stops-list {
  display: grid;
  gap: 8px;
}

.stop-row {
  display: grid;
  grid-template-columns: 78px 130px 140px 104px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
}

.stop-move-tools {
  display: inline-grid;
  grid-template-columns: repeat(2, 34px);
  gap: 4px;
}

.stop-move-tools .mini {
  min-width: 34px;
  padding: 0;
}

.stop-row input,
.stop-row select {
  height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.ares-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.editor-detail {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.editor-detail > strong {
  display: block;
  margin-top: 4px;
  color: var(--cyan);
}

.compact-schedule {
  margin-top: 10px;
}

.compact-schedule div {
  display: grid;
  grid-template-columns: 132px 82px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.compact-schedule time {
  color: var(--cyan);
  font-weight: 900;
}

.compact-schedule span {
  color: var(--green);
  font-weight: 850;
}

.compact-schedule strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.timeline-item time {
  color: var(--cyan);
  font-weight: 900;
}

.planner-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
  align-items: start;
}

.planner-console {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.planner-toolbar,
.planner-week-tabs {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.planner-week-tabs {
  justify-content: flex-start;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.025);
}

.planner-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.planner-controls label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.planner-controls input[type="range"] {
  width: 150px;
  accent-color: var(--cyan);
}

.planner-week-tabs button {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  place-items: center;
  min-width: 58px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.planner-week-tabs button.active {
  color: #061016;
  border-color: transparent;
  background: var(--cyan);
}

.schedule-grid {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 620px;
}

.schedule-left {
  border-right: 1px solid var(--line);
  background: rgba(8, 14, 22, 0.72);
}

.schedule-corner,
.schedule-vehicle {
  border-bottom: 1px solid var(--line);
}

.schedule-corner {
  display: flex;
  align-items: center;
  height: 84px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.schedule-vehicle {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
}

.schedule-vehicle-head {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.schedule-vehicle-head span {
  display: inline-flex;
  gap: 4px;
}

.schedule-vehicle-head .planner-order-tools {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.schedule-vehicle:hover .planner-order-tools,
.schedule-vehicle:focus-within .planner-order-tools {
  opacity: 1;
  pointer-events: auto;
}

.schedule-vehicle-head .mini {
  min-width: 28px;
  height: 28px;
  padding: 0;
}

.schedule-vehicle strong {
  color: var(--cyan);
  font-size: 16px;
}

.schedule-vehicle span,
.schedule-vehicle small {
  color: var(--muted);
}

.schedule-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.schedule-shifts,
.schedule-hours,
.schedule-body {
  min-width: 2016px;
}

.schedule-shifts {
  display: flex;
  height: 28px;
  color: #061016;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.schedule-shifts div {
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(0, 0, 0, 0.22);
}

.shift-night {
  background: #7dd3fc;
}

.shift-morning {
  background: #54f0a6;
}

.shift-afternoon {
  background: #ffc66d;
}

.shift-evening {
  background: #fda4af;
}

.schedule-hours {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(24, 84px);
  height: 56px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 14, 22, 0.92);
}

.schedule-hours div {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.schedule-body {
  position: relative;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size:
    var(--planner-hour-width, 84px) 100%,
    var(--planner-quarter-width, 21px) 100%;
}

.schedule-row {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.schedule-row.drag-target {
  background: linear-gradient(90deg, rgba(86, 217, 255, 0.13), rgba(86, 217, 255, 0.03));
  box-shadow: inset 0 0 0 2px rgba(86, 217, 255, 0.38);
}

.schedule-task {
  position: absolute;
  min-height: 76px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 8px;
  color: var(--text);
  background: rgba(16, 24, 38, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
  cursor: grab;
  overflow: hidden;
  touch-action: none;
}

.schedule-task.dragging {
  z-index: 50;
  opacity: 0.92;
  outline: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(86, 217, 255, 0.12), 0 18px 34px rgba(0, 0, 0, 0.42);
  cursor: grabbing;
}

.schedule-task.status-done,
.schedule-task.status-invoiced {
  border-left-color: var(--green);
}

.schedule-task.status-planned {
  border-left-color: var(--cyan);
}

.schedule-task.status-progress {
  border-left-color: var(--amber);
}

.schedule-task.status-cancelled {
  border-left-color: var(--red);
}

.task-headline {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.task-headline strong,
.schedule-task small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-headline span {
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.schedule-task time {
  display: block;
  margin-top: 5px;
  color: var(--cyan);
  font-weight: 950;
}

.schedule-task small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.schedule-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px solid var(--red);
  pointer-events: none;
  z-index: 6;
}

.schedule-now span {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  color: #fff;
  background: var(--red);
  font-size: 11px;
  font-weight: 900;
}

.planner-lane {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 14, 22, 0.62);
  overflow: hidden;
}

.planner-lane header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.planner-lane header span {
  font-weight: 900;
}

.planner-lane header strong {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #061016;
  background: var(--cyan);
}

.ride-stack {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.ride-card,
.driver-job {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ride-card {
  padding: 12px;
}

.ride-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ride-card-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ride-card p {
  margin-top: 8px;
  color: var(--cyan);
  font-weight: 800;
}

.ride-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.empty {
  padding: 12px;
}

.ops-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ops-list,
.people-grid,
.vehicle-grid {
  display: grid;
  gap: 10px;
}

.ops-card,
.person-card,
.vehicle-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ops-title {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ops-title h3 {
  margin: 0;
}

.route-line {
  margin-top: 8px;
  color: var(--cyan);
  font-size: 16px;
  font-weight: 900;
}

.schedule-block {
  margin-top: 12px;
}

.ride-schedule {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.ride-schedule li {
  display: grid;
  grid-template-columns: 130px 92px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.ride-schedule time {
  color: var(--cyan);
  font-weight: 900;
}

.ride-schedule span {
  color: var(--green);
  font-weight: 850;
}

.ride-schedule strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ride-schedule .schedule-more {
  display: block;
  color: var(--muted);
}

.meta-line,
.mini-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.meta-line span,
.meta-line strong,
.mini-metrics span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.settings-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.settings-list div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.settings-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.settings-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.integration-status-panel {
  margin-top: 14px;
}

.integration-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.integration-status-card {
  display: grid;
  gap: 10px;
  min-height: 164px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.integration-status-card h3 {
  margin: 8px 0 0;
  font-size: 17px;
}

.integration-status-card p {
  margin: 0;
  color: var(--text);
}

.integration-status-card small {
  color: var(--muted);
  line-height: 1.4;
}

.integration-status-card.status-ready,
.integration-status-card.status-done {
  border-color: rgba(72, 223, 191, 0.5);
}

.integration-status-card.status-partial {
  border-color: rgba(73, 213, 255, 0.42);
}

.integration-status-card.status-todo {
  border-color: rgba(255, 184, 74, 0.35);
}

.tacho-analysis-box {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(73, 213, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.tacho-analysis-box.muted {
  color: var(--muted);
}

.tacho-activity-strip {
  display: flex;
  overflow: hidden;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(3, 12, 24, 0.35);
}

.tacho-activity-segment {
  min-width: 3px;
}

.tacho-activity-segment.driving {
  background: #42e8d5;
}

.tacho-activity-segment.work {
  background: #ffb84a;
}

.tacho-activity-segment.availability {
  background: #6ea8ff;
}

.tacho-activity-segment.rest {
  background: rgba(162, 179, 199, 0.48);
}

.tacho-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.tacho-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.tacho-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.tacho-legend .driving {
  background: #42e8d5;
}

.tacho-legend .work {
  background: #ffb84a;
}

.tacho-legend .availability {
  background: #6ea8ff;
}

.tacho-legend .rest {
  background: rgba(162, 179, 199, 0.68);
}

.tacho-daily-chart {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.tacho-daily-bar {
  display: grid;
  grid-template-columns: 42px minmax(220px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 420px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tacho-daily-bar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.tacho-daily-bar > div {
  position: relative;
  display: flex;
  overflow: hidden;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(3, 12, 24, 0.28);
}

.tacho-daily-bar:hover > div,
.tacho-daily-bar.active > div {
  border-color: rgba(73, 213, 255, 0.68);
  box-shadow: 0 0 0 2px rgba(73, 213, 255, 0.14);
}

.tacho-daily-bar.active > span {
  color: var(--cyan);
}

.tacho-daily-bar i {
  min-width: 0;
}

.tacho-daily-bar b {
  position: absolute;
  right: 4px;
  top: 50%;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  color: #111827;
  background: #ffb84a;
  font-size: 11px;
  font-weight: 950;
  transform: translateY(-50%);
}

.tacho-daily-bar .driving {
  background: #42e8d5;
}

.tacho-daily-bar .work {
  background: #ffb84a;
}

.tacho-daily-bar .availability {
  background: #6ea8ff;
}

.tacho-daily-bar .rest {
  background: rgba(162, 179, 199, 0.55);
}

.tacho-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.tacho-summary-grid span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.tacho-summary-grid strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.tacho-day-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.tacho-day-head,
.tacho-day-row {
  display: grid;
  grid-template-columns: 108px repeat(7, minmax(86px, 1fr)) 38px;
  gap: 6px;
  min-width: 820px;
  align-items: center;
}

.tacho-day-head {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tacho-day-row {
  padding: 8px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.tacho-day-row:hover,
.tacho-day-row.active {
  border-color: rgba(73, 213, 255, 0.58);
  background: rgba(73, 213, 255, 0.09);
}

.tacho-day-row.ok {
  border-left-color: #42e8d5;
}

.tacho-day-row.warning,
.tacho-day-row.missing {
  border-left-color: #ffb84a;
}

.tacho-day-row.danger {
  border-left-color: #ff5c77;
}

.tacho-day-warning-slot {
  display: flex;
  justify-content: flex-end;
}

.tacho-day-warning {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 184, 74, 0.74);
  border-radius: 999px;
  color: #111827;
  background: #ffb84a;
  font-weight: 950;
  cursor: pointer;
}

.tacho-day-timeline {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.tacho-day-axis {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: center;
  height: 18px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.tacho-day-axis span {
  position: static;
  transform: none;
  text-align: center;
}

.tacho-day-axis span:first-child {
  text-align: left;
}

.tacho-day-axis span:last-child {
  text-align: right;
}

.tacho-day-track {
  position: relative;
  overflow: hidden;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px calc(100% / 24)),
    rgba(3, 12, 24, 0.34);
}

.tacho-day-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 2px;
}

.tacho-day-track i.driving {
  background: #42e8d5;
}

.tacho-day-track i.work {
  background: #ffb84a;
}

.tacho-day-track i.availability {
  background: #6ea8ff;
}

.tacho-day-track i.rest {
  background: rgba(162, 179, 199, 0.62);
}

.tacho-day-track em {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.tacho-day-detail {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(73, 213, 255, 0.24);
  border-radius: 8px;
  background: rgba(73, 213, 255, 0.055);
}

.tacho-day-detail-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.tacho-day-detail-metrics span {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.tacho-day-detail-metrics strong {
  display: block;
  color: var(--text);
}

.tacho-day-detail-metrics .ok strong {
  color: #42e8d5;
}

.tacho-day-detail-metrics .warning strong {
  color: #ffb84a;
}

.tacho-day-detail-metrics .danger strong {
  color: #ff5c77;
}

.tacho-day-segments {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tacho-highlight {
  border-color: rgba(73, 213, 255, 0.8) !important;
  box-shadow: 0 0 0 2px rgba(73, 213, 255, 0.2), 0 14px 32px rgba(73, 213, 255, 0.16);
  background: rgba(73, 213, 255, 0.11) !important;
}

.tacho-highlight-soft {
  border-color: rgba(73, 213, 255, 0.42) !important;
  background: rgba(73, 213, 255, 0.055) !important;
}

.tacho-segment-row.tacho-highlight {
  transform: translateX(2px);
}

.tacho-segment-row.tacho-highlight strong {
  color: var(--cyan);
}

.tacho-segment-list {
  display: grid;
  gap: 10px;
}

.tacho-segment-day {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.tacho-segment-day summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
}

.tacho-segment-day summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tacho-segment-rows {
  display: grid;
  border-top: 1px solid var(--line);
}

.tacho-segment-row {
  display: grid;
  grid-template-columns: 58px 58px minmax(120px, 1fr) 90px;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border-left: 4px solid rgba(162, 179, 199, 0.5);
  color: var(--muted);
  font-size: 12px;
}

.tacho-segment-row + .tacho-segment-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tacho-segment-row strong {
  color: var(--text);
}

.tacho-segment-row.driving {
  border-left-color: #42e8d5;
}

.tacho-segment-row.work {
  border-left-color: #ffb84a;
}

.tacho-segment-row.availability {
  border-left-color: #6ea8ff;
}

.tacho-segment-row.rest {
  border-left-color: rgba(162, 179, 199, 0.75);
}

.tacho-control-note {
  color: var(--muted);
  font-size: 12px;
}

.tacho-empty-state {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px dashed rgba(73, 213, 255, 0.35);
  border-radius: 8px;
  background: rgba(73, 213, 255, 0.06);
}

.tacho-empty-state strong {
  color: var(--cyan);
}

.tacho-observed-dates {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.tacho-observed-dates strong {
  color: var(--text);
  font-size: 13px;
}

.tacho-observed-dates div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tacho-observed-dates span {
  padding: 6px 8px;
  border: 1px solid rgba(73, 213, 255, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(73, 213, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.tacho-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tacho-hints span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 800;
}

.tacho-detail-view .ride-detail-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
}

.tacho-comparison-panel {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(73, 213, 255, 0.22);
  border-radius: 8px;
  background: rgba(73, 213, 255, 0.055);
}

.tacho-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.tacho-comparison-grid span {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.tacho-comparison-grid strong {
  display: block;
  color: var(--text);
  font-size: 17px;
}

.tacho-comparison-grid .ok strong {
  color: #42e8d5;
}

.tacho-comparison-grid .warning strong {
  color: #ffb84a;
}

.tacho-comparison-grid .danger strong {
  color: #ff5c77;
}

.tacho-review-list {
  display: grid;
  gap: 8px;
}

.tacho-review-row {
  display: grid;
  grid-template-columns: 110px minmax(160px, 1fr) minmax(220px, 1.4fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(162, 179, 199, 0.5);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tacho-review-row:hover {
  border-color: rgba(73, 213, 255, 0.6);
  background: rgba(73, 213, 255, 0.09);
}

.tacho-review-row.missing,
.tacho-review-row.warning {
  border-left-color: #ffb84a;
}

.tacho-review-row.danger {
  border-left-color: #ff5c77;
}

.tacho-review-row small {
  color: var(--muted);
}

.tacho-compare-overview {
  display: grid;
  gap: 14px;
}

.tacho-compare-body {
  display: grid;
  gap: 12px;
}

.tacho-compare-overview.is-collapsed .tacho-compare-body {
  display: none;
}

.tacho-compare-list .tacho-review-row {
  grid-template-columns: 112px minmax(150px, 1fr) minmax(260px, 1.4fr) auto auto;
}

.tacho-attendance-admin {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(73, 213, 255, 0.22);
  border-radius: 8px;
  background: rgba(73, 213, 255, 0.055);
}

.tacho-attendance-admin-grid {
  display: grid;
  gap: 8px;
}

.tacho-attendance-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(162, 179, 199, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tacho-attendance-admin-row.warning,
.tacho-attendance-admin-row.missing {
  border-left-color: #ffb84a;
}

.tacho-attendance-admin-row.danger {
  border-left-color: #ff5c77;
}

.tacho-attendance-admin-row.ok {
  border-left-color: #42e8d5;
}

.tacho-attendance-admin-row span,
.tacho-attendance-admin-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 860px) {
  .tacho-attendance-admin-row {
    grid-template-columns: 1fr;
  }

  .tacho-compare-list .tacho-review-row {
    grid-template-columns: 1fr;
  }
}

.dispatcher-alert-panel {
  display: grid;
  gap: 14px;
}

.dispatcher-alert-list {
  display: grid;
  gap: 9px;
}

.dispatcher-alert {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #ffb84a;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.dispatcher-alert.danger {
  border-left-color: #ff5c77;
}

.dispatcher-alert strong,
.dispatcher-alert span {
  display: block;
}

.dispatcher-alert span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .tacho-compare-list .tacho-review-row,
  .dispatcher-alert {
    grid-template-columns: 1fr;
  }

  .dispatcher-alert .mini,
  .tacho-compare-list .mini {
    width: 100%;
  }
}

.tacho-violation-list {
  display: grid;
  gap: 8px;
}

.tacho-violation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid rgba(255, 184, 74, 0.35);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 184, 74, 0.08);
  font: inherit;
  text-align: left;
  cursor: default;
}

.tacho-violation-main {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tacho-day-row strong {
  display: grid;
  gap: 2px;
}

.tacho-day-row strong small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.tacho-violation.critical {
  border-color: rgba(255, 92, 119, 0.44);
  background: rgba(255, 92, 119, 0.1);
}

.tacho-violation:hover {
  border-color: rgba(73, 213, 255, 0.72);
  background: rgba(73, 213, 255, 0.1);
}

.tacho-violation.active {
  border-color: rgba(73, 213, 255, 0.86);
  background: rgba(73, 213, 255, 0.14);
  box-shadow: 0 0 0 2px rgba(73, 213, 255, 0.16);
}

.tacho-selected-violation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(255, 184, 74, 0.44);
  border-left: 5px solid #ffb84a;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 184, 74, 0.13), rgba(73, 213, 255, 0.06));
}

.tacho-selected-violation.critical {
  border-color: rgba(255, 92, 119, 0.52);
  border-left-color: #ff5c77;
  background: linear-gradient(135deg, rgba(255, 92, 119, 0.16), rgba(73, 213, 255, 0.05));
}

.tacho-selected-violation h4 {
  margin: 2px 0 4px;
  font-size: 20px;
}

.tacho-selected-violation p {
  margin: 0;
  color: var(--text);
}

.tacho-selected-violation strong {
  display: inline-block;
  margin-top: 8px;
  color: var(--cyan);
}

.tacho-advice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.tacho-advice-grid span {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(73, 213, 255, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.tacho-advice-grid b {
  color: var(--text);
}

.tacho-country-list,
.tacho-attendance-list {
  display: grid;
  gap: 8px;
}

.tacho-country-list div,
.tacho-attendance-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tacho-country-list span,
.tacho-attendance-row small,
.tacho-attendance-row em {
  color: var(--muted);
  font-style: normal;
}

.tacho-attendance-draft {
  margin-top: 12px;
}

.tacho-attendance-row {
  grid-template-columns: auto minmax(140px, 1fr) auto minmax(130px, auto);
  cursor: pointer;
}

.tacho-attendance-row input {
  width: 18px;
  height: 18px;
}

.tacho-attendance-row > span {
  display: grid;
  gap: 2px;
}

.tacho-attendance-row.locked {
  opacity: 0.72;
  cursor: default;
}

.settings-editor {
  display: grid;
  gap: 14px;
}

.settings-editor-head,
.attendance-admin-filter {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-editor .form-grid label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.settings-editor .form-grid .wide {
  grid-column: 1 / -1;
}

.settings-editor .form-grid input,
.settings-editor .form-grid select,
.settings-editor .form-grid textarea {
  margin-top: 6px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
}

.compact-list {
  max-height: 280px;
  overflow: auto;
}

.ops-card.slim {
  padding: 10px 12px;
}

.admin-attendance-table {
  min-width: 1120px;
}

.admin-attendance-table td:first-child {
  min-width: 150px;
}

.admin-attendance-table td:nth-child(2) {
  min-width: 112px;
}

.admin-attendance-table td:nth-child(2) span,
.admin-attendance-table td:nth-child(2) small {
  display: block;
}

.admin-attendance-table .admin-att-hours {
  width: 78px;
  color: var(--cyan);
  font-weight: 900;
  text-align: center;
}

.settings-terms {
  max-height: 280px;
  overflow: auto;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  white-space: pre-wrap;
}

.stack-actions {
  justify-content: flex-end;
}

.person-card,
.vehicle-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.avatar,
.vehicle-plate {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #061016;
  background: var(--cyan);
  font-weight: 950;
}

.avatar {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.vehicle-plate {
  min-width: 104px;
  min-height: 42px;
  padding: 8px 10px;
  letter-spacing: 0;
}

.driver-console {
  max-width: none;
}

.driver-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
}

.attendance-card {
  min-width: 260px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.attendance-card span {
  color: var(--muted);
  font-size: 13px;
}

.attendance-card strong {
  display: block;
  margin: 6px 0 10px;
  font-size: 22px;
}

.driver-datebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.driver-datebar input,
.attendance-edit input,
.attendance-edit textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
}

.driver-datebar input {
  height: 32px;
  padding: 0 9px;
}

.attendance-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.attendance-edit label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.attendance-edit label.wide {
  grid-column: 1 / -1;
}

.attendance-edit input,
.attendance-edit textarea {
  width: 100%;
  padding: 8px 9px;
}

.attendance-edit textarea {
  resize: vertical;
}

.attendance-month {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.attendance-month-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.attendance-table-wrap {
  overflow-x: auto;
}

.attendance-table {
  min-width: 860px;
}

.attendance-table td,
.attendance-table th {
  padding: 8px 10px;
}

.attendance-table input {
  width: 100%;
  min-width: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
}

.attendance-table .att-hours {
  max-width: 78px;
  color: var(--muted);
}

.attendance-table .weekend-row td {
  background: rgba(255, 198, 109, 0.06);
}

.attendance-table .row-selected td {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.attendance-table .dirty td {
  background: rgba(84, 240, 166, 0.06);
}

.day-jump {
  min-width: 64px;
}

.driver-timeline {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.driver-timeline::before {
  content: "";
  position: absolute;
  left: 55px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(var(--cyan), rgba(84, 240, 166, 0.2));
}

.driver-stop {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
}

.driver-stop time {
  z-index: 1;
  align-self: start;
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(86, 217, 255, 0.38);
  border-radius: 8px;
  color: var(--cyan);
  background: #08111a;
  font-weight: 950;
}

.driver-stop-body {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.driver-stop-body h3 {
  margin-top: 9px;
  font-size: 22px;
}

.driver-note {
  margin-top: 9px;
  color: var(--soft);
}

.driver-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.driver-list.compact .driver-job {
  opacity: 0.9;
}

.driver-job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
}

.driver-job h3 {
  margin-top: 8px;
  font-size: 22px;
}

.driver-job ol {
  display: grid;
  gap: 7px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--soft);
}

.driver-job li span {
  color: var(--muted);
}

.driver-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link,
.upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.text-link,
.doc-links a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 800;
}

.text-link:hover,
.doc-links a:hover {
  text-decoration: underline;
}

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.doc-links a,
.doc-links span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(86, 217, 255, 0.08);
}

.upload-label {
  position: relative;
  overflow: hidden;
}

.upload-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    inset: 0 auto 0 0;
    width: 290px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .only-mobile {
    display: grid;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .hero-strip,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    align-items: flex-start;
  }

  .search {
    min-width: 0;
    width: 100%;
  }

  .stats,
  .ops-overview,
  .grid-two,
  .planner-board {
    grid-template-columns: 1fr;
  }

  .planner-lane {
    min-height: auto;
  }

  .planner-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-grid {
    grid-template-columns: 122px minmax(0, 1fr);
  }

  .schedule-corner,
  .schedule-vehicle {
    padding-left: 8px;
    padding-right: 8px;
  }

  .driver-head,
  .driver-job {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .attendance-card {
    min-width: 0;
  }

  .attendance-edit {
    grid-template-columns: 1fr;
  }

  .driver-stop {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .driver-timeline::before {
    left: 35px;
  }

  .driver-actions {
    justify-content: stretch;
  }

  .driver-actions button {
    flex: 1;
  }

  .ops-card,
  .person-card,
  .vehicle-card {
    grid-template-columns: 1fr;
  }

  .stack-actions {
    justify-content: stretch;
  }

  .stack-actions button,
  .stack-actions a {
    flex: 1;
  }

  .ride-schedule li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .filter-panel,
  .ares-tools,
  .stops-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stop-row {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .settings-editor-head,
  .attendance-admin-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-editor-head .primary,
  .attendance-admin-filter .primary {
    width: 100%;
  }

  .attendance-table-wrap {
    margin-left: -4px;
    margin-right: -4px;
  }

  .settings-list div {
    grid-template-columns: 1fr;
  }
}

/* Final planner overrides after the base responsive rules. */
.planner-console {
  border-color: #21314c;
  background: #0b1220;
}

.planner-toolbar,
.planner-week-tabs {
  background: #101827;
}

.planner-toolbar h2 {
  color: #f8fbff;
}

.schedule-grid {
  grid-template-columns: 200px minmax(0, 1fr);
  background: #0b1220;
}

.schedule-left {
  background: #0a111d;
}

.schedule-corner {
  height: 66px;
  justify-content: space-between;
  padding: 0 16px;
  color: #b9d4f3;
}

.schedule-vehicle {
  justify-items: center;
  text-align: center;
  background: #0c1422;
}

.schedule-vehicle strong {
  color: #ffffff;
  font-size: 20px;
}

.vehicle-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.vehicle-status.free {
  color: #00e197;
  border: 1px solid #00b875;
  background: rgba(0,184,117,.14);
}

.vehicle-status.busy {
  color: #ffb32b;
  border: 1px solid #ffb32b;
  background: rgba(255,179,43,.12);
}

.schedule-shifts {
  height: 36px;
  color: #ffffff;
}

.schedule-shifts .shift-night {
  background: #294898;
}

.schedule-shifts .shift-morning {
  background: #20b8d0;
}

.schedule-shifts .shift-afternoon {
  background: #f6a313;
}

.schedule-shifts .shift-evening {
  background: #e9292f;
}

.schedule-hours {
  height: 30px;
  background: #0d1524;
  color: #ffffff;
  font-weight: 950;
}

.schedule-body {
  background-color: #0b1220;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size:
    var(--planner-hour-width, 84px) 100%,
    var(--planner-quarter-width, 21px) 100%;
}

.schedule-row {
  border-bottom: 1px solid #24324a;
}

.schedule-task {
  border: 1px solid #25344e;
  border-left: 5px solid #10b981;
  border-radius: 8px;
  color: #ffffff;
  background: #101827;
}

.schedule-task.transfer {
  border-color: #07936f;
  border-left-color: #00c083;
  background:
    repeating-linear-gradient(135deg, rgba(0,194,160,.34) 0 12px, rgba(239,42,62,.28) 12px 24px),
    #0d2230;
}

/* Harmonogram lock: final readable planner layer. */
body.planner-shell .planner-console {
  position: relative;
  overflow: visible;
  border-color: rgba(86, 217, 255, 0.16);
  background: rgba(7, 12, 22, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 24px 70px rgba(0, 0, 0, 0.22);
}

body.planner-shell .planner-toolbar,
body.planner-shell .planner-toolbar-original,
body.planner-shell .planner-week-tabs {
  position: relative;
  z-index: 40;
  overflow: visible;
  background: rgba(9, 15, 27, 0.24);
  backdrop-filter: blur(18px);
}

body.planner-shell .planner-toolbar-original {
  flex-wrap: wrap;
  border-bottom-color: rgba(86, 217, 255, 0.16);
}

body.planner-shell .planner-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

body.planner-shell .planner-title .planner-logo {
  width: 52px;
  height: 52px;
}

body.planner-shell .planner-title h2 {
  margin: 0;
  color: #f8fbff;
  line-height: 1.05;
}

body.planner-shell .planner-view-menu {
  z-index: 90;
}

body.planner-shell .planner-view-menu[open] summary {
  border-color: rgba(86, 217, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(86, 217, 255, 0.12);
}

body.planner-shell .planner-view-menu .planner-controls {
  z-index: 320;
  color: var(--text);
}

body.planner-shell .planner-new-ride {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(86, 217, 255, 0.2);
}

body.planner-shell .schedule-grid {
  border-color: rgba(86, 217, 255, 0.16);
  background: rgba(4, 10, 20, 0.04);
}

body.planner-shell .schedule-left,
body.planner-shell .schedule-corner,
body.planner-shell .schedule-vehicle,
body.planner-shell .schedule-body {
  background-color: rgba(5, 11, 22, 0.11);
}

body.planner-shell .schedule-vehicle-head .planner-order-tools {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

body.planner-shell .schedule-vehicle:hover .planner-order-tools,
body.planner-shell .schedule-vehicle:focus-within .planner-order-tools {
  opacity: 1;
  pointer-events: auto;
}

body.planner-shell .schedule-hours {
  color: #ffffff;
  background: rgba(7, 13, 25, 0.70);
  backdrop-filter: blur(12px);
}

body.planner-shell .schedule-body {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

body.planner-shell .schedule-row {
  background: rgba(4, 10, 20, 0.03);
  border-bottom-color: rgba(142, 180, 213, 0.18);
}

body.planner-shell .schedule-task {
  background: rgba(14, 23, 38, 0.76);
  backdrop-filter: blur(10px);
}

body.planner-shell .schedule-task.dragging {
  z-index: 70;
  pointer-events: none;
  opacity: 0.92;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(86, 217, 255, 0.45);
}

body.light.planner-shell .planner-console {
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 70px rgba(36, 56, 76, 0.15);
}

body.light.planner-shell .planner-toolbar,
body.light.planner-shell .planner-toolbar-original,
body.light.planner-shell .planner-week-tabs {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.22);
}

body.light.planner-shell .planner-title h2 {
  color: #102033;
}

body.light.planner-shell .planner-view-menu summary,
body.light.planner-shell .planner-round,
body.light.planner-shell .planner-primary,
body.light.planner-shell .planner-transfer-toggle,
body.light.planner-shell .planner-theme-toggle,
body.light.planner-shell .planner-date-pill {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 24px rgba(36, 56, 76, 0.10);
}

body.light.planner-shell .planner-primary,
body.light.planner-shell .planner-new-ride,
body.light.planner-shell .planner-week-tabs button.active {
  color: #ffffff;
  border-color: rgba(0, 119, 168, 0.38);
  background: #0f4f88;
}

body.light.planner-shell .planner-date-pill input {
  color: #102033;
}

body.light.planner-shell .planner-view-menu .planner-controls {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.96);
}

body.light.planner-shell .schedule-grid {
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

body.light.planner-shell .schedule-left,
body.light.planner-shell .schedule-corner,
body.light.planner-shell .schedule-vehicle,
body.light.planner-shell .schedule-body {
  background-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

body.light.planner-shell .schedule-corner {
  color: #dbeafe;
}

body.light.planner-shell .schedule-vehicle {
  color: #102033;
}

body.light.planner-shell .schedule-vehicle strong {
  color: #102033;
}

body.light.planner-shell .schedule-vehicle span,
body.light.planner-shell .schedule-vehicle small {
  color: #42556b;
}

body.light.planner-shell .schedule-row {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(15, 23, 42, 0.24);
}

body.light.planner-shell .schedule-body {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.13) 1px, transparent 1px),
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

body.light.planner-shell .schedule-hours {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.84);
}

body.light.planner-shell .schedule-task {
  color: #102033;
  border-color: rgba(15, 23, 42, 0.18);
  border-left-color: #0f9f6e;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(36, 56, 76, 0.14);
}

body.light.planner-shell .schedule-task .task-headline strong,
body.light.planner-shell .schedule-task time,
body.light.planner-shell .schedule-task .card-price {
  color: #102033;
}

body.light.planner-shell .schedule-task small {
  color: #42556b;
}

.stats-chart,
.stats-chart-panel,
.stats-chart-layout {
  overflow: visible;
}

.stats-hover-tooltip {
  z-index: 9999;
  background: rgba(7, 12, 22, 0.98);
  transform: none;
}

.stats-hover-tooltip.visible {
  transform: none;
}

body.light .stats-hover-tooltip {
  background: rgba(255, 255, 255, 0.98);
}

dialog[data-editor-collection="rides"],
dialog[data-editor-collection="orders"] {
  width: min(1240px, calc(100vw - 28px));
}

dialog[data-editor-collection="orders"] .form-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}

dialog[data-editor-collection="orders"] .order-customer-side {
  grid-column: 1;
  border-left: 3px solid rgba(86, 217, 255, 0.45);
  padding-left: 10px;
}

dialog[data-editor-collection="orders"] .order-supplier-side {
  grid-column: 2;
  border-left: 3px solid rgba(84, 240, 166, 0.42);
  padding-left: 10px;
}

.stop-row {
  grid-template-columns: 42px 124px minmax(320px, 2fr) 126px 96px 38px !important;
  align-items: center;
}

.stop-drag-handle {
  width: 42px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  cursor: grab;
}

.stop-drag-handle::before {
  content: "";
  width: 18px;
  height: 14px;
  background: repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 6px);
  opacity: 0.8;
}

.stop-drag-handle:active {
  cursor: grabbing;
}

.stop-row.dragging-stop {
  opacity: 0.62;
  transform: scale(0.995);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.stop-address {
  min-width: 220px;
}

.stop-date {
  max-width: 126px;
}

.stop-time {
  max-width: 96px;
}

dialog[data-editor-collection="orders"] .form-grid {
  grid-auto-flow: row dense;
}

dialog[data-editor-collection="orders"] .order-helper,
dialog[data-editor-collection="orders"] .order-calc-summary {
  min-height: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

dialog[data-editor-collection="orders"] .order-calc-summary {
  grid-template-columns: 1fr;
  gap: 8px;
}

dialog[data-editor-collection="orders"] .order-calc-summary div {
  padding: 8px;
}

body.light .stop-drag-handle,
body.light dialog[data-editor-collection="orders"] .order-helper,
body.light dialog[data-editor-collection="orders"] .order-calc-summary {
  background: rgba(255, 255, 255, 0.74);
}

@media (max-width: 860px) {
  dialog[data-editor-collection="orders"] .form-grid,
  dialog[data-editor-collection="rides"] .form-grid {
    grid-template-columns: 1fr;
  }

  dialog[data-editor-collection="orders"] .order-customer-side,
  dialog[data-editor-collection="orders"] .order-supplier-side {
    grid-column: 1;
  }

  .stop-row {
    grid-template-columns: 42px 1fr !important;
  }

  .stop-row .stop-type,
  .stop-row .stop-address,
  .stop-row .stop-date,
  .stop-row .stop-time,
  .stop-row [data-remove-stop] {
    grid-column: 2;
    max-width: none;
  }
}

/* Final dispatcher alert and ride detail overrides. */
.dispatcher-alert-panel.is-collapsed .dispatcher-alert-list {
  display: none;
}

.dispatcher-alert-tools,
.dispatcher-alert-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dispatcher-alert-toggle {
  min-width: 108px;
}

.dispatcher-alert-toggle span {
  display: inline-block;
  margin-right: 4px;
  font-size: 18px;
  line-height: 1;
}

dialog[data-editor-collection="rideDetail"],
dialog[data-editor-collection="orderDetail"] {
  width: min(1280px, calc(100vw - 24px));
}

dialog[data-editor-collection="rideDetail"] .dialog-card,
dialog[data-editor-collection="orderDetail"] .dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 28px);
  padding: 16px;
}

dialog[data-editor-collection="rideDetail"] #editorFields,
dialog[data-editor-collection="orderDetail"] #editorFields {
  overflow: auto;
  max-height: calc(100vh - 150px);
}

.ride-detail-view {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ride-detail-hero,
.ride-detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.ride-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 12px;
  align-items: start;
  padding: 16px;
}

.ride-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.ride-detail-section {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.ride-detail-side {
  display: grid;
  gap: 12px;
}

.ride-detail-resolve {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(255, 184, 74, 0.32);
  background: rgba(255, 184, 74, 0.065);
}

.compact-schedule div {
  grid-template-columns: 150px 96px minmax(0, 1fr);
  padding: 10px 0;
}

.compact-schedule strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

@media (max-width: 900px) {
  .ride-detail-hero,
  .ride-detail-grid,
  .ride-detail-resolve {
    grid-template-columns: 1fr;
  }

  .dispatcher-alert-actions {
    justify-content: flex-start;
  }
}
