:root {
  color-scheme: light;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --line: #dbe1ea;
  --text: #152033;
  --muted: #69768b;
  --accent: #14213d;
  --danger: #b8372f;
  --success: #1d7a5a;
  --info: #3267e3;
  --warning: #f7c84b;
  --shadow: 0 24px 70px rgba(20, 33, 61, 0.12);
  --window-surface: rgba(255, 255, 255, 0.86);
  --window-surface-strong: rgba(255, 255, 255, 0.92);
  --window-surface-soft: rgba(255, 255, 255, 0.52);
  --window-border: rgba(255, 255, 255, 0.72);
  --window-shadow: 0 30px 80px rgba(20, 33, 61, 0.2);
  --window-glass-filter: blur(4px) saturate(1.55);
  --window-glass-filter-soft: blur(4px) saturate(1.35);
  --window-glass-base: rgba(255, 255, 255, 0.2);
  --window-glass-base-strong: rgba(255, 255, 255, 0.3);
  --window-frost-tint: rgba(255, 255, 255, 0.14);
  --window-frost-tint-strong: rgba(255, 255, 255, 0.22);
  --control-bg: rgba(255, 255, 255, 0.92);
  --control-bg-strong: rgba(255, 255, 255, 0.98);
  --control-bg-soft: rgba(20, 33, 61, 0.06);
  --control-bg-hover: rgba(50, 103, 227, 0.1);
  --control-border: rgba(126, 143, 170, 0.36);
  --control-border-strong: rgba(50, 103, 227, 0.52);
  --control-text: var(--text);
  --control-muted: var(--muted);
  --control-focus: rgba(50, 103, 227, 0.12);
  --control-popover-bg: rgba(255, 255, 255, 0.98);
  --control-selected-bg: rgba(50, 103, 227, 0.12);
  --control-selected-text: var(--text);
  --range-track-bg: rgba(20, 33, 61, 0.1);
  --range-track-border: rgba(109, 126, 153, 0.18);
  --range-fill: rgba(29, 53, 107, 0.9);
  --range-fill-boost: rgba(255, 194, 61, 0.95);
  --range-thumb-bg: #14213d;
  --range-thumb-border: #ffffff;
  --range-thumb-shadow: 0 4px 12px rgba(20, 33, 61, 0.22);
  --window-titlebar-bg: linear-gradient(90deg, #1f2f53 0%, #4969a5 52%, #1f2f53 100%);
  --window-titlebar-text: #ffffff;
  --window-titlebar-muted: rgba(255, 255, 255, 0.8);
  --table-header-bg: linear-gradient(135deg, #082f5f 0%, #0f6395 52%, #082f5f 100%);
  --table-header-text: #e8fbff;
  --table-header-border: rgba(23, 217, 231, 0.24);
  --table-header-bottom: rgba(23, 217, 231, 0.24);
  --topbar-button-border: rgba(150, 158, 172, 0.34);
  --topbar-button-bg:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.78) 0 12%, rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 0.12) 52%, transparent 72%),
    radial-gradient(circle at 50% 54%, rgba(154, 160, 176, 0.14) 0 22%, rgba(154, 160, 176, 0.08) 46%, transparent 76%),
    linear-gradient(145deg, #f5f7fb 0%, #e3e7ef 48%, #d5d9e3 100%);
  --topbar-button-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 3px rgba(73, 82, 98, 0.14);
  --topbar-button-hover-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    inset 0 -1px 3px rgba(73, 82, 98, 0.18),
    0 8px 22px rgba(20, 33, 61, 0.16);
  --topbar-button-icon-filter: none;
  --z-floating-window-layer: 1;
  --z-floating-chat-layer: 1;
  --z-chat-head-layer: 90000;
  --z-popup-layer: 90000;
  --z-critical-popup-layer: 91000;
  --z-critical-confirm-layer: 2147483200;
  --z-session-expired-layer: 2147483647;
  --z-theme-passing-layer: 2147483600;
  --z-app-loader-layer: 2147483600;
  --driver-visual-viewport-width: 100vw;
  --driver-visual-viewport-height: 100dvh;
  --driver-visual-viewport-offset-top: 0px;
  --driver-visual-viewport-offset-left: 0px;
  --driver-viewport-correction-top: 0px;
}

[hidden] {
  display: none !important;
}

body.dispatch-theme-fire,
body.driver-page.driver-theme-fire {
  --window-glass-base: rgba(64, 12, 3, 0.2);
  --window-glass-base-strong: rgba(92, 18, 5, 0.3);
  --window-frost-tint: rgba(64, 12, 3, 0.18);
  --window-frost-tint-strong: rgba(92, 18, 5, 0.26);
  --window-titlebar-bg: linear-gradient(90deg, #4b0b02 0%, #d6420a 52%, #4b0b02 100%);
  --window-titlebar-text: #fff7e8;
  --window-titlebar-muted: rgba(255, 247, 232, 0.78);
  --table-header-bg: linear-gradient(135deg, #4b0b02 0%, #d6420a 52%, #4b0b02 100%);
  --table-header-text: #ffe694;
  --table-header-border: rgba(255, 174, 62, 0.22);
  --table-header-bottom: rgba(255, 174, 62, 0.26);
  --topbar-button-border: rgba(255, 218, 112, 0.62);
  --topbar-button-bg:
    radial-gradient(circle at 50% 50%, rgba(255, 249, 205, 0.76) 0 11%, rgba(255, 213, 103, 0.42) 30%, rgba(255, 213, 103, 0.14) 52%, transparent 74%),
    radial-gradient(circle at 50% 56%, rgba(255, 71, 12, 0.3) 0 22%, rgba(255, 71, 12, 0.12) 48%, transparent 78%),
    linear-gradient(145deg, #fff0a4 0%, #ffb029 36%, #c43a0a 72%, #4c0802 100%);
  --topbar-button-shadow:
    inset 0 1px 0 rgba(255, 251, 214, 0.82),
    inset 0 -2px 5px rgba(72, 8, 0, 0.34),
    0 0 18px rgba(255, 78, 0, 0.2);
  --topbar-button-hover-shadow:
    inset 0 1px 0 rgba(255, 253, 226, 0.92),
    inset 0 -2px 5px rgba(72, 8, 0, 0.42),
    0 0 24px rgba(255, 92, 0, 0.36),
    0 10px 28px rgba(73, 8, 0, 0.28);
  --topbar-button-icon-filter: drop-shadow(0 1px 0 rgba(255, 241, 190, 0.45)) saturate(1.18) contrast(1.05);
}

body.dispatch-theme-dark,
body.driver-page.driver-theme-dark {
  --window-glass-base: rgba(9, 17, 32, 0.22);
  --window-glass-base-strong: rgba(22, 33, 52, 0.32);
  --window-frost-tint: rgba(9, 17, 32, 0.2);
  --window-frost-tint-strong: rgba(22, 33, 52, 0.28);
  --window-titlebar-bg: linear-gradient(90deg, #1f2c45 0%, #355ba1 52%, #1f2c45 100%);
  --window-titlebar-text: #f4f7ff;
  --window-titlebar-muted: rgba(237, 242, 255, 0.76);
  --table-header-bg: linear-gradient(135deg, #1f2c45 0%, #355ba1 52%, #1f2c45 100%);
  --table-header-text: #f4f7ff;
  --table-header-border: rgba(220, 230, 251, 0.18);
  --table-header-bottom: rgba(220, 230, 251, 0.18);
  --topbar-button-border: rgba(103, 151, 236, 0.54);
  --topbar-button-bg:
    radial-gradient(circle at 42% 31%, rgba(202, 222, 255, 0.28) 0 9%, rgba(95, 143, 224, 0.2) 29%, transparent 62%),
    radial-gradient(circle at 58% 64%, rgba(26, 52, 98, 0.66) 0 25%, rgba(13, 31, 61, 0.38) 52%, transparent 78%),
    linear-gradient(145deg, #4e74b2 0%, #284d88 42%, #143061 72%, #0b1e40 100%);
  --topbar-button-shadow:
    inset 0 1px 0 rgba(233, 242, 255, 0.4),
    inset 0 -2px 6px rgba(5, 14, 32, 0.54),
    0 8px 22px rgba(3, 12, 31, 0.2);
  --topbar-button-hover-shadow:
    inset 0 1px 0 rgba(244, 248, 255, 0.56),
    inset 0 -2px 6px rgba(5, 14, 32, 0.58),
    0 0 20px rgba(76, 127, 222, 0.2),
    0 12px 30px rgba(3, 12, 31, 0.34);
  --topbar-button-icon-filter: saturate(1.04) brightness(0.96) contrast(1.08) drop-shadow(0 1px 0 rgba(228, 238, 255, 0.16));
}

body.dispatch-theme-midnight,
body.driver-page.driver-theme-midnight {
  --window-glass-base: rgba(7, 8, 10, 0.22);
  --window-glass-base-strong: rgba(20, 21, 25, 0.32);
  --window-frost-tint: rgba(7, 8, 10, 0.2);
  --window-frost-tint-strong: rgba(20, 21, 25, 0.28);
  --window-titlebar-bg: linear-gradient(90deg, #0a0b0d 0%, #2f3541 52%, #0a0b0d 100%);
  --window-titlebar-text: #fafafa;
  --window-titlebar-muted: rgba(243, 244, 246, 0.72);
  --table-header-bg: linear-gradient(135deg, #0a0b0d 0%, #2f3541 52%, #0a0b0d 100%);
  --table-header-text: #f7f7fa;
  --table-header-border: rgba(255, 255, 255, 0.12);
  --table-header-bottom: rgba(255, 255, 255, 0.12);
  --topbar-button-border: rgba(255, 255, 255, 0.16);
  --topbar-button-bg:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.3) 0 12%, rgba(255, 255, 255, 0.12) 32%, rgba(255, 255, 255, 0.05) 54%, transparent 74%),
    radial-gradient(circle at 50% 56%, rgba(92, 101, 119, 0.28) 0 22%, rgba(92, 101, 119, 0.1) 48%, transparent 78%),
    linear-gradient(145deg, #3a3f4a 0%, #1e222b 48%, #090a0d 100%);
  --topbar-button-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -2px 5px rgba(0, 0, 0, 0.4);
  --topbar-button-hover-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -2px 5px rgba(0, 0, 0, 0.46),
    0 10px 26px rgba(0, 0, 0, 0.34);
  --topbar-button-icon-filter: brightness(1.06) contrast(1.08);
}

body.dispatch-theme-girly,
body.driver-page.driver-theme-girly {
  --window-glass-base: rgba(255, 242, 250, 0.2);
  --window-glass-base-strong: rgba(255, 249, 253, 0.3);
  --window-frost-tint: rgba(255, 242, 250, 0.14);
  --window-frost-tint-strong: rgba(255, 249, 253, 0.22);
  --window-titlebar-bg: linear-gradient(90deg, #d86fac 0%, #ffc4e2 52%, #d86fac 100%);
  --window-titlebar-text: #51203d;
  --window-titlebar-muted: rgba(81, 32, 61, 0.72);
  --table-header-bg: linear-gradient(135deg, #d86fac 0%, #ffc4e2 52%, #d86fac 100%);
  --table-header-text: #6a3456;
  --table-header-border: rgba(151, 74, 130, 0.24);
  --table-header-bottom: rgba(151, 74, 130, 0.28);
  --topbar-button-border: rgba(213, 104, 168, 0.38);
  --topbar-button-bg:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.68) 0 12%, rgba(255, 220, 240, 0.36) 32%, rgba(255, 220, 240, 0.12) 54%, transparent 74%),
    radial-gradient(circle at 50% 56%, rgba(216, 111, 172, 0.2) 0 22%, rgba(216, 111, 172, 0.08) 48%, transparent 78%),
    linear-gradient(145deg, #fff3fb 0%, #ffd1ea 48%, #f2a6d0 100%);
  --topbar-button-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 4px rgba(151, 74, 130, 0.14);
  --topbar-button-hover-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 4px rgba(151, 74, 130, 0.2),
    0 10px 24px rgba(216, 111, 172, 0.22);
}

body.dispatch-theme-test,
body.driver-page.driver-theme-test {
  --window-titlebar-bg: linear-gradient(90deg, #d9aa2c 0%, #ffe08a 52%, #d9aa2c 100%);
  --window-titlebar-text: #2d2412;
  --window-titlebar-muted: rgba(45, 36, 18, 0.74);
  --table-header-bg: linear-gradient(135deg, #d9aa2c 0%, #ffe08a 52%, #d9aa2c 100%);
  --table-header-text: #2d2412;
  --table-header-border: rgba(45, 36, 18, 0.2);
  --table-header-bottom: rgba(45, 36, 18, 0.24);
  --topbar-button-border: rgba(173, 122, 18, 0.36);
  --topbar-button-bg:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.68) 0 12%, rgba(255, 234, 166, 0.36) 32%, rgba(255, 234, 166, 0.12) 54%, transparent 74%),
    radial-gradient(circle at 50% 56%, rgba(217, 170, 44, 0.18) 0 22%, rgba(217, 170, 44, 0.07) 48%, transparent 78%),
    linear-gradient(145deg, #fff8dd 0%, #ffe39a 48%, #d9aa2c 100%);
  --topbar-button-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 4px rgba(109, 73, 0, 0.18);
  --topbar-button-hover-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 4px rgba(109, 73, 0, 0.24),
    0 10px 24px rgba(217, 170, 44, 0.2);
}

body.dispatch-theme-space,
body.driver-page.driver-theme-space {
  --window-glass-base: rgba(7, 12, 32, 0.22);
  --window-glass-base-strong: rgba(17, 29, 72, 0.32);
  --window-frost-tint: rgba(7, 12, 32, 0.2);
  --window-frost-tint-strong: rgba(17, 29, 72, 0.28);
  --window-titlebar-bg: linear-gradient(90deg, #080d22 0%, #3555b8 28%, #8f6cff 52%, #18477c 74%, #080d22 100%);
  --window-titlebar-text: #f7fbff;
  --window-titlebar-muted: rgba(225, 235, 255, 0.76);
  --table-header-bg: linear-gradient(135deg, #112052 0%, #3368cb 34%, #8b6dff 52%, #1d7cad 70%, #112052 100%);
  --table-header-text: #f7fbff;
  --table-header-border: rgba(202, 222, 255, 0.28);
  --table-header-bottom: rgba(146, 184, 255, 0.34);
  --topbar-button-border: rgba(160, 205, 255, 0.36);
  --topbar-button-bg:
    radial-gradient(circle at 50% 50%, rgba(240, 250, 255, 0.62) 0 12%, rgba(101, 185, 255, 0.24) 32%, rgba(101, 185, 255, 0.1) 54%, transparent 74%),
    radial-gradient(circle at 50% 56%, rgba(143, 108, 255, 0.24) 0 22%, rgba(143, 108, 255, 0.1) 48%, transparent 78%),
    linear-gradient(145deg, #e5f9ff 0%, #7bc9f4 32%, #5b6ee9 68%, #141a54 100%);
  --topbar-button-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -2px 5px rgba(20, 26, 84, 0.24),
    0 0 16px rgba(77, 205, 255, 0.16);
  --topbar-button-hover-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -2px 5px rgba(20, 26, 84, 0.3),
    0 0 24px rgba(77, 205, 255, 0.28),
    0 10px 28px rgba(26, 45, 125, 0.24);
  --topbar-button-icon-filter: drop-shadow(0 1px 0 rgba(215, 246, 255, 0.35)) saturate(1.08);
}

body.dispatch-theme-fire,
body.driver-page.driver-theme-fire {
  --control-bg: rgba(35, 5, 1, 0.86);
  --control-bg-strong: rgba(54, 9, 2, 0.96);
  --control-bg-soft: rgba(255, 214, 105, 0.11);
  --control-bg-hover: rgba(255, 177, 45, 0.18);
  --control-border: rgba(255, 181, 75, 0.5);
  --control-border-strong: rgba(255, 223, 120, 0.72);
  --control-text: #fff7d6;
  --control-muted: #ffc96f;
  --control-focus: rgba(255, 194, 61, 0.18);
  --control-popover-bg: rgba(49, 8, 2, 0.98);
  --control-selected-bg: rgba(255, 178, 54, 0.24);
  --control-selected-text: #fff7d6;
  --range-track-bg: rgba(255, 214, 105, 0.14);
  --range-track-border: rgba(255, 190, 82, 0.36);
  --range-fill: rgba(255, 159, 28, 0.96);
  --range-fill-boost: rgba(255, 225, 93, 0.98);
  --range-thumb-bg: #ffef9a;
  --range-thumb-border: #4b0b02;
  --range-thumb-shadow: 0 4px 14px rgba(255, 91, 0, 0.34);
}

body.dispatch-theme-dark,
body.driver-page.driver-theme-dark {
  --control-bg: rgba(255, 255, 255, 0.06);
  --control-bg-strong: rgba(255, 255, 255, 0.1);
  --control-bg-soft: rgba(220, 230, 251, 0.08);
  --control-bg-hover: rgba(100, 144, 232, 0.18);
  --control-border: rgba(220, 230, 251, 0.16);
  --control-border-strong: rgba(122, 162, 239, 0.54);
  --control-text: #f5f8ff;
  --control-muted: #bdcae3;
  --control-focus: rgba(100, 144, 232, 0.18);
  --control-popover-bg: rgba(31, 44, 69, 0.98);
  --control-selected-bg: rgba(100, 144, 232, 0.24);
  --control-selected-text: #f5f8ff;
  --range-track-bg: rgba(220, 230, 251, 0.12);
  --range-track-border: rgba(220, 230, 251, 0.2);
  --range-fill: rgba(95, 139, 222, 0.96);
  --range-fill-boost: rgba(247, 200, 75, 0.95);
  --range-thumb-bg: #edf2ff;
  --range-thumb-border: #34548d;
  --range-thumb-shadow: 0 4px 14px rgba(5, 16, 34, 0.38);
}

body.dispatch-theme-midnight,
body.driver-page.driver-theme-midnight {
  --control-bg: rgba(255, 255, 255, 0.045);
  --control-bg-strong: rgba(255, 255, 255, 0.075);
  --control-bg-soft: rgba(255, 255, 255, 0.055);
  --control-bg-hover: rgba(255, 255, 255, 0.11);
  --control-border: rgba(255, 255, 255, 0.09);
  --control-border-strong: rgba(255, 255, 255, 0.24);
  --control-text: #f3f4f6;
  --control-muted: #b7bdc9;
  --control-focus: rgba(255, 255, 255, 0.12);
  --control-popover-bg: rgba(18, 19, 23, 0.98);
  --control-selected-bg: rgba(255, 255, 255, 0.12);
  --control-selected-text: #ffffff;
  --range-track-bg: rgba(255, 255, 255, 0.1);
  --range-track-border: rgba(255, 255, 255, 0.13);
  --range-fill: rgba(166, 174, 188, 0.96);
  --range-fill-boost: rgba(245, 245, 245, 0.96);
  --range-thumb-bg: #f5f5f5;
  --range-thumb-border: #2f3541;
  --range-thumb-shadow: 0 4px 14px rgba(0, 0, 0, 0.44);
}

body.dispatch-theme-girly,
body.driver-page.driver-theme-girly {
  --control-bg: rgba(255, 255, 255, 0.82);
  --control-bg-strong: rgba(255, 255, 255, 0.96);
  --control-bg-soft: rgba(255, 220, 240, 0.42);
  --control-bg-hover: rgba(255, 193, 226, 0.56);
  --control-border: rgba(233, 175, 210, 0.84);
  --control-border-strong: rgba(193, 76, 149, 0.5);
  --control-text: #51203d;
  --control-muted: #9b648b;
  --control-focus: rgba(216, 111, 172, 0.16);
  --control-popover-bg: rgba(255, 247, 252, 0.98);
  --control-selected-bg: rgba(216, 111, 172, 0.18);
  --control-selected-text: #5e3356;
  --range-track-bg: rgba(151, 74, 130, 0.12);
  --range-track-border: rgba(233, 175, 210, 0.62);
  --range-fill: rgba(216, 111, 172, 0.96);
  --range-fill-boost: rgba(183, 96, 220, 0.96);
  --range-thumb-bg: #fff9ff;
  --range-thumb-border: #c14c95;
  --range-thumb-shadow: 0 4px 14px rgba(193, 76, 149, 0.24);
}

body.dispatch-theme-test,
body.driver-page.driver-theme-test {
  --control-bg: rgba(255, 255, 255, 0.82);
  --control-bg-strong: rgba(255, 255, 255, 0.96);
  --control-bg-soft: rgba(255, 224, 138, 0.28);
  --control-bg-hover: rgba(255, 214, 92, 0.34);
  --control-border: rgba(173, 122, 18, 0.24);
  --control-border-strong: rgba(173, 122, 18, 0.46);
  --control-text: #2d2412;
  --control-muted: #6f5b2d;
  --control-focus: rgba(217, 170, 44, 0.17);
  --control-popover-bg: rgba(255, 248, 221, 0.98);
  --control-selected-bg: rgba(217, 170, 44, 0.22);
  --control-selected-text: #2d2412;
  --range-track-bg: rgba(45, 36, 18, 0.12);
  --range-track-border: rgba(173, 122, 18, 0.24);
  --range-fill: rgba(217, 170, 44, 0.96);
  --range-fill-boost: rgba(20, 33, 61, 0.9);
  --range-thumb-bg: #fff8dd;
  --range-thumb-border: #d9aa2c;
  --range-thumb-shadow: 0 4px 14px rgba(173, 122, 18, 0.22);
}

body.dispatch-theme-space,
body.driver-page.driver-theme-space {
  --control-bg: rgba(6, 10, 27, 0.72);
  --control-bg-strong: rgba(15, 23, 51, 0.94);
  --control-bg-soft: rgba(158, 231, 255, 0.08);
  --control-bg-hover: rgba(95, 125, 255, 0.18);
  --control-border: rgba(146, 184, 255, 0.32);
  --control-border-strong: rgba(158, 231, 255, 0.56);
  --control-text: #f7fbff;
  --control-muted: #b9d0ff;
  --control-focus: rgba(95, 125, 255, 0.2);
  --control-popover-bg: rgba(12, 18, 48, 0.98);
  --control-selected-bg: rgba(102, 233, 255, 0.18);
  --control-selected-text: #f7fbff;
  --range-track-bg: rgba(146, 184, 255, 0.12);
  --range-track-border: rgba(146, 184, 255, 0.3);
  --range-fill: rgba(102, 233, 255, 0.96);
  --range-fill-boost: rgba(155, 114, 255, 0.96);
  --range-thumb-bg: #f7fbff;
  --range-thumb-border: #5f7dff;
  --range-thumb-shadow: 0 4px 16px rgba(77, 205, 255, 0.3);
}

* {
  box-sizing: border-box;
  color-scheme: light !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.22), transparent 22%),
    radial-gradient(circle at bottom right, rgba(50, 103, 227, 0.14), transparent 28%),
    linear-gradient(160deg, #eef3f8, #f8fafc 45%, #eef2f7);
}

input,
textarea,
select,
[contenteditable="true"] {
  color-scheme: light;
  user-select: text;
  -webkit-user-select: text;
}

body.dispatch-theme-fire {
  --surface: rgba(37, 7, 2, 0.82);
  --surface-strong: rgba(67, 13, 4, 0.92);
  --line: rgba(255, 179, 83, 0.36);
  --text: #fff6df;
  --muted: #ffd08a;
  --accent: #ffef9a;
  --danger: #ff3b1f;
  --success: #ffd75d;
  --info: #ff9f1c;
  --warning: #ffcf33;
  --shadow: 0 30px 90px rgba(80, 10, 0, 0.42);
  --window-surface: rgba(56, 10, 3, 0.88);
  --window-surface-strong: rgba(74, 12, 4, 0.94);
  --window-surface-soft: rgba(255, 98, 0, 0.22);
  --window-border: rgba(255, 190, 82, 0.42);
  --window-shadow: 0 34px 96px rgba(118, 18, 0, 0.42);
  color-scheme: dark;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 214, 84, 0.24), transparent 18%),
    radial-gradient(circle at 78% 8%, rgba(255, 91, 35, 0.22), transparent 22%),
    radial-gradient(circle at 50% 112%, rgba(255, 119, 0, 0.52), transparent 32%),
    linear-gradient(180deg, #180301 0%, #2d0602 45%, #4c0d03 78%, #7a2103 100%);
}

body.dispatch-theme-fire::before,
body.dispatch-theme-fire::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  pointer-events: none;
  z-index: 1;
}

body.dispatch-theme-fire::before {
  height: 30vh;
  opacity: 0.46;
  background:
    radial-gradient(ellipse at 8% 100%, rgba(255, 221, 69, 0.86) 0 9%, rgba(255, 98, 0, 0.66) 18%, transparent 42%),
    radial-gradient(ellipse at 23% 100%, rgba(255, 244, 153, 0.8) 0 7%, rgba(255, 79, 0, 0.74) 17%, transparent 39%),
    radial-gradient(ellipse at 44% 100%, rgba(255, 210, 44, 0.78) 0 8%, rgba(255, 61, 0, 0.7) 18%, transparent 42%),
    radial-gradient(ellipse at 66% 100%, rgba(255, 235, 120, 0.76) 0 7%, rgba(255, 92, 0, 0.72) 18%, transparent 40%),
    radial-gradient(ellipse at 87% 100%, rgba(255, 219, 64, 0.78) 0 8%, rgba(255, 72, 0, 0.72) 18%, transparent 41%);
  filter: blur(1px) saturate(140%);
  animation: dispatch-fire-rise 1.1s ease-in-out infinite alternate;
}

body.dispatch-theme-fire::after {
  inset: 0;
  opacity: 0.16;
  background:
    radial-gradient(circle at 18% 78%, rgba(255, 196, 52, 0.42), transparent 16%),
    radial-gradient(circle at 72% 62%, rgba(255, 68, 0, 0.34), transparent 19%),
    linear-gradient(0deg, rgba(255, 58, 0, 0.24), transparent 44%);
  mix-blend-mode: screen;
  animation: dispatch-heat-shimmer 2.4s ease-in-out infinite alternate;
}

@keyframes dispatch-fire-rise {
  from {
    transform: translateY(10px) scaleX(1);
  }

  to {
    transform: translateY(-8px) scaleX(1.035);
  }
}

@keyframes dispatch-heat-shimmer {
  from {
    transform: translate3d(-6px, 0, 0);
  }

  to {
    transform: translate3d(6px, -8px, 0);
  }
}

body.dispatch-theme-dark {
  --surface: rgba(31, 44, 69, 0.92);
  --surface-strong: #24314d;
  --line: #3a4b6b;
  --text: #edf2ff;
  --muted: #b0bdd4;
  --accent: #dce6fb;
  --shadow: 0 28px 80px rgba(5, 16, 34, 0.32);
  --window-surface: rgba(31, 44, 69, 0.9);
  --window-surface-strong: rgba(31, 44, 69, 0.94);
  --window-surface-soft: rgba(31, 44, 69, 0.68);
  --window-border: rgba(220, 230, 251, 0.12);
  --window-shadow: 0 32px 90px rgba(5, 16, 34, 0.36);
  color-scheme: dark;
  background-color: #17243a;
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.driver-page.driver-theme-dark {
  --surface: rgba(31, 44, 69, 0.92);
  --surface-strong: #24314d;
  --line: #3a4b6b;
  --text: #edf2ff;
  --muted: #b0bdd4;
  --accent: #dce6fb;
  --shadow: 0 28px 80px rgba(5, 16, 34, 0.32);
  --window-surface: rgba(31, 44, 69, 0.9);
  --window-surface-strong: rgba(31, 44, 69, 0.94);
  --window-surface-soft: rgba(31, 44, 69, 0.68);
  --window-border: rgba(220, 230, 251, 0.12);
  --window-shadow: 0 32px 90px rgba(5, 16, 34, 0.36);
  color-scheme: dark;
  background-color: #17243a;
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.dispatch-theme-midnight {
  --surface: rgba(12, 12, 14, 0.94);
  --surface-strong: #121317;
  --line: #2d3138;
  --text: #f3f4f6;
  --muted: #a7adb8;
  --accent: #f5f5f5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --window-surface: rgba(12, 12, 14, 0.88);
  --window-surface-strong: rgba(12, 12, 14, 0.93);
  --window-surface-soft: rgba(12, 12, 14, 0.68);
  --window-border: rgba(255, 255, 255, 0.08);
  --window-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
  background-color: #090a0c;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.driver-page.driver-theme-midnight {
  --surface: rgba(12, 12, 14, 0.94);
  --surface-strong: #121317;
  --line: #2d3138;
  --text: #f3f4f6;
  --muted: #a7adb8;
  --accent: #f5f5f5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --window-surface: rgba(12, 12, 14, 0.88);
  --window-surface-strong: rgba(12, 12, 14, 0.93);
  --window-surface-soft: rgba(12, 12, 14, 0.68);
  --window-border: rgba(255, 255, 255, 0.08);
  --window-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
  background-color: #090a0c;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.dispatch-theme-space,
body.driver-page.driver-theme-space {
  --surface: rgba(9, 14, 35, 0.9);
  --surface-strong: rgba(15, 23, 51, 0.96);
  --line: rgba(146, 184, 255, 0.3);
  --text: #eef5ff;
  --muted: #a9b9df;
  --accent: #9ee7ff;
  --danger: #ff6b8a;
  --success: #57e6b7;
  --info: #8aa7ff;
  --warning: #f6d365;
  --shadow: 0 30px 90px rgba(3, 7, 22, 0.5);
  --window-surface: rgba(9, 14, 35, 0.86);
  --window-surface-strong: rgba(15, 23, 51, 0.94);
  --window-surface-soft: rgba(77, 101, 229, 0.18);
  --window-border: rgba(146, 184, 255, 0.28);
  --window-shadow: 0 34px 96px rgba(3, 7, 22, 0.54);
  color-scheme: dark;
  background-color: #050816;
  background:
    radial-gradient(circle at 18% 18%, rgba(84, 190, 255, 0.28), transparent 18%),
    radial-gradient(circle at 78% 14%, rgba(155, 115, 255, 0.34), transparent 22%),
    radial-gradient(circle at 52% 112%, rgba(45, 255, 214, 0.16), transparent 28%),
    linear-gradient(160deg, #050816 0%, #0d1230 42%, #111a3f 68%, #060817 100%);
}

body.dispatch-theme-space::before,
body.driver-page.driver-theme-space::before,
body.dispatch-theme-space::after,
body.driver-page.driver-theme-space::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.dispatch-theme-space::before,
body.driver-page.driver-theme-space::before {
  z-index: 0;
  opacity: 0.72;
  background:
    radial-gradient(circle at 12% 24%, rgba(255, 255, 255, 0.86) 0 1px, transparent 1.6px),
    radial-gradient(circle at 38% 16%, rgba(158, 231, 255, 0.72) 0 1px, transparent 1.8px),
    radial-gradient(circle at 66% 28%, rgba(255, 255, 255, 0.7) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 86% 58%, rgba(196, 181, 253, 0.78) 0 1px, transparent 1.8px),
    radial-gradient(circle at 28% 74%, rgba(255, 255, 255, 0.74) 0 1px, transparent 1.7px);
  background-size: 180px 180px, 230px 230px, 270px 270px, 210px 210px, 310px 310px;
  animation: space-star-drift 42s linear infinite;
}

body.dispatch-theme-space::after,
body.driver-page.driver-theme-space::after {
  z-index: 0;
  opacity: 0.55;
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 0, 0, 0.72) 0 36px, rgba(91, 141, 255, 0.18) 37px 58px, transparent 62px),
    conic-gradient(from 12deg at 78% 18%, transparent 0deg, rgba(158, 231, 255, 0.16) 46deg, transparent 102deg, rgba(143, 108, 255, 0.18) 168deg, transparent 236deg, rgba(246, 211, 101, 0.14) 292deg, transparent 360deg),
    radial-gradient(ellipse at 26% 30%, rgba(91, 141, 255, 0.16), transparent 34%),
    radial-gradient(ellipse at 55% 72%, rgba(143, 108, 255, 0.14), transparent 36%);
  mix-blend-mode: screen;
  animation: space-nebula-drift 34s ease-in-out infinite alternate;
}

body.dispatch-theme-space .app-shell,
body.driver-page.driver-theme-space .app-shell {
  position: relative;
  z-index: 1;
}

html,
body,
body.dispatch-theme-fire,
body.driver-page.driver-theme-fire,
body.dispatch-theme-dark,
body.driver-page.driver-theme-dark,
body.dispatch-theme-midnight,
body.driver-page.driver-theme-midnight,
body.dispatch-theme-space,
body.driver-page.driver-theme-space {
  color-scheme: light;
}

select option,
select optgroup {
  background: var(--control-popover-bg, #ffffff);
  color: var(--control-text, #152033);
}

body.dispatch-theme-girly {
  --surface: rgba(255, 247, 252, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: #f0c9df;
  --text: #5e3356;
  --muted: #9f6f97;
  --accent: #c14c95;
  --danger: #d85d79;
  --success: #48a77f;
  --info: #9f6bff;
  --warning: #ffca6c;
  --shadow: 0 26px 76px rgba(193, 76, 149, 0.18);
  --window-surface: rgba(255, 247, 252, 0.84);
  --window-surface-strong: rgba(255, 255, 255, 0.9);
  --window-surface-soft: rgba(255, 247, 252, 0.58);
  --window-border: rgba(236, 183, 216, 0.72);
  --window-shadow: 0 30px 82px rgba(193, 76, 149, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 200, 235, 0.55), transparent 23%),
    radial-gradient(circle at top right, rgba(203, 183, 255, 0.32), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 233, 161, 0.28), transparent 24%),
    linear-gradient(160deg, #fff5fb, #fff9fd 48%, #fef1fb);
}

body.driver-page.driver-theme-girly {
  --surface: rgba(255, 247, 252, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: #f0c9df;
  --text: #5e3356;
  --muted: #9f6f97;
  --accent: #c14c95;
  --danger: #d85d79;
  --success: #48a77f;
  --info: #9f6bff;
  --warning: #ffca6c;
  --shadow: 0 26px 76px rgba(193, 76, 149, 0.18);
  --window-surface: rgba(255, 247, 252, 0.84);
  --window-surface-strong: rgba(255, 255, 255, 0.9);
  --window-surface-soft: rgba(255, 247, 252, 0.58);
  --window-border: rgba(236, 183, 216, 0.72);
  --window-shadow: 0 30px 82px rgba(193, 76, 149, 0.18);
  background:
    radial-gradient(circle at top left, rgba(255, 200, 235, 0.55), transparent 23%),
    radial-gradient(circle at top right, rgba(203, 183, 255, 0.32), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 233, 161, 0.28), transparent 24%),
    linear-gradient(160deg, #fff5fb, #fff9fd 48%, #fef1fb);
}

body.dispatch-theme-girly .app-shell,
body.driver-page.driver-theme-girly .app-shell {
  position: relative;
}

body.dispatch-theme-girly .app-shell::before,
body.driver-page.driver-theme-girly .app-shell::before {
  content: "🦄 ✨ 🦄";
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 20px;
  letter-spacing: 10px;
  opacity: 0.34;
  pointer-events: none;
  filter: saturate(1.08);
}

body.dispatch-theme-girly .app-shell::after,
body.driver-page.driver-theme-girly .app-shell::after {
  content: "✨ 🦄 ✨";
  position: absolute;
  bottom: 18px;
  left: 24px;
  font-size: 18px;
  letter-spacing: 8px;
  opacity: 0.28;
  pointer-events: none;
}

.theme-unicorn-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: var(--z-theme-passing-layer);
}

.theme-unicorn-field.hidden {
  display: none;
}

.theme-unicorn-sprite {
  position: absolute;
  top: var(--unicorn-top, 50%);
  left: -10vw;
  font-size: clamp(54px, 4.4vw, 82px);
  opacity: var(--unicorn-opacity, 0.8);
  filter: drop-shadow(0 8px 14px rgba(193, 76, 149, 0.2));
  transform: translate3d(0, 0, 0) scale(var(--unicorn-scale, 1));
  animation: unicorn-drift var(--unicorn-duration, 24s) linear infinite;
  animation-delay: var(--unicorn-delay, 0s);
  will-change: transform, opacity;
}

.theme-unicorn-core,
.theme-unicorn-accent {
  display: inline-block;
  line-height: 1;
}

.theme-unicorn-core.is-mirrored {
  transform: scaleX(-1);
}

.theme-unicorn-accent {
  position: absolute;
  pointer-events: none;
}

.theme-unicorn-sprite.variant-classic .theme-unicorn-accent {
  top: -8px;
  right: -10px;
  font-size: 0.34em;
}

.theme-unicorn-sprite.variant-mirror .theme-unicorn-accent {
  right: -12px;
  bottom: 6px;
  font-size: 0.3em;
}

.theme-unicorn-sprite.variant-crowned .theme-unicorn-accent {
  top: -10px;
  left: 20px;
  font-size: 0.28em;
}

.theme-unicorn-sprite.variant-starry .theme-unicorn-accent {
  left: -10px;
  bottom: 2px;
  font-size: 0.3em;
}

.theme-unicorn-sprite.variant-mirror {
  filter: drop-shadow(0 8px 14px rgba(128, 146, 255, 0.18));
}

.theme-unicorn-sprite.variant-crowned {
  filter: drop-shadow(0 8px 14px rgba(255, 172, 88, 0.18));
}

.theme-unicorn-sprite.variant-starry {
  filter: drop-shadow(0 8px 14px rgba(255, 188, 92, 0.18));
}

.theme-unicorn-sprite.is-sparkle {
  font-size: clamp(16px, 1.5vw, 24px);
  filter: drop-shadow(0 6px 10px rgba(255, 202, 108, 0.24));
}

@keyframes unicorn-drift {
  0% {
    transform: translate3d(-12vw, 0, 0) scale(var(--unicorn-scale, 1)) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: var(--unicorn-opacity, 0.8);
  }
  50% {
    transform: translate3d(52vw, -8px, 0) scale(calc(var(--unicorn-scale, 1) * 1.04)) rotate(3deg);
    opacity: var(--unicorn-opacity, 0.8);
  }
  90% {
    opacity: var(--unicorn-opacity, 0.8);
  }
  100% {
    transform: translate3d(118vw, 6px, 0) scale(var(--unicorn-scale, 1)) rotate(-4deg);
    opacity: 0;
  }
}

.theme-space-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: var(--z-theme-passing-layer);
}

.theme-space-field.hidden {
  display: none;
}

.theme-space-sprite {
  position: absolute;
  top: var(--space-top, 50%);
  left: var(--space-left, -12vw);
  opacity: var(--space-opacity, 0.72);
  transform: translate3d(0, 0, 0) scale(var(--space-scale, 1));
  animation: space-orbit-drift var(--space-duration, 26s) linear infinite;
  animation-delay: var(--space-delay, 0s);
  will-change: transform, opacity;
}

.theme-space-sprite.is-star {
  color: #f7fbff;
  font-size: clamp(12px, 1.2vw, 22px);
  filter: drop-shadow(0 0 8px rgba(158, 231, 255, 0.7));
}

.theme-space-sprite.is-ufo,
.theme-space-sprite.is-asteroid,
.theme-space-sprite.is-planet {
  font-size: clamp(34px, 3vw, 58px);
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28)) drop-shadow(0 0 12px rgba(158, 231, 255, 0.28));
}

.theme-space-sprite.is-ufo {
  animation-name: space-ufo-drift;
}

.theme-space-sprite.is-asteroid {
  width: clamp(82px, 6.6vw, 128px);
  height: clamp(52px, 4.2vw, 82px);
  font-size: 0;
  isolation: isolate;
  filter:
    drop-shadow(0 12px 18px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 14px rgba(255, 142, 87, 0.24))
    drop-shadow(0 0 26px rgba(246, 211, 101, 0.16));
  animation-name: space-asteroid-drift;
}

.theme-space-sprite.is-asteroid::before,
.theme-space-sprite.is-asteroid::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.theme-space-sprite.is-asteroid::before {
  left: 4%;
  bottom: 7%;
  z-index: 2;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 44% 58% 48% 62% / 50% 42% 62% 46%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 236, 194, 0.8) 0 8%, transparent 9%),
    radial-gradient(circle at 62% 38%, rgba(62, 55, 72, 0.5) 0 10%, transparent 11%),
    radial-gradient(circle at 40% 68%, rgba(45, 39, 52, 0.52) 0 8%, transparent 9%),
    radial-gradient(circle at 72% 70%, rgba(255, 203, 126, 0.28) 0 7%, transparent 8%),
    linear-gradient(135deg, #f4c27f 0%, #a4684f 42%, #5a4b5c 72%, #2d3046 100%);
  box-shadow:
    inset -7px -8px 12px rgba(25, 24, 36, 0.48),
    inset 6px 5px 10px rgba(255, 235, 188, 0.34),
    0 0 18px rgba(255, 142, 87, 0.24);
  transform: rotate(-20deg);
  transform-origin: 50% 55%;
  animation: space-asteroid-rock-tumble 7.5s ease-in-out infinite;
}

.theme-space-sprite.is-asteroid::after {
  left: 23%;
  top: 30%;
  z-index: 1;
  width: 106%;
  height: 38%;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 0% 58%, rgba(255, 236, 186, 0.92), rgba(255, 142, 87, 0.5) 32%, transparent 68%),
    radial-gradient(ellipse at 8% 48%, rgba(255, 210, 128, 0.58), transparent 34%),
    linear-gradient(90deg, rgba(255, 235, 166, 0.66) 0%, rgba(255, 142, 87, 0.38) 30%, rgba(143, 108, 255, 0.14) 64%, transparent 100%),
    linear-gradient(180deg, transparent 0 10%, rgba(95, 233, 255, 0.16) 44%, transparent 84% 100%);
  filter: blur(4.4px);
  opacity: 0.9;
  transform: rotate(-22deg);
  transform-origin: left center;
}

.theme-space-sprite.is-black-hole {
  width: clamp(68px, 7vw, 122px);
  height: clamp(68px, 7vw, 122px);
  border-radius: 999px;
  background:
    radial-gradient(circle, #000 0 28%, rgba(4, 7, 20, 0.96) 30% 36%, rgba(158, 231, 255, 0.28) 37% 40%, rgba(143, 108, 255, 0.18) 41% 50%, transparent 54%),
    conic-gradient(from 20deg, rgba(158, 231, 255, 0), rgba(158, 231, 255, 0.46), rgba(143, 108, 255, 0.08), rgba(246, 211, 101, 0.28), rgba(158, 231, 255, 0));
  box-shadow:
    0 0 28px rgba(91, 141, 255, 0.32),
    0 0 72px rgba(143, 108, 255, 0.18);
  animation-name: space-black-hole-float;
}

@keyframes space-star-drift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 180px -180px, -230px 230px, 270px -270px, -210px 210px, 310px -310px;
  }
}

@keyframes space-nebula-drift {
  from {
    transform: translate3d(-10px, -6px, 0) scale(1);
  }

  to {
    transform: translate3d(12px, 10px, 0) scale(1.035);
  }
}

@keyframes space-orbit-drift {
  0% {
    transform: translate3d(-14vw, 0, 0) scale(var(--space-scale, 1)) rotate(0deg);
    opacity: 0;
  }

  14% {
    opacity: var(--space-opacity, 0.72);
  }

  50% {
    transform: translate3d(52vw, -14px, 0) scale(calc(var(--space-scale, 1) * 1.05)) rotate(18deg);
    opacity: var(--space-opacity, 0.72);
  }

  88% {
    opacity: var(--space-opacity, 0.72);
  }

  100% {
    transform: translate3d(118vw, 8px, 0) scale(var(--space-scale, 1)) rotate(36deg);
    opacity: 0;
  }
}

@keyframes space-ufo-drift {
  0% {
    transform: translate3d(-16vw, 0, 0) scale(var(--space-scale, 1)) rotate(-4deg);
    opacity: 0;
  }

  12% {
    opacity: var(--space-opacity, 0.78);
  }

  44% {
    transform: translate3d(42vw, -22px, 0) scale(calc(var(--space-scale, 1) * 1.04)) rotate(3deg);
  }

  74% {
    transform: translate3d(82vw, 10px, 0) scale(var(--space-scale, 1)) rotate(-2deg);
    opacity: var(--space-opacity, 0.78);
  }

  100% {
    transform: translate3d(120vw, -8px, 0) scale(var(--space-scale, 1)) rotate(4deg);
    opacity: 0;
  }
}

@keyframes space-asteroid-drift {
  0% {
    transform: translate3d(112vw, -8vh, 0) scale(var(--space-scale, 1));
    opacity: 0;
  }

  12% {
    opacity: var(--space-opacity, 0.72);
  }

  50% {
    transform: translate3d(46vw, 5vh, 0) scale(calc(var(--space-scale, 1) * 1.04));
  }

  86% {
    opacity: var(--space-opacity, 0.72);
  }

  100% {
    transform: translate3d(-18vw, 18vh, 0) scale(var(--space-scale, 1));
    opacity: 0;
  }
}

@keyframes space-asteroid-rock-tumble {
  0%,
  100% {
    transform: rotate(-20deg);
  }

  45% {
    transform: rotate(18deg) scale(1.04);
  }

  70% {
    transform: rotate(-4deg) scale(0.98);
  }
}

@keyframes space-black-hole-float {
  0% {
    transform: translate3d(-16vw, 0, 0) scale(var(--space-scale, 1)) rotate(0deg);
    opacity: 0;
  }

  14% {
    opacity: var(--space-opacity, 0.68);
  }

  52% {
    transform: translate3d(50vw, -20px, 0) scale(calc(var(--space-scale, 1) * 1.04)) rotate(160deg);
  }

  86% {
    opacity: var(--space-opacity, 0.68);
  }

  100% {
    transform: translate3d(116vw, 14px, 0) scale(var(--space-scale, 1)) rotate(320deg);
    opacity: 0;
  }
}

@keyframes space-logo-blackhole-spin {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.035);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

body.driver-page.driver-theme-dark .clock-chip,
body.driver-page.driver-theme-dark .user-chip,
body.driver-page.driver-theme-dark .driver-metric-chip,
body.driver-page.driver-theme-dark .driver-location-compact,
body.driver-page.driver-theme-dark .driver-empty-state,
body.driver-page.driver-theme-dark .driver-active-info,
body.driver-page.driver-theme-dark .driver-active-fare,
body.driver-page.driver-theme-dark .driver-active-map,
body.driver-page.driver-theme-dark .driver-active-notes,
body.driver-page.driver-theme-dark .board-panel,
body.driver-page.driver-theme-dark .reservation-tabs,
body.driver-page.driver-theme-dark .tab-button.active,
body.driver-page.driver-theme-dark .driver-location-card,
body.driver-page.driver-theme-dark .dialog-card,
body.driver-page.driver-theme-dark .driver-settings-section {
  background: rgba(31, 44, 69, 0.94);
  border-color: rgba(220, 230, 251, 0.14);
  box-shadow: 0 18px 48px rgba(5, 16, 34, 0.2);
}

body.driver-page.driver-theme-dark .driver-ride-card.state-accepted,
body.driver-page.driver-theme-dark .driver-ride-card.state-in_progress {
  background:
    radial-gradient(circle at 18% 24%, rgba(247, 200, 75, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(31, 44, 69, 0.98), rgba(74, 68, 34, 0.5));
}

body.driver-page.driver-theme-dark .driver-ride-details div,
body.driver-page.driver-theme-dark .driver-fare-editor,
body.driver-page.driver-theme-dark .driver-map-links,
body.driver-page.driver-theme-dark .driver-history-filters,
body.driver-page.driver-theme-dark .dispatch-table,
body.driver-page.driver-theme-dark .dispatch-table thead th,
body.driver-page.driver-theme-dark .table-wrap {
  background-color: rgba(255, 255, 255, 0.03);
}

body.driver-page.driver-theme-dark input,
body.driver-page.driver-theme-dark select,
body.driver-page.driver-theme-dark textarea {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(220, 230, 251, 0.1);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.driver-page.driver-theme-dark select option,
body.driver-page.driver-theme-dark select optgroup {
  background: #24314d;
  color: #edf2ff;
}

body.driver-page.driver-theme-dark .ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(220, 230, 251, 0.08);
}

body.driver-page.driver-theme-dark .primary {
  background: linear-gradient(135deg, #426bbc, #2c4b89);
  color: #f4f7ff;
}

body.driver-page.driver-theme-dark .reservation-tabs {
  background: rgba(255, 255, 255, 0.04);
}

body.driver-page.driver-theme-dark .tab-button {
  color: var(--muted);
}

body.driver-page.driver-theme-dark .tab-button.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

body.dispatch-theme-girly .clock-chip,
body.dispatch-theme-girly .user-chip,
body.dispatch-theme-girly .board-panel,
body.dispatch-theme-girly .dialog-card,
body.dispatch-theme-girly .reservation-tabs,
body.dispatch-theme-girly .connected-driver-card,
body.dispatch-theme-girly .connected-drivers-grid,
body.dispatch-theme-girly .connected-driver-cell,
body.dispatch-theme-girly .map-ops-card,
body.dispatch-theme-girly .statistics-metric-card,
body.dispatch-theme-girly .statistics-note-list,
body.dispatch-theme-girly .settings-subsection,
body.dispatch-theme-girly .chat-thread-item,
body.dispatch-theme-girly .chat-message-list,
body.dispatch-theme-girly .chat-bubble,
body.dispatch-theme-girly .maintenance-kpi-card,
body.driver-page.driver-theme-girly .clock-chip,
body.driver-page.driver-theme-girly .user-chip,
body.driver-page.driver-theme-girly .driver-metric-chip,
body.driver-page.driver-theme-girly .driver-location-compact,
body.driver-page.driver-theme-girly .driver-empty-state,
body.driver-page.driver-theme-girly .driver-active-info,
body.driver-page.driver-theme-girly .driver-active-fare,
body.driver-page.driver-theme-girly .driver-active-map,
body.driver-page.driver-theme-girly .driver-active-notes,
body.driver-page.driver-theme-girly .board-panel,
body.driver-page.driver-theme-girly .reservation-tabs,
body.driver-page.driver-theme-girly .tab-button.active,
body.driver-page.driver-theme-girly .driver-location-card,
body.driver-page.driver-theme-girly .dialog-card,
body.driver-page.driver-theme-girly .driver-settings-section,
body.driver-page.driver-theme-girly .chat-thread-item,
body.driver-page.driver-theme-girly .chat-message-list,
body.driver-page.driver-theme-girly .chat-bubble {
  background:
    radial-gradient(circle at top left, rgba(255, 220, 240, 0.38), transparent 36%),
    var(--window-surface);
  border-color: var(--window-border);
  box-shadow: 0 16px 44px rgba(193, 76, 149, 0.14);
}

body.dispatch-theme-girly .dialog-card,
body.driver-page.driver-theme-girly .dialog-card {
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
}

body.dispatch-theme-girly input,
body.dispatch-theme-girly select,
body.dispatch-theme-girly textarea,
body.driver-page.driver-theme-girly input,
body.driver-page.driver-theme-girly select,
body.driver-page.driver-theme-girly textarea {
  background: rgba(255, 255, 255, 0.86);
  border-color: #efc7de;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.dispatch-theme-girly .ghost,
body.dispatch-theme-girly .button-link.ghost,
body.driver-page.driver-theme-girly .ghost,
body.driver-page.driver-theme-girly .button-link.ghost {
  background: rgba(255, 255, 255, 0.74);
  color: #8d4676;
  border-color: rgba(233, 175, 210, 0.94);
}

body.dispatch-theme-girly .primary,
body.driver-page.driver-theme-girly .primary {
  background: linear-gradient(135deg, #ff87c0, #b760dc);
  color: #fff9ff;
}

body.dispatch-theme-girly .dispatch-table th,
body.driver-page.driver-theme-girly .dispatch-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

body.dispatch-theme-girly .chat-bubble.mine,
body.driver-page.driver-theme-girly .chat-bubble.mine {
  background: linear-gradient(135deg, rgba(255, 193, 222, 0.62), rgba(214, 187, 255, 0.44));
}

body.dispatch-theme-space .clock-chip,
body.dispatch-theme-space .user-chip,
body.dispatch-theme-space .board-panel,
body.dispatch-theme-space .dialog-card,
body.dispatch-theme-space .reservation-tabs,
body.dispatch-theme-space .connected-driver-card,
body.dispatch-theme-space .connected-drivers-grid,
body.dispatch-theme-space .connected-driver-cell,
body.dispatch-theme-space .map-ops-card,
body.dispatch-theme-space .statistics-metric-card,
body.dispatch-theme-space .statistics-note-list,
body.dispatch-theme-space .settings-subsection,
body.dispatch-theme-space .chat-thread-item,
body.dispatch-theme-space .chat-message-list,
body.dispatch-theme-space .chat-bubble,
body.dispatch-theme-space .chat-popout-window,
body.dispatch-theme-space .maintenance-kpi-card,
body.driver-page.driver-theme-space .clock-chip,
body.driver-page.driver-theme-space .user-chip,
body.driver-page.driver-theme-space .driver-metric-chip,
body.driver-page.driver-theme-space .driver-location-compact,
body.driver-page.driver-theme-space .driver-empty-state,
body.driver-page.driver-theme-space .driver-active-info,
body.driver-page.driver-theme-space .driver-active-fare,
body.driver-page.driver-theme-space .driver-active-map,
body.driver-page.driver-theme-space .driver-active-notes,
body.driver-page.driver-theme-space .board-panel,
body.driver-page.driver-theme-space .reservation-tabs,
body.driver-page.driver-theme-space .tab-button.active,
body.driver-page.driver-theme-space .driver-location-card,
body.driver-page.driver-theme-space .dialog-card,
body.driver-page.driver-theme-space .driver-settings-section,
body.driver-page.driver-theme-space .chat-thread-item,
body.driver-page.driver-theme-space .chat-message-list,
body.driver-page.driver-theme-space .chat-bubble {
  background:
    radial-gradient(circle at 14% 10%, rgba(158, 231, 255, 0.18), transparent 36%),
    radial-gradient(circle at 86% 18%, rgba(143, 108, 255, 0.18), transparent 36%),
    var(--window-surface);
  border-color: var(--window-border);
  box-shadow: 0 18px 54px rgba(3, 7, 22, 0.34);
}

body.dispatch-theme-space .topbar,
body.driver-page.driver-theme-space .topbar,
body.dispatch-theme-space .driver-strip,
body.dispatch-theme-space .driver-strip-wrap,
body.driver-page.driver-theme-space .driver-viewport,
body.driver-page.driver-theme-space .driver-app-layout {
  background:
    radial-gradient(circle at 18% 16%, rgba(158, 231, 255, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(8, 13, 34, 0.94), rgba(21, 33, 76, 0.88));
  border-color: rgba(146, 184, 255, 0.2);
}

body.dispatch-theme-space .driver-card.available,
body.dispatch-theme-space .driver-pill.available,
body.dispatch-theme-space .driver-tile.available,
body.dispatch-theme-space .connected-driver-cell.connected-state-available {
  background:
    radial-gradient(circle at 12% 12%, rgba(87, 230, 183, 0.22), transparent 32%),
    rgba(13, 36, 51, 0.86);
  border-color: rgba(87, 230, 183, 0.34);
}

body.dispatch-theme-space .connected-driver-cell.connected-state-busy,
body.dispatch-theme-space .connected-driver-cell.connected-state-unavailable {
  background:
    radial-gradient(circle at 12% 12%, rgba(246, 211, 101, 0.18), transparent 34%),
    rgba(35, 25, 44, 0.86);
}

body.dispatch-theme-space .connected-drivers-wrap {
  background:
    radial-gradient(circle at 22% 14%, rgba(126, 196, 255, 0.12), transparent 36%),
    rgba(6, 10, 27, 0.72);
  border-color: rgba(126, 196, 255, 0.28);
}

body.dispatch-theme-space .connected-driver-cell {
  color: #f7fbff;
  border-color: rgba(126, 196, 255, 0.42);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 10px rgba(77, 205, 255, 0.08);
}

body.dispatch-theme-space .driver-card.available,
body.dispatch-theme-space .driver-pill.available,
body.dispatch-theme-space .driver-tile.available,
body.dispatch-theme-space .connected-driver-cell.connected-state-available {
  color: #d8fff0;
  background:
    radial-gradient(circle at 18% 14%, rgba(108, 255, 209, 0.36), transparent 36%),
    linear-gradient(145deg, rgba(12, 70, 67, 0.96), rgba(7, 28, 42, 0.94));
  border-color: rgba(108, 255, 209, 0.56);
}

body.dispatch-theme-space .connected-driver-cell.connected-state-busy {
  color: #d8fbff;
  background:
    radial-gradient(circle at 18% 14%, rgba(126, 230, 255, 0.28), transparent 36%),
    linear-gradient(145deg, rgba(20, 78, 96, 0.96), rgba(8, 27, 49, 0.94));
  border-color: rgba(126, 230, 255, 0.46);
}

body.dispatch-theme-space .connected-driver-cell.connected-state-unavailable,
body.dispatch-theme-space .connected-driver-cell.connected-state-offline {
  color: #d7e4ff;
  background:
    radial-gradient(circle at 18% 14%, rgba(199, 215, 255, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(27, 37, 67, 0.94), rgba(9, 13, 31, 0.94));
  border-color: rgba(199, 215, 255, 0.28);
}

body.dispatch-theme-space .connected-driver-cell.connected-state-round_trip {
  color: #e8fff1;
  background:
    radial-gradient(circle at 18% 14%, rgba(128, 255, 176, 0.34), transparent 36%),
    linear-gradient(145deg, rgba(21, 83, 58, 0.96), rgba(7, 31, 35, 0.94));
  border-color: rgba(128, 255, 176, 0.54);
}

body.dispatch-theme-space .connected-driver-cell.connected-state-signal_loss {
  color: #f7e7ff;
  background:
    radial-gradient(circle at 18% 14%, rgba(220, 170, 255, 0.28), transparent 36%),
    linear-gradient(145deg, rgba(70, 37, 96, 0.96), rgba(21, 13, 43, 0.94));
  border-color: rgba(220, 170, 255, 0.46);
}

body.dispatch-theme-space input,
body.dispatch-theme-space select,
body.dispatch-theme-space textarea,
body.driver-page.driver-theme-space input,
body.driver-page.driver-theme-space select,
body.driver-page.driver-theme-space textarea {
  background: rgba(6, 10, 27, 0.72);
  border-color: rgba(146, 184, 255, 0.32);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.dispatch-theme-space input::placeholder,
body.dispatch-theme-space textarea::placeholder,
body.driver-page.driver-theme-space input::placeholder,
body.driver-page.driver-theme-space textarea::placeholder {
  color: rgba(199, 215, 255, 0.58);
  -webkit-text-fill-color: rgba(199, 215, 255, 0.58);
}

body.dispatch-theme-space select option,
body.dispatch-theme-space select optgroup,
body.driver-page.driver-theme-space select option,
body.driver-page.driver-theme-space select optgroup {
  background: #101833;
  color: #eef5ff;
}

body.dispatch-theme-space .ghost,
body.dispatch-theme-space .button-link.ghost,
body.driver-page.driver-theme-space .ghost,
body.driver-page.driver-theme-space .button-link.ghost {
  background: rgba(158, 231, 255, 0.08);
  color: #dce9ff;
  border-color: rgba(146, 184, 255, 0.28);
}

body.dispatch-theme-space .ghost:hover,
body.dispatch-theme-space .button-link.ghost:hover,
body.driver-page.driver-theme-space .ghost:hover,
body.driver-page.driver-theme-space .button-link.ghost:hover {
  background: rgba(158, 231, 255, 0.16);
  border-color: rgba(158, 231, 255, 0.44);
}

body.dispatch-theme-space .primary,
body.driver-page.driver-theme-space .primary {
  background: linear-gradient(135deg, #66e9ff 0%, #5f7dff 48%, #9b72ff 100%);
  color: #061022;
  box-shadow: 0 16px 34px rgba(95, 125, 255, 0.28);
}

body.dispatch-theme-space .reservation-tabs,
body.driver-page.driver-theme-space .reservation-tabs {
  background: rgba(9, 14, 35, 0.54);
}

body.dispatch-theme-space .tab-button,
body.driver-page.driver-theme-space .tab-button {
  color: var(--muted);
}

body.dispatch-theme-space .tab-button.active,
body.driver-page.driver-theme-space .tab-button.active {
  background:
    radial-gradient(circle at top left, rgba(158, 231, 255, 0.24), transparent 36%),
    rgba(21, 33, 76, 0.78);
  color: var(--text);
}

body.dispatch-theme-space .dispatch-table,
body.driver-page.driver-theme-space .dispatch-table,
body.dispatch-theme-space .table-wrap,
body.driver-page.driver-theme-space .table-wrap,
body.dispatch-theme-space .empty-table,
body.driver-page.driver-theme-space .empty-table {
  background-color: rgba(6, 10, 27, 0.62);
  color: var(--text);
}

body.dispatch-theme-space .empty-table,
body.driver-page.driver-theme-space .empty-table {
  background:
    radial-gradient(circle at 24% 18%, rgba(126, 196, 255, 0.1), transparent 36%),
    linear-gradient(135deg, rgba(13, 22, 55, 0.84), rgba(8, 13, 34, 0.72));
}

body.dispatch-theme-space .dispatch-table th,
body.driver-page.driver-theme-space .dispatch-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

body.dispatch-theme-space .dispatch-table td,
body.driver-page.driver-theme-space .dispatch-table td {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(146, 184, 255, 0.12);
}

body.dispatch-theme-space .dispatch-table tbody tr:hover,
body.driver-page.driver-theme-space .dispatch-table tbody tr:hover {
  background: rgba(95, 125, 255, 0.12);
}

body.dispatch-theme-space .dispatch-table tbody tr.state-deleted,
body.driver-page.driver-theme-space .dispatch-table tbody tr.state-deleted {
  background:
    linear-gradient(90deg, rgba(96, 25, 45, 0.92), rgba(124, 38, 66, 0.84));
  color: #ffd9df;
}

body.dispatch-theme-space .dispatch-table tbody tr.state-deleted td,
body.driver-page.driver-theme-space .dispatch-table tbody tr.state-deleted td {
  background: rgba(96, 25, 45, 0.62);
  border-color: rgba(255, 139, 166, 0.24);
  color: #ffd9df;
}

body.dispatch-theme-space .dispatch-table tbody tr.state-deleted a,
body.dispatch-theme-space .dispatch-table tbody tr.state-deleted .table-cell-hover-content,
body.driver-page.driver-theme-space .dispatch-table tbody tr.state-deleted a,
body.driver-page.driver-theme-space .dispatch-table tbody tr.state-deleted .table-cell-hover-content {
  color: #fff2f5;
}

body.dispatch-theme-space .dispatch-table tbody tr.state-deleted:hover,
body.driver-page.driver-theme-space .dispatch-table tbody tr.state-deleted:hover {
  background:
    linear-gradient(90deg, rgba(112, 30, 52, 0.96), rgba(144, 46, 76, 0.9));
}

body.dispatch-theme-space .dispatch-table a,
body.driver-page.driver-theme-space .dispatch-table a {
  color: #9ee7ff;
}

body.dispatch-theme-space .window-shell,
body.dispatch-theme-space .window-body,
body.dispatch-theme-space .ride-window-form,
body.dispatch-theme-space .ride-window-content,
body.dispatch-theme-space .ride-window-main-column,
body.dispatch-theme-space .ride-window-side-column,
body.dispatch-theme-space .ride-window-bottom,
body.dispatch-theme-space .ride-window-map-card,
body.dispatch-theme-space .address-suggestions,
body.dispatch-theme-space .establishment-suggestions,
body.dispatch-theme-space .establishment-picker-panel,
body.dispatch-theme-space .address-suggestions-popover,
body.driver-page.driver-theme-space .window-shell,
body.driver-page.driver-theme-space .window-body,
body.driver-page.driver-theme-space .ride-window-bottom {
  background:
    radial-gradient(circle at 18% 10%, rgba(158, 231, 255, 0.1), transparent 36%),
    rgba(9, 14, 35, 0.88);
  border-color: rgba(146, 184, 255, 0.22);
  color: var(--text);
}

body.dispatch-theme-space .establishment-suggestion-item,
body.dispatch-theme-space .address-suggestion-item,
body.dispatch-theme-space .establishment-picker-item {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

body.dispatch-theme-space .establishment-suggestion-item:hover,
body.dispatch-theme-space .address-suggestion-item:hover,
body.dispatch-theme-space .establishment-picker-item:hover,
body.dispatch-theme-space .establishment-picker-item.is-active {
  background: rgba(158, 231, 255, 0.14);
}

body.dispatch-theme-space .chat-bubble.mine,
body.driver-page.driver-theme-space .chat-bubble.mine {
  background: linear-gradient(135deg, rgba(102, 233, 255, 0.32), rgba(143, 108, 255, 0.28));
}

body.driver-page.driver-theme-space .driver-ride-card.state-accepted,
body.driver-page.driver-theme-space .driver-ride-card.state-in_progress {
  background:
    radial-gradient(circle at 18% 24%, rgba(158, 231, 255, 0.16), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(143, 108, 255, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(9, 14, 35, 0.96), rgba(24, 44, 90, 0.78));
}

body.driver-page.driver-theme-space .driver-ride-details div,
body.driver-page.driver-theme-space .driver-fare-editor,
body.driver-page.driver-theme-space .driver-map-links,
body.driver-page.driver-theme-space .driver-history-filters {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(146, 184, 255, 0.18);
}

body.driver-page.driver-theme-dark .dispatch-table tbody td {
  background: rgba(255, 255, 255, 0.02);
}

body.driver-page.driver-theme-dark .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
  color: var(--text);
}

body.driver-page.driver-theme-dark .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.driver-page.driver-theme-midnight .clock-chip,
body.driver-page.driver-theme-midnight .user-chip,
body.driver-page.driver-theme-midnight .driver-metric-chip,
body.driver-page.driver-theme-midnight .driver-location-compact,
body.driver-page.driver-theme-midnight .driver-empty-state,
body.driver-page.driver-theme-midnight .driver-active-info,
body.driver-page.driver-theme-midnight .driver-active-fare,
body.driver-page.driver-theme-midnight .driver-active-map,
body.driver-page.driver-theme-midnight .driver-active-notes,
body.driver-page.driver-theme-midnight .board-panel,
body.driver-page.driver-theme-midnight .reservation-tabs,
body.driver-page.driver-theme-midnight .tab-button.active,
body.driver-page.driver-theme-midnight .driver-location-card,
body.driver-page.driver-theme-midnight .dialog-card,
body.driver-page.driver-theme-midnight .driver-settings-section,
body.dispatch-theme-midnight .clock-chip,
body.dispatch-theme-midnight .user-chip,
body.dispatch-theme-midnight .board-panel,
body.dispatch-theme-midnight .dialog-card,
body.dispatch-theme-midnight .reservation-tabs,
body.dispatch-theme-midnight .connected-driver-card,
body.dispatch-theme-midnight .connected-drivers-grid,
body.dispatch-theme-midnight .connected-driver-cell {
  background: var(--window-surface-strong);
  border-color: var(--window-border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

body.driver-page.driver-theme-midnight .driver-ride-card.state-accepted,
body.driver-page.driver-theme-midnight .driver-ride-card.state-in_progress {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.05), transparent 30%),
    linear-gradient(135deg, rgba(12, 12, 14, 0.98), rgba(38, 39, 43, 0.82));
}

body.driver-page.driver-theme-midnight .driver-ride-details div,
body.driver-page.driver-theme-midnight .driver-fare-editor,
body.driver-page.driver-theme-midnight .driver-map-links,
body.driver-page.driver-theme-midnight .driver-history-filters,
body.driver-page.driver-theme-midnight .dispatch-table,
body.driver-page.driver-theme-midnight .dispatch-table thead th,
body.driver-page.driver-theme-midnight .table-wrap,
body.dispatch-theme-midnight .dispatch-table,
body.dispatch-theme-midnight .table-wrap {
  background-color: rgba(255, 255, 255, 0.025);
}

body.driver-page.driver-theme-midnight input,
body.driver-page.driver-theme-midnight select,
body.driver-page.driver-theme-midnight textarea,
body.dispatch-theme-midnight input,
body.dispatch-theme-midnight select,
body.dispatch-theme-midnight textarea {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.driver-page.driver-theme-midnight .ghost,
body.driver-page.driver-theme-midnight .button-link.ghost,
body.dispatch-theme-midnight .ghost,
body.dispatch-theme-midnight .button-link.ghost {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

body.driver-page.driver-theme-midnight .primary,
body.dispatch-theme-midnight .primary {
  background: linear-gradient(135deg, #474d58, #242830);
  color: #fafafa;
}

body.driver-page.driver-theme-midnight .reservation-tabs,
body.dispatch-theme-midnight .reservation-tabs {
  background: rgba(255, 255, 255, 0.035);
}

body.driver-page.driver-theme-midnight .tab-button,
body.dispatch-theme-midnight .tab-button {
  color: var(--muted);
}

body.driver-page.driver-theme-midnight .tab-button.active,
body.dispatch-theme-midnight .tab-button.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

body.driver-page.driver-theme-midnight .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
  color: var(--text);
}

body.driver-page.driver-theme-midnight .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.driver-page.driver-theme-dark .app-shell:fullscreen .ghost,
body.driver-page.driver-theme-dark .app-shell:fullscreen .button-link.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-color: rgba(220, 230, 251, 0.1);
}

body.maintenance-page.dispatch-theme-dark .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.maintenance-page.dispatch-theme-dark .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.maintenance-page.dispatch-theme-test .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(255, 211, 119, 0.08), transparent 22%),
    radial-gradient(circle at bottom right, rgba(72, 122, 247, 0.12), transparent 28%),
    linear-gradient(160deg, #141925, #1a2130 45%, #121824);
}

body.maintenance-page.dispatch-theme-test .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(255, 211, 119, 0.08), transparent 22%),
    radial-gradient(circle at bottom right, rgba(72, 122, 247, 0.12), transparent 28%),
    linear-gradient(160deg, #141925, #1a2130 45%, #121824);
}

body.maintenance-page.dispatch-theme-midnight .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.maintenance-page.dispatch-theme-midnight .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.dispatch-theme-dark:not(.driver-page) .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.dispatch-theme-dark:not(.driver-page) .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.dispatch-theme-test:not(.driver-page) .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(255, 211, 119, 0.08), transparent 22%),
    radial-gradient(circle at bottom right, rgba(72, 122, 247, 0.12), transparent 28%),
    linear-gradient(160deg, #141925, #1a2130 45%, #121824);
}

body.dispatch-theme-test:not(.driver-page) .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(255, 211, 119, 0.08), transparent 22%),
    radial-gradient(circle at bottom right, rgba(72, 122, 247, 0.12), transparent 28%),
    linear-gradient(160deg, #141925, #1a2130 45%, #121824);
}

body.dispatch-theme-midnight:not(.driver-page) .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.dispatch-theme-midnight:not(.driver-page) .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.dispatch-theme-girly:not(.driver-page) .app-shell:fullscreen,
body.driver-page.driver-theme-girly .app-shell:fullscreen {
  background:
    radial-gradient(circle at top left, rgba(255, 200, 235, 0.55), transparent 23%),
    radial-gradient(circle at top right, rgba(203, 183, 255, 0.32), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 233, 161, 0.28), transparent 24%),
    linear-gradient(160deg, #fff5fb, #fff9fd 48%, #fef1fb);
}

body.dispatch-theme-girly:not(.driver-page) .app-shell:fullscreen::backdrop,
body.driver-page.driver-theme-girly .app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(255, 200, 235, 0.55), transparent 23%),
    radial-gradient(circle at top right, rgba(203, 183, 255, 0.32), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 233, 161, 0.28), transparent 24%),
    linear-gradient(160deg, #fff5fb, #fff9fd 48%, #fef1fb);
}

body.dispatch-theme-dark .clock-chip,
body.dispatch-theme-dark .user-chip,
body.dispatch-theme-dark .board-panel,
body.dispatch-theme-dark .dialog-card,
body.dispatch-theme-dark .reservation-tabs,
body.dispatch-theme-dark .connected-driver-card,
body.dispatch-theme-dark .connected-drivers-grid,
body.dispatch-theme-dark .connected-driver-cell {
  background: rgba(39, 50, 72, 0.96);
  border-color: rgba(220, 230, 251, 0.22);
  box-shadow:
    0 18px 48px rgba(5, 16, 34, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dispatch-theme-dark .connected-drivers-empty,
body.dispatch-theme-dark .empty-strip,
body.dispatch-theme-dark .empty-table {
  color: var(--muted);
}

body.dispatch-theme-dark .connected-drivers-empty,
body.dispatch-theme-dark .empty-strip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(220, 230, 251, 0.08);
}

body.dispatch-theme-dark .connected-drivers-wrap {
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(220, 230, 251, 0.2);
  border-radius: 14px;
}

body.dispatch-theme-dark .connected-drivers-panel .count-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(220, 230, 251, 0.08);
}

body.dispatch-theme-dark .connected-driver-cell.connected-state-available {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.36), rgba(185, 239, 104, 0.24));
  color: #f0ffdf;
  border-color: rgba(185, 239, 104, 0.34);
}

body.dispatch-theme-dark .connected-driver-cell.connected-state-unavailable {
  background: rgba(255, 255, 255, 0.12);
  color: #edf2ff;
  border-color: rgba(220, 230, 251, 0.22);
}

body.dispatch-theme-dark .connected-driver-cell.connected-state-busy {
  background: linear-gradient(135deg, rgba(85, 201, 219, 0.34), rgba(156, 236, 255, 0.23));
  color: #e4fdff;
  border-color: rgba(156, 236, 255, 0.32);
}

body.dispatch-theme-dark .connected-driver-cell.connected-state-round_trip {
  background: linear-gradient(135deg, rgba(55, 166, 98, 0.38), rgba(136, 235, 164, 0.25));
  color: #ebfff0;
  border-color: rgba(136, 235, 164, 0.34);
}

body.dispatch-theme-dark .connected-driver-cell.connected-state-signal_loss {
  background: linear-gradient(135deg, rgba(157, 90, 214, 0.34), rgba(211, 168, 255, 0.23));
  color: #f6eaff;
  border-color: rgba(211, 168, 255, 0.32);
}

body.dispatch-theme-dark .driver-strip-wrap {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(31, 44, 69, 0.28)),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 0 1px rgba(220, 230, 251, 0.06);
}

body.dispatch-theme-dark .driver-strip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(220, 230, 251, 0.12);
}

body.dispatch-theme-dark .driver-strip-header span {
  color: var(--muted);
}

body.dispatch-theme-dark .driver-card.available,
body.dispatch-theme-dark .driver-pill.available {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.26), rgba(185, 239, 104, 0.18));
  border-color: rgba(127, 214, 62, 0.28);
  color: #e9ffd4;
}

body.dispatch-theme-dark .driver-card.available p,
body.dispatch-theme-dark .driver-card.available span,
body.dispatch-theme-dark .driver-pill.available p,
body.dispatch-theme-dark .driver-pill.available span {
  color: rgba(233, 255, 212, 0.82);
}

body.dispatch-theme-dark .driver-tile.available {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.26), rgba(185, 239, 104, 0.18));
  border-color: rgba(127, 214, 62, 0.28);
  color: #e9ffd4;
}

body.dispatch-theme-dark .driver-tile.available span {
  color: rgba(233, 255, 212, 0.82);
}

body.dispatch-theme-dark .driver-tile.available.selected {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.26), rgba(185, 239, 104, 0.18));
  border-color: rgba(247, 200, 75, 0.58);
  box-shadow: inset 0 0 0 1px rgba(247, 200, 75, 0.3);
}

body.dispatch-theme-dark .driver-card.selected,
body.dispatch-theme-dark .driver-pill.selected {
  box-shadow: 0 0 0 2px rgba(247, 200, 75, 0.5);
}

body.dispatch-theme-dark input,
body.dispatch-theme-dark select,
body.dispatch-theme-dark textarea {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(220, 230, 251, 0.1);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.dispatch-theme-dark select option,
body.dispatch-theme-dark select optgroup {
  background: #24314d;
  color: #edf2ff;
}

body.dispatch-theme-dark .ghost,
body.dispatch-theme-dark .button-link.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(220, 230, 251, 0.08);
}

body.dispatch-theme-dark .ghost.danger {
  color: #f0a7a1;
}

body.dispatch-theme-dark .primary {
  background: linear-gradient(135deg, #426bbc, #2c4b89);
  color: #f4f7ff;
}

body.dispatch-theme-dark .admin-modal-message.is-success {
  color: #7fe0a3;
  background: rgba(89, 198, 120, 0.14);
  border-color: rgba(89, 198, 120, 0.25);
}

body.dispatch-theme-dark .admin-modal-message.is-error {
  color: #f5aba4;
  background: rgba(217, 83, 79, 0.14);
  border-color: rgba(217, 83, 79, 0.24);
}

body.dispatch-theme-dark .establishment-admin-item {
  background: rgba(34, 42, 58, 0.94);
  border-color: rgba(220, 230, 251, 0.08);
  color: var(--text);
}

body.dispatch-theme-dark .establishment-admin-item.active,
body.dispatch-theme-dark .establishment-admin-item.is-active {
  background: rgba(43, 58, 98, 0.84);
  border-color: rgba(119, 160, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(88, 128, 234, 0.22);
}

body.dispatch-theme-dark .establishment-admin-item span,
body.dispatch-theme-dark .establishment-admin-empty {
  color: #b9c6e4;
}

body.dispatch-theme-dark .establishment-admin-empty {
  background: rgba(31, 44, 69, 0.76);
  border-color: rgba(220, 230, 251, 0.12);
}

body.dispatch-theme-dark .establishment-admin-map-card {
  background: rgba(31, 44, 69, 0.82);
}

body.dispatch-theme-dark .server-log-entry,
body.dispatch-theme-dark .server-log-empty,
body.dispatch-theme-dark .server-log-active-blocks,
body.dispatch-theme-dark .server-log-login-block {
  background: rgba(34, 42, 58, 0.94);
  border-color: rgba(220, 230, 251, 0.08);
  color: var(--text);
}

body.dispatch-theme-dark .server-log-entry header span,
body.dispatch-theme-dark .server-log-entry header time,
body.dispatch-theme-dark .server-log-meta,
body.dispatch-theme-dark .server-log-empty,
body.dispatch-theme-dark .server-log-active-blocks > header span,
body.dispatch-theme-dark .server-log-login-block span {
  color: #b9c6e4;
}

body.dispatch-theme-dark .server-log-notice {
  background: rgba(38, 79, 56, 0.74);
  border-color: rgba(120, 220, 148, 0.22);
  color: #c9f2d6;
}

body.dispatch-theme-dark .server-log-notice.error {
  background: rgba(88, 40, 45, 0.78);
  border-color: rgba(255, 150, 150, 0.24);
  color: #ffd1d1;
}

body.dispatch-theme-dark .statistics-metric-card,
body.dispatch-theme-dark .statistics-note-list {
  background: rgba(34, 42, 58, 0.94);
  border-color: rgba(220, 230, 251, 0.08);
  color: var(--text);
}

body.dispatch-theme-dark .statistics-metric-card span,
body.dispatch-theme-dark .statistics-block-header .muted,
body.dispatch-theme-dark .statistics-note-list {
  color: #b9c6e4;
}

body.dispatch-theme-dark .statistics-metric-card.emphasis {
  background: rgba(57, 88, 164, 0.28);
}

body.dispatch-theme-dark .dispatch-table,
body.driver-page.driver-theme-dark .dispatch-table {
  color: var(--text);
  background: transparent;
}

body.dispatch-theme-dark .table-wrap,
body.driver-page.driver-theme-dark .table-wrap {
  background: rgba(255, 255, 255, 0.03);
}

body.dispatch-theme-dark .dispatch-table th,
body.driver-page.driver-theme-dark .dispatch-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

body.dispatch-theme-dark .dispatch-table td,
body.driver-page.driver-theme-dark .dispatch-table td {
  background: rgba(255, 255, 255, 0.03);
  border-right-color: rgba(152, 165, 189, 0.24);
  border-bottom-color: rgba(152, 165, 189, 0.18);
  color: var(--text);
}

body.dispatch-theme-dark .dispatch-table tbody tr:hover,
body.driver-page.driver-theme-dark .dispatch-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.dispatch-theme-dark .dispatch-table td:hover,
body.driver-page.driver-theme-dark .dispatch-table td:hover {
  background: transparent;
  box-shadow: none;
}

body.dispatch-theme-dark .dispatch-table td:hover .table-cell-hover-content,
body.driver-page.driver-theme-dark .dispatch-table td:hover .table-cell-hover-content {
  background: rgba(34, 42, 58, 0.98);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
}

body.dispatch-theme-dark .dispatch-table tbody tr.selected,
body.driver-page.driver-theme-dark .dispatch-table tbody tr.selected {
  --dispatch-selection-ring: rgba(247, 200, 75, 0.68);
  background: rgba(247, 200, 75, 0.16);
}

body.dispatch-theme-dark .dispatch-table tbody tr.selected td,
body.driver-page.driver-theme-dark .dispatch-table tbody tr.selected td {
  border-top-color: rgba(247, 200, 75, 0.68);
  border-bottom-color: rgba(247, 200, 75, 0.68);
}

body.dispatch-theme-dark .dispatch-table tbody tr.selected td:first-child,
body.driver-page.driver-theme-dark .dispatch-table tbody tr.selected td:first-child {
  border-left-color: rgba(247, 200, 75, 0.68);
}

body.dispatch-theme-dark .dispatch-table tbody tr.selected td:last-child,
body.driver-page.driver-theme-dark .dispatch-table tbody tr.selected td:last-child {
  border-right-color: rgba(247, 200, 75, 0.68);
}

body.dispatch-theme-dark .dispatch-table tbody tr.state-deleted,
body.driver-page.driver-theme-dark .dispatch-table tbody tr.state-deleted {
  color: #ffd0ca;
}

body.dispatch-theme-dark .dispatch-table tbody tr.state-deleted td,
body.driver-page.driver-theme-dark .dispatch-table tbody tr.state-deleted td {
  color: #ffd0ca;
}

body.dispatch-theme-dark .dispatch-table a,
body.driver-page.driver-theme-dark .dispatch-table a {
  color: #8bb0ff;
}

body.dispatch-theme-dark .empty-table,
body.driver-page.driver-theme-dark .empty-table {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(22, 33, 52, 0.72);
  color: var(--muted);
}

body.dispatch-theme-dark .window-shell {
  background: var(--window-surface-strong);
  border-color: var(--window-border);
  box-shadow: var(--window-shadow);
}

body.dispatch-theme-dark .window-body {
  background: var(--window-surface-strong);
}

body.dispatch-theme-dark .ride-window-form,
body.dispatch-theme-dark .ride-window-content,
body.dispatch-theme-dark .ride-window-main-column,
body.dispatch-theme-dark .ride-window-side-column {
  color: var(--text);
}

body.dispatch-theme-dark .window-form-grid label,
body.dispatch-theme-dark .ride-window-address-grid label,
body.dispatch-theme-dark .ride-window-main-column > label,
body.dispatch-theme-dark .ride-window-two-column label {
  color: var(--text);
}

body.dispatch-theme-dark .ride-window-bottom {
  background: linear-gradient(180deg, var(--window-surface-soft), var(--window-surface-strong));
}

body.dispatch-theme-dark .window-footer,
body.dispatch-theme-dark .window-meta {
  color: var(--muted);
}

body.dispatch-theme-dark .ride-window-map-card {
  background: linear-gradient(180deg, rgba(25, 33, 49, 0.96), rgba(20, 28, 43, 0.92));
  border-color: rgba(220, 230, 251, 0.08);
}

body.dispatch-theme-dark .ride-window-map-frame {
  border-color: rgba(220, 230, 251, 0.08);
  background: #1a2537;
}

body.dispatch-theme-dark .ride-window-map-empty,
body.dispatch-theme-dark .ride-window-map-loading {
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

body.dispatch-theme-dark .ride-window-map-empty strong,
body.dispatch-theme-dark .ride-window-map-meta strong {
  color: var(--text);
}

body.dispatch-theme-dark .ride-window-map-empty span,
body.dispatch-theme-dark .ride-window-map-meta span {
  color: var(--muted);
}

body.dispatch-theme-dark.dispatch-theme-midnight,
body.driver-page.driver-theme-dark.driver-theme-midnight {
  --surface: rgba(12, 12, 14, 0.94);
  --surface-strong: #121317;
  --line: #2d3138;
  --text: #f3f4f6;
  --muted: #a7adb8;
  --accent: #f5f5f5;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  background-color: #090a0c;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.dispatch-theme-dark.dispatch-theme-midnight .clock-chip,
body.dispatch-theme-dark.dispatch-theme-midnight .user-chip,
body.dispatch-theme-dark.dispatch-theme-midnight .board-panel,
body.dispatch-theme-dark.dispatch-theme-midnight .dialog-card,
body.dispatch-theme-dark.dispatch-theme-midnight .reservation-tabs,
body.dispatch-theme-dark.dispatch-theme-midnight .connected-driver-card,
body.dispatch-theme-dark.dispatch-theme-midnight .connected-drivers-grid,
body.dispatch-theme-dark.dispatch-theme-midnight .connected-driver-cell,
body.driver-page.driver-theme-dark.driver-theme-midnight .clock-chip,
body.driver-page.driver-theme-dark.driver-theme-midnight .user-chip,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-metric-chip,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-location-compact,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-empty-state,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-active-info,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-active-fare,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-active-map,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-active-notes,
body.driver-page.driver-theme-dark.driver-theme-midnight .board-panel,
body.driver-page.driver-theme-dark.driver-theme-midnight .reservation-tabs,
body.driver-page.driver-theme-dark.driver-theme-midnight .tab-button.active,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-location-card,
body.driver-page.driver-theme-dark.driver-theme-midnight .dialog-card,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-settings-section {
  background: rgba(12, 12, 14, 0.96);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

body.dispatch-theme-dark.dispatch-theme-midnight .driver-strip-wrap {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.015), rgba(12, 12, 14, 0.18)),
    rgba(255, 255, 255, 0.015);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body.dispatch-theme-dark.dispatch-theme-midnight .driver-strip,
body.dispatch-theme-dark.dispatch-theme-midnight .table-wrap,
body.driver-page.driver-theme-dark.driver-theme-midnight .table-wrap {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-dark.dispatch-theme-midnight input,
body.dispatch-theme-dark.dispatch-theme-midnight select,
body.dispatch-theme-dark.dispatch-theme-midnight textarea,
body.driver-page.driver-theme-dark.driver-theme-midnight input,
body.driver-page.driver-theme-dark.driver-theme-midnight select,
body.driver-page.driver-theme-dark.driver-theme-midnight textarea {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.dispatch-theme-dark.dispatch-theme-midnight select option,
body.dispatch-theme-dark.dispatch-theme-midnight select optgroup,
body.driver-page.driver-theme-dark.driver-theme-midnight select option,
body.driver-page.driver-theme-dark.driver-theme-midnight select optgroup {
  background: #121317;
  color: #f3f4f6;
}

body.dispatch-theme-dark.dispatch-theme-midnight .ghost,
body.dispatch-theme-dark.dispatch-theme-midnight .button-link.ghost,
body.driver-page.driver-theme-dark.driver-theme-midnight .ghost,
body.driver-page.driver-theme-dark.driver-theme-midnight .button-link.ghost {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-dark.dispatch-theme-midnight .primary,
body.driver-page.driver-theme-dark.driver-theme-midnight .primary {
  background: linear-gradient(135deg, #4a4f58, #262a31);
  color: #fafafa;
}

body.dispatch-theme-dark.dispatch-theme-midnight .dispatch-table td,
body.driver-page.driver-theme-dark.driver-theme-midnight .dispatch-table td {
  background: rgba(255, 255, 255, 0.025);
  border-right-color: rgba(167, 173, 184, 0.2);
  border-bottom-color: rgba(167, 173, 184, 0.16);
  color: var(--text);
}

body.dispatch-theme-dark.dispatch-theme-midnight .dispatch-table tbody tr:hover,
body.driver-page.driver-theme-dark.driver-theme-midnight .dispatch-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.dispatch-theme-dark.dispatch-theme-midnight .dispatch-table td:hover .table-cell-hover-content,
body.driver-page.driver-theme-dark.driver-theme-midnight .dispatch-table td:hover .table-cell-hover-content {
  background: rgba(24, 25, 29, 0.98);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.44);
}

body.dispatch-theme-midnight .connected-drivers-empty,
body.dispatch-theme-midnight .empty-strip,
body.dispatch-theme-midnight .empty-table {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(18, 19, 23, 0.72);
  color: var(--muted);
}

body.dispatch-theme-midnight .connected-drivers-empty,
body.dispatch-theme-midnight .empty-strip,
body.dispatch-theme-midnight .connected-drivers-wrap,
body.dispatch-theme-midnight .driver-strip,
body.dispatch-theme-midnight .table-wrap,
body.driver-page.driver-theme-midnight .table-wrap {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .connected-drivers-panel .count-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .driver-strip-wrap {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.015), rgba(12, 12, 14, 0.18)),
    rgba(255, 255, 255, 0.015);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body.dispatch-theme-midnight .driver-card.available,
body.dispatch-theme-midnight .driver-pill.available {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.2), rgba(185, 239, 104, 0.12));
  border-color: rgba(127, 214, 62, 0.22);
  color: #efffdf;
}

body.dispatch-theme-midnight .driver-card.available p,
body.dispatch-theme-midnight .driver-card.available span,
body.dispatch-theme-midnight .driver-pill.available p,
body.dispatch-theme-midnight .driver-pill.available span {
  color: rgba(239, 255, 223, 0.82);
}

body.dispatch-theme-midnight .driver-tile.available {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.2), rgba(185, 239, 104, 0.12));
  border-color: rgba(127, 214, 62, 0.22);
  color: #efffdf;
}

body.dispatch-theme-midnight .driver-tile.available span {
  color: rgba(239, 255, 223, 0.82);
}

body.dispatch-theme-midnight .driver-tile.available.selected {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.2), rgba(185, 239, 104, 0.12));
  border-color: rgba(247, 200, 75, 0.54);
  box-shadow: inset 0 0 0 1px rgba(247, 200, 75, 0.28);
}

body.dispatch-theme-midnight input,
body.dispatch-theme-midnight select,
body.dispatch-theme-midnight textarea,
body.driver-page.driver-theme-midnight input,
body.driver-page.driver-theme-midnight select,
body.driver-page.driver-theme-midnight textarea {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

body.dispatch-theme-midnight select option,
body.dispatch-theme-midnight select optgroup,
body.driver-page.driver-theme-midnight select option,
body.driver-page.driver-theme-midnight select optgroup {
  background: #121317;
  color: #f3f4f6;
}

body.dispatch-theme-midnight .ghost,
body.dispatch-theme-midnight .button-link.ghost,
body.driver-page.driver-theme-midnight .ghost,
body.driver-page.driver-theme-midnight .button-link.ghost {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .primary,
body.driver-page.driver-theme-midnight .primary {
  background: linear-gradient(135deg, #4a4f58, #262a31);
  color: #fafafa;
}

body.dispatch-theme-midnight .establishment-admin-item,
body.dispatch-theme-midnight .server-log-entry,
body.dispatch-theme-midnight .server-log-empty,
body.dispatch-theme-midnight .statistics-metric-card,
body.dispatch-theme-midnight .statistics-note-list {
  background: rgba(22, 23, 27, 0.96);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

body.dispatch-theme-midnight .establishment-admin-item.active,
body.dispatch-theme-midnight .establishment-admin-item.is-active {
  background: rgba(48, 50, 57, 0.92);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .establishment-admin-empty {
  background: rgba(18, 19, 23, 0.78);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .establishment-admin-map-card,
body.dispatch-theme-midnight .window-shell,
body.dispatch-theme-midnight .window-body {
  background: var(--window-surface-strong);
  border-color: var(--window-border);
  box-shadow: var(--window-shadow);
}

body.dispatch-theme-midnight .ride-window-bottom {
  background: linear-gradient(180deg, var(--window-surface-soft), var(--window-surface-strong));
}

body.dispatch-theme-midnight .ride-window-map-card {
  background: linear-gradient(180deg, rgba(18, 19, 23, 0.98), rgba(12, 12, 14, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
}

body.dispatch-theme-midnight .ride-window-map-frame {
  border-color: rgba(255, 255, 255, 0.08);
  background: #121317;
}

body.dispatch-theme-midnight .ride-window-map-empty,
body.dispatch-theme-midnight .ride-window-map-loading {
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

body.dispatch-theme-midnight .dispatch-table,
body.driver-page.driver-theme-midnight .dispatch-table {
  color: var(--text);
  background: transparent;
}

body.dispatch-theme-midnight .dispatch-table th,
body.driver-page.driver-theme-midnight .dispatch-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

body.dispatch-theme-midnight .dispatch-table td,
body.driver-page.driver-theme-midnight .dispatch-table td {
  background: rgba(255, 255, 255, 0.025);
  border-right-color: rgba(167, 173, 184, 0.2);
  border-bottom-color: rgba(167, 173, 184, 0.16);
  color: var(--text);
}

body.dispatch-theme-midnight .dispatch-table tbody tr:hover,
body.driver-page.driver-theme-midnight .dispatch-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

body.dispatch-theme-midnight .dispatch-table td:hover .table-cell-hover-content,
body.driver-page.driver-theme-midnight .dispatch-table td:hover .table-cell-hover-content {
  background: rgba(24, 25, 29, 0.98);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.44);
}

body.dispatch-theme-dark .window-inline-hint {
  background: rgba(91, 130, 227, 0.16);
  color: #bcd0ff;
}

body.dispatch-theme-dark .window-inline-warning {
  background: rgba(184, 55, 47, 0.18);
  color: #ffbeb8;
  border-color: rgba(184, 55, 47, 0.28);
}

body.dispatch-theme-dark .civic-warning {
  background: rgba(255, 190, 184, 0.14);
  border-color: rgba(255, 190, 184, 0.42);
  color: #ffbeb8;
}

body.dispatch-theme-dark .civic-warning-tooltip {
  background: rgba(25, 32, 48, 0.98);
  border-color: rgba(255, 190, 184, 0.3);
  color: #ffe5e2;
}

body.dispatch-theme-dark .address-suggestions,
body.dispatch-theme-dark .ride-window-map-actions .button-link,
body.dispatch-theme-dark .establishment-suggestions {
  color: var(--text);
}

.app-shell {
  --app-scale-active: 1;
  --app-scale-width-factor: 1;
  --app-font-scale: 1;
  width: min(1920px, calc(100% - 12px));
  min-height: calc(100vh - 8px);
  margin: 0 auto;
  padding: 8px 0 14px;
  font-size: calc(1rem * var(--app-font-scale));
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

body.app-resolution-scaled .app-shell {
  width: min(1920px, calc((100% - 12px) / var(--app-scale-width-factor)));
  min-height: calc((100vh - 8px) / var(--app-scale-active));
}

body.dispatch-page.dispatch-app-active.app-resolution-scale-zoom .app-shell {
  width: min(1920px, calc(100% - 12px));
  min-height: calc(100vh - 8px);
}

body.app-resolution-scale-zoom .app-shell {
  zoom: var(--app-scale-active);
}

body.app-resolution-scale-transform {
  overflow-x: hidden;
}

body.dispatch-page.dispatch-app-active.app-resolution-scaled {
  overflow: hidden;
}

body.app-resolution-scale-transform .app-shell {
  transform: scale(var(--app-scale-active));
  transform-origin: top center;
}

.app-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 10px 12px 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
}

.app-signature time {
  font: inherit;
}

.app-signature-copyright,
.app-signature a {
  color: inherit;
}

.app-signature-link {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.app-signature-link:hover,
.app-signature-link:focus-visible {
  color: var(--primary);
}

.auth-layout {
  min-height: calc(100vh - 28px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.portal-shell {
  width: min(1120px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.portal-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform-origin: center top;
}

body.portal-fit-no-scroll {
  min-height: 100dvh;
  overflow: hidden;
}

body.portal-fit-no-scroll .portal-shell {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.portal-shell.portal-fit-scaled .portal-content {
  flex: 0 0 auto;
  will-change: transform;
}

.portal-shell.portal-fit-scaled .app-signature {
  padding-top: 4px;
  padding-bottom: max(3px, env(safe-area-inset-bottom, 0px));
  font-size: 0.66rem;
}

#auth-view,
#app-view,
#driver-auth-view,
#driver-app-view,
#map-auth-view,
#map-app-view,
#maintenance-auth-view,
#maintenance-app-view {
  flex: 1 1 auto;
  min-height: 0;
}

#app-view,
#driver-app-view,
#map-app-view,
#maintenance-app-view {
  display: flex;
  flex-direction: column;
}

#app-view > main,
#driver-app-view > main,
#map-app-view > main,
#maintenance-app-view > main {
  flex: 1 1 auto;
  min-height: 0;
}

.portal-hero {
  width: min(760px, 100%);
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.portal-brand-logo {
  display: block;
  width: min(420px, 100%);
  height: auto;
  margin: 0 auto 28px;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(2, 21, 47, 0.22);
}

.tenant-brand-logo {
  border-radius: 0;
  box-shadow: none;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.portal-card {
  min-height: 260px;
  padding: 28px;
  border-radius: 28px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 90px rgba(20, 33, 61, 0.18);
}

.portal-card span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
}

.portal-card strong {
  display: block;
  margin: auto 0 12px;
  font-size: clamp(2rem, 5vw, 3.7rem);
  letter-spacing: -0.05em;
}

.portal-card p {
  max-width: 420px;
  color: var(--muted);
  margin-bottom: 0;
}

.dispatch-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 200, 75, 0.2));
}

.driver-card {
  background: linear-gradient(135deg, rgba(20, 33, 61, 0.96), rgba(33, 63, 120, 0.86));
  color: white;
}

.driver-card p,
.driver-card span {
  color: rgba(255, 255, 255, 0.74);
}


.map-card {
  background: linear-gradient(135deg, rgba(224, 246, 244, 0.96), rgba(142, 201, 190, 0.32));
}

.maintenance-card {
  background: linear-gradient(135deg, rgba(255, 245, 226, 0.96), rgba(224, 177, 74, 0.3));
}

.taxiflow-home .portal-hero {
  width: min(880px, 100%);
  max-width: 880px;
}

.taxiflow-home .portal-brand-logo {
  width: min(520px, 100%);
}

.taxiflow-home .portal-card {
  min-height: 230px;
}

.taxiflow-home .portal-card strong {
  font-size: clamp(1.45rem, 2.4vw, 2.4rem);
  letter-spacing: -0.03em;
}

.portal-back {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  text-decoration: none;
}

.auth-hero,
.auth-panel,
.board-panel,
.stat {
  background: var(--surface);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
}

.auth-hero {
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(140% 120% at 14% 10%, rgba(255, 255, 255, 0.05), transparent 46%),
    radial-gradient(170% 150% at 88% 92%, rgba(103, 140, 221, 0.055), transparent 54%),
    linear-gradient(145deg, #1a2d52 0%, #27467d 52%, #436296 100%);
  color: white;
}

.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-hero::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.012), transparent 38%, rgba(255, 255, 255, 0.008) 72%, rgba(0, 0, 0, 0.012));
  opacity: 0.9;
}

.auth-hero::after {
  opacity: 0.035;
  mix-blend-mode: overlay;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.auth-hero > * {
  position: relative;
  z-index: 1;
}

.auth-hero .eyebrow,
.auth-hero .lede {
  color: rgba(255, 255, 255, 0.74);
}

.auth-panel {
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 8px;
}

.auth-form label span {
  display: block;
  font-weight: 700;
}

.auth-form label input {
  width: 100%;
  max-width: 240px;
}

.password-field-wrap {
  position: relative;
  display: inline-grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.auth-form label > .password-field-wrap {
  display: grid;
  font-weight: 400;
}

.auth-form .password-field-wrap {
  max-width: 240px;
}

#auth-view .auth-form .password-field-wrap,
#driver-auth-view .auth-form .password-field-wrap,
#map-auth-view .auth-form .password-field-wrap,
#maintenance-auth-view .auth-form .password-field-wrap {
  max-width: none;
}

.password-field-wrap > input[type="password"],
.password-field-wrap > input[type="text"] {
  grid-area: 1 / 1;
  width: 100%;
  padding-right: 44px;
}

.password-toggle-button {
  position: relative;
  grid-area: 1 / 1;
  align-self: center;
  justify-self: end;
  margin-right: 6px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(20, 33, 61, 0.58);
  box-shadow: none;
  transform: none;
}

.password-toggle-button svg {
  width: 20px;
  height: 20px;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible,
.password-toggle-button.is-visible {
  background: rgba(20, 33, 61, 0.08);
  color: var(--text);
  box-shadow: none;
  transform: none;
}

.password-toggle-button:active {
  transform: scale(0.94);
}

body.dispatch-theme-dark .password-toggle-button,
body.dispatch-theme-midnight .password-toggle-button,
body.dispatch-theme-space .password-toggle-button,
body.driver-page.driver-theme-dark .password-toggle-button,
body.driver-page.driver-theme-midnight .password-toggle-button,
body.driver-page.driver-theme-space .password-toggle-button {
  color: rgba(238, 245, 255, 0.68);
}

body.dispatch-theme-dark .password-toggle-button:hover,
body.dispatch-theme-dark .password-toggle-button:focus-visible,
body.dispatch-theme-dark .password-toggle-button.is-visible,
body.dispatch-theme-midnight .password-toggle-button:hover,
body.dispatch-theme-midnight .password-toggle-button:focus-visible,
body.dispatch-theme-midnight .password-toggle-button.is-visible,
body.dispatch-theme-space .password-toggle-button:hover,
body.dispatch-theme-space .password-toggle-button:focus-visible,
body.dispatch-theme-space .password-toggle-button.is-visible,
body.driver-page.driver-theme-dark .password-toggle-button:hover,
body.driver-page.driver-theme-dark .password-toggle-button:focus-visible,
body.driver-page.driver-theme-dark .password-toggle-button.is-visible,
body.driver-page.driver-theme-midnight .password-toggle-button:hover,
body.driver-page.driver-theme-midnight .password-toggle-button:focus-visible,
body.driver-page.driver-theme-midnight .password-toggle-button.is-visible,
body.driver-page.driver-theme-space .password-toggle-button:hover,
body.driver-page.driver-theme-space .password-toggle-button:focus-visible,
body.driver-page.driver-theme-space .password-toggle-button.is-visible {
  background: rgba(238, 245, 255, 0.12);
  color: #ffffff;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  margin: -4px 0 2px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  transition: color 160ms ease, transform 160ms ease;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
  color: var(--text);
  transform: translateX(-2px);
}

.auth-submit-button {
  justify-self: start;
  width: auto;
  min-width: 220px;
  padding-inline: 28px;
}

.auth-form .error {
  margin-left: 0;
}

.credentials {
  margin-top: 24px;
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#auth-view.auth-layout,
#driver-auth-view.auth-layout,
#map-auth-view.auth-layout,
#maintenance-auth-view.auth-layout {
  position: relative;
  flex: 0 0 auto;
  width: min(620px, 100%);
  min-height: 0;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: var(--surface);
  padding: 42px;
  box-shadow: 0 28px 90px rgba(28, 43, 73, 0.16);
  backdrop-filter: blur(6px);
}

#auth-view.auth-layout::before,
#driver-auth-view.auth-layout::before,
#map-auth-view.auth-layout::before,
#maintenance-auth-view.auth-layout::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 190px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.16), transparent 26%),
    linear-gradient(145deg, #172a4f 0%, #284b86 58%, #4d6fa3 100%);
  pointer-events: none;
}

#auth-view.auth-layout::after,
#driver-auth-view.auth-layout::after,
#map-auth-view.auth-layout::after,
#maintenance-auth-view.auth-layout::after {
  content: "";
  position: absolute;
  top: 84px;
  right: -90px;
  width: 320px;
  height: 150px;
  border-radius: 999px;
  background: rgba(247, 200, 75, 0.16);
  transform: rotate(-12deg);
  pointer-events: none;
}

#auth-view .auth-hero,
#driver-auth-view .auth-hero,
#map-auth-view .auth-hero,
#maintenance-auth-view .auth-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: white;
  text-align: center;
  background: transparent;
  backdrop-filter: none;
}

#auth-view .auth-hero::before,
#auth-view .auth-hero::after,
#driver-auth-view .auth-hero::before,
#driver-auth-view .auth-hero::after,
#map-auth-view .auth-hero::before,
#map-auth-view .auth-hero::after,
#maintenance-auth-view .auth-hero::before,
#maintenance-auth-view .auth-hero::after {
  content: none;
}

#auth-view .auth-hero > *,
#driver-auth-view .auth-hero > *,
#map-auth-view .auth-hero > *,
#maintenance-auth-view .auth-hero > *,
#auth-view .auth-panel,
#driver-auth-view .auth-panel,
#map-auth-view .auth-panel,
#maintenance-auth-view .auth-panel,
#auth-view .credentials,
#driver-auth-view .credentials,
#map-auth-view .credentials,
#maintenance-auth-view .credentials {
  position: relative;
  z-index: 1;
}

.auth-brand-mark {
  width: min(270px, 72%);
  height: 118px;
  margin: 0 auto 28px;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 24px 34px rgba(3, 14, 32, 0.24));
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-mark.hidden,
.auth-brand-mark[hidden] {
  display: none;
}

.auth-brand-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.auth-brand-logo,
.dispatch-brand-logo,
.tenant-brand-logo,
.client-brand-logo {
  transition: filter 160ms ease, opacity 160ms ease;
}

body.dispatch-theme-space .dispatch-brand-center,
body.dispatch-theme-space .auth-brand-mark,
body.driver-page.driver-theme-space .auth-brand-mark {
  isolation: isolate;
  overflow: visible;
}

body.dispatch-theme-space #app-view .dispatch-brand-center {
  position: relative;
}

body.dispatch-theme-space .dispatch-brand-center::before,
body.dispatch-theme-space .auth-brand-mark::before,
body.driver-page.driver-theme-space .auth-brand-mark::before,
body.dispatch-theme-space .dispatch-brand-center::after,
body.dispatch-theme-space .auth-brand-mark::after,
body.driver-page.driver-theme-space .auth-brand-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

body.dispatch-theme-space .dispatch-brand-center::before,
body.dispatch-theme-space .auth-brand-mark::before,
body.driver-page.driver-theme-space .auth-brand-mark::before {
  inset: -28% -20%;
  z-index: -2;
  opacity: 0.92;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.92) 0 20%, rgba(7, 10, 28, 0.9) 21% 30%, rgba(70, 112, 255, 0.44) 31% 36%, rgba(95, 233, 255, 0.34) 37% 41%, rgba(143, 108, 255, 0.22) 45% 55%, transparent 68%),
    conic-gradient(from 18deg, rgba(95, 233, 255, 0), rgba(95, 233, 255, 0.46), rgba(143, 108, 255, 0.18), rgba(246, 211, 101, 0.2), rgba(95, 233, 255, 0));
  box-shadow:
    0 0 28px rgba(95, 233, 255, 0.26),
    0 0 72px rgba(83, 109, 255, 0.22),
    inset 0 0 38px rgba(0, 0, 0, 0.76);
  animation: space-logo-blackhole-spin 18s linear infinite;
}

body.dispatch-theme-space .dispatch-brand-center::after,
body.dispatch-theme-space .auth-brand-mark::after,
body.driver-page.driver-theme-space .auth-brand-mark::after {
  inset: -4% -2%;
  z-index: 1;
  opacity: 1;
  border-radius: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 755 348'%3E%3Cdefs%3E%3ClinearGradient id='taxi' x1='300' y1='54' x2='474' y2='128' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23dff7ff'/%3E%3Cstop offset='.45' stop-color='%2360a5fa'/%3E%3Cstop offset='1' stop-color='%231d4ed8'/%3E%3C/linearGradient%3E%3ClinearGradient id='name' x1='48' y1='144' x2='704' y2='270' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23bae6fd'/%3E%3Cstop offset='.24' stop-color='%2338bdf8'/%3E%3Cstop offset='.52' stop-color='%232563eb'/%3E%3Cstop offset='.78' stop-color='%2360a5fa'/%3E%3Cstop offset='1' stop-color='%23e0f2fe'/%3E%3C/linearGradient%3E%3Cfilter id='glow' x='-12%25' y='-20%25' width='124%25' height='142%25'%3E%3CfeGaussianBlur stdDeviation='3.2' result='blur'/%3E%3CfeColorMatrix in='blur' type='matrix' values='0 0 0 0 0.26 0 0 0 0 0.64 0 0 0 0 1 0 0 0 .68 0' result='glow'/%3E%3CfeMerge%3E%3CfeMergeNode in='glow'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23glow)' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M294 55h171c17 0 31 13 33 30l8 44H286l-6-44c-3-17 12-30 30-30Z' fill='rgba(4,12,30,.62)' stroke='%2360a5fa' stroke-width='8'/%3E%3Cpath d='M20 145c152 0 300-2 435-4 114-2 213 8 284 24' fill='none' stroke='%238edfff' stroke-width='7' opacity='.9'/%3E%3Ctext x='378' y='118' text-anchor='middle' fill='url(%23taxi)' stroke='%23071322' stroke-width='7' paint-order='stroke fill' font-size='74' font-weight='900' font-family='Arial Black, Segoe UI, sans-serif'%3ETAXI%3C/text%3E%3Ctext x='378' y='255' text-anchor='middle' fill='url(%23name)' stroke='%23071322' stroke-width='6' paint-order='stroke fill' font-size='132' font-weight='700' font-family='Georgia, Times New Roman, serif'%3ENaudVille%3C/text%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 10px 22px rgba(95, 233, 255, 0.24));
  mix-blend-mode: normal;
  transform: none;
  transform-origin: center;
  animation: space-logo-blackhole-spin 18s linear infinite;
}

body.dispatch-theme-test .auth-brand-logo,
body.dispatch-theme-test .dispatch-brand-logo,
body.dispatch-theme-test .tenant-brand-logo,
body.dispatch-theme-test .client-brand-logo,
body.driver-page.driver-theme-test .auth-brand-logo,
body.driver-page.driver-theme-test .dispatch-brand-logo {
  filter: saturate(1.12) contrast(1.04) drop-shadow(0 8px 18px rgba(217, 170, 44, 0.2));
}

body.dispatch-theme-dark .auth-brand-logo,
body.dispatch-theme-dark .dispatch-brand-logo,
body.dispatch-theme-dark .tenant-brand-logo,
body.dispatch-theme-dark .client-brand-logo,
body.driver-page.driver-theme-dark .auth-brand-logo,
body.driver-page.driver-theme-dark .dispatch-brand-logo {
  filter: hue-rotate(150deg) saturate(0.92) brightness(0.78) contrast(1.16) drop-shadow(0 8px 22px rgba(40, 77, 148, 0.34));
}

body.dispatch-theme-midnight .auth-brand-logo,
body.dispatch-theme-midnight .dispatch-brand-logo,
body.dispatch-theme-midnight .tenant-brand-logo,
body.dispatch-theme-midnight .client-brand-logo,
body.driver-page.driver-theme-midnight .auth-brand-logo,
body.driver-page.driver-theme-midnight .dispatch-brand-logo {
  filter: grayscale(0.18) saturate(0.82) brightness(1.04) contrast(1.05) drop-shadow(0 8px 20px rgba(255, 255, 255, 0.1));
}

body.dispatch-theme-girly .auth-brand-logo,
body.dispatch-theme-girly .dispatch-brand-logo,
body.dispatch-theme-girly .tenant-brand-logo,
body.dispatch-theme-girly .client-brand-logo,
body.driver-page.driver-theme-girly .auth-brand-logo,
body.driver-page.driver-theme-girly .dispatch-brand-logo {
  filter: hue-rotate(285deg) saturate(1.18) brightness(1.03) drop-shadow(0 8px 20px rgba(193, 76, 149, 0.2));
}

body.dispatch-theme-space .auth-brand-logo,
body.dispatch-theme-space .dispatch-brand-logo,
body.dispatch-theme-space .tenant-brand-logo,
body.dispatch-theme-space .client-brand-logo,
body.driver-page.driver-theme-space .auth-brand-logo,
body.driver-page.driver-theme-space .dispatch-brand-logo {
  position: relative;
  z-index: 1;
  transform-origin: center;
  animation: space-logo-blackhole-spin 18s linear infinite;
  filter: hue-rotate(176deg) saturate(1.22) brightness(0.78) contrast(1.22) drop-shadow(0 10px 26px rgba(95, 233, 255, 0.28));
}

body.dispatch-theme-space .dispatch-brand-center .dispatch-brand-logo,
body.dispatch-theme-space .auth-brand-mark .auth-brand-logo,
body.driver-page.driver-theme-space .auth-brand-mark .auth-brand-logo {
  visibility: hidden;
  opacity: 0;
  filter: none;
  animation: none;
  transition: none;
}

body.dispatch-theme-fire .auth-brand-logo,
body.dispatch-theme-fire .dispatch-brand-logo,
body.dispatch-theme-fire .tenant-brand-logo,
body.dispatch-theme-fire .client-brand-logo,
body.driver-page.driver-theme-fire .auth-brand-logo,
body.driver-page.driver-theme-fire .dispatch-brand-logo {
  filter: hue-rotate(330deg) saturate(1.45) brightness(1.08) contrast(1.08) drop-shadow(0 8px 22px rgba(255, 98, 0, 0.28));
}

#auth-view .auth-hero-title,
#driver-auth-view .auth-hero-title,
#map-auth-view .auth-hero-title,
#maintenance-auth-view .auth-hero-title {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text);
  font-size: clamp(1.725rem, 2vw, 0.95rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

#auth-view .lede,
#driver-auth-view .lede,
#map-auth-view .lede,
#maintenance-auth-view .lede {
  max-width: 500px;
  margin: 18px 0 0;
  color: #5d6b80;
  font-size: 1.05rem;
  line-height: 1.5;
}

#auth-view .auth-panel,
#driver-auth-view .auth-panel,
#map-auth-view .auth-panel,
#maintenance-auth-view .auth-panel {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: min(380px, 100%);
  padding: 28px;
  border: 1px solid rgba(128, 145, 170, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 46px rgba(28, 43, 73, 0.1);
  backdrop-filter: none;
}

#auth-view .auth-panel .eyebrow,
#driver-auth-view .auth-panel .eyebrow,
#map-auth-view .auth-panel .eyebrow,
#maintenance-auth-view .auth-panel .eyebrow {
  color: var(--muted);
  margin-bottom: 10px;
}

.auth-panel-title {
  margin: 0 0 24px;
  font-size: 1.55rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

#auth-view .auth-form label input,
#driver-auth-view .auth-form label input,
#map-auth-view .auth-form label input,
#maintenance-auth-view .auth-form label input {
  max-width: none;
}

#auth-view .auth-submit-button,
#driver-auth-view .auth-submit-button,
#map-auth-view .auth-submit-button,
#maintenance-auth-view .auth-submit-button {
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

#auth-view .credentials,
#driver-auth-view .credentials,
#map-auth-view .credentials,
#maintenance-auth-view .credentials {
  width: 100%;
  margin-top: 0;
  padding: 18px 20px;
  border: 1px solid rgba(128, 145, 170, 0.2);
  border-radius: 18px;
  background: rgba(246, 248, 252, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: var(--text);
}

#auth-view .credentials p,
#driver-auth-view .credentials p,
#map-auth-view .credentials p,
#maintenance-auth-view .credentials p {
  margin: 0;
  color: var(--muted);
}

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

.cred-grid div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.cred-grid span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
}

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
  min-height: 116px;
}

.dispatch-titlebar {
  display: flex;
  align-items: center;
  min-width: 0;
  justify-self: start;
}

.topbar-connected-panel {
  overflow: visible;
}

.topbar-connected-panel .connected-drivers-row {
  min-height: 0;
}

.dispatch-brand-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.dispatch-brand-logo {
  display: block;
  width: 300px;
  max-height: 120px;
  object-fit: contain;
  flex: 0 0 auto;
}

.topbar-actions {
  position: relative;
  z-index: 35;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  pointer-events: auto;
}

#app-view .topbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, auto) minmax(280px, 1fr);
  align-items: center;
}

#app-view .topbar-connected-panel {
  grid-column: 1;
  justify-self: start;
  width: fit-content;
  max-width: min(340px, 100%);
  min-width: 0;
}

#app-view .dispatch-brand-center {
  position: static;
  left: auto;
  top: auto;
  grid-column: 2;
  transform: none;
  min-width: 0;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

#app-view .dispatch-brand-logo {
  width: clamp(190px, 24vw, 300px);
  max-height: clamp(72px, 10vw, 120px);
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

body.dispatch-theme-fire #app-view .topbar,
body.dispatch-theme-fire .board-panel,
body.dispatch-theme-fire .dialog-card,
body.dispatch-theme-fire .reservation-tabs,
body.dispatch-theme-fire .connected-driver-card,
body.dispatch-theme-fire .connected-drivers-grid,
body.dispatch-theme-fire .connected-driver-cell,
body.dispatch-theme-fire .settings-subsection,
body.dispatch-theme-fire .chat-thread-item,
body.dispatch-theme-fire .chat-message-list,
body.dispatch-theme-fire .chat-bubble,
body.dispatch-theme-fire .window-shell,
body.dispatch-theme-fire .window-body,
body.dispatch-theme-fire .ride-window-bottom {
  border-color: rgba(255, 190, 90, 0.34);
  background:
    linear-gradient(160deg, rgba(35, 5, 1, 0.9), rgba(88, 15, 4, 0.78)),
    radial-gradient(circle at top left, rgba(255, 194, 74, 0.2), transparent 34%);
  box-shadow:
    0 18px 52px rgba(76, 9, 0, 0.34),
    inset 0 1px 0 rgba(255, 224, 141, 0.16);
}

body.dispatch-theme-fire .topbar,
body.dispatch-theme-fire .dispatch-layout,
body.dispatch-theme-fire #window-layer,
body.dispatch-theme-fire .chat-floating-stack {
  position: relative;
  z-index: 2;
}

body.dispatch-theme-fire .dialog-backdrop {
  position: fixed;
  z-index: var(--z-popup-layer);
}

/* body.dispatch-theme-fire #app-view .topbar { */
  /* min-height: clamp(148px, 9.4vw, 190px); */
  /* height: clamp(148px, 9.4vw, 190px); */
  /* isolation: isolate; */
  /* overflow: visible; */
/* } */

body.dispatch-theme-fire #app-view .topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 237, 123, 0.72) 0 4%, rgba(255, 126, 0, 0.5) 17%, rgba(255, 35, 0, 0.24) 35%, transparent 56%),
    radial-gradient(ellipse at 30% 50%, rgba(255, 56, 18, 0.56) 0 24%, transparent 56%),
    linear-gradient(90deg, rgba(169, 19, 3, 0.82) 0%, rgba(104, 12, 2, 0.9) 52%, rgba(48, 5, 1, 0.94) 76%, rgba(20, 2, 0, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 222, 129, 0.2),
    inset 0 -1px 0 rgba(255, 118, 28, 0.18),
    0 0 34px rgba(255, 70, 0, 0.32);
}

body.dispatch-theme-fire #app-view .topbar > * {
  position: relative;
  z-index: 2;
}

body.dispatch-theme-fire #app-view .dispatch-brand-center {
  position: relative;
  min-width: min(200px, 40vw);
  min-height: 0;
  height: 1px;
  display: grid;
  place-items: center;
  align-self: center;
  overflow: visible;
  z-index: 1;
}

body.dispatch-theme-fire .fire-meteor-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-theme-passing-layer);
  pointer-events: none;
  overflow: hidden;
}

body.dispatch-theme-fire .fire-meteor-layer .fire-meteor {
  position: fixed;
  top: var(--meteor-top, -18vh);
  left: var(--meteor-left, 82vw);
  width: calc(var(--meteor-scale, 1) * 230px);
  height: calc(var(--meteor-scale, 1) * 92px);
  pointer-events: none;
  z-index: 1;
  transform-origin: 24% 50%;
  background:
    radial-gradient(ellipse at 17% 51%, rgba(255, 246, 178, 0.95) 0 4%, rgba(255, 164, 35, 0.92) 8%, rgba(255, 67, 13, 0.74) 16%, transparent 30%),
    radial-gradient(ellipse at 36% 50%, rgba(255, 238, 116, 0.96) 0 5%, rgba(255, 116, 20, 0.88) 17%, rgba(210, 20, 2, 0.52) 32%, transparent 54%),
    radial-gradient(ellipse at 62% 50%, rgba(255, 230, 90, 0.74) 0 3%, rgba(255, 72, 0, 0.64) 16%, rgba(128, 10, 0, 0.22) 38%, transparent 68%);
  clip-path: polygon(0 48%, 10% 20%, 26% 8%, 48% 16%, 76% 4%, 100% 0, 82% 24%, 96% 42%, 76% 54%, 94% 72%, 66% 68%, 42% 86%, 20% 76%, 8% 68%);
  filter: drop-shadow(0 0 14px rgba(255, 92, 0, 0.72)) drop-shadow(0 0 28px rgba(255, 205, 60, 0.34));
  animation: fire-meteor-fall var(--meteor-duration, 3.8s) linear infinite;
  animation-delay: var(--meteor-delay, 0s);
}

body.dispatch-theme-fire .fire-meteor-layer .fire-meteor::before {
  content: "";
  position: absolute;
  left: calc(var(--meteor-scale, 1) * 3px);
  top: calc(var(--meteor-scale, 1) * 21px);
  width: calc(var(--meteor-scale, 1) * 54px);
  height: calc(var(--meteor-scale, 1) * 54px);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 198, 89, 0.32) 0 8%, transparent 9%),
    radial-gradient(circle at 68% 35%, rgba(28, 18, 14, 0.42) 0 9%, transparent 10%),
    radial-gradient(circle at 46% 70%, rgba(26, 16, 13, 0.38) 0 11%, transparent 12%),
    radial-gradient(circle at 24% 62%, rgba(255, 99, 21, 0.46) 0 7%, transparent 8%),
    radial-gradient(circle at 60% 58%, rgba(255, 104, 22, 0.48) 0 8%, transparent 9%),
    radial-gradient(circle at 50% 50%, #74675d 0 18%, #4f4945 46%, #2c2928 72%, #171514 100%);
  border: 1px solid rgba(255, 192, 89, 0.28);
  box-shadow:
    inset -8px -8px 14px rgba(0, 0, 0, 0.36),
    inset 6px 5px 10px rgba(255, 217, 147, 0.12),
    0 0 16px rgba(255, 89, 0, 0.68);
}

body.dispatch-theme-fire .fire-meteor-layer .fire-meteor::after {
  content: "";
  position: absolute;
  left: calc(var(--meteor-scale, 1) * 28px);
  top: calc(var(--meteor-scale, 1) * 26px);
  width: calc(var(--meteor-scale, 1) * 190px);
  height: calc(var(--meteor-scale, 1) * 38px);
  border-radius: 0 999px 999px 0;
  transform: skewX(-18deg);
  transform-origin: left center;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(255, 255, 210, 0.98) 0 12%, rgba(255, 215, 68, 0.94) 22%, transparent 36%),
    linear-gradient(90deg, rgba(255, 241, 121, 0.98), rgba(255, 130, 23, 0.82) 38%, rgba(255, 45, 10, 0.48) 68%, transparent 100%);
  filter: blur(0.35px);
}

body.dispatch-theme-fire .fire-meteor-layer .fire-meteor:nth-child(2) {
  --meteor-top: -14vh;
  --meteor-left: 78vw;
  --meteor-scale: 0.68;
  --meteor-duration: 3.5s;
  --meteor-delay: -0.6s;
}

body.dispatch-theme-fire .fire-meteor-layer .fire-meteor:nth-child(3) {
  --meteor-top: -22vh;
  --meteor-left: 96vw;
  --meteor-scale: 0.95;
  --meteor-duration: 4.6s;
  --meteor-delay: -2.4s;
}

body.dispatch-theme-fire .fire-meteor-layer .fire-meteor:nth-child(4) {
  --meteor-top: -10vh;
  --meteor-left: 58vw;
  --meteor-scale: 0.76;
  --meteor-duration: 4s;
  --meteor-delay: -1.4s;
}

body.dispatch-theme-fire .fire-meteor-layer .fire-meteor:nth-child(5) {
  --meteor-top: -26vh;
  --meteor-left: 112vw;
  --meteor-scale: 1.08;
  --meteor-duration: 5.4s;
  --meteor-delay: -3.1s;
}

body.dispatch-theme-fire #app-view .dispatch-brand-logo {
  visibility: hidden;
  opacity: 0;
  filter: none;
  transform: none;
  animation: none;
  transition: none;
}

body.dispatch-theme-fire #app-view .dispatch-brand-center::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(420px, 43vw, 820px);
  height: clamp(126px, 9.2vw, 180px);
  transform: translate(-50%, -52%);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 88%, rgba(255, 246, 156, 0.9), transparent 23%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 97, 0, 0.82) 0 24%, rgba(255, 28, 0, 0.36) 44%, transparent 72%);
  box-shadow:
    0 0 34px rgba(255, 98, 0, 0.72),
    0 0 92px rgba(255, 180, 0, 0.28);
  animation: taxi-debile-backdraft 1.08s ease-in-out infinite alternate;
  user-select: none;
  -webkit-user-select: none;
}

body.dispatch-theme-fire #app-view .dispatch-brand-center::after {
  content: var(--dispatch-fire-theme-label, "Taxi Débile");
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  padding: 0.08em 0.22em 0.16em;
  color: #fff4bc;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(2rem, 3.45vw, 3.75rem);
  font-weight: 950;
  letter-spacing: 0.055em;
  line-height: 0.92;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  background:
    radial-gradient(circle at 20% 20%, #ffcb65 0 6%, transparent 8%),
    radial-gradient(circle at 74% 28%, #ff6a00 0 8%, transparent 11%),
    radial-gradient(circle at 42% 72%, #ffe2a0 0 5%, transparent 8%),
    radial-gradient(circle at 86% 78%, #ff3100 0 7%, transparent 10%),
    radial-gradient(circle at 52% 104%, rgba(255, 247, 177, 0.96) 0 10%, transparent 24%),
    linear-gradient(180deg, #fffdf1 0%, #ffd973 18%, #ff8b1f 38%, #6b1304 68%, #1b0501 100%);
  background-size: 185px 185px, 170px 170px, 150px 150px, 190px 190px, 100% 100%, 100% 100%;
  background-position: 0 50%, 55% 30%, 30% 70%, 88% 84%, center, center;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: contrast(1.22) brightness(1.16);
  text-shadow:
    0 -2px 4px rgba(255, 255, 255, 0.9),
    0 -4px 10px rgba(255, 255, 120, 0.88),
    0 -10px 20px rgba(255, 140, 0, 0.9),
    0 -18px 35px rgba(200, 40, 0, 0.84),
    0 2px 0 rgba(68, 6, 0, 0.95),
    0 0 5px rgba(255, 80, 0, 0.68);
  transform: translate(-50%, -56%) rotate(-5deg);
  animation:
    taxi-debile-burn 1.08s ease-in-out infinite alternate,
    taxi-debile-ash-move 8s linear infinite;
  user-select: none;
  -webkit-user-select: none;
}

body.dispatch-theme-fire .primary {
  background: linear-gradient(135deg, #ffce3a, #ff5a1f 52%, #aa1503);
  color: #2b0500;
  box-shadow: 0 10px 24px rgba(255, 70, 0, 0.38);
}

body.dispatch-theme-fire .clock-chip,
body.dispatch-theme-fire .user-chip {
  border: 1px solid rgba(255, 198, 92, 0.26);
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 213, 103, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(91, 14, 3, 0.82), rgba(42, 5, 1, 0.9));
  color: #fff6df;
  box-shadow:
    inset 0 1px 0 rgba(255, 237, 170, 0.12),
    0 12px 28px rgba(56, 6, 0, 0.24);
}

body.dispatch-theme-fire .clock-chip span,
body.dispatch-theme-fire .user-chip span,
body.dispatch-theme-fire .driver-strip-header span,
body.dispatch-theme-fire .service-load-details {
  color: #ffdba0;
}

body.dispatch-theme-fire .clock-chip strong,
body.dispatch-theme-fire .user-chip strong {
  color: #fff9df;
}

body.dispatch-theme-fire .reservation-tabs {
  border: 1px solid rgba(255, 190, 90, 0.18);
  background: rgba(38, 5, 1, 0.58);
}

body.dispatch-theme-fire .tab-button {
  color: #ffdba0;
}

body.dispatch-theme-fire .tab-button span {
  background: rgba(255, 214, 105, 0.12);
  color: #fff4cf;
}

body.dispatch-theme-fire .tab-button.active {
  background:
    linear-gradient(145deg, rgba(255, 245, 205, 0.95), rgba(255, 178, 54, 0.88));
  color: #3a0800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 8px 20px rgba(83, 9, 0, 0.22);
}

body.dispatch-theme-fire .tab-button.active span {
  background: rgba(55, 8, 0, 0.12);
  color: #3a0800;
}

body.dispatch-theme-fire .driver-strip-wrap {
  border-color: rgba(255, 181, 75, 0.28);
  background:
    linear-gradient(160deg, rgba(53, 7, 1, 0.76), rgba(116, 22, 4, 0.38)),
    rgba(33, 4, 1, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 105, 0.08);
}

body.dispatch-theme-fire .driver-strip {
  border-color: rgba(255, 194, 92, 0.32);
  background: rgba(24, 3, 1, 0.42);
}

body.dispatch-theme-fire .empty-strip,
body.dispatch-theme-fire .connected-drivers-empty,
body.dispatch-theme-fire .empty-table {
  color: #ffe5ad;
}

body.dispatch-theme-fire .connected-drivers-wrap,
body.dispatch-theme-fire .connected-drivers-empty {
  border-color: rgba(255, 190, 90, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 231, 167, 0.1), rgba(69, 8, 1, 0.56)),
    rgba(32, 4, 1, 0.42);
}

body.dispatch-theme-fire .empty-table {
  background:
    linear-gradient(145deg, rgba(255, 231, 167, 0.1), rgba(69, 8, 1, 0.56)),
    rgba(32, 4, 1, 0.42);
}

body.dispatch-theme-fire .connected-drivers-panel .count-pill {
  background: rgba(58, 8, 1, 0.72);
  color: #fff4cf;
}

body.dispatch-theme-fire .ghost,
body.dispatch-theme-fire .button-link.ghost {
  border-color: rgba(255, 194, 92, 0.4);
  background: rgba(38, 5, 1, 0.5);
  color: #fff1c2;
}

body.dispatch-theme-fire input,
body.dispatch-theme-fire select,
body.dispatch-theme-fire textarea {
  border-color: rgba(255, 181, 75, 0.46);
  background: rgba(33, 5, 1, 0.82);
  color: #fff6df;
}

body.dispatch-theme-fire .dispatch-table,
body.dispatch-theme-fire .table-wrap {
  background: rgba(39, 6, 1, 0.7);
  border-color: rgba(255, 174, 62, 0.32);
}

body.dispatch-theme-fire .dispatch-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

body.dispatch-theme-fire .dispatch-table td {
  color: #fff7df;
  border-color: rgba(255, 168, 47, 0.16);
}

@keyframes taxi-debile-burn {
  0% {
    filter: contrast(1.18) brightness(1.12);
    text-shadow:
      0 -2px 4px rgba(255, 255, 255, 0.9),
      0 -4px 10px rgba(255, 255, 120, 0.88),
      0 -10px 20px rgba(255, 140, 0, 0.9),
      0 -18px 35px rgba(200, 40, 0, 0.84),
      0 2px 0 rgba(68, 6, 0, 0.95),
      0 0 5px rgba(255, 80, 0, 0.68);
    transform: translate(-50%, -56%) translateY(0) rotate(-5deg) scale(1);
  }

  48% {
    filter: contrast(1.34) brightness(1.24);
    text-shadow:
      0 -4px 8px rgba(255, 255, 255, 1),
      0 -8px 18px rgba(255, 255, 120, 0.96),
      0 -16px 30px rgba(255, 140, 0, 1),
      0 -28px 50px rgba(200, 40, 0, 1),
      0 2px 0 rgba(68, 6, 0, 0.95),
      0 0 8px rgba(255, 80, 0, 0.8);
    transform: translate(-50%, -56%) translateY(-1px) rotate(-5.4deg) scale(1.025);
  }

  100% {
    filter: contrast(1.23) brightness(1.18);
    text-shadow:
      0 -2px 5px rgba(255, 255, 255, 0.95),
      0 -5px 12px rgba(255, 255, 120, 0.92),
      0 -12px 24px rgba(255, 140, 0, 0.95),
      0 -22px 42px rgba(200, 40, 0, 0.9),
      0 2px 0 rgba(68, 6, 0, 0.95),
      0 0 6px rgba(255, 80, 0, 0.74);
    transform: translate(-50%, -56%) translateY(1px) rotate(-4.7deg) scale(0.995);
  }
}

@keyframes taxi-debile-ash-move {
  0% {
    background-position: 0 50%, 55% 30%, 30% 70%, 88% 84%, center, center;
  }

  100% {
    background-position: 100% 50%, 0 30%, 92% 70%, 18% 84%, center, center;
  }
}

@keyframes taxi-debile-backdraft {
  from {
    filter: saturate(130%) brightness(1);
    transform: translate(-50%, -52%) translateY(0) scale(1);
    opacity: 0.92;
  }

  to {
    filter: saturate(170%) brightness(1.12);
    transform: translate(-50%, -52%) translateY(-2px) scale(1.025);
    opacity: 1;
  }
}

@keyframes fire-meteor-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-24deg);
  }

  8% {
    opacity: 1;
  }

  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(-74vw, 124vh, 0) rotate(-24deg);
  }
}

#app-view .topbar-actions {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
  margin-left: 0;
}

.driver-topbar-overview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.driver-metric-chip {
  min-width: 108px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(20, 33, 61, 0.14);
  box-shadow: 0 12px 24px rgba(20, 33, 61, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.driver-metric-chip span {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.driver-metric-chip strong {
  font-size: 1.05rem;
  line-height: 1.1;
  color: var(--text);
}

.driver-metric-chip-button {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.driver-metric-chip-button:hover,
.driver-metric-chip-button:focus-visible,
.driver-metric-chip-button.is-open {
  border-color: rgba(20, 33, 61, 0.24);
  box-shadow: 0 14px 26px rgba(20, 33, 61, 0.12);
}

.driver-queue-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  max-width: min(320px, 70vw);
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(20, 33, 61, 0.14);
  box-shadow: 0 16px 34px rgba(20, 33, 61, 0.16);
  z-index: 20;
}

.driver-queue-popover-title {
  margin-bottom: 8px;
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.driver-queue-list {
  display: grid;
  gap: 6px;
}

.driver-queue-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text);
}

.driver-queue-item.is-current {
  margin: -2px -4px;
  padding: 2px 4px;
  border-radius: 8px;
  background: rgba(206, 239, 97, 0.28);
}

.driver-queue-rank {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.driver-queue-empty {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

body.driver-page.driver-theme-dark .driver-queue-popover {
  background: rgba(28, 34, 47, 0.98);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

body.driver-page.driver-theme-dark .driver-queue-item {
  color: #f3f6fb;
}

body.driver-page.driver-theme-midnight .driver-queue-popover,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-queue-popover {
  background: rgba(22, 22, 24, 0.98);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

body.driver-page.driver-theme-midnight .driver-queue-item,
body.driver-page.driver-theme-dark.driver-theme-midnight .driver-queue-item {
  color: #f5f5f5;
}


.icon-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
}

button.history-icon-button,
button.history-icon-button.ghost,
button.history-btn,
button.history-btn.ghost {
  --history-scale: 0.66;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 45%, #0f172a 100%);
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(37, 99, 235, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: visible;
  transition: transform 0.22s ease, opacity 0.14s ease, box-shadow 0.22s ease;
}

button.history-icon-button:not(.icon-button),
button.history-btn:not(.icon-button) {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 999px;
}

button.history-icon-button:hover:not(:disabled),
button.history-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 24px 45px rgba(37, 99, 235, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

button.history-icon-button:active:not(:disabled),
button.history-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

button.history-icon-button:disabled,
button.history-btn:disabled {
  transform: none;
  box-shadow:
    0 10px 22px rgba(37, 99, 235, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.history-icon {
  position: relative;
  width: 58px;
  height: 58px;
  display: block;
  transform: scale(var(--history-scale));
  transform-origin: center center;
  pointer-events: none;
  transition: transform 0.22s ease;
}

.history-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 41px;
  height: 41px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.12);
}

.history-arrow {
  position: absolute;
  left: -5px;
  top: 12px;
  width: 17px;
  height: 17px;
  border-left: 5px solid #ffffff;
  border-top: 5px solid #ffffff;
  border-radius: 3px;
  transform: rotate(-45deg);
}

.history-hands {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 16px;
  background: #ffffff;
  border-radius: 999px;
  transform: translate(-50%, -88%);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.18);
}

.history-hands::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: 0;
  width: 11px;
  height: 3px;
  background: #ffffff;
  border-radius: 999px;
  transform: rotate(38deg);
  transform-origin: left center;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.18);
}

.history-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.28);
}

button.history-icon-button:hover:not(:disabled) .history-icon,
button.history-btn:hover:not(:disabled) .history-icon {
  transform: scale(calc(var(--history-scale) * 1.08));
}

.board-header-actions .history-icon-button {
  flex: 0 0 auto;
}

button.cancel-icon-button,
button.cancel-icon-button.ghost,
button.cancel-icon-button.danger,
button.cancel-btn,
button.cancel-btn.ghost,
button.cancel-btn.danger {
  --cancel-scale: 0.72;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-color: rgba(248, 113, 113, 0.42);
  background: linear-gradient(145deg, #991b1b 0%, #ef4444 45%, #3f0a0a 100%);
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(239, 68, 68, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: visible;
  transition: transform 0.22s ease, opacity 0.14s ease, box-shadow 0.22s ease;
}

button.cancel-icon-button:not(.icon-button),
button.cancel-btn:not(.icon-button) {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 999px;
}

button.cancel-icon-button:hover:not(:disabled),
button.cancel-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 24px 45px rgba(239, 68, 68, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

button.cancel-icon-button:active:not(:disabled),
button.cancel-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

button.cancel-icon-button:disabled,
button.cancel-btn:disabled {
  transform: none;
  box-shadow:
    0 10px 22px rgba(239, 68, 68, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.cancel-icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: block;
  transform: scale(var(--cancel-scale));
  transform-origin: center center;
  pointer-events: none;
  transition: transform 0.22s ease;
}

.cancel-icon::before,
.cancel-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 7px;
  background: #ffffff;
  border-radius: 999px;
  transform-origin: center;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

.cancel-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.cancel-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

button.cancel-icon-button:hover:not(:disabled) .cancel-icon,
button.cancel-btn:hover:not(:disabled) .cancel-icon {
  transform: scale(calc(var(--cancel-scale) * 1.08));
}

.board-header-actions .cancel-icon-button {
  flex: 0 0 auto;
}

button.newcall-icon-button,
button.newcall-icon-button.primary,
button.newcall-btn,
button.newcall-btn.primary {
  --newcall-scale: 0.72;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-color: rgba(96, 165, 250, 0.42);
  background: linear-gradient(145deg, #1e3a8a 0%, #1d4ed8 45%, #0f172a 100%);
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(37, 99, 235, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: visible;
  transition: transform 0.22s ease, opacity 0.14s ease, box-shadow 0.22s ease;
}

button.newcall-icon-button:not(.icon-button),
button.newcall-btn:not(.icon-button) {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 999px;
}

button.newcall-icon-button:hover:not(:disabled),
button.newcall-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 24px 45px rgba(37, 99, 235, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

button.newcall-icon-button:active:not(:disabled),
button.newcall-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

button.newcall-icon-button:disabled,
button.newcall-btn:disabled {
  transform: none;
  box-shadow:
    0 10px 22px rgba(37, 99, 235, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.newcall-icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: block;
  transform: scale(var(--newcall-scale));
  transform-origin: center center;
  pointer-events: none;
}

.newcall-icon::before,
.newcall-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #ffffff;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.newcall-icon::before {
  width: 34px;
  height: 6px;
}

.newcall-icon::after {
  width: 6px;
  height: 34px;
}

button.newcall-icon-button:hover:not(:disabled) .newcall-icon,
button.newcall-btn:hover:not(:disabled) .newcall-icon {
  animation: newCallPop 0.45s ease;
}

@keyframes newCallPop {
  0% {
    transform: scale(var(--newcall-scale));
  }

  45% {
    transform: scale(calc(var(--newcall-scale) * 1.14));
  }

  100% {
    transform: scale(var(--newcall-scale));
  }
}

.board-header-actions .newcall-icon-button {
  flex: 0 0 auto;
}

button.assign-icon-button,
button.assign-icon-button.primary,
button.assign-btn,
button.assign-btn.primary {
  --assign-scale: 0.72;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(145deg, #10b981 0%, #059669 48%, #047857 100%);
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: visible;
  transition: transform 0.22s ease, opacity 0.14s ease, box-shadow 0.22s ease;
}

button.assign-icon-button:not(.icon-button),
button.assign-btn:not(.icon-button) {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 999px;
}

button.assign-icon-button:hover:not(:disabled),
button.assign-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 24px 45px rgba(16, 185, 129, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

button.assign-icon-button:active:not(:disabled),
button.assign-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

button.assign-icon-button:disabled,
button.assign-btn:disabled {
  transform: none;
  box-shadow:
    0 10px 22px rgba(16, 185, 129, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.assign-icon {
  position: relative;
  width: 48px;
  height: 48px;
  display: block;
  transform: scale(var(--assign-scale));
  transform-origin: center center;
  pointer-events: none;
}

.assign-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: #ffffff;
  transform: translateX(-50%);
}

.assign-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 18px;
  height: 18px;
  border-left: 5px solid #ffffff;
  border-top: 5px solid #ffffff;
  border-radius: 5px 0 0 0;
  transform: translateX(-50%) rotate(45deg);
}

button.assign-icon-button:hover:not(:disabled) .assign-icon,
button.assign-btn:hover:not(:disabled) .assign-icon {
  animation: assignLift 0.45s ease;
}

@keyframes assignLift {
  0% {
    transform: scale(var(--assign-scale)) translateY(0);
  }

  45% {
    transform: scale(var(--assign-scale)) translateY(-6px);
  }

  100% {
    transform: scale(var(--assign-scale)) translateY(0);
  }
}

.board-header-actions .assign-icon-button {
  flex: 0 0 auto;
}

button.duplicate-icon-button,
button.duplicate-icon-button.ghost,
button.duplicate-btn,
button.duplicate-btn.ghost {
  --duplicate-scale: 0.72;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-color: rgba(96, 165, 250, 0.44);
  background: linear-gradient(145deg, #3b82f6 0%, #2563eb 48%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(59, 130, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  overflow: visible;
  transition: transform 0.22s ease, opacity 0.14s ease, box-shadow 0.22s ease;
}

button.duplicate-icon-button:not(.icon-button),
button.duplicate-btn:not(.icon-button) {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 999px;
}

button.duplicate-icon-button:hover:not(:disabled),
button.duplicate-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 24px 45px rgba(59, 130, 246, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

button.duplicate-icon-button:active:not(:disabled),
button.duplicate-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

button.duplicate-icon-button:disabled,
button.duplicate-btn:disabled {
  transform: none;
  box-shadow:
    0 10px 22px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.duplicate {
  position: relative;
  width: 42px;
  height: 42px;
  transform: scale(var(--duplicate-scale));
  transform-origin: center center;
  pointer-events: none;
}

.duplicate .back,
.duplicate .front {
  position: absolute;
  width: 26px;
  height: 30px;
  border: 4px solid #ffffff;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.duplicate .back {
  left: 3px;
  top: 3px;
  opacity: 0.55;
}

.duplicate .front {
  right: 2px;
  bottom: 2px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.duplicate .front::before,
.duplicate .front::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 12px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  transform: translateX(-50%);
}

.duplicate .front::before {
  top: 8px;
}

.duplicate .front::after {
  top: 16px;
}

button.duplicate-icon-button:hover:not(:disabled) .front,
button.duplicate-btn:hover:not(:disabled) .front {
  transform: translate(2px, -2px);
}

button.duplicate-icon-button:hover:not(:disabled) .back,
button.duplicate-btn:hover:not(:disabled) .back {
  transform: translate(-2px, 2px);
  opacity: 0.8;
}

.board-header-actions .duplicate-icon-button {
  flex: 0 0 auto;
}

button.trash-icon-button,
button.trash-icon-button.ghost,
button.trash-icon-button.danger,
button.delete-btn,
button.delete-btn.ghost,
button.delete-btn.danger {
  --trash-scale: 0.76;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-color: rgba(248, 113, 113, 0.42);
  background: linear-gradient(135deg, #fb7185 0%, #ef4444 48%, #dc2626 100%);
  color: #ffffff;
  box-shadow:
    0 16px 30px rgba(239, 68, 68, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  overflow: visible;
  transition: transform 0.2s ease, opacity 0.14s ease, box-shadow 0.2s ease;
}

button.trash-icon-button:not(.icon-button),
button.delete-btn:not(.icon-button) {
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  border-radius: 18px;
}

button.trash-icon-button:hover:not(:disabled),
button.delete-btn:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.04);
  box-shadow:
    0 24px 45px rgba(239, 68, 68, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

button.trash-icon-button:active:not(:disabled),
button.delete-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}

button.trash-icon-button:disabled,
button.delete-btn:disabled {
  transform: none;
  box-shadow:
    0 10px 22px rgba(239, 68, 68, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.trash {
  position: relative;
  width: 38px;
  height: 46px;
  transform: scale(var(--trash-scale));
  transform-origin: center center;
  pointer-events: none;
}

.trash .lid {
  position: absolute;
  left: 50%;
  top: 1px;
  width: 30px;
  height: 6px;
  border-radius: 8px;
  background: #ffffff;
  transform: translateX(-50%);
  transform-origin: center center;
  transition: transform 0.25s ease;
}

.trash .lid::before {
  content: "";
  position: absolute;
  left: 10px;
  top: -6px;
  width: 10px;
  height: 6px;
  border-radius: 6px 6px 0 0;
  background: #ffffff;
}

.trash .can {
  position: absolute;
  left: 5px;
  top: 11px;
  width: 28px;
  height: 31px;
  border: 4px solid #ffffff;
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.trash .can::before,
.trash .can::after,
.trash .can .line {
  content: "";
  position: absolute;
  top: 5px;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.trash .can::before {
  left: 5px;
}

.trash .can::after {
  right: 5px;
}

.trash .can .line {
  left: 50%;
  transform: translateX(-50%);
}

button.trash-icon-button:hover:not(:disabled) .lid,
button.delete-btn:hover:not(:disabled) .lid {
  transform: translateX(-50%) rotate(18deg) translateY(-3px);
}

.board-header-actions .trash-icon-button {
  --trash-scale: 0.72;
  flex: 0 0 auto;
}

.board-header-actions .trash-icon-button:not(.icon-button) {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  border-radius: 999px;
}

.dialog-actions .trash-icon-button:not(.icon-button) {
  --trash-scale: 0.72;
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
}

button.trash-icon-button.icon-button {
  --trash-scale: 0.62;
  border-radius: 14px;
}

.chat-message-action.trash-icon-button {
  --trash-scale: 0.48;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 12px;
}

.chat-message-action.trash-icon-button:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
}

.establishment-suggestion-delete-button.trash-icon-button {
  --trash-scale: 0.58;
  border-radius: 14px;
}

.topbar-action-button {
  position: relative;
  pointer-events: auto;
}

.topbar-action-menu {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.topbar-action-menu > summary {
  display: none;
}

.topbar-action-menu-panel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topbar-action-menu-panel > .topbar-action-button {
  flex: 0 0 auto;
}

.toolbar-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.topbar-menu-icon {
  width: 22px;
  height: 22px;
}

.topbar-menu-line {
  stroke: #5d78d9;
}

.topbar-menu-caret {
  stroke: #d2951c;
}

.topbar-actions .toolbar-icon {
  width: 34px;
  height: 34px;
}

.topbar-message-button {
  --topbar-icon-image: url("/assets/Message-Button-Icon.webp?v=2026-06-04-001");
}

.topbar-dispatch-button {
  --topbar-icon-image: url("/assets/Topbar-Dispatch-Icon.webp?v=2026-06-04-001");
}

.topbar-settings-button {
  --topbar-icon-image: url("/assets/Topbar-Settings-Icon.webp?v=2026-06-04-001");
}

.topbar-fullscreen-button {
  --topbar-icon-image: url("/assets/Topbar-Fullscreen-Icon.webp?v=2026-06-04-001");
}

.topbar-logout-button {
  --topbar-icon-image: url("/assets/Topbar-Logout-Icon.webp?v=2026-06-04-001");
}

.topbar-map-button {
  --topbar-icon-image: url("/assets/Topbar-Map-Icon.webp?v=2026-06-04-001");
}

.topbar-maintenance-button {
  --topbar-icon-image: url("/assets/Topbar-Maintenance-Icon.webp?v=2026-06-04-001");
}

.topbar-menu-button {
  --topbar-icon-image: url("/assets/Topbar-Menu-Icon.webp?v=2026-06-04-001");
}

.map-recenter-button {
  --topbar-icon-image: url("/assets/Map-Recenter-Icon.webp?v=2026-06-04-001");
}

.map-zones-button {
  --topbar-icon-image: url("/assets/Map-Zones-Icon.webp?v=2026-06-04-001");
}

.map-history-button {
  --topbar-icon-image: url("/assets/Map-History-Icon.webp?v=2026-06-04-001");
}

.topbar-png-button:not(.message-image-button),
button.topbar-png-button:not(.message-image-button).ghost,
button.topbar-png-button:not(.message-image-button).danger,
.button-link.topbar-png-button:not(.message-image-button).ghost,
.topbar-action-menu > summary.topbar-png-button,
button.message-image-button,
button.message-image-button.ghost {
  color: #7b8598;
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.topbar-png-button::before,
button.message-image-button::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -6%;
  display: block;
  border: 1px solid var(--topbar-button-border);
  border-radius: 999px;
  background: var(--topbar-button-bg);
  box-shadow: var(--topbar-button-shadow);
  pointer-events: none;
  transition: box-shadow 180ms ease, filter 180ms ease, transform 180ms ease;
}

.topbar-png-button::after,
button.message-image-button::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -6%;
  display: block;
  background-image: var(--topbar-icon-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: var(--topbar-button-icon-filter);
  pointer-events: none;
  transition: transform 160ms ease, opacity 160ms ease;
}

.topbar-png-button:not(.message-image-button):hover:not(:disabled),
button.message-image-button:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.03);
}

.topbar-png-button:not(.message-image-button):hover:not(:disabled)::before,
button.message-image-button:hover:not(:disabled)::before {
  box-shadow: var(--topbar-button-hover-shadow);
  filter: brightness(1.04);
}

.topbar-png-button:not(.message-image-button):active:not(:disabled),
button.message-image-button:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.topbar-png-button:not(.message-image-button) .toolbar-icon,
.topbar-png-button .driver-logout-symbol,
.message-button-backup-icon {
  display: none;
}

.message-button-art {
  display: none;
}

.message-image-button .topbar-action-badge {
  z-index: 2;
}

@media (min-width: 1101px) and (min-height: 620px) {
  .topbar-actions,
  .topbar-action-menu-panel {
    gap: 14px;
  }

  .topbar-actions .topbar-action-button.icon-button,
  .topbar-actions .topbar-action-menu > summary.topbar-action-button {
    /* Previous desktop test sizes: 56px/24px/12px, 84px/36px/18px, then 63px/27px/14px. */
    width: 63px;
    min-width: 63px;
    height: 63px;
  }
}

.topbar-actions[data-topbar-compact="true"] {
  gap: 8px;
}

.topbar-action-menu[data-compact="true"] {
  position: relative;
  flex: 0 0 auto;
  order: 999;
  width: auto;
  min-width: 46px;
}

.topbar-action-menu[data-compact="true"] > summary {
  display: inline-flex;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  list-style: none;
  cursor: pointer;
}

.topbar-action-menu[data-compact="true"] > summary::-webkit-details-marker {
  display: none;
}

.topbar-action-menu[data-compact="true"] .topbar-action-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 95;
  display: none;
  grid-template-columns: repeat(2, 46px);
  gap: 8px;
  width: max-content;
  min-width: 112px;
  padding: 8px;
  border: 1px solid rgba(219, 225, 234, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 42px rgba(20, 33, 61, 0.18);
  backdrop-filter: blur(4px);
}

.topbar-action-menu[data-compact="true"][open] .topbar-action-menu-panel {
  display: grid;
}

.topbar-action-menu[data-compact="true"] .topbar-action-menu-panel > .topbar-action-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
}

body.dispatch-theme-dark .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel,
body.driver-page.driver-theme-dark .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel {
  border-color: rgba(220, 230, 251, 0.12);
  background: rgba(31, 44, 69, 0.96);
  box-shadow: 0 24px 54px rgba(5, 16, 34, 0.34);
}

body.dispatch-theme-midnight .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel,
body.driver-page.driver-theme-midnight .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel {
  border-color: rgba(220, 230, 251, 0.12);
  background: rgba(17, 23, 36, 0.96);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

body.dispatch-theme-fire .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel,
body.driver-page.driver-theme-fire .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel {
  border-color: rgba(255, 199, 92, 0.3);
  background:
    radial-gradient(circle at top left, rgba(255, 194, 74, 0.2), transparent 42%),
    rgba(40, 5, 1, 0.96);
  box-shadow: 0 24px 54px rgba(64, 8, 0, 0.36);
}

body.dispatch-theme-girly .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel,
body.driver-page.driver-theme-girly .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel {
  border-color: rgba(216, 111, 172, 0.22);
  background: rgba(255, 244, 251, 0.97);
  box-shadow: 0 24px 54px rgba(216, 111, 172, 0.18);
}

body.dispatch-theme-test .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel,
body.driver-page.driver-theme-test .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel {
  border-color: rgba(173, 122, 18, 0.22);
  background: rgba(255, 248, 221, 0.97);
  box-shadow: 0 24px 54px rgba(173, 122, 18, 0.18);
}

body.dispatch-theme-space .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel,
body.driver-page.driver-theme-space .topbar-action-menu[data-compact="true"] .topbar-action-menu-panel {
  border-color: rgba(160, 205, 255, 0.2);
  background:
    radial-gradient(circle at top left, rgba(91, 110, 233, 0.24), transparent 42%),
    rgba(12, 18, 48, 0.97);
  box-shadow: 0 24px 54px rgba(4, 10, 34, 0.34);
}

body.dispatch-theme-fire .board-header-actions button.newcall-icon-button,
body.dispatch-theme-fire .board-header-actions button.assign-icon-button,
body.dispatch-theme-fire .board-header-actions button.duplicate-icon-button,
body.dispatch-theme-fire .board-header-actions button.history-icon-button,
body.dispatch-theme-fire .board-header-actions button.cancel-icon-button,
body.dispatch-theme-fire .board-header-actions button.trash-icon-button {
  border-color: rgba(255, 218, 112, 0.34);
  box-shadow:
    0 14px 28px rgba(67, 8, 0, 0.3),
    inset 0 1px 0 rgba(255, 247, 204, 0.26);
}

body.dispatch-theme-fire .board-header-actions button.newcall-icon-button {
  background: linear-gradient(145deg, #ffef8a 0%, #ff9d1f 42%, #921804 100%);
}

body.dispatch-theme-fire .board-header-actions button.assign-icon-button {
  background: linear-gradient(145deg, #f7df68 0%, #da7a19 46%, #5a1305 100%);
}

body.dispatch-theme-fire .board-header-actions button.duplicate-icon-button,
body.dispatch-theme-fire .board-header-actions button.history-icon-button {
  background: linear-gradient(145deg, #ffd05a 0%, #d94c13 46%, #3b0702 100%);
}

body.dispatch-theme-fire .board-header-actions button.cancel-icon-button,
body.dispatch-theme-fire .board-header-actions button.trash-icon-button {
  background: linear-gradient(145deg, #ffb45b 0%, #ef3e1f 46%, #4b0702 100%);
}

body.dispatch-theme-fire .board-header-actions button.newcall-icon-button:hover:not(:disabled),
body.dispatch-theme-fire .board-header-actions button.assign-icon-button:hover:not(:disabled),
body.dispatch-theme-fire .board-header-actions button.duplicate-icon-button:hover:not(:disabled),
body.dispatch-theme-fire .board-header-actions button.history-icon-button:hover:not(:disabled),
body.dispatch-theme-fire .board-header-actions button.cancel-icon-button:hover:not(:disabled),
body.dispatch-theme-fire .board-header-actions button.trash-icon-button:hover:not(:disabled) {
  box-shadow:
    0 20px 42px rgba(255, 75, 0, 0.28),
    inset 0 1px 0 rgba(255, 247, 204, 0.34);
}

.topbar-action-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f7c84b, #d9aa2c);
  color: #2d2412;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(20, 33, 61, 0.16);
  pointer-events: none;
}

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

.clock-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(247, 200, 75, 0.18);
  box-shadow:
    0 10px 24px rgba(20, 33, 61, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  user-select: none;
  -webkit-user-select: none;
}

.clock-chip span {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.clock-chip strong {
  cursor: pointer;
}

.user-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(20, 33, 61, 0.08);
  box-shadow:
    0 10px 24px rgba(20, 33, 61, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.user-chip span {
  font-size: 0.76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dispatcher-chip {
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 44;
  transition:
    min-width 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.dispatcher-chip:focus {
  outline: none;
}

.dispatcher-chip:hover,
.dispatcher-chip:focus-within {
  z-index: 90;
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(20, 33, 61, 0.16);
}

.dispatcher-chip strong {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 2;
}

.dispatcher-chip > span {
  position: relative;
  z-index: 2;
}

.dispatcher-chip-panel {
  position: absolute;
  top: calc(100% - 6px);
  left: 0;
  right: 0;
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  padding: 14px 10px 10px;
  border: 1px solid rgba(113, 128, 150, 0.22);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: rgba(244, 247, 252, 0.98);
  box-shadow: 0 22px 44px rgba(20, 33, 61, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  z-index: 1;
}

.dispatcher-chip:hover .dispatcher-chip-panel,
.dispatcher-chip:focus-within .dispatcher-chip-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dispatcher-chip .dispatcher-chip-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dispatcher-chip .dispatcher-chip-person,
.dispatcher-chip .dispatcher-chip-empty {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: normal;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.dispatcher-chip .dispatcher-chip-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.dispatcher-chip .driver-presence-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(113, 128, 150, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}

.dispatcher-chip .driver-presence-number {
  min-width: 28px;
  color: var(--text);
  font-size: 0.96rem;
  text-align: center;
}

.dispatcher-chip .driver-presence-name,
.dispatcher-chip .driver-presence-status {
  overflow: hidden;
  letter-spacing: normal;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.dispatcher-chip .driver-presence-name {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.dispatcher-chip .driver-presence-status {
  grid-column: 2;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(220, 230, 245, 0.76);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.dispatcher-chip .driver-presence-person.status-available .driver-presence-status {
  background: rgba(204, 245, 212, 0.9);
  color: #176534;
}

.dispatcher-chip .driver-presence-person.status-busy .driver-presence-status,
.dispatcher-chip .driver-presence-person.status-round_trip .driver-presence-status {
  background: rgba(255, 227, 161, 0.9);
  color: #7c4a03;
}

body.dispatch-theme-dark .dispatcher-chip-panel,
body.dispatch-theme-midnight .dispatcher-chip-panel,
body.driver-page.driver-theme-dark .dispatcher-chip-panel,
body.driver-page.driver-theme-midnight .dispatcher-chip-panel {
  background: var(--window-surface-strong);
  border-color: var(--window-border);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}

body.dispatch-theme-dark .dispatcher-chip .driver-presence-person,
body.dispatch-theme-midnight .dispatcher-chip .driver-presence-person,
body.driver-page.driver-theme-dark .dispatcher-chip .driver-presence-person,
body.driver-page.driver-theme-midnight .dispatcher-chip .driver-presence-person {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--window-border);
}

body.dispatch-theme-girly .dispatcher-chip-panel,
body.driver-page.driver-theme-girly .dispatcher-chip-panel {
  background:
    radial-gradient(circle at top left, rgba(255, 220, 240, 0.38), transparent 36%),
    rgba(255, 249, 253, 0.98);
  border-color: var(--window-border);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 0.95;
}

h2,
h3 {
  margin-bottom: 0;
}

.lede {
  max-width: 680px;
  color: var(--muted);
  font-size: 1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.connected-drivers-panel {
  width: fit-content;
  max-width: min(440px, 100%);
  justify-self: start;
  margin-bottom: 10px;
  padding: 9px;
  border-radius: 16px;
}

.connected-drivers-wrap {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-height: 30px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px;
  border: 1px solid rgba(219, 225, 234, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  max-width: 100%;
}

.connected-drivers-row {
  display: grid;
  grid-template-columns: auto auto;
  align-items: start;
  gap: 8px;
}

.connected-driver-column {
  display: grid;
  grid-auto-rows: 22px;
  gap: 4px;
  min-width: 52px;
  flex: 0 0 auto;
}

.connected-drivers-wrap.show-driver-names .connected-driver-column {
  min-width: 92px;
}

.connected-driver-cell {
  min-width: 52px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(217, 225, 236, 0.95);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.connected-drivers-wrap.show-driver-names .connected-driver-cell {
  min-width: 92px;
  max-width: 92px;
}

.connected-driver-cell:hover {
  transform: translateY(-1px);
}

.connected-driver-cell.selected {
  border-color: rgba(56, 102, 214, 0.9);
  box-shadow: inset 0 0 0 1px rgba(56, 102, 214, 0.28);
}

.connected-driver-cell.connected-state-available {
  background: rgba(179, 234, 36, 0.22);
  color: #435800;
}

.connected-driver-cell.connected-state-unavailable {
  background: rgba(255, 255, 255, 0.62);
  color: #4e4e4e;
}

.connected-driver-cell.connected-state-busy {
  background: rgba(171, 238, 245, 0.38);
  color: #0f4f58;
}

.connected-driver-cell.connected-state-round_trip {
  background: rgba(128, 221, 152, 0.46);
  color: #14622a;
}

.connected-driver-cell.connected-state-signal_loss {
  background: rgba(189, 147, 249, 0.38);
  color: #5d2ca0;
}

.connected-driver-cell.connected-state-offline {
  background: rgba(226, 230, 236, 0.75);
  color: #5e6470;
}

.connected-drivers-empty {
  align-self: stretch;
  width: 100%;
  min-height: 100%;
  display: grid;
  align-items: center;
  padding: 8px 10px;
  text-align: left;
}

.connected-drivers-panel .count-pill {
  min-width: 34px;
  padding: 4px 8px;
  font-size: 0.76rem;
  align-self: center;
}

.service-load-indicator {
  --service-load-color: #16a34a;
  --service-load-bg: rgba(22, 163, 74, 0.12);
  --service-load-border: rgba(22, 163, 74, 0.32);
  --service-load-gloss: rgba(255, 255, 255, 0.58);
  display: grid;
  gap: 6px;
  min-width: min(292px, 100%);
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--service-load-border);
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--service-load-bg), var(--service-load-gloss)),
    var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.service-health-idle {
  --service-load-color: #16a34a;
  --service-load-bg: rgba(22, 163, 74, 0.12);
  --service-load-border: rgba(22, 163, 74, 0.34);
}

.service-health-good {
  --service-load-color: #65a30d;
  --service-load-bg: rgba(132, 204, 22, 0.14);
  --service-load-border: rgba(101, 163, 13, 0.36);
}

.service-health-watch {
  --service-load-color: #d97706;
  --service-load-bg: rgba(245, 158, 11, 0.15);
  --service-load-border: rgba(217, 119, 6, 0.38);
}

.service-health-busy {
  --service-load-color: #ea580c;
  --service-load-bg: rgba(249, 115, 22, 0.16);
  --service-load-border: rgba(234, 88, 12, 0.42);
}

.service-health-critical {
  --service-load-color: #dc2626;
  --service-load-bg: rgba(220, 38, 38, 0.17);
  --service-load-border: rgba(220, 38, 38, 0.46);
}

.service-load-head {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.service-load-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--service-load-color);
  box-shadow: 0 0 0 4px var(--service-load-bg);
  flex: 0 0 auto;
}

.service-load-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-load-head strong {
  min-width: 0;
  color: var(--service-load-color);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-load-score {
  margin-left: auto;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.service-load-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.18);
}

.service-load-meter span {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: var(--service-load-color);
  transition: width 220ms ease, background 220ms ease;
}

.service-load-details {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dispatch-theme-dark .service-load-indicator,
body.dispatch-theme-midnight .service-load-indicator,
body.dispatch-theme-space .service-load-indicator,
body.dispatch-theme-fire .service-load-indicator {
  --service-load-gloss: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stat {
  padding: 16px 18px;
  border-radius: 18px;
}

.stat span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat strong {
  font-size: 1.75rem;
}

.dispatch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 10px;
  position: relative;
  min-height: calc(100vh - 168px);
  align-items: stretch;
}

.left-column,
.right-column {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.left-column {
  grid-template-rows: minmax(0, 1fr) minmax(0, 0.62fr);
}

.board-panel {
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.assigned-panel {
  min-height: 0;
  height: 100%;
}

.driver-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.driver-mobile-tabs {
  display: inline-flex !important;
  width: auto;
  max-width: 100%;
  align-self: flex-start;
}

.driver-current-card {
  min-height: 260px;
}

body.driver-page.driver-mobile-app-mode {
  overscroll-behavior-y: contain;
}

body.driver-page.driver-mobile-app-mode .driver-mobile-tabs {
  display: inline-flex !important;
  width: auto;
  max-width: 100%;
  align-self: flex-start;
}

body.driver-page.driver-mobile-app-mode .driver-layout {
  grid-template-rows: auto minmax(0, 1fr);
}

body.driver-page.driver-mobile-app-mode .driver-current-card,
body.driver-page.driver-mobile-app-mode #driver-history-panel,
body.driver-page.driver-mobile-app-mode #driver-settlement-panel {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

body.driver-page.driver-mobile-app-mode #driver-history-panel,
body.driver-page.driver-mobile-app-mode #driver-settlement-panel {
  display: flex;
  flex-direction: column;
}

body.driver-page.driver-mobile-app-mode #driver-history-panel .table-wrap,
body.driver-page.driver-mobile-app-mode #driver-settlement-panel .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

body.driver-page {
  overflow: hidden;
}

body.driver-page .app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  padding-top: 0;
  padding-bottom: 0;
}

body.driver-page:has(#driver-auth-view:not(.hidden)) {
  overflow: auto;
}

body.driver-page:has(#driver-auth-view:not(.hidden)) .app-shell {
  width: min(1920px, calc(100% - 12px));
  min-height: calc(100vh - 8px);
  height: auto;
  padding: 8px 0 14px;
}

body.driver-page #driver-app-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.driver-page .topbar {
  flex: 0 0 auto;
  min-height: 0;
  margin-bottom: 20px;
}

body.driver-page .driver-layout {
  flex: 1 1 auto;
  min-height: 0;
}

.driver-empty-state,
.driver-ride-card {
  min-height: 260px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.driver-empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.driver-ride-card {
  display: grid;
  gap: 18px;
}

.driver-pending-alert .driver-ride-card.state-assigned,
.driver-pending-alert .driver-ride-card.state-received {
  animation: driver-pending-flash 1.25s ease-in-out infinite;
  border-color: rgba(184, 55, 47, 0.42);
}

.driver-ride-card.state-accepted,
.driver-ride-card.state-in_progress {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 24%, rgba(247, 200, 75, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 200, 75, 0.12));
}

.driver-ride-card.state-accepted::before,
.driver-ride-card.state-in_progress::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 36%,
      rgba(255, 255, 255, 0.12) 46%,
      rgba(247, 200, 75, 0.34) 50%,
      rgba(255, 255, 255, 0.12) 54%,
      rgba(255, 255, 255, 0) 64%,
      rgba(255, 255, 255, 0) 100%
    );
  background-size: 220% 100%;
  background-position: 130% 0;
  animation: driver-progress-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.9;
  transform: translate3d(0, 0, 0);
}

.driver-ride-card.state-accepted::after,
.driver-ride-card.state-in_progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 45%, rgba(247, 200, 75, 0.06)),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

.driver-ride-card.state-accepted > *,
.driver-ride-card.state-in_progress > * {
  position: relative;
  z-index: 1;
}

.driver-ride-card.effect-none::before,
.driver-ride-card.effect-none::after {
  display: none;
}

.driver-ride-card.effect-pulse::before {
  background:
    radial-gradient(circle at center, rgba(247, 200, 75, 0.26), transparent 58%);
  background-size: 100% 100%;
  background-position: center;
  animation: driver-progress-pulse 2.2s ease-in-out infinite;
  opacity: 0.95;
}

.driver-ride-card.effect-pulse::after {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 55%, rgba(247, 200, 75, 0.06));
}

.driver-ride-card.effect-glow::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(247, 200, 75, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
  background-size: 100% 100%;
  background-position: center;
  animation: driver-progress-glow 3.2s ease-in-out infinite;
  opacity: 0.85;
}

.driver-ride-card.effect-glow::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(247, 200, 75, 0.16), transparent 60%);
}

@keyframes driver-pending-flash {
  0%,
  100% {
    box-shadow: var(--shadow);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(184, 55, 47, 0.14), 0 34px 90px rgba(184, 55, 47, 0.22);
  }
}

@keyframes driver-progress-sweep {
  0% {
    background-position: 130% 0;
  }

  100% {
    background-position: -40% 0;
  }
}

@keyframes driver-progress-pulse {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.52;
  }

  50% {
    transform: scale(1.03);
    opacity: 0.98;
  }
}

@keyframes driver-progress-glow {
  0%,
  100% {
    opacity: 0.38;
    filter: saturate(1);
  }

  50% {
    opacity: 0.92;
    filter: saturate(1.18);
  }
}

.driver-ride-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  flex-wrap: wrap;
}

.driver-ride-header-main {
  flex: 1 1 360px;
  min-width: 0;
}

.driver-ride-status-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.driver-ride-header-note {
  margin-top: 12px;
  padding: 13px 14px 13px 16px;
  border-width: 2px;
  border-left-width: 7px;
  border-left-color: #f0b429;
  background:
    linear-gradient(135deg, rgba(255, 248, 220, 0.96), rgba(255, 255, 255, 0.92)),
    rgba(255, 248, 220, 0.9);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.driver-ride-header-note.has-note {
  border-color: rgba(240, 180, 41, 0.74);
  border-left-color: #f59e0b;
}

.driver-ride-header-note.is-empty {
  opacity: 0.78;
  border-left-color: rgba(100, 116, 139, 0.42);
  background: rgba(255, 255, 255, 0.74);
}

.driver-ride-header-note span {
  color: #8a5a00;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.driver-ride-header-note strong {
  overflow: visible;
  color: #111827;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.26;
  text-overflow: clip;
  white-space: normal;
}

.driver-ride-header-meta {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.driver-ride-header h2,
.driver-ride-status {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.driver-ride-status {
  margin-bottom: 0;
  line-height: 0.96;
}

.driver-ride-panic-slot {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  margin-right: 2px;
}

.driver-card-panic-button {
  min-width: 93px;
  min-height: 53px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.08rem;
}

.driver-card-panic-button span[aria-hidden="true"] {
  display: inline-block;
  line-height: 1;
}

.driver-ride-status.status-assigned {
  color: #b8372f;
}

.driver-ride-status.status-received {
  color: #456dd8;
}

.driver-ride-status.status-accepted {
  color: #2e9f5f;
}

.driver-ride-status.status-in_progress {
  color: #1f6d44;
}

.driver-ride-status.status-round_trip {
  color: #1f8d44;
}

.driver-ride-status.status-completed {
  color: #6a7487;
}

.driver-ride-time-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 94px;
  height: 48px;
  box-sizing: border-box;
  text-align: center;
}

.driver-ride-time-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  cursor: pointer;
}

.driver-active-timer-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 106px;
  height: 48px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(247, 200, 75, 0.18);
  text-align: center;
  box-sizing: border-box;
}

.driver-pill-label {
  display: block;
  color: var(--muted);
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  align-self: center;
  opacity: 0.95;
}

.driver-pill-value {
  display: block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1.02rem;
  line-height: 1;
  align-self: center;
  white-space: nowrap;
}

.driver-ride-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.driver-ride-details div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(20, 33, 61, 0.05);
}

.driver-ride-details .driver-history-actions-cell,
.driver-ride-details .driver-payment-actions,
.driver-ride-details .driver-history-fare-cell {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.driver-ride-details .full {
  grid-column: 1 / -1;
}

.driver-fare-editor,
.driver-map-links,
.driver-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.dialog-card.driver-route-card {
  position: relative;
  width: min(860px, calc(100vw - 24px));
  height: min(820px, calc(100dvh - 24px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
}

.driver-route-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 0;
  padding-right: 0;
}

.driver-route-header h3 {
  margin-bottom: 2px;
  font-size: 1.05rem;
}

.driver-route-header p {
  margin: 0;
  line-height: 1.25;
}

.driver-route-header .modal-close-button {
  margin-left: auto;
}

.driver-route-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.driver-route-target,
.driver-route-meta {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(124, 139, 166, 0.2);
  border-radius: 12px;
  background: rgba(238, 242, 247, 0.74);
}

.driver-route-target span {
  display: block;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-route-target strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.18;
}

.driver-route-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 160px;
  text-align: right;
  white-space: nowrap;
}

.driver-route-map {
  min-height: 420px;
  border: 1px solid rgba(124, 139, 166, 0.24);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(238, 242, 247, 0.72);
}

.driver-route-map .leaflet-control-container {
  user-select: none;
}

body.driver-page.driver-theme-dark .driver-route-target,
body.driver-page.driver-theme-dark .driver-route-meta,
body.driver-page.driver-theme-midnight .driver-route-target,
body.driver-page.driver-theme-midnight .driver-route-meta {
  background: rgba(12, 18, 32, 0.42);
  border-color: rgba(220, 230, 251, 0.14);
}

.driver-route-tooltip {
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  color: var(--text);
  font-weight: 800;
}

.driver-route-actions {
  justify-content: flex-end;
  margin-top: 0;
}

#driver-route-close-bottom {
  display: none;
}

@media (orientation: landscape) and (max-height: 760px), (max-width: 1024px) and (orientation: landscape) {
  .dialog-card.driver-route-card {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 10px;
    gap: 6px;
    border-radius: 16px;
  }

  .driver-route-header h3 {
    font-size: 0.95rem;
  }

  .driver-route-header p {
    font-size: 0.78rem;
  }

  .driver-route-header .modal-close-button {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .driver-route-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .driver-route-target,
  .driver-route-meta {
    padding: 6px 9px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .driver-route-meta {
    min-width: 120px;
  }

  .driver-route-map {
    min-height: 0;
    border-radius: 14px;
  }

  .driver-route-actions {
    position: absolute;
    right: 20px;
    bottom: 18px;
    z-index: 540;
    padding: 4px;
    border: 1px solid rgba(124, 139, 166, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(4px);
  }

  .driver-route-actions button {
    min-height: 32px;
    padding: 7px 11px;
    font-size: 0.78rem;
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  .dialog-card.driver-route-card {
    width: calc(100vw - 12px);
    height: calc(100dvh - 12px);
    padding: 12px 12px max(72px, calc(12px + env(safe-area-inset-bottom, 0px)));
    gap: 8px;
    border-radius: 16px;
  }

  .driver-route-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .driver-route-meta {
    justify-content: flex-start;
    min-width: 0;
    text-align: left;
  }

  .driver-route-map {
    min-height: 260px;
    border-radius: 14px;
  }

  .driver-route-actions {
    position: absolute;
    right: 18px;
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    z-index: 540;
    justify-content: flex-end;
    padding: 5px;
    border: 1px solid rgba(124, 139, 166, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .driver-route-actions button {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.8rem;
  }
}

.driver-payment-actions button {
  min-width: 0;
  min-height: 38px;
  font-weight: 700;
}

.driver-fare-editor input {
  width: 120px;
  min-width: 0;
}

.driver-fare-editor.compact {
  flex-wrap: nowrap;
}

.driver-fare-editor.compact input {
  width: 92px;
}

.ghost.small {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.driver-ride-details span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.driver-actions button {
  font-weight: 700;
}

.topbar-panic-button {
  min-width: 72px;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #9d201a;
  border-color: rgba(184, 55, 47, 0.26);
  background: rgba(184, 55, 47, 0.1);
}

.topbar-panic-button:hover,
.topbar-panic-button:focus-visible {
  background: rgba(184, 55, 47, 0.16);
  color: #8b1712;
  border-color: rgba(184, 55, 47, 0.34);
}

.topbar-panic-button.is-busy {
  opacity: 0.86;
  pointer-events: none;
}

.topbar-panic-button.is-sent {
  background: rgba(184, 55, 47, 0.2);
  box-shadow: 0 0 0 1px rgba(184, 55, 47, 0.24), 0 0 24px rgba(184, 55, 47, 0.2);
}

.panic-alert-card {
  max-width: 460px;
  border-color: rgba(184, 55, 47, 0.28);
  background:
    radial-gradient(circle at top left, rgba(184, 55, 47, 0.14), transparent 36%),
    linear-gradient(160deg, rgba(255, 248, 248, 0.98), rgba(255, 255, 255, 0.98));
}

.panic-alert-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(184, 55, 47, 0.12);
  color: #9f2b24;
}

.panic-alert-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(184, 55, 47, 0.18);
  font-weight: 900;
}

.panic-alert-banner-text {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.panic-alert-card .dialog-header h3 {
  color: var(--danger);
}

.panic-alert-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 245, 0.9)),
    rgba(184, 55, 47, 0.04);
  border: 1px solid rgba(184, 55, 47, 0.16);
}

.panic-alert-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(184, 55, 47, 0.12);
}

.panic-alert-item-primary {
  background:
    radial-gradient(circle at top left, rgba(255, 220, 220, 0.34), transparent 45%),
    rgba(255, 255, 255, 0.82);
}

.panic-alert-item-wide {
  grid-column: 1 / -1;
}

.panic-alert-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panic-alert-value {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
}

.panic-alert-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #1f4f96;
  text-decoration: none;
  font-weight: 800;
}

.panic-alert-link::after {
  content: "↗";
  font-size: 0.92rem;
  line-height: 1;
  opacity: 0.72;
}

.panic-alert-link:hover,
.panic-alert-link:focus-visible {
  color: #173b70;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .panic-alert-meta {
    grid-template-columns: 1fr;
  }
}

.driver-location-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(20, 33, 61, 0.05);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.driver-location-compact.state-active {
  background: rgba(37, 111, 77, 0.12);
  border-color: rgba(37, 111, 77, 0.18);
}

.driver-location-compact.state-denied,
.driver-location-compact.state-error {
  background: rgba(184, 55, 47, 0.1);
  border-color: rgba(184, 55, 47, 0.18);
}

.driver-location-compact.state-sending {
  background: rgba(50, 103, 227, 0.08);
  border-color: rgba(50, 103, 227, 0.14);
}

.driver-location-compact-text {
  display: grid;
  gap: 1px;
}

.driver-location-compact-text span {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.driver-location-compact-text strong {
  font-size: 0.84rem;
  line-height: 1;
}

.driver-location-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin: 12px 0 4px;
  border-radius: 14px;
  background: rgba(20, 33, 61, 0.05);
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.driver-location-card.state-active {
  background: rgba(37, 111, 77, 0.12);
  border-color: rgba(37, 111, 77, 0.18);
}

.driver-location-card.state-denied,
.driver-location-card.state-error {
  background: rgba(184, 55, 47, 0.1);
  border-color: rgba(184, 55, 47, 0.18);
}

.driver-location-card.state-sending {
  background: rgba(50, 103, 227, 0.08);
  border-color: rgba(50, 103, 227, 0.14);
}

.driver-location-text {
  display: grid;
  gap: 2px;
}

.driver-location-text span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.driver-location-text strong {
  font-size: 0.92rem;
}

.driver-location-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.driver-history-actions {
  justify-content: flex-end;
}

.driver-history-tabs {
  flex-shrink: 0;
}

.driver-history-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.driver-history-filters.hidden {
  display: none;
}

.driver-history-filters .inline-toolbar-field input {
  width: 132px;
}

.driver-history-filters .inline-toolbar-field select {
  width: auto;
  min-width: 72px;
}

#driver-history-year {
  min-width: 76px;
}

#driver-history-month {
  min-width: 68px;
}

.driver-history-actions-cell {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.driver-current-fare-actions {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
}

.driver-current-fare-actions .driver-payment-actions {
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.driver-current-fare-actions .driver-payment-actions > * {
  flex: 0 0 auto;
}

.driver-inline-payment-trace {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.driver-history-fare-cell {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.driver-history-payment-trace {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.driver-history-fare-trigger {
  min-height: 30px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  color: var(--info);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.driver-history-fare-trigger:hover {
  transform: none;
  color: #254fb4;
}

#driver-history-panel .driver-history-row-cancelled td {
  position: relative;
  color: color-mix(in srgb, var(--muted) 72%, var(--text));
}

#driver-history-panel .driver-history-row-cancelled td:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 8px;
  right: 8px;
  top: 50%;
  border-top: 2px solid color-mix(in srgb, #b8372f 76%, var(--text));
  opacity: 0.78;
  pointer-events: none;
}

#driver-history-panel .driver-history-row-cancelled .table-cell-hover-content,
#driver-history-panel .driver-history-row-cancelled .driver-history-payment-trace {
  color: inherit;
}

#driver-history-panel .driver-history-row-cancelled .driver-history-fare-trigger {
  color: color-mix(in srgb, #b8372f 76%, var(--info));
}

.driver-history-terminal-badge {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 4px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, #b8372f 54%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 86%, #b8372f);
  color: color-mix(in srgb, #b8372f 78%, var(--text));
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

#driver-settlement-panel {
  --settlement-card-bg:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 72%, transparent), color-mix(in srgb, var(--surface) 92%, transparent)),
    var(--surface);
  --settlement-card-border: color-mix(in srgb, var(--line) 78%, var(--accent) 22%);
  --settlement-card-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 16%, transparent);
  --settlement-card-text: var(--text);
  --settlement-row-border: color-mix(in srgb, var(--line) 70%, transparent);
  --settlement-due-bg:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 18%, transparent), transparent 38%),
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, var(--surface-strong)), color-mix(in srgb, var(--surface) 92%, transparent)),
    var(--surface);
  --settlement-due-border: color-mix(in srgb, var(--accent) 42%, var(--line));
  --settlement-due-row-border: color-mix(in srgb, var(--accent) 22%, var(--line));
}

.driver-settlement-header h2 {
  margin: 2px 0 0;
  font-size: 1.08rem;
}

.driver-settlement-actions {
  align-items: center;
  justify-content: flex-end;
}

.driver-settlement-save-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 220px;
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 74%, var(--success) 26%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 86%, var(--success) 14%);
  color: color-mix(in srgb, var(--success) 66%, var(--text));
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: normal;
}

.driver-settlement-save-status[data-driver-settlement-save-status="dirty"] {
  border-color: color-mix(in srgb, var(--line) 62%, #f59e0b 38%);
  background: color-mix(in srgb, var(--surface-strong) 82%, #f59e0b 18%);
  color: color-mix(in srgb, #a16207 76%, var(--text));
}

.driver-settlement-save-status[data-driver-settlement-save-status="saving"],
.driver-settlement-save-status[data-driver-settlement-save-status="loading"] {
  border-color: color-mix(in srgb, var(--line) 66%, var(--accent) 34%);
  background: color-mix(in srgb, var(--surface-strong) 82%, var(--accent) 18%);
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

.driver-settlement-save-status[data-driver-settlement-save-status="error"] {
  border-color: color-mix(in srgb, var(--line) 58%, var(--danger) 42%);
  background: color-mix(in srgb, var(--surface-strong) 82%, var(--danger) 18%);
  color: color-mix(in srgb, var(--danger) 74%, var(--text));
}

.driver-settlement-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(760px, 1fr) minmax(230px, 288px);
  gap: 10px;
  padding: 10px;
  overflow: hidden;
}

.driver-settlement-sheet,
.driver-settlement-side {
  min-width: 0;
  min-height: 0;
}

.driver-settlement-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.driver-settlement-meta {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(160px, 0.75fr) minmax(160px, 0.75fr) minmax(160px, 0.75fr);
  gap: 8px;
}

.driver-settlement-meta .inline-toolbar-field input {
  width: 100%;
}

.driver-settlement-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.driver-settlement-table {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
}

.driver-settlement-table th:first-child,
.driver-settlement-row-number {
  width: 44px;
  text-align: center;
}

.driver-settlement-table th:nth-child(3),
.driver-settlement-table td:nth-child(3) {
  width: 148px;
}

.driver-settlement-table th:nth-child(4),
.driver-settlement-table td:nth-child(4),
.driver-settlement-table th:nth-child(5),
.driver-settlement-table td:nth-child(5) {
  width: 92px;
}

.driver-settlement-table input,
.driver-settlement-table select,
.driver-settlement-expense input {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--control-border);
  border-radius: 6px;
  background: var(--control-bg);
  color: var(--control-text);
  font: inherit;
}

.driver-settlement-table input:focus,
.driver-settlement-table select:focus,
.driver-settlement-expense input:focus {
  outline: 2px solid var(--control-focus);
  border-color: var(--control-border-strong);
}

.driver-settlement-row-number {
  color: var(--muted);
  font-weight: 800;
}

.driver-settlement-side {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.driver-settlement-summary-card,
.driver-settlement-due-card {
  border: 1px solid var(--settlement-card-border);
  border-radius: 8px;
  background: var(--settlement-card-bg);
  color: var(--settlement-card-text);
  box-shadow: var(--settlement-card-shadow);
  overflow: hidden;
}

.driver-settlement-summary-card h3,
.driver-settlement-due-card h3 {
  margin: 0;
  padding: 9px 11px;
  font-size: 0.95rem;
  color: var(--table-header-text);
  background: var(--table-header-bg);
}

.driver-settlement-due-card {
  background: var(--settlement-due-bg);
  border-color: var(--settlement-due-border);
  color: var(--settlement-card-text);
}

.driver-settlement-summary-card dl,
.driver-settlement-due-card dl {
  margin: 0;
  display: grid;
}

.driver-settlement-summary-card dl > div,
.driver-settlement-due-card dl > div,
.driver-settlement-expense {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, max-content);
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--settlement-due-row-border);
}

.driver-settlement-summary-card dl > div {
  border-bottom-color: var(--settlement-row-border);
}

.driver-settlement-summary-card dt,
.driver-settlement-due-card dt,
.driver-settlement-expense span,
.driver-settlement-amount-due span {
  font-weight: 800;
}

.driver-settlement-summary-card dd,
.driver-settlement-due-card dd {
  margin: 0;
  text-align: right;
  font-weight: 900;
}

.driver-settlement-expense input {
  justify-self: end;
  width: 82px;
  max-width: 100%;
  background: var(--control-bg);
  border-color: var(--control-border);
  color: var(--control-text);
  text-align: right;
  font-weight: 800;
}

.driver-settlement-manual-total input {
  justify-self: end;
  width: 82px;
  max-width: 100%;
  background: var(--control-bg);
  border-color: var(--control-border);
  color: var(--control-text);
  text-align: right;
  font-weight: 900;
}

.driver-settlement-amount-due {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 11px;
  font-size: 1.05rem;
}

.driver-settlement-amount-due strong {
  font-size: 1.2rem;
  text-align: right;
}

body.driver-page.driver-mobile-settlement-panel .theme-unicorn-field,
body.driver-page.driver-mobile-settlement-panel .theme-space-field,
body.driver-page.driver-mobile-settlement-panel .fire-meteor-layer,
body.driver-page.driver-mobile-settlement-panel .app-shell::before,
body.driver-page.driver-mobile-settlement-panel .app-shell::after {
  display: none;
}

body.driver-page.driver-mobile-settlement-panel .driver-viewport-taxi {
  display: none;
}

@media (max-width: 1180px) {
  .driver-settlement-content {
    grid-template-columns: minmax(0, 1fr) minmax(230px, 288px);
    overflow: visible;
  }

  .driver-settlement-meta {
    grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.65fr) minmax(120px, 0.65fr) minmax(110px, 0.58fr);
  }

  .driver-settlement-side {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .driver-settlement-table {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .driver-settlement-content {
    grid-template-columns: 1fr;
    overflow: auto;
  }

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

  .driver-settlement-table {
    width: 640px;
    min-width: 640px;
  }
}

@media (orientation: landscape) and (max-height: 760px) {
  body.driver-page.driver-mobile-settlement-panel #driver-settlement-panel,
  body.driver-page.driver-fullscreen-active #driver-settlement-panel {
    overflow: hidden;
  }

  body.driver-page.driver-mobile-settlement-panel .driver-settlement-content,
  body.driver-page.driver-fullscreen-active .driver-settlement-content {
    align-content: start;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.driver-page.driver-mobile-settlement-panel .driver-settlement-table-wrap,
  body.driver-page.driver-fullscreen-active .driver-settlement-table-wrap {
    min-height: 220px;
    max-height: calc(100dvh - 178px);
  }
}

@media (pointer: coarse), (max-width: 760px) {
  body.driver-page.driver-mobile-settlement-panel .driver-settlement-table input,
  body.driver-page.driver-mobile-settlement-panel .driver-settlement-table select,
  body.driver-page.driver-mobile-settlement-panel .driver-settlement-meta input,
  body.driver-page.driver-mobile-settlement-panel .driver-settlement-expense input,
  body.driver-page.driver-mobile-settlement-panel .driver-settlement-manual-total input {
    min-height: 40px;
    font-size: 16px;
  }
}

body.driver-page.driver-settlement-panel-active #driver-settlement-panel {
  overflow: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

body.driver-page.driver-settlement-panel-active .driver-settlement-content {
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.driver-page.driver-settlement-panel-active .driver-settlement-table-wrap {
  flex: 1 1 auto;
  max-height: min(62dvh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1180px) {
  body.driver-page.driver-settlement-panel-active .driver-settlement-content {
    align-content: start;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table-wrap {
    flex: 0 0 auto;
    min-height: 220px;
    max-height: clamp(260px, calc(100dvh - 340px), 460px);
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-side {
    align-self: stretch;
    overflow: visible;
  }
}

@media (orientation: landscape) and (max-height: 760px) {
  body.driver-page.driver-settlement-panel-active .driver-settlement-table-wrap {
    min-height: 190px;
    max-height: clamp(190px, calc(100dvh - 390px), 320px);
  }
}

@media (min-width: 1181px) {
  body.driver-page.driver-settlement-panel-active .driver-settlement-side {
    align-self: start;
    max-height: calc(100dvh - 152px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .driver-settlement-content {
    padding: 10px;
  }

  .driver-settlement-meta,
  .driver-settlement-side {
    grid-template-columns: 1fr;
  }

  .driver-settlement-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.driver-panel-hidden {
  display: none !important;
}

body.driver-page:not(.driver-mobile-history-panel) #driver-history-panel,
body.driver-page:not(.driver-mobile-settlement-panel) #driver-settlement-panel,
body.driver-page.driver-mobile-history-panel #driver-current-card,
body.driver-page.driver-mobile-history-panel #driver-settlement-panel,
body.driver-page.driver-mobile-settlement-panel #driver-current-card,
body.driver-page.driver-mobile-settlement-panel #driver-history-panel,
body.driver-page #driver-current-card.driver-panel-hidden,
body.driver-page #driver-history-panel.driver-panel-hidden,
body.driver-page #driver-settlement-panel.driver-panel-hidden {
  display: none !important;
}

@media print {
  @page {
    size: letter landscape;
    margin: 4mm;
  }

  body.driver-settlement-printing {
    background: #ffffff !important;
    color: #111827 !important;
    overflow: visible !important;
    font-size: 11px !important;
  }

  body.driver-settlement-printing .driver-viewport-taxi,
  body.driver-settlement-printing .topbar,
  body.driver-settlement-printing .driver-mobile-tabs,
  body.driver-settlement-printing #driver-current-card,
  body.driver-settlement-printing #driver-history-panel,
  body.driver-settlement-printing .driver-settlement-actions,
  body.driver-settlement-printing .dialog-backdrop,
  body.driver-settlement-printing .chat-heads,
  body.driver-settlement-printing .app-signature {
    display: none !important;
  }

  body.driver-settlement-printing .app-shell,
  body.driver-settlement-printing #driver-app-view,
  body.driver-settlement-printing .driver-layout {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    transform: none !important;
  }

  body.driver-settlement-printing #driver-settlement-panel {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  body.driver-settlement-printing #driver-settlement-panel .board-header {
    padding: 0 0 6px !important;
    border-bottom: 2px solid #0f172a !important;
    background: #ffffff !important;
  }

  body.driver-settlement-printing #driver-settlement-panel .eyebrow,
  body.driver-settlement-printing #driver-settlement-panel h2 {
    color: #111827 !important;
  }

  body.driver-settlement-printing #driver-settlement-panel .eyebrow {
    margin: 0 0 2px !important;
    font-size: 10px !important;
    letter-spacing: 0.12em !important;
  }

  body.driver-settlement-printing #driver-settlement-panel h2 {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  body.driver-settlement-printing .driver-settlement-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 260px !important;
    gap: 10px !important;
    padding: 7px 0 0 !important;
    overflow: visible !important;
  }

  body.driver-settlement-printing .driver-settlement-meta {
    grid-template-columns: minmax(0, 1fr) 160px 130px 145px !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  body.driver-settlement-printing .driver-settlement-table-wrap,
  body.driver-settlement-printing .driver-settlement-side {
    overflow: visible !important;
  }

  body.driver-settlement-printing .driver-settlement-side {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start !important;
    gap: 8px !important;
  }

  body.driver-settlement-printing .dispatch-table {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 9.5px !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
  }

  body.driver-settlement-printing .driver-settlement-table th:first-child,
  body.driver-settlement-printing .driver-settlement-table td:first-child {
    width: 28px !important;
  }

  body.driver-settlement-printing .driver-settlement-table th:nth-child(3),
  body.driver-settlement-printing .driver-settlement-table td:nth-child(3) {
    width: 118px !important;
  }

  body.driver-settlement-printing .driver-settlement-table th:nth-child(4),
  body.driver-settlement-printing .driver-settlement-table td:nth-child(4),
  body.driver-settlement-printing .driver-settlement-table th:nth-child(5),
  body.driver-settlement-printing .driver-settlement-table td:nth-child(5) {
    width: 78px !important;
  }

  body.driver-settlement-printing .dispatch-table th,
  body.driver-settlement-printing .dispatch-table td {
    height: 21px !important;
    max-height: none !important;
    padding: 2px 4px !important;
    border: 1px solid #8ab7df !important;
    background: #ffffff !important;
    color: #111827 !important;
    animation: none !important;
    line-height: 1.15 !important;
  }

  body.driver-settlement-printing .dispatch-table th {
    background: #0f5f92 !important;
    color: #ffffff !important;
    font-size: 8.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
  }

  body.driver-settlement-printing .inline-toolbar-field {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-width: 0 !important;
    gap: 5px !important;
    padding: 4px 6px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.driver-settlement-printing .inline-toolbar-field span {
    flex: 0 0 auto !important;
    font-weight: 900 !important;
    letter-spacing: 0.04em !important;
    color: #334155 !important;
  }

  body.driver-settlement-printing input,
  body.driver-settlement-printing select {
    min-height: 0 !important;
    height: 16px !important;
    padding: 1px 3px !important;
    border: 0 !important;
    border-bottom: 1px solid #94a3b8 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  body.driver-settlement-printing select {
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  body.driver-settlement-printing .inline-toolbar-field input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 18px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }

  body.driver-settlement-printing #driver-settlement-date {
    flex: 0 0 92px !important;
    width: 92px !important;
    min-width: 92px !important;
  }

  body.driver-settlement-printing #driver-settlement-date::-webkit-calendar-picker-indicator {
    display: none !important;
    opacity: 0 !important;
  }

  body.driver-settlement-printing .driver-settlement-table input,
  body.driver-settlement-printing .driver-settlement-table select {
    width: 100% !important;
    height: 16px !important;
  }

  body.driver-settlement-printing .driver-settlement-summary-card,
  body.driver-settlement-printing .driver-settlement-due-card {
    border: 1px solid #111827 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.driver-settlement-printing .driver-settlement-due-card {
    background: #fff4bf !important;
  }

  body.driver-settlement-printing .driver-settlement-summary-card h3,
  body.driver-settlement-printing .driver-settlement-due-card h3 {
    padding: 4px 7px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 11px !important;
    animation: none !important;
  }

  body.driver-settlement-printing .driver-settlement-summary-card dl > div,
  body.driver-settlement-printing .driver-settlement-due-card dl > div,
  body.driver-settlement-printing .driver-settlement-expense,
  body.driver-settlement-printing .driver-settlement-amount-due {
    grid-template-columns: minmax(0, 1fr) 74px !important;
    gap: 8px !important;
    padding: 4px 7px !important;
    border-bottom: 1px solid rgba(17, 24, 39, 0.34) !important;
    font-size: 10.5px !important;
    line-height: 1.12 !important;
  }

  body.driver-settlement-printing .driver-settlement-summary-card dt,
  body.driver-settlement-printing .driver-settlement-due-card dt,
  body.driver-settlement-printing .driver-settlement-expense span,
  body.driver-settlement-printing .driver-settlement-amount-due span {
    white-space: normal !important;
  }

  body.driver-settlement-printing .driver-settlement-summary-card dd,
  body.driver-settlement-printing .driver-settlement-due-card dd,
  body.driver-settlement-printing .driver-settlement-amount-due strong {
    white-space: nowrap !important;
    text-align: right !important;
  }

  body.driver-settlement-printing .driver-settlement-expense input {
    width: 74px !important;
    text-align: right !important;
  }

  body.driver-settlement-printing .driver-settlement-amount-due {
    font-size: 12px !important;
  }

  body.driver-settlement-printing .driver-settlement-amount-due strong {
    font-size: 16px !important;
  }
}

.settlement-print-modal {
  align-items: center;
}

.settlement-print-card {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  overflow: hidden;
  border-radius: 8px;
}

.settlement-print-header {
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.settlement-print-header h3 {
  margin: 2px 0 0;
}

.settlement-print-body {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.settlement-print-document {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(126, 143, 170, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.settlement-print-document-header,
.settlement-print-meta {
  display: grid;
  gap: 10px;
}

.settlement-print-document-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding-bottom: 7px;
  border-bottom: 2px solid #0f172a;
}

.settlement-print-document-header span,
.settlement-print-meta span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settlement-print-document-header strong {
  display: block;
  margin-top: 2px;
  color: #111827;
  font-size: 1.18rem;
  line-height: 1.1;
}

.settlement-print-document-header small {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.settlement-print-document-header time {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.settlement-print-meta {
  grid-template-columns: minmax(180px, 1fr) 150px 130px 145px;
  gap: 8px;
}

.settlement-print-meta > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  background: #ffffff;
}

.settlement-print-meta strong {
  display: block;
  flex: 1 1 auto;
  min-height: 1.25em;
  margin-top: 0;
  border-bottom: 1px solid #94a3b8;
  color: #111827;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.settlement-print-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 12px;
  align-items: start;
}

.settlement-print-table-wrap {
  min-width: 0;
  overflow: auto;
}

.settlement-print-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.78rem;
  table-layout: fixed;
}

.settlement-print-table th,
.settlement-print-table td {
  padding: 6px 7px;
  border: 1px solid #93c5fd;
  color: #111827;
  text-align: left;
  vertical-align: top;
}

.settlement-print-table th {
  background: #1f77b4;
  color: #ffffff;
  font-weight: 900;
}

.settlement-print-table th:first-child,
.settlement-print-table td:first-child {
  width: 42px;
  text-align: center;
}

.settlement-print-table th:nth-child(3),
.settlement-print-table td:nth-child(3) {
  width: 170px;
}

.settlement-print-table th:nth-child(4),
.settlement-print-table th:nth-child(5),
.settlement-print-table td:nth-child(4),
.settlement-print-table td:nth-child(5) {
  width: 112px;
}

.settlement-print-money {
  text-align: right !important;
  white-space: nowrap;
}

.settlement-print-side {
  display: grid;
  gap: 12px;
}

.settlement-print-summary,
.settlement-print-due {
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: 0;
}

.settlement-print-due {
  background: #ffe16a;
}

.settlement-print-summary h4,
.settlement-print-due h4 {
  margin: 0;
  padding: 7px 8px;
  background: #111827;
  color: #ffffff;
  font-size: 0.8rem;
}

.settlement-print-summary dl,
.settlement-print-due dl {
  margin: 0;
  display: grid;
}

.settlement-print-summary dl > div,
.settlement-print-due dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.25);
}

.settlement-print-summary dl > div:last-child,
.settlement-print-due dl > div:last-child {
  border-bottom: 0;
}

.settlement-print-summary dt,
.settlement-print-due dt,
.settlement-print-summary dd,
.settlement-print-due dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.settlement-print-summary dd,
.settlement-print-due dd {
  text-align: right;
  white-space: nowrap;
}

.settlement-print-actions {
  justify-content: flex-end;
}

.settlement-document-print-host {
  display: none;
}

@media screen {
  body.driver-settlement-printing {
    overflow: hidden;
    background: #ffffff;
  }

  body.driver-settlement-printing > *:not(.settlement-document-print-host) {
    visibility: hidden;
  }

  body.driver-settlement-printing .settlement-document-print-host {
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 12px;
    overflow: auto;
    background: #ffffff;
    visibility: visible;
    -webkit-overflow-scrolling: touch;
  }

  body.driver-settlement-printing .settlement-document-print-host .settlement-document {
    width: min(1120px, calc(100vw - 24px));
    max-width: 100%;
    min-width: 0;
  }
}

.settlement-document {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(126, 143, 170, 0.28);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.settlement-document-header,
.settlement-document-meta {
  display: grid;
  gap: 10px;
}

.settlement-document-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding-bottom: 7px;
  border-bottom: 2px solid #0f172a;
}

.settlement-document-header span,
.settlement-document-meta span {
  display: block;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settlement-document-header strong {
  display: block;
  margin-top: 2px;
  color: #111827;
  font-size: 1.18rem;
  line-height: 1.1;
}

.settlement-document-header small {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.settlement-document-header small:empty,
.settlement-document-header time:empty {
  display: none;
}

.settlement-document-header time {
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.settlement-document-meta {
  grid-template-columns: minmax(180px, 1fr) 150px 130px 145px;
  gap: 8px;
}

.settlement-document-meta > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 0;
  background: #ffffff;
}

.settlement-document-meta strong {
  display: block;
  flex: 1 1 auto;
  min-height: 1.25em;
  border-bottom: 1px solid #94a3b8;
  color: #111827;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.settlement-document-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 10px;
  align-items: start;
}

.settlement-document-table-wrap {
  min-width: 0;
  overflow: auto;
}

.settlement-document-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.78rem;
}

.settlement-document-table th,
.settlement-document-table td {
  padding: 6px 7px;
  border: 1px solid #93c5fd;
  color: #111827;
  text-align: left;
  vertical-align: top;
}

.settlement-document-table th {
  background: #1f77b4;
  color: #ffffff;
  font-weight: 900;
}

.settlement-document-table th:first-child,
.settlement-document-table td:first-child {
  width: 42px;
  text-align: center;
}

.settlement-document-table th:nth-child(3),
.settlement-document-table td:nth-child(3) {
  width: 170px;
}

.settlement-document-table th:nth-child(4),
.settlement-document-table th:nth-child(5),
.settlement-document-table td:nth-child(4),
.settlement-document-table td:nth-child(5) {
  width: 112px;
}

.settlement-document-money {
  text-align: right !important;
  white-space: nowrap;
}

.settlement-document-side {
  display: grid;
  gap: 12px;
}

.settlement-document-summary,
.settlement-document-due {
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: 0;
  background: #ffffff;
}

.settlement-document-due {
  background: #fff4bf;
}

.settlement-document-summary h4,
.settlement-document-due h4 {
  margin: 0;
  padding: 7px 8px;
  background: #111827;
  color: #ffffff;
  font-size: 0.8rem;
}

.settlement-document-summary dl,
.settlement-document-due dl {
  margin: 0;
  display: grid;
}

.settlement-document-summary dl > div,
.settlement-document-due dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.25);
}

.settlement-document-summary dl > div:last-child,
.settlement-document-due dl > div:last-child {
  border-bottom: 0;
}

.settlement-document-summary dt,
.settlement-document-due dt,
.settlement-document-summary dd,
.settlement-document-due dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
}

.settlement-document-summary dd,
.settlement-document-due dd {
  text-align: right;
  white-space: nowrap;
}

.settlement-print-bubbles {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: var(--z-chat-head-layer);
  width: min(300px, calc(100vw - 36px));
  max-height: min(54vh, 460px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  pointer-events: none;
  overscroll-behavior: contain;
}

.settlement-print-bubbles.hidden {
  display: none;
}

.settlement-print-bubble {
  pointer-events: auto;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(29, 122, 90, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 12%, rgba(29, 122, 90, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.97);
  box-shadow:
    0 16px 30px rgba(17, 24, 39, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: var(--text);
  text-align: left;
  animation: chat-head-pending-nudge 1.9s ease-in-out infinite;
}

.settlement-print-bubble:hover,
.settlement-print-bubble:active {
  animation-play-state: paused;
  transform: translateY(-1px);
}

.settlement-print-bubble-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(29, 122, 90, 0.26);
  background: linear-gradient(135deg, rgba(29, 122, 90, 0.94), rgba(16, 185, 129, 0.82));
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.settlement-print-bubble-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.settlement-print-bubble-body strong,
.settlement-print-bubble-body span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settlement-print-bubble-body strong {
  color: var(--text);
  font-size: 0.92rem;
}

.settlement-print-bubble-body span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

body.dispatch-theme-dark .settlement-print-bubble,
body.dispatch-theme-midnight .settlement-print-bubble,
body.dispatch-theme-space .settlement-print-bubble {
  border-color: rgba(125, 211, 183, 0.28);
  background:
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.24), transparent 34%),
    linear-gradient(145deg, rgba(18, 43, 58, 0.98), rgba(10, 24, 38, 0.96));
  box-shadow:
    0 18px 38px rgba(4, 12, 28, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f7fbff;
}

body.dispatch-theme-midnight .settlement-print-bubble {
  background:
    radial-gradient(circle at 18% 12%, rgba(125, 211, 183, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(32, 42, 45, 0.98), rgba(12, 15, 16, 0.96));
}

body.dispatch-theme-space .settlement-print-bubble {
  border-color: rgba(126, 196, 255, 0.34);
  background:
    radial-gradient(circle at 18% 12%, rgba(45, 212, 191, 0.24), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(143, 108, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(10, 35, 62, 0.98), rgba(5, 9, 28, 0.96));
}

body.dispatch-theme-dark .settlement-print-bubble-body strong,
body.dispatch-theme-midnight .settlement-print-bubble-body strong,
body.dispatch-theme-space .settlement-print-bubble-body strong {
  color: #f7fbff;
}

body.dispatch-theme-dark .settlement-print-bubble-body span,
body.dispatch-theme-midnight .settlement-print-bubble-body span,
body.dispatch-theme-space .settlement-print-bubble-body span {
  color: rgba(226, 247, 244, 0.78);
}

@media (max-width: 780px) {
  .settlement-print-card {
    width: min(100%, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
  }

  .settlement-print-layout,
  .settlement-print-meta {
    grid-template-columns: 1fr;
  }

  .settlement-print-actions {
    justify-content: flex-start;
  }

  .settlement-print-bubbles {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 42vh;
  }
}

@media print {
  body.dispatch-settlement-printing {
    background: #ffffff !important;
    color: #111827 !important;
    overflow: visible !important;
  }

  body.dispatch-settlement-printing > *:not(.settlement-document-print-host) {
    display: none !important;
  }

  body.dispatch-settlement-printing #settlement-print-modal {
    position: static !important;
    inset: auto !important;
    display: none !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    opacity: 1 !important;
    z-index: auto !important;
  }

  body.dispatch-settlement-printing .settlement-print-card {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    transform: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.dispatch-settlement-printing .settlement-print-card::before,
  body.dispatch-settlement-printing .settlement-print-header,
  body.dispatch-settlement-printing .settlement-print-actions {
    display: none !important;
  }

  body.dispatch-settlement-printing .settlement-print-body,
  body.dispatch-settlement-printing .settlement-print-table-wrap {
    overflow: visible !important;
  }

  body.dispatch-settlement-printing .settlement-print-document {
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #111827 !important;
  }

  body.dispatch-settlement-printing .settlement-print-document-header {
    padding-bottom: 6px !important;
    border-bottom: 2px solid #0f172a !important;
  }

  body.dispatch-settlement-printing .settlement-print-document-header span {
    margin: 0 0 2px !important;
    color: #111827 !important;
    font-size: 10px !important;
    letter-spacing: 0.12em !important;
  }

  body.dispatch-settlement-printing .settlement-print-document-header strong {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  body.dispatch-settlement-printing .settlement-print-document-header small {
    margin-top: 2px !important;
    font-size: 9.5px !important;
  }

  body.dispatch-settlement-printing .settlement-print-layout {
    grid-template-columns: minmax(0, 1fr) 260px !important;
    gap: 10px !important;
  }

  body.dispatch-settlement-printing .settlement-print-meta {
    grid-template-columns: minmax(0, 1fr) 160px 130px 145px !important;
    gap: 6px !important;
    margin: 7px 0 6px !important;
  }

  body.dispatch-settlement-printing .settlement-print-meta > div {
    gap: 5px !important;
    padding: 4px 6px !important;
    border-radius: 0 !important;
    background: #ffffff !important;
  }

  body.dispatch-settlement-printing .settlement-print-meta span,
  body.dispatch-settlement-printing .settlement-print-meta strong {
    font-size: 11px !important;
    font-weight: 900 !important;
  }

  body.dispatch-settlement-printing .settlement-print-table {
    min-width: 0 !important;
    font-size: 9.5px !important;
    table-layout: fixed !important;
  }

  body.dispatch-settlement-printing .settlement-print-table th:first-child,
  body.dispatch-settlement-printing .settlement-print-table td:first-child {
    width: 28px !important;
  }

  body.dispatch-settlement-printing .settlement-print-table th:nth-child(3),
  body.dispatch-settlement-printing .settlement-print-table td:nth-child(3) {
    width: 118px !important;
  }

  body.dispatch-settlement-printing .settlement-print-table th:nth-child(4),
  body.dispatch-settlement-printing .settlement-print-table td:nth-child(4),
  body.dispatch-settlement-printing .settlement-print-table th:nth-child(5),
  body.dispatch-settlement-printing .settlement-print-table td:nth-child(5) {
    width: 78px !important;
  }

  body.dispatch-settlement-printing .settlement-print-table th,
  body.dispatch-settlement-printing .settlement-print-table td {
    height: 21px !important;
    max-height: none !important;
    padding: 2px 4px !important;
    border: 1px solid #8ab7df !important;
    line-height: 1.15 !important;
  }

  body.dispatch-settlement-printing .settlement-print-table th {
    background: #0f5f92 !important;
    color: #ffffff !important;
    font-size: 8.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
  }

  body.dispatch-settlement-printing .settlement-print-summary h4,
  body.dispatch-settlement-printing .settlement-print-due h4 {
    padding: 5px 6px !important;
    font-size: 11px !important;
  }

  body.dispatch-settlement-printing .settlement-print-summary dl > div,
  body.dispatch-settlement-printing .settlement-print-due dl > div {
    padding: 4px 6px !important;
  }

  body.dispatch-settlement-printing .settlement-print-summary dt,
  body.dispatch-settlement-printing .settlement-print-due dt,
  body.dispatch-settlement-printing .settlement-print-summary dd,
  body.dispatch-settlement-printing .settlement-print-due dd {
    font-size: 10px !important;
  }
}

@media print {
  @page {
    size: letter landscape;
    margin: 4mm;
  }

  body.driver-settlement-printing,
  body.dispatch-settlement-printing {
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    overflow: visible !important;
  }

  body.driver-settlement-printing > *:not(.settlement-document-print-host),
  body.dispatch-settlement-printing > *:not(.settlement-document-print-host) {
    display: none !important;
  }

  body.driver-settlement-printing #driver-settlement-panel {
    display: none !important;
  }

  body.driver-settlement-printing .settlement-document-print-host,
  body.dispatch-settlement-printing .settlement-document-print-host {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    position: static !important;
    inset: auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
    transform: none !important;
    zoom: 1 !important;
  }

  body.dispatch-settlement-printing #settlement-print-modal,
  body.dispatch-settlement-printing .settlement-print-card,
  body.dispatch-settlement-printing .settlement-print-body {
    display: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    overflow: visible !important;
    transform: none !important;
  }

  body.driver-settlement-printing .settlement-document,
  body.dispatch-settlement-printing .settlement-document {
    box-sizing: border-box !important;
    width: 8.35in !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #111827 !important;
  }

  body.driver-settlement-printing .settlement-document-header,
  body.dispatch-settlement-printing .settlement-document-header {
    padding-bottom: 4px !important;
    border-bottom: 2px solid #0f172a !important;
  }

  body.driver-settlement-printing .settlement-document-header span,
  body.dispatch-settlement-printing .settlement-document-header span {
    margin: 0 0 1px !important;
    color: #111827 !important;
    font-size: 9px !important;
    letter-spacing: 0.12em !important;
  }

  body.driver-settlement-printing .settlement-document-header strong,
  body.dispatch-settlement-printing .settlement-document-header strong {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.1 !important;
  }

  body.driver-settlement-printing .settlement-document-header small,
  body.dispatch-settlement-printing .settlement-document-header small,
  body.driver-settlement-printing .settlement-document-header time,
  body.dispatch-settlement-printing .settlement-document-header time {
    margin-top: 1px !important;
    font-size: 8.5px !important;
  }

  body.driver-settlement-printing .settlement-document-meta,
  body.dispatch-settlement-printing .settlement-document-meta {
    grid-template-columns: minmax(0, 3.05in) 1.45in 1.1in 1.6in !important;
    justify-content: center !important;
    gap: 5px !important;
    margin: 5px 0 5px !important;
  }

  body.driver-settlement-printing .settlement-document-meta > div,
  body.dispatch-settlement-printing .settlement-document-meta > div {
    gap: 4px !important;
    padding: 3px 5px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
  }

  body.driver-settlement-printing .settlement-document-meta span,
  body.dispatch-settlement-printing .settlement-document-meta span,
  body.driver-settlement-printing .settlement-document-meta strong,
  body.dispatch-settlement-printing .settlement-document-meta strong {
    font-size: 10px !important;
    font-weight: 900 !important;
    overflow-wrap: normal !important;
    white-space: nowrap !important;
    word-break: normal !important;
  }

  body.driver-settlement-printing .settlement-document-layout,
  body.dispatch-settlement-printing .settlement-document-layout {
    grid-template-columns: 5.45in 2.72in !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  body.driver-settlement-printing .settlement-document-table-wrap,
  body.dispatch-settlement-printing .settlement-document-table-wrap,
  body.driver-settlement-printing .settlement-document-side,
  body.dispatch-settlement-printing .settlement-document-side {
    overflow: visible !important;
  }

  body.driver-settlement-printing .settlement-document-table,
  body.dispatch-settlement-printing .settlement-document-table {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 9px !important;
  }

  body.driver-settlement-printing .settlement-document-table th:first-child,
  body.driver-settlement-printing .settlement-document-table td:first-child,
  body.dispatch-settlement-printing .settlement-document-table th:first-child,
  body.dispatch-settlement-printing .settlement-document-table td:first-child {
    width: 0.3in !important;
  }

  body.driver-settlement-printing .settlement-document-table th:nth-child(2),
  body.driver-settlement-printing .settlement-document-table td:nth-child(2),
  body.dispatch-settlement-printing .settlement-document-table th:nth-child(2),
  body.dispatch-settlement-printing .settlement-document-table td:nth-child(2) {
    width: 2.55in !important;
  }

  body.driver-settlement-printing .settlement-document-table th:nth-child(3),
  body.driver-settlement-printing .settlement-document-table td:nth-child(3),
  body.dispatch-settlement-printing .settlement-document-table th:nth-child(3),
  body.dispatch-settlement-printing .settlement-document-table td:nth-child(3) {
    width: 1.1in !important;
  }

  body.driver-settlement-printing .settlement-document-table th:nth-child(4),
  body.driver-settlement-printing .settlement-document-table td:nth-child(4),
  body.driver-settlement-printing .settlement-document-table th:nth-child(5),
  body.driver-settlement-printing .settlement-document-table td:nth-child(5),
  body.dispatch-settlement-printing .settlement-document-table th:nth-child(4),
  body.dispatch-settlement-printing .settlement-document-table td:nth-child(4),
  body.dispatch-settlement-printing .settlement-document-table th:nth-child(5),
  body.dispatch-settlement-printing .settlement-document-table td:nth-child(5) {
    width: 0.72in !important;
  }

  body.driver-settlement-printing .settlement-document-table th,
  body.driver-settlement-printing .settlement-document-table td,
  body.dispatch-settlement-printing .settlement-document-table th,
  body.dispatch-settlement-printing .settlement-document-table td {
    height: 18px !important;
    max-height: none !important;
    padding: 1px 3px !important;
    border: 1px solid #8ab7df !important;
    color: #111827 !important;
    line-height: 1.15 !important;
  }

  body.driver-settlement-printing .settlement-document-table th,
  body.dispatch-settlement-printing .settlement-document-table th {
    background: #0f5f92 !important;
    color: #ffffff !important;
    font-size: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
  }

  body.driver-settlement-printing .settlement-document-summary,
  body.driver-settlement-printing .settlement-document-due,
  body.dispatch-settlement-printing .settlement-document-summary,
  body.dispatch-settlement-printing .settlement-document-due {
    border: 1px solid #111827 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.driver-settlement-printing .settlement-document-due,
  body.dispatch-settlement-printing .settlement-document-due {
    background: #fff4bf !important;
  }

  body.driver-settlement-printing .settlement-document-summary h4,
  body.driver-settlement-printing .settlement-document-due h4,
  body.dispatch-settlement-printing .settlement-document-summary h4,
  body.dispatch-settlement-printing .settlement-document-due h4 {
    padding: 3px 6px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    font-size: 10px !important;
  }

  body.driver-settlement-printing .settlement-document-summary dl > div,
  body.driver-settlement-printing .settlement-document-due dl > div,
  body.dispatch-settlement-printing .settlement-document-summary dl > div,
  body.dispatch-settlement-printing .settlement-document-due dl > div {
    grid-template-columns: minmax(0, 1fr) 74px !important;
    gap: 6px !important;
    padding: 3px 6px !important;
    border-bottom: 1px solid rgba(17, 24, 39, 0.34) !important;
    font-size: 10px !important;
    line-height: 1.12 !important;
  }

  body.driver-settlement-printing .settlement-document-summary dt,
  body.driver-settlement-printing .settlement-document-due dt,
  body.driver-settlement-printing .settlement-document-summary dd,
  body.driver-settlement-printing .settlement-document-due dd,
  body.dispatch-settlement-printing .settlement-document-summary dt,
  body.dispatch-settlement-printing .settlement-document-due dt,
  body.dispatch-settlement-printing .settlement-document-summary dd,
  body.dispatch-settlement-printing .settlement-document-due dd {
    font-size: 10px !important;
  }
}

.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 33, 61, 0.04), rgba(20, 33, 61, 0));
}

.board-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.board-title-with-count {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-toolbar-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(20, 33, 61, 0.05);
  border: 1px solid rgba(20, 33, 61, 0.08);
  font-size: 0.78rem;
  color: var(--muted);
}

.inline-toolbar-field span {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inline-toolbar-field input {
  width: 68px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(20, 33, 61, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
}

.inline-toolbar-field input:focus {
  outline: 2px solid rgba(50, 103, 227, 0.22);
  border-color: rgba(50, 103, 227, 0.36);
}

.reservation-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.07);
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--control-bg-soft, transparent);
  border: 0;
  color: var(--control-muted, var(--muted));
}

.tab-button:hover:not(:disabled) {
  background: var(--control-bg-hover, rgba(20, 33, 61, 0.08));
}

.tab-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--control-selected-bg, rgba(20, 33, 61, 0.08));
  color: var(--control-selected-text, var(--text));
  font-weight: 700;
  font-size: 0.78rem;
}

.tab-button .tab-label {
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

.tab-button .tab-count {
  flex: 0 0 auto;
}

.tab-button.active {
  background: var(--control-bg-strong, var(--surface-strong));
  color: var(--control-text, var(--text));
  box-shadow: 0 8px 20px rgba(20, 33, 61, 0.08);
}

.driver-strip-wrap {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(20, 33, 61, 0.055), rgba(255, 255, 255, 0.58)),
    rgba(20, 33, 61, 0.03);
  box-shadow: inset 0 0 0 1px rgba(20, 33, 61, 0.08);
}

.driver-strip-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 0.78rem;
}

.driver-strip-header span {
  color: var(--muted);
}

.driver-strip {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 50px;
  padding: 6px;
  border: 1px dashed rgba(20, 33, 61, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

.auto-dispatch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(126, 143, 170, 0.24);
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.07)),
    rgba(255, 255, 255, 0.62);
}

.auto-dispatch-panel.hidden {
  display: none;
}

.auto-dispatch-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.auto-dispatch-main strong {
  color: #10243f;
  font-size: 0.82rem;
  white-space: nowrap;
}

.auto-dispatch-main span,
.auto-dispatch-recommendation,
.auto-dispatch-roi {
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-dispatch-recommendation {
  grid-column: 1;
}

.auto-dispatch-roi {
  grid-column: 1 / -1;
  color: #0f766e;
  font-weight: 800;
}

.auto-dispatch-panel.is-locked {
  background: rgba(246, 248, 252, 0.76);
}

.auto-dispatch-panel.is-enabled {
  box-shadow: inset 3px 0 0 rgba(16, 185, 129, 0.72);
}

.auto-dispatch-open-button {
  min-height: 42px;
  padding: 7px 14px;
  border-color: rgba(16, 185, 129, 0.32);
  color: #0f766e;
  font-weight: 800;
  white-space: nowrap;
}

.auto-dispatch-open-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.auto-dispatch-open-label-short {
  display: none;
}

.auto-dispatch-open-button.is-enabled {
  background: rgba(16, 185, 129, 0.11);
  box-shadow: inset 3px 0 0 rgba(16, 185, 129, 0.72);
}

.auto-dispatch-open-button.is-locked {
  color: var(--muted);
  border-color: rgba(126, 143, 170, 0.28);
}

.auto-dispatch-modal-card {
  width: min(620px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 32px));
}

.auto-dispatch-modal-body {
  display: grid;
  gap: 12px;
}

.auto-dispatch-modal-section {
  display: grid;
  gap: 8px;
}

.auto-dispatch-modal-card .auto-dispatch-panel {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(126, 143, 170, 0.24);
  border-radius: 14px;
}

.auto-dispatch-modal-card .auto-dispatch-main {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.auto-dispatch-modal-card .auto-dispatch-main span,
.auto-dispatch-modal-card .auto-dispatch-recommendation,
.auto-dispatch-modal-card .auto-dispatch-roi {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.auto-dispatch-modal-card .auto-dispatch-recommendation,
.auto-dispatch-modal-card .auto-dispatch-roi {
  grid-column: 1;
}

.driver-tile {
  min-width: 48px;
  min-height: 42px;
  padding: 6px 7px;
  border-radius: 11px;
  border: 1px solid rgba(29, 122, 90, 0.2);
  background: rgba(29, 122, 90, 0.08);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.driver-tile strong {
  max-width: 84px;
  overflow: hidden;
  font-size: 1.05rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-tile span {
  max-width: 84px;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-tile.available {
  border-color: rgba(179, 234, 36, 0.34);
  background: rgba(179, 234, 36, 0.22);
  color: #435800;
}

.driver-tile.available span {
  color: rgba(67, 88, 0, 0.78);
}

.driver-tile.selected {
  border-color: rgba(50, 103, 227, 0.35);
  background: rgba(50, 103, 227, 0.14);
}

.driver-tile.available.selected {
  border-color: rgba(56, 102, 214, 0.9);
  background: rgba(179, 234, 36, 0.22);
  box-shadow: inset 0 0 0 1px rgba(56, 102, 214, 0.28);
}

.driver-tile.signal_loss {
  border-color: rgba(189, 147, 249, 0.42);
  background: rgba(189, 147, 249, 0.16);
  color: #5d2ca0;
}

.driver-tile.signal_loss span {
  color: rgba(93, 44, 160, 0.82);
}

.driver-tile.drag-over {
  border-color: rgba(247, 200, 75, 0.65);
  background: rgba(247, 200, 75, 0.22);
}

.driver-tile.dragging {
  opacity: 0.58;
  transform: scale(0.96);
}

.driver-tile.reorder-target {
  box-shadow: inset 3px 0 0 rgba(56, 102, 214, 0.8);
}

.driver-strip.reorder-drop-target {
  outline: 2px dashed rgba(56, 102, 214, 0.34);
  outline-offset: -4px;
}

.driver-tile:hover {
  border-color: rgba(20, 33, 61, 0.24);
}

.driver-context-menu {
  position: fixed;
  z-index: var(--z-popup-layer);
  width: max-content;
  min-width: 168px;
  max-width: min(240px, calc(100vw - 16px));
  padding: 6px;
  border: 1px solid rgba(20, 33, 61, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 36px rgba(20, 33, 61, 0.22);
}

.driver-context-menu.hidden {
  display: none;
}

.driver-context-menu-title {
  padding: 7px 9px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.driver-context-menu button {
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.driver-context-menu button:hover {
  background: rgba(50, 103, 227, 0.12);
}

.driver-context-menu button:disabled {
  color: rgba(101, 116, 139, 0.64);
  cursor: not-allowed;
  opacity: 0.68;
}

.driver-context-menu button:disabled:hover {
  background: transparent;
}

.driver-context-menu button.danger {
  color: #b3261e;
}

.driver-context-menu button.danger:hover {
  background: rgba(179, 38, 30, 0.1);
}

.empty-strip {
  color: var(--muted);
  font-size: 0.9rem;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  color: var(--text);
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  max-height: calc(40vh - 24px);
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overscroll-behavior: contain;
}

.left-column .board-panel:first-child .table-wrap {
  min-height: 180px;
}

.future-wrap {
  max-height: calc(22vh - 18px);
  flex: 1 1 auto;
  min-height: 0;
}

.assigned-wrap {
  max-height: calc(100vh - 292px);
  flex: 1 1 auto;
  min-height: 0;
}

.dispatch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  table-layout: fixed;
}

body.dispatch-page #dispatch-waiting-panel .dispatch-table {
  min-width: 940px;
}

body.dispatch-page #dispatch-reservation-panel .dispatch-table {
  min-width: 900px;
}

body.dispatch-page .assigned-panel > .table-wrap > .dispatch-table {
  min-width: 1280px;
}

.dispatch-table th,
.dispatch-table td {
  box-sizing: border-box;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(219, 225, 234, 0.75);
  vertical-align: middle;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  height: 28px;
  max-height: 28px;
}

.table-cell-hover-content {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.dispatch-table th:last-child,
.dispatch-table td:last-child {
  border-right: 0;
}

.dispatch-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  padding-left: 22px;
  padding-right: 14px;
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

.dispatch-table th[data-column-key="fare"],
.dispatch-table td[data-column-key="fare"] {
  text-align: center;
}

.dispatch-table td[data-column-key="fare"] .table-cell-hover-content {
  display: block;
  text-align: center;
}

.dispatch-table th.column-dragging {
  opacity: 0.55;
}

.dispatch-table th.column-drop-target {
  box-shadow: inset 0 0 0 2px rgba(20, 33, 61, 0.45);
}

.column-resize-handle {
  position: absolute;
  top: 0;
  right: 1px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 2;
  border-radius: 3px;
}

.column-resize-handle:hover {
  background: rgba(20, 33, 61, 0.24);
}

.column-drag-handle {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.62rem;
  line-height: 1;
  letter-spacing: -0.08em;
  color: rgba(232, 251, 255, 0.72);
  cursor: grab;
  user-select: none;
}

.column-drag-handle:active {
  cursor: grabbing;
}

.column-context-menu {
  position: fixed;
  z-index: var(--z-popup-layer);
  min-width: 190px;
  padding: 6px;
  border: 1px solid rgba(20, 33, 61, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(20, 33, 61, 0.22);
}

.column-context-menu.hidden {
  display: none;
}

.refund-btn {
  min-height: 34px;
  border-color: rgba(29, 122, 90, 0.28);
  background: rgba(29, 122, 90, 0.08);
  color: #145c43;
  font-weight: 900;
}

.refund-btn:hover:not(:disabled) {
  border-color: rgba(29, 122, 90, 0.46);
  background: rgba(29, 122, 90, 0.14);
}

.refund-btn:disabled {
  opacity: 0.42;
}

.window-refund-btn {
  margin-right: auto;
}

.column-context-menu-item {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #152033;
  text-align: left;
  font-size: 0.84rem;
  font-weight: 800;
}

.column-context-menu-item:hover {
  transform: none;
  background: rgba(20, 33, 61, 0.08);
}

body.dispatch-theme-dark .column-context-menu,
body.dispatch-theme-midnight .column-context-menu {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(31, 44, 69, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

body.dispatch-theme-dark .column-context-menu-item,
body.dispatch-theme-midnight .column-context-menu-item {
  color: #edf2ff;
}

body.dispatch-theme-dark .column-context-menu-item:hover,
body.dispatch-theme-midnight .column-context-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.is-resizing-column {
  cursor: col-resize;
  user-select: none;
}

.dispatch-table td:hover {
  overflow: hidden;
  position: relative;
  z-index: 4;
}

.dispatch-table td:hover .table-cell-hover-content {
  display: block;
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 18px rgba(20, 33, 61, 0.16);
}

.dispatch-table td[title] {
  cursor: default;
}

.dispatch-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

.dispatch-table tbody tr:hover {
  background: rgba(50, 103, 227, 0.06);
}

.dispatch-table tbody tr.reservation-group-row {
  background: transparent;
  cursor: pointer;
}

.dispatch-table tbody tr.reservation-group-row:hover {
  background: transparent;
}

.dispatch-table tbody tr.reservation-group-row td {
  height: auto;
  max-height: none;
  padding: 0 8px;
  overflow: visible;
  white-space: normal;
  vertical-align: middle;
}

.reservation-series-tree-toggle:hover,
.reservation-series-tree-toggle:focus-visible {
  text-decoration: underline;
}

.dispatch-table tbody tr.reservation-group-member td:first-child {
  padding-left: 24px;
}

.dispatch-table tbody tr.reservation-table-row.reservation-group-member {
  background: rgba(23, 163, 145, 0.035);
}

.dispatch-table tbody tr.reservation-series-member td:first-child {
  border-left: 4px solid rgba(23, 163, 145, 0.72);
}

.reservation-series-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reservation-series-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.reservation-series-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 18px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(23, 163, 145, 0.16);
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.reservation-series-name,
.reservation-series-address {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-series-name {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.dispatch-table tbody tr.ride-terminal {
  opacity: 0.5;
}

.dispatch-table tbody tr.ride-terminal:hover,
.dispatch-table tbody tr.ride-terminal.selected {
  opacity: 0.68;
}

.dispatch-table tbody tr.selected {
  --dispatch-selection-ring: rgba(20, 33, 61, 0.72);
  background: rgba(247, 200, 75, 0.16);
}

.dispatch-table tbody tr.selected td {
  border-top-color: var(--dispatch-selection-ring);
  border-bottom-color: var(--dispatch-selection-ring);
  box-shadow:
    inset 0 2px 0 var(--dispatch-selection-ring),
    inset 0 -2px 0 var(--dispatch-selection-ring);
}

.dispatch-table tbody tr.selected td:first-child {
  box-shadow:
    inset 2px 0 0 var(--dispatch-selection-ring),
    inset 0 2px 0 var(--dispatch-selection-ring),
    inset 0 -2px 0 var(--dispatch-selection-ring);
}

.dispatch-table tbody tr.selected td:last-child {
  box-shadow:
    inset -2px 0 0 var(--dispatch-selection-ring),
    inset 0 2px 0 var(--dispatch-selection-ring),
    inset 0 -2px 0 var(--dispatch-selection-ring);
}

.dispatch-table tbody tr.auto-dispatch-recommended {
  box-shadow: inset 4px 0 0 rgba(16, 185, 129, 0.86);
}

.dispatch-table tbody tr.auto-dispatch-recommended td:first-child::before {
  content: "AUTO";
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin-right: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #047857;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0;
  vertical-align: middle;
}

.dispatch-table tbody tr.state-assigned td {
  animation: pending-dispatch-pulse 2.8s ease-in-out infinite;
}

.dispatch-table tbody tr.reservation-due td {
  animation: reservation-due-pulse 2.8s ease-in-out infinite;
}

.dispatch-table tbody tr.returned-refusal {
  background: rgba(20, 33, 61, 0.16);
}

.dispatch-table tbody tr.returned-refusal:hover {
  background: rgba(20, 33, 61, 0.22);
}

.dispatch-table tbody tr.state-received {
  background: rgba(95, 132, 228, 0.12);
}

.dispatch-table tbody tr.state-accepted {
  background: rgba(106, 198, 135, 0.18);
}

.dispatch-table tbody tr.state-refused {
  background: rgba(184, 55, 47, 0.26);
}

.dispatch-table tbody tr.state-in_progress {
  background: rgba(29, 122, 90, 0.26);
}

.dispatch-table tbody tr.state-completed {
  background: rgba(123, 133, 148, 0.16);
}

.dispatch-table tbody tr.state-deleted {
  background: rgba(184, 55, 47, 0.26);
  color: rgba(75, 18, 15, 0.9);
}

@keyframes pending-dispatch-pulse {
  0%,
  100% {
    background: rgba(50, 103, 227, 0.08);
  }

  50% {
    background: rgba(247, 200, 75, 0.24);
  }
}

@keyframes reservation-due-pulse {
  0%,
  100% {
    background: rgba(247, 200, 75, 0.14);
  }

  50% {
    background: rgba(247, 200, 75, 0.42);
  }
}

.status-text {
  display: inline;
  width: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-size: inherit;
  line-height: inherit;
  overflow: visible;
  animation: none !important;
  transition: none !important;
}

.status-assigned {
  color: #2859cc;
}

.status-received {
  color: #456dd8;
}

.status-accepted {
  color: #2f8f60;
}

.status-refused {
  color: #b8372f;
}

.status-panic {
  color: #b31919;
}

.status-round_trip {
  color: #087043;
}

.status-text.status-panic {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(179, 25, 25, 0.12);
  box-shadow: 0 0 0 1px rgba(179, 25, 25, 0.12);
}

.status-in_progress {
  color: #0b5f32;
}

.status-text.status-in_progress {
  color: #0b5f32;
  -webkit-text-fill-color: currentColor;
  background: none;
  box-shadow: none;
  text-shadow: none;
}

body.dispatch-page .status-text.status-in_progress,
body.dispatch-page .status-text.status-round_trip,
body.dispatch-page .dispatch-table tbody tr.state-in_progress td,
body.dispatch-page .connected-driver-cell.connected-state-round_trip {
  animation: none !important;
  transition: none !important;
}

body.dispatch-page .dispatch-table .status-text.status-in_progress,
body.dispatch-page .dispatch-table .status-text.status-round_trip,
body.dispatch-page .dispatch-table .status-text.status-in_progress::before,
body.dispatch-page .dispatch-table .status-text.status-in_progress::after,
body.dispatch-page .dispatch-table .status-text.status-round_trip::before,
body.dispatch-page .dispatch-table .status-text.status-round_trip::after {
  background: none !important;
  background-image: none !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

body.dispatch-theme-dark .status-text.status-in_progress,
body.dispatch-theme-midnight .status-text.status-in_progress,
body.dispatch-theme-space .status-text.status-in_progress {
  color: #a7f3d0;
}

body.dispatch-theme-dark .status-text.status-round_trip,
body.dispatch-theme-midnight .status-text.status-round_trip,
body.dispatch-theme-space .status-text.status-round_trip {
  color: #bbf7d0;
}

.status-completed {
  color: #6f7886;
}

.status-deleted {
  color: #596579;
}

.compact td,
.compact th {
  white-space: nowrap;
}

#unassigned-table-body td:nth-child(1) {
  width: 68px;
}

#future-table-body td:nth-child(1) {
  width: 142px;
}

#assigned-table-body td:nth-child(1),
#assigned-table-body td:nth-child(2) {
  width: 72px;
}

#assigned-table-body td:nth-child(3) {
  width: 64px;
}

#assigned-table-body td:nth-child(6) {
  width: 118px;
}

#assigned-table-body td:nth-child(9) {
  width: 72px;
}

.empty-table {
  box-sizing: border-box;
  width: 100%;
  color: var(--muted);
  text-align: center;
  padding: 24px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.18)),
    rgba(20, 33, 61, 0.035);
  white-space: normal;
  overflow-wrap: anywhere;
}

.chat-message-list:has(> .empty-table:only-child),
.chat-thread-list:has(> .empty-table:only-child) {
  align-content: stretch;
  align-items: stretch;
}

.chat-message-list > .empty-table:only-child,
.chat-thread-list > .empty-table:only-child {
  min-height: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.table-wrap:has(.dispatch-table td.empty-table:only-child) .dispatch-table,
.table-wrap:has(.dispatch-table td.empty-table:only-child) .dispatch-table tbody,
.table-wrap:has(.dispatch-table td.empty-table:only-child) .dispatch-table tr {
  height: 100%;
}

.dispatch-table td.empty-table {
  height: 100%;
  max-height: none;
  border-radius: 14px;
  text-overflow: clip;
  vertical-align: middle;
}

input,
select,
textarea,
button {
  font: inherit;
}

button,
.button-link,
[role="button"],
.topbar-action-menu > summary {
  -webkit-user-select: none;
  user-select: none;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--control-bg, var(--surface-strong));
  color: var(--control-text, var(--text));
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--control-border-strong, rgba(50, 103, 227, 0.4));
  box-shadow: 0 0 0 4px var(--control-focus, rgba(50, 103, 227, 0.08));
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[data-native-control-type] {
  appearance: textfield;
  -webkit-appearance: none;
  background-image: linear-gradient(transparent, transparent),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23152033' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  padding-right: 40px;
}

input[data-native-control-type] {
  cursor: pointer;
  caret-color: transparent;
}

.native-control-popover {
  position: fixed;
  z-index: var(--z-critical-popup-layer);
  max-width: min(420px, calc(100vw - 16px));
  max-height: min(460px, calc(100vh - 16px));
  padding: 5px;
  overflow: auto;
  border: 1px solid var(--control-border, rgba(20, 33, 61, 0.14));
  border-radius: 10px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--control-selected-bg, rgba(50, 103, 227, 0.12)) 62%, transparent), transparent 38%),
    var(--control-popover-bg, #ffffff);
  color: var(--control-text, #152033);
  -webkit-text-fill-color: var(--control-text, #152033);
  box-shadow:
    0 20px 50px rgba(20, 33, 61, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  scrollbar-color: var(--control-border-strong, rgba(50, 103, 227, 0.4)) transparent;
}

.native-select-group {
  padding: 8px 10px 5px;
  color: var(--control-muted, #69768b);
  -webkit-text-fill-color: var(--control-muted, #69768b);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.native-select-option {
  border: 0;
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 7px;
  background: transparent;
  color: var(--control-text, #152033);
  -webkit-text-fill-color: var(--control-text, #152033);
  text-align: left;
  white-space: nowrap;
}

.native-select-option:hover,
.native-select-option.selected {
  background: var(--control-selected-bg, rgba(50, 103, 227, 0.12));
  color: var(--control-selected-text, var(--control-text, #152033));
  -webkit-text-fill-color: var(--control-selected-text, var(--control-text, #152033));
}

.native-select-option:disabled {
  opacity: 0.48;
}

.native-datetime-popover {
  width: min(324px, calc(100vw - 16px));
}

.native-datetime-popover.native-datetime-popover-compact {
  width: min(324px, calc(100vw - 16px));
  min-width: 0;
}

.native-calendar {
  display: grid;
  gap: 6px;
}

.native-calendar-header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
}

.native-calendar-header strong {
  font-size: 0.94rem;
  text-align: center;
  color: var(--control-text, #152033);
}

.native-calendar-nav {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  background: var(--control-bg-soft, rgba(20, 33, 61, 0.08));
  color: var(--control-text, #152033);
  font-size: 1.35rem;
  line-height: 1;
}

.native-calendar-nav:hover {
  background: var(--control-bg-hover, rgba(50, 103, 227, 0.14));
}

.native-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.native-calendar-weekday {
  padding: 2px 0;
  color: var(--control-muted, #69768b);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.native-calendar-day {
  border: 0;
  width: 100%;
  min-height: 30px;
  padding: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--control-text, #152033);
  font-size: 0.86rem;
}

.native-calendar-day:hover {
  background: var(--control-bg-hover, rgba(50, 103, 227, 0.1));
}

.native-calendar-day.outside {
  color: color-mix(in srgb, var(--control-muted, #69768b) 55%, transparent);
}

.native-calendar-day.today {
  box-shadow: inset 0 0 0 1px var(--control-border-strong, rgba(50, 103, 227, 0.36));
}

.native-calendar-day.selected {
  background: var(--range-fill, #14213d);
  color: var(--control-selected-text, #ffffff);
  font-weight: 800;
}

.native-datetime-time-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.native-datetime-time-row span {
  color: var(--control-muted, #69768b);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.native-datetime-time-row input,
.native-datetime-time-row select,
.native-time-select-control {
  min-height: 34px;
  padding: 7px 9px;
}

.native-datetime-time-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.native-time-select-control {
  width: 100%;
  border: 1px solid var(--control-border, rgba(102, 129, 180, 0.32));
  border-radius: 9px;
  background: var(--control-bg, #ffffff);
  color: var(--control-text, #152033);
  font: inherit;
  font-weight: 700;
  padding-right: 28px;
  text-align: left;
}

.native-datetime-time-select::after {
  content: "⌄";
  position: absolute;
  top: 17px;
  right: 10px;
  pointer-events: none;
  color: var(--control-muted, #69768b);
  font-weight: 900;
  transform: translateY(-50%);
}

.native-time-select-list {
  position: fixed;
  z-index: calc(var(--z-critical-popup-layer) + 1);
  display: grid;
  gap: 3px;
  max-height: 176px;
  margin-top: 4px;
  padding: 5px;
  overflow: auto;
  border: 1px solid var(--control-border, rgba(20, 33, 61, 0.14));
  border-radius: 10px;
  background: var(--control-popover-bg, #ffffff);
  box-shadow: 0 16px 36px rgba(20, 33, 61, 0.2);
  scrollbar-gutter: stable;
}

.native-time-select-floating-list {
  margin-top: 0;
}

.native-time-select-list.hidden {
  display: none;
}

.native-time-select-option {
  min-height: 30px;
  padding: 6px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--control-text, #152033);
  font: inherit;
  font-weight: 750;
  text-align: left;
}

.native-time-select-option:hover,
.native-time-select-option.selected {
  background: var(--control-selected-bg, rgba(50, 103, 227, 0.12));
  color: var(--control-selected-text, var(--control-text, #152033));
}

.native-datetime-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 7px;
}

.native-datetime-actions button {
  min-height: 32px;
  padding: 7px 10px;
}

select option,
select optgroup {
  background: var(--control-popover-bg, #ffffff);
  color: var(--control-text, #152033);
  -webkit-text-fill-color: var(--control-text, #152033);
}

input[type="range"] {
  accent-color: var(--range-fill, var(--accent));
}

textarea {
  resize: vertical;
}

button {
  border: 1px solid;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(2px) scale(0.985);
  box-shadow:
    inset 0 5px 12px rgba(15, 23, 42, 0.18),
    0 1px 2px rgba(15, 23, 42, 0.08);
  filter: brightness(0.96);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

button.primary {
  background: linear-gradient(135deg, var(--accent), #213f78);
  color: white;
}

.save-action-button,
.chat-record-button,
.chat-audio-save,
.icon-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.save-action-button {
  gap: 8px;
}

.refresh-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
  min-width: 42px;
  font-size: 0 !important;
  line-height: 0 !important;
}

.refresh-icon-button::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background: center / contain no-repeat url("/assets/Refresh-Icon.webp?v=2026-06-04-001");
}

.ghost.small.refresh-icon-button {
  min-width: 34px;
}

.chat-popout-refresh.refresh-icon-button::before {
  width: 20px;
  height: 20px;
}

.save-action-button::before,
.chat-audio-save::before,
.icon-save-button::before {
  content: "";
  display: inline-block;
  width: 1.18em;
  height: 1.18em;
  flex: 0 0 auto;
  background: center / contain no-repeat url("/assets/Save-Icon.webp?v=2026-06-04-001");
}

.chat-audio-save,
.icon-save-button {
  font-size: 0;
  line-height: 0;
}

.chat-audio-save::before,
.icon-save-button::before {
  width: 24px;
  height: 24px;
}

.chat-record-button.is-mic-idle {
  min-width: 54px;
  padding-inline: 14px;
  font-size: 0;
  line-height: 0;
}

.chat-record-button.is-mic-idle::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 28px;
  background: center / contain no-repeat url("/assets/Mic-Icon.webp?v=2026-06-04-001");
}

button.ghost {
  background: rgba(20, 33, 61, 0.08);
  color: var(--text);
}

.button-link {
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 42px;
  border-radius: 999px;
  padding: 11px 16px;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.button-link:hover {
  transform: translateY(-1px);
}

.button-link:active {
  transform: translateY(2px) scale(0.985);
  box-shadow:
    inset 0 5px 12px rgba(15, 23, 42, 0.18),
    0 1px 2px rgba(15, 23, 42, 0.08);
  filter: brightness(0.96);
}

.button-link.ghost {
  background: rgba(20, 33, 61, 0.08);
  color: var(--text);
}

button.history-icon-button:active:not(:disabled),
button.history-btn:active:not(:disabled),
button.cancel-icon-button:active:not(:disabled),
button.cancel-btn:active:not(:disabled),
button.newcall-icon-button:active:not(:disabled),
button.newcall-btn:active:not(:disabled),
button.assign-icon-button:active:not(:disabled),
button.assign-btn:active:not(:disabled),
button.duplicate-icon-button:active:not(:disabled),
button.duplicate-btn:active:not(:disabled),
button.trash-icon-button:active:not(:disabled),
button.delete-btn:active:not(:disabled) {
  transform: translateY(3px) scale(0.94);
  box-shadow:
    inset 0 8px 18px rgba(15, 23, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 4px rgba(15, 23, 42, 0.14);
  filter: brightness(0.94) saturate(0.98);
}

.topbar-png-button:not(.message-image-button):active:not(:disabled),
button.message-image-button:active:not(:disabled),
.topbar-action-menu > summary.topbar-png-button:active {
  transform: translateY(3px) scale(0.94);
  filter: brightness(0.94) saturate(0.98);
}

.topbar-png-button:not(.message-image-button):active:not(:disabled)::before,
button.message-image-button:active:not(:disabled)::before,
.topbar-action-menu > summary.topbar-png-button:active::before {
  transform: translateY(2px) scale(0.96);
  box-shadow:
    inset 0 8px 18px rgba(15, 23, 42, 0.24),
    inset 0 -1px 0 rgba(255, 255, 255, 0.18),
    0 1px 2px rgba(15, 23, 42, 0.12);
  filter: brightness(0.92);
}

.topbar-png-button:not(.message-image-button):active:not(:disabled)::after,
button.message-image-button:active:not(:disabled)::after,
.topbar-action-menu > summary.topbar-png-button:active::after {
  transform: translateY(2px) scale(0.92);
  opacity: 0.9;
}

button.danger {
  color: #8e221d;
  background: rgba(184, 55, 47, 0.1);
}

body.driver-page:not(.driver-theme-dark):not(.driver-theme-midnight) #driver-logout {
  color: #8e221d;
  background: rgba(184, 55, 47, 0.12);
  border-color: rgba(184, 55, 47, 0.2);
}

button.warn {
  color: #7c5a00;
  background: rgba(247, 200, 75, 0.18);
}

button.wide {
  width: 100%;
}

.window-layer {
  position: fixed;
  inset: 0;
  z-index: var(--window-layer-z, var(--z-floating-window-layer)) !important;
  pointer-events: none;
}

.window-backdrop-blur-pane {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: var(--window-glass-filter) !important;
  -webkit-backdrop-filter: var(--window-glass-filter) !important;
  will-change: left, top, width, height, border-radius;
}

:root {
  --ui-motion-duration: 220ms;
  --ui-view-motion-duration: 170ms;
  --ui-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.app-boot-loader {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.14), transparent 24%),
    radial-gradient(circle at bottom right, rgba(50, 103, 227, 0.12), transparent 28%),
    rgba(245, 248, 252, 0.96);
  backdrop-filter: saturate(135%) blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--ui-motion-duration) var(--ui-motion-ease),
    visibility 0s linear var(--ui-motion-duration);
  z-index: var(--z-app-loader-layer) !important;
}

body.app-booting .app-boot-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--ui-motion-duration) var(--ui-motion-ease);
}

.app-boot-loader-card {
  min-width: min(320px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 26px 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(20, 33, 61, 0.08);
  box-shadow: 0 24px 64px rgba(20, 33, 61, 0.16);
}

.app-boot-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(20, 33, 61, 0.08);
  border-top-color: #213f78;
  border-right-color: #f7c84b;
  animation: app-boot-spin 800ms linear infinite;
}

.app-boot-loader-text {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #20314f;
  text-align: center;
}

@keyframes app-boot-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 31, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: var(--z-popup-layer);
  opacity: 1;
  transition: opacity var(--ui-motion-duration) var(--ui-motion-ease);
  will-change: opacity;
}

.dialog-backdrop:not(.chat-floating-backdrop):not(.floating-nonblocking-backdrop):not(.map-nonblocking-dialog) {
  z-index: var(--z-popup-layer) !important;
}

.dialog-backdrop.floating-nonblocking-backdrop {
  background: transparent;
  pointer-events: none;
  padding: 0;
  z-index: var(--floating-backdrop-z, var(--z-floating-chat-layer)) !important;
}

.dialog-backdrop.settings-child-backdrop {
  background: rgba(12, 18, 31, 0.18);
  pointer-events: auto;
  padding: 20px;
}

.dialog-backdrop.settings-child-backdrop .dialog-card {
  pointer-events: auto;
}

.dialog-backdrop.critical-confirm-backdrop,
.dialog-backdrop.chat-confirm-backdrop,
.dialog-backdrop.dispatch-confirm-backdrop,
.dialog-backdrop.logout-confirm-backdrop,
#admin-flush-modal,
#admin-account-delete-modal {
  background: rgba(12, 18, 31, 0.18);
  pointer-events: auto;
  padding: 20px;
  z-index: var(--z-critical-confirm-layer) !important;
}

.dialog-backdrop.critical-confirm-backdrop .dialog-card,
.dialog-backdrop.chat-confirm-backdrop .dialog-card,
.dialog-backdrop.dispatch-confirm-backdrop .dialog-card,
.dialog-backdrop.logout-confirm-backdrop .dialog-card,
#admin-flush-modal .dialog-card,
#admin-account-delete-modal .dialog-card {
  pointer-events: auto;
}

.dispatch-confirm-reason-field {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  text-align: left;
}

.dispatch-confirm-reason-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dispatch-confirm-reason-field textarea {
  box-sizing: border-box;
  min-height: 92px;
  resize: vertical;
  width: 100%;
}

.dialog-backdrop.logout-confirm-backdrop {
  z-index: var(--z-critical-confirm-layer) !important;
  pointer-events: auto !important;
}

#dispatch-logout-modal.logout-confirm-backdrop,
#driver-logout-modal.logout-confirm-backdrop,
#map-logout-modal.logout-confirm-backdrop,
#maintenance-logout-modal.logout-confirm-backdrop {
  z-index: var(--z-critical-confirm-layer) !important;
}

.dialog-backdrop.logout-confirm-backdrop .dialog-card {
  pointer-events: auto !important;
}

.dialog-backdrop.session-expired-backdrop {
  z-index: var(--z-session-expired-layer) !important;
  pointer-events: auto !important;
}

#dispatch-session-modal.session-expired-backdrop,
#driver-session-modal.session-expired-backdrop,
#map-session-modal.session-expired-backdrop {
  z-index: var(--z-session-expired-layer) !important;
}

.dialog-backdrop.session-expired-backdrop .dialog-card {
  pointer-events: auto !important;
  z-index: 1;
}

.dialog-card {
  --dialog-card-padding: 18px;
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  box-shadow:
    0 30px 90px rgba(20, 33, 61, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  background-clip: padding-box;
  backdrop-filter: var(--window-glass-filter);
  -webkit-backdrop-filter: var(--window-glass-filter);
  isolation: isolate;
  overflow: hidden;
  padding: var(--dialog-card-padding);
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    transform var(--ui-motion-duration) var(--ui-motion-ease),
    opacity var(--ui-motion-duration) var(--ui-motion-ease);
  will-change: transform, opacity;
}

.dialog-card::before,
.admin-card::before,
.chat-popout-window::before,
.floating-window::before,
.ride-window-modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(145deg, var(--window-frost-tint-strong), var(--window-frost-tint)),
    var(--window-frost-tint);
  backdrop-filter: var(--window-glass-filter) !important;
  -webkit-backdrop-filter: var(--window-glass-filter) !important;
}

.admin-card,
.chat-popout-window,
.floating-window,
.ride-window-modal-card {
  isolation: isolate;
}

.dialog-card > *,
.admin-card > *,
.chat-popout-window > *,
.floating-window > *,
.ride-window-modal-card > * {
  position: relative;
  z-index: 1;
}

.dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.dialog-card select,
.dialog-card textarea {
  background: var(--control-bg, rgba(255, 255, 255, 0.92));
  border-color: var(--control-border, rgba(126, 143, 170, 0.36));
  color: var(--control-text, var(--text));
  -webkit-text-fill-color: var(--control-text, var(--text));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 1px 2px rgba(20, 33, 61, 0.04);
}

.dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.dialog-card select:focus,
.dialog-card textarea:focus {
  background: var(--control-bg-strong, rgba(255, 255, 255, 0.98));
  border-color: var(--control-border-strong, rgba(50, 103, 227, 0.52));
  box-shadow:
    0 0 0 4px var(--control-focus, rgba(50, 103, 227, 0.12)),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

body.dispatch-theme-dark .dialog-card,
body.dispatch-theme-midnight .dialog-card,
body.dispatch-theme-space .dialog-card,
body.driver-page.driver-theme-dark .dialog-card,
body.driver-page.driver-theme-midnight .dialog-card,
body.driver-page.driver-theme-space .dialog-card {
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border-color: rgba(220, 230, 251, 0.18);
  box-shadow:
    0 32px 92px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .dialog-card,
body.driver-page.driver-theme-midnight .dialog-card {
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow:
    0 32px 92px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body.dispatch-theme-dark .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.dispatch-theme-dark .dialog-card select,
body.dispatch-theme-dark .dialog-card textarea,
body.dispatch-theme-midnight .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.dispatch-theme-midnight .dialog-card select,
body.dispatch-theme-midnight .dialog-card textarea,
body.dispatch-theme-space .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.dispatch-theme-space .dialog-card select,
body.dispatch-theme-space .dialog-card textarea,
body.driver-page.driver-theme-dark .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.driver-page.driver-theme-dark .dialog-card select,
body.driver-page.driver-theme-dark .dialog-card textarea,
body.driver-page.driver-theme-midnight .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.driver-page.driver-theme-midnight .dialog-card select,
body.driver-page.driver-theme-midnight .dialog-card textarea,
body.driver-page.driver-theme-space .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.driver-page.driver-theme-space .dialog-card select,
body.driver-page.driver-theme-space .dialog-card textarea {
  background: var(--control-bg, rgba(255, 255, 255, 0.08));
  border-color: var(--control-border, rgba(220, 230, 251, 0.22));
  color: var(--control-text, var(--text));
  -webkit-text-fill-color: var(--control-text, var(--text));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-fire .dialog-card,
body.driver-page.driver-theme-fire .dialog-card {
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border-color: rgba(255, 190, 82, 0.48);
  box-shadow:
    0 34px 96px rgba(118, 18, 0, 0.46),
    inset 0 1px 0 rgba(255, 220, 128, 0.12);
}

body.dispatch-theme-fire .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.dispatch-theme-fire .dialog-card select,
body.dispatch-theme-fire .dialog-card textarea,
body.driver-page.driver-theme-fire .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.driver-page.driver-theme-fire .dialog-card select,
body.driver-page.driver-theme-fire .dialog-card textarea {
  background: var(--control-bg, rgba(33, 5, 1, 0.86));
  border-color: var(--control-border, rgba(255, 181, 75, 0.5));
  color: var(--control-text, var(--text));
  -webkit-text-fill-color: var(--control-text, var(--text));
  box-shadow: inset 0 1px 0 rgba(255, 223, 142, 0.12);
}

select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--control-muted, #69768b) 50%),
    linear-gradient(135deg, var(--control-muted, #69768b) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.tenant-terms-backdrop {
  z-index: var(--z-critical-confirm-layer) !important;
}

.tenant-terms-card {
  width: min(680px, calc(100vw - 24px));
  max-height: min(760px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tenant-terms-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  max-height: 42vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
}

.tenant-terms-body p,
.tenant-terms-body ul {
  margin: 0;
}

.tenant-terms-body ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.tenant-terms-full {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.tenant-terms-full h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
}

.tenant-terms-full-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.tenant-terms-full-list li {
  padding-left: 2px;
}

.tenant-terms-full-list strong,
.tenant-terms-full-list span {
  display: block;
}

.tenant-terms-full-list strong {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
}

.tenant-terms-full-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.38;
}

.tenant-terms-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.tenant-terms-version strong {
  color: var(--text);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.tenant-terms-actions {
  display: grid;
  gap: 12px;
}

.tenant-terms-actions .dialog-actions {
  justify-content: space-between;
  align-items: center;
}

#tenant-terms-reject {
  order: 2;
  margin-left: 0;
  margin-right: 0;
}

#tenant-terms-accept {
  order: 1;
  margin-left: 0;
  margin-right: auto;
}

.tenant-terms-check {
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(238, 243, 248, 0.62);
  font-weight: 800;
}

.tenant-terms-check input {
  margin-top: 3px;
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .tenant-terms-actions .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #tenant-terms-reject,
  #tenant-terms-accept {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

.dialog-backdrop.ui-opening,
.dialog-backdrop.ui-closing {
  pointer-events: none;
}

.dialog-backdrop.ui-opening,
.dialog-backdrop.ui-closing {
  opacity: 0;
}

.dialog-backdrop.ui-opening .dialog-card,
.dialog-backdrop.ui-closing .dialog-card {
  opacity: 0;
  transform: translateY(22px) scale(0.975);
}

.admin-card {
  position: relative;
  width: min(720px, 100%);
  height: min(800px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: var(--window-glass-filter);
  -webkit-backdrop-filter: var(--window-glass-filter);
}

#tenant-admin-unlock-modal .admin-card {
  --dialog-card-padding: 14px;
  width: min(420px, calc(100vw - 32px));
  height: auto;
  max-height: min(300px, calc(100dvh - 32px));
  border-radius: 14px;
  overflow: visible;
}

#tenant-admin-unlock-modal .dialog-form {
  gap: 8px;
}

#tenant-admin-unlock-modal .dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child {
  gap: 10px;
  margin: calc(0px - var(--dialog-card-padding)) calc(0px - var(--dialog-card-padding)) 10px;
  padding: 8px 12px;
  border-radius: 14px 14px 0 0;
}

#tenant-admin-unlock-modal .dialog-header h3 {
  font-size: 0.94rem;
}

#tenant-admin-unlock-modal .dialog-header .muted {
  font-size: 0.86rem;
  line-height: 1.2;
}

#tenant-admin-unlock-modal .modal-close-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}

#tenant-admin-unlock-modal label {
  gap: 6px;
  font-size: 0.9rem;
}

#tenant-admin-unlock-modal .dialog-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  min-height: 34px;
  padding: 7px 38px 7px 10px;
}

#tenant-admin-unlock-modal .password-field-wrap button {
  width: 34px;
  min-width: 34px;
}

#tenant-admin-unlock-modal .admin-modal-message {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
}

#tenant-admin-unlock-modal .dialog-actions {
  gap: 8px;
  margin-top: 4px;
}

#tenant-admin-unlock-modal .dialog-actions button {
  min-height: 36px;
  padding: 8px 14px;
}

.admin-card-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.establishment-admin-card {
  width: min(1280px, calc(100vw - 16px));
  height: min(1040px, calc(100dvh - 16px));
  max-height: calc(100dvh - 16px);
  overflow: hidden;
}

.admin-modal-message {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
}

.admin-unlock-button {
  --admin-unlock-bg-start: rgba(255, 255, 255, 0.18);
  --admin-unlock-bg-end: rgba(255, 255, 255, 0.08);
  --admin-unlock-text: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  min-height: 38px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, var(--admin-unlock-bg-start), var(--admin-unlock-bg-end));
  color: var(--admin-unlock-text);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(5, 14, 32, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 3px rgba(7, 18, 38, 0.22),
    0 10px 24px rgba(7, 18, 38, 0.2);
}

.admin-unlock-button::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 0.94;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='black'%20d='M17%208V7a5%205%200%200%200-9.9-1H9a3%203%200%200%201%206%201v1H7a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2v-8a2%202%200%200%200-2-2Zm0%2010H7v-8h10v8Zm-5-2a1.5%201.5%200%200%200%20.75-2.8V12h-1.5v1.2A1.5%201.5%200%200%200%2012%2016Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='black'%20d='M17%208V7a5%205%200%200%200-9.9-1H9a3%203%200%200%201%206%201v1H7a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2v-8a2%202%200%200%200-2-2Zm0%2010H7v-8h10v8Zm-5-2a1.5%201.5%200%200%200%20.75-2.8V12h-1.5v1.2A1.5%201.5%200%200%200%2012%2016Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.admin-unlock-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08) brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 3px rgba(7, 18, 38, 0.24),
    0 14px 30px rgba(7, 18, 38, 0.28);
}

.admin-unlock-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.admin-unlock-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.admin-unlock-button + .modal-close-button {
  margin-left: 12px !important;
}

.admin-modal-message.is-success {
  color: #19653d;
  background: rgba(89, 198, 120, 0.16);
  border-color: rgba(89, 198, 120, 0.3);
}

.admin-modal-message.is-error {
  color: #a32634;
  background: rgba(217, 83, 79, 0.14);
  border-color: rgba(217, 83, 79, 0.28);
}

.page-toast-stack {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 30000;
  display: flex;
  width: min(720px, calc(100vw - 24px));
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  transform: translateX(-50%);
}

.page-toast {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.2);
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(-24px) scale(0.98);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

.page-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.page-toast.is-leaving {
  opacity: 0;
  transform: translateY(-18px) scale(0.985);
}

.page-toast.is-success {
  color: #19653d;
  background: rgba(225, 250, 234, 0.94);
  border-color: rgba(89, 198, 120, 0.38);
}

.page-toast.is-error {
  color: #9f1d2f;
  background: rgba(255, 231, 231, 0.95);
  border-color: rgba(217, 83, 79, 0.38);
}

.soft-separator {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.inline-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
}

.inline-check input {
  width: auto;
}

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

.dialog-card:not(.ride-window-modal-card) > .dialog-header,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: calc(100% + var(--dialog-card-padding) + var(--dialog-card-padding));
  margin: calc(0px - var(--dialog-card-padding)) calc(0px - var(--dialog-card-padding)) 16px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px 18px 0 0;
  backdrop-filter: blur(6px) saturate(0.72);
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
  overflow: visible;
}

.dialog-card:not(.ride-window-modal-card) > .dialog-header > div,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child > div {
  min-width: 0;
}

.dialog-card:not(.ride-window-modal-card) > .dialog-header h3,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child h3,
.dialog-card:not(.ride-window-modal-card) > .dialog-header h2,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child h2 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.15;
}

.dialog-card:not(.ride-window-modal-card) > .dialog-header .muted,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child .muted {
  margin: 3px 0 0;
  color: var(--window-titlebar-muted);
  line-height: 1.25;
}

.dialog-card:not(.ride-window-modal-card) > .dialog-header .modal-close-button,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child .modal-close-button,
.dialog-card:not(.ride-window-modal-card) > .dialog-header .modal-close-button.danger,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child .modal-close-button.danger {
  margin-left: auto;
  color: #fff;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.96), rgba(153, 27, 27, 0.92));
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.chat-popout-titlebar {
  backdrop-filter: blur(6px) saturate(0.72);
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

.chat-popout-titlebar .muted,
.chat-popout-titlebar p,
.chat-popout-titlebar span {
  color: var(--window-titlebar-muted);
}

.platform-admin-dialog-header {
  padding: 14px 70px 12px 18px !important;
  border-bottom-color: rgba(255, 255, 255, 0.22) !important;
  background-color: transparent !important;
  color: var(--window-titlebar-text) !important;
}

.platform-admin-dialog-header h2,
.platform-admin-dialog-header p {
  color: inherit !important;
}

.platform-admin-dialog-header h2 {
  margin: 0 !important;
  font-size: 1.08rem !important;
  line-height: 1.15 !important;
}

.platform-admin-dialog-header p {
  margin: 3px 0 0 !important;
  color: var(--window-titlebar-muted) !important;
  line-height: 1.25 !important;
}

.platform-admin-dialog-header .platform-admin-dialog-close {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.96), rgba(153, 27, 27, 0.92)) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.54) !important;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.modal-close-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  background: rgba(184, 55, 47, 0.1);
  color: #b42318;
  border-color: rgba(184, 55, 47, 0.26);
  font-size: 1.2rem;
  flex: 0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.modal-close-button.danger {
  color: #b42318;
  background: rgba(184, 55, 47, 0.1);
  border-color: rgba(184, 55, 47, 0.26);
}

.modal-close-button:hover,
.modal-close-button:focus-visible {
  color: #fff;
  background: linear-gradient(145deg, #ef4444, #991b1b);
  border-color: rgba(153, 27, 27, 0.58);
}

.account-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20, 33, 61, 0.04);
}

.account-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.account-panel-header h4 {
  margin: 0;
}

.account-creation-driver-fields {
  display: grid;
  gap: 12px;
}

#dispatch-account-modal,
#dispatch-account-modal.settings-child-backdrop,
#dispatch-account-modal.floating-nonblocking-backdrop,
#dispatch-account-modal .dialog-card,
#dispatch-account-modal .dialog-form,
#dispatch-account-modal input,
#dispatch-account-modal select,
#dispatch-account-modal button {
  pointer-events: auto !important;
}

.admin-account-picker-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  gap: 12px;
  align-items: end;
}

.admin-account-select-field {
  min-width: 0;
}

.admin-account-avatar-button {
  position: relative;
  width: 54px;
  min-width: 54px;
  height: 54px;
  min-height: 54px;
  padding: 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.admin-account-avatar-button:hover,
.admin-account-avatar-button:focus-visible {
  background: rgba(31, 79, 150, 0.08);
}

.admin-account-avatar {
  width: 42px;
  height: 42px;
}

.admin-account-avatar-edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
  font-size: 0.76rem;
  line-height: 1;
  pointer-events: none;
}

.admin-account-avatar-input {
  display: none;
}

#admin-account-role-fields {
  display: grid;
  gap: 12px;
}

.dialog-header {
  margin-bottom: 16px;
}

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

.dialog-form {
  display: grid;
  gap: 12px;
}

#driver-modal .dialog-card,
#assigned-history-modal .assigned-history-card {
  background: #f8fafc;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

#driver-modal .dialog-card::before,
#assigned-history-modal .assigned-history-card::before {
  content: none;
  display: none;
}

body.dispatch-theme-dark #driver-modal .dialog-card,
body.dispatch-theme-dark #assigned-history-modal .assigned-history-card {
  background: #24314d;
}

body.dispatch-theme-midnight #driver-modal .dialog-card,
body.dispatch-theme-midnight #assigned-history-modal .assigned-history-card {
  background: #121317;
}

body.dispatch-theme-space #driver-modal .dialog-card,
body.dispatch-theme-space #assigned-history-modal .assigned-history-card {
  background: #0f1733;
}

body.dispatch-theme-fire #driver-modal .dialog-card,
body.dispatch-theme-fire #assigned-history-modal .assigned-history-card {
  background: #430d04;
}

body.dispatch-theme-girly #driver-modal .dialog-card,
body.dispatch-theme-girly #assigned-history-modal .assigned-history-card {
  background: #fff7fc;
}

body.dispatch-theme-test #driver-modal .dialog-card,
body.dispatch-theme-test #assigned-history-modal .assigned-history-card {
  background: #fff8dd;
}

.settings-subgrid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.settings-checkbox-grid {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.settings-checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.settings-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.settings-map-center-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.settings-map-center-frame {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 12px;
  background: #dfe7f7;
}

.settings-map-center-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
}

.settings-map-center-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-size: 0.88rem;
}

.settings-map-center-meta span {
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.settings-map-center-picker.is-read-only .settings-map-center-frame,
.settings-map-center-picker.is-disabled .settings-map-center-frame {
  filter: saturate(0.86);
}

.settings-map-center-picker.is-disabled .settings-map-center-meta span {
  color: var(--muted);
}

@media (max-width: 640px) {
  .settings-map-center-frame,
  .settings-map-center-canvas {
    min-height: 220px;
  }

  .settings-map-center-meta {
    display: grid;
    justify-items: start;
  }

  .settings-map-center-meta span {
    text-align: left;
  }
}

.settings-sms-outbox {
  display: grid;
  gap: 6px;
}

.settings-sms-empty,
.settings-sms-outbox-item {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(91, 104, 124, 0.28);
  border-radius: 10px;
  background: rgba(246, 248, 252, 0.94);
  color: #34425a;
  font-size: 0.82rem;
  line-height: 1.35;
}

.settings-sms-outbox-item strong,
.settings-sms-outbox-item span {
  display: block;
  overflow-wrap: anywhere;
}

.settings-sms-outbox-item strong {
  color: #14213d;
  font-size: 0.78rem;
  text-transform: uppercase;
}

body.dispatch-theme-space .settings-sms-empty,
body.dispatch-theme-space .settings-sms-outbox-item,
body.dispatch-theme-dark .settings-sms-empty,
body.dispatch-theme-dark .settings-sms-outbox-item,
body.dispatch-theme-midnight .settings-sms-empty,
body.dispatch-theme-midnight .settings-sms-outbox-item {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(248, 250, 252, 0.96);
  color: #26344d;
}

body.dispatch-theme-space .settings-sms-outbox-item strong,
body.dispatch-theme-dark .settings-sms-outbox-item strong,
body.dispatch-theme-midnight .settings-sms-outbox-item strong {
  color: #0f1f3d;
}

body.dispatch-theme-dark .auto-dispatch-panel,
body.dispatch-theme-midnight .auto-dispatch-panel,
body.dispatch-theme-space .auto-dispatch-panel {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(96, 165, 250, 0.1)),
    rgba(18, 24, 38, 0.82);
}

body.dispatch-theme-dark .auto-dispatch-main strong,
body.dispatch-theme-midnight .auto-dispatch-main strong,
body.dispatch-theme-space .auto-dispatch-main strong {
  color: #eef6ff;
}

body.dispatch-theme-dark .auto-dispatch-roi,
body.dispatch-theme-midnight .auto-dispatch-roi,
body.dispatch-theme-space .auto-dispatch-roi {
  color: #8ef5dc;
}

.settings-subsection {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(126, 143, 170, 0.24);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.settings-default-city-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.settings-default-city-row #manage-tenant-cities,
.settings-default-city-row #manage-establishments {
  min-height: 42px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .settings-default-city-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-default-city-row #manage-tenant-cities,
  .settings-default-city-row #manage-establishments {
    width: 100%;
  }
}

.admin-settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.admin-settings-panels {
  display: grid;
  gap: 16px;
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.admin-settings-panel {
  display: none;
  gap: 16px;
}

.admin-settings-panel.active {
  display: grid;
}

.admin-settings-panel.is-read-only input:disabled,
.admin-settings-panel.is-read-only select:disabled,
.admin-settings-panel.is-read-only textarea:disabled {
  opacity: 0.78;
  cursor: default;
  -webkit-text-fill-color: var(--control-text, var(--text));
}

.admin-settings-panel.is-read-only button:disabled {
  opacity: 0.45;
}

.admin-settings-panel.is-read-only .admin-account-avatar-edit {
  display: none;
}

.admin-card-footer {
  flex: 0 0 auto;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.dialog-form label {
  display: grid;
  gap: 8px;
}

#driver-modal .driver-modal-readonly-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(57, 90, 148, 0.28);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.72);
}

#driver-modal .driver-modal-readonly-panel label > span {
  color: var(--text);
  font-weight: 800;
}

#driver-modal .driver-modal-readonly-panel input[readonly] {
  border-style: solid;
  border-color: rgba(57, 90, 148, 0.28);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  cursor: default;
  opacity: 1;
  box-shadow: inset 3px 0 0 rgba(57, 90, 148, 0.34);
}

#driver-modal .driver-modal-readonly-panel p {
  margin: 0;
  color: color-mix(in srgb, var(--muted) 72%, var(--text));
  font-size: 0.82rem;
  line-height: 1.35;
}

body.dispatch-theme-dark #driver-modal .driver-modal-readonly-panel,
body.dispatch-theme-midnight #driver-modal .driver-modal-readonly-panel,
body.dispatch-theme-space #driver-modal .driver-modal-readonly-panel,
body.dispatch-theme-fire #driver-modal .driver-modal-readonly-panel {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}

body.dispatch-theme-dark #driver-modal .driver-modal-readonly-panel label > span,
body.dispatch-theme-midnight #driver-modal .driver-modal-readonly-panel label > span,
body.dispatch-theme-space #driver-modal .driver-modal-readonly-panel label > span,
body.dispatch-theme-fire #driver-modal .driver-modal-readonly-panel label > span {
  color: rgba(255, 255, 255, 0.94);
}

body.dispatch-theme-dark #driver-modal .driver-modal-readonly-panel input[readonly],
body.dispatch-theme-midnight #driver-modal .driver-modal-readonly-panel input[readonly],
body.dispatch-theme-space #driver-modal .driver-modal-readonly-panel input[readonly],
body.dispatch-theme-fire #driver-modal .driver-modal-readonly-panel input[readonly] {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 3px 0 0 rgba(131, 190, 255, 0.76);
}

body.dispatch-theme-dark #driver-modal .driver-modal-readonly-panel p,
body.dispatch-theme-midnight #driver-modal .driver-modal-readonly-panel p,
body.dispatch-theme-space #driver-modal .driver-modal-readonly-panel p,
body.dispatch-theme-fire #driver-modal .driver-modal-readonly-panel p {
  color: rgba(255, 255, 255, 0.76);
}

.establishment-admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}

.establishment-admin-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.establishment-admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.establishment-admin-toolbar input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
}

.assigned-history-card {
  width: min(1800px, 96vw);
  height: min(88vh, 1100px);
  display: flex;
  flex-direction: column;
}

.assigned-history-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 26px 16px;
}

.assigned-history-modal-search-field {
  min-width: 220px;
  flex: 0 1 255px;
}

#assigned-history-modal-period,
#assigned-history-modal-driver {
  min-width: 55px;
  width: auto;
}

#assigned-history-modal-period {
  min-width: 132px;
}

.assigned-history-custom-range {
  min-width: 228px;
  flex: 0 0 auto;
  position: relative;
}

#assigned-history-modal-status {
  min-width: 82px;
  width: auto;
}

#assigned-history-modal-driver {
  min-width: 86px;
}

.assigned-history-modal-search-field input[type="search"] {
  width: 100%;
}

.assigned-history-toolbar .inline-toolbar-field select,
.assigned-history-toolbar .inline-toolbar-field input[type="date"],
.assigned-history-toolbar .inline-toolbar-field input[type="datetime-local"] {
  min-width: 120px;
}

#assigned-history-modal .assigned-history-custom-range input[type="datetime-local"] {
  width: 176px;
  min-width: 176px;
  background-image: none;
  padding-right: 32px;
  font-variant-numeric: tabular-nums;
}

#assigned-history-modal .assigned-history-custom-range::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-color: currentColor;
  opacity: 0.68;
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.assigned-history-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: 100%;
  margin: 0 26px;
}

.assigned-history-load-more-row td {
  text-align: center;
}

.assigned-history-load-more-row td > span {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.assigned-history-load-more {
  min-height: 38px;
  padding-inline: 18px;
}

.assigned-history-card .dialog-actions {
  margin-top: auto;
  padding: 16px 26px 0;
  flex: 0 0 auto;
}

@media (max-width: 1100px) {
  #assigned-history-modal {
    align-items: stretch;
    justify-content: center;
    padding: 10px;
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  #assigned-history-modal .assigned-history-card {
    width: 100%;
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  #assigned-history-modal .assigned-history-toolbar {
    padding: 0 12px 10px;
  }

  #assigned-history-modal .assigned-history-wrap {
    flex: 1 1 0;
    height: auto;
    margin: 0 12px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  #assigned-history-modal .assigned-history-card .dialog-actions {
    margin-top: 0;
    padding: 10px 12px 0;
  }
}

@media (max-height: 760px) {
  body.dispatch-page #assigned-history-modal .assigned-history-toolbar {
    align-items: stretch;
  }
}

.establishment-admin-toolbar .icon-button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.establishment-admin-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: none;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.establishment-admin-item {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.establishment-admin-item.active,
.establishment-admin-item.is-active {
  border-color: rgba(52, 91, 183, 0.45);
  box-shadow: 0 0 0 2px rgba(52, 91, 183, 0.14);
  background: rgba(244, 248, 255, 0.96);
}

.establishment-admin-item strong {
  font-size: 0.98rem;
}

.establishment-admin-item span {
  color: var(--muted);
  font-size: 0.88rem;
}

.establishment-admin-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

.establishment-admin-form {
  align-content: start;
  position: relative;
  isolation: isolate;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.establishment-admin-form > .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  justify-content: flex-end;
  margin-top: 4px;
  padding: 14px 0 0;
  background: linear-gradient(to top, var(--window-surface-strong) 72%, transparent);
}

.establishment-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tenant-city-admin-card {
  --window-glass-filter: blur(18px) saturate(1.18);
  --window-glass-filter-soft: blur(12px) saturate(1.08);
  width: min(1180px, 96vw);
}

.tenant-city-admin-layout > .establishment-admin-sidebar {
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.tenant-city-admin-file-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.tenant-city-admin-file-actions > button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding-inline: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-city-admin-layout .establishment-admin-list {
  min-height: 0;
}

.tenant-city-admin-form {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-right: 0;
}

.tenant-city-admin-form > input[type="hidden"] {
  display: none;
}

.tenant-city-admin-grid {
  grid-template-columns: repeat(3, minmax(150px, 320px));
  justify-content: start;
}

.tenant-city-admin-grid > label {
  min-width: 0;
}

.tenant-city-admin-grid input,
.tenant-city-admin-grid textarea {
  width: 100%;
}

.tenant-city-admin-name-grid {
  grid-template-columns: minmax(180px, 300px) minmax(240px, 420px);
}

.tenant-city-admin-region-grid {
  grid-template-columns: minmax(170px, 320px) minmax(170px, 320px) minmax(86px, 140px);
}

.tenant-city-admin-center-grid {
  grid-template-columns: 250px 260px;
}

.tenant-city-admin-center-field {
  min-width: 0;
}

.tenant-city-admin-center-input-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.tenant-city-admin-center-input-wrap input {
  width: 100%;
  padding-right: 46px;
}

.tenant-city-admin-center-input-wrap .tenant-city-admin-set-center {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 9px;
  color: #24446f;
}

.tenant-city-admin-set-center.active {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.1);
  color: #183b84;
  transform: translateY(-50%);
}

.tenant-city-admin-center-input-wrap .tenant-city-admin-set-center:not(.active) {
  transform: translateY(-50%);
}

.tenant-city-admin-target-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tenant-city-admin-target-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tenant-city-admin-target-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.tenant-city-admin-default-row {
  margin-top: -2px;
}

.tenant-city-admin-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tenant-city-admin-default-badge {
  min-width: 0;
  padding-inline: 10px;
  background: rgba(50, 103, 227, 0.12);
  color: var(--info);
}

.tenant-city-admin-form textarea {
  resize: vertical;
  min-height: 76px;
}

.tenant-city-territory-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(126, 143, 170, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.tenant-city-territory-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.tenant-city-territory-title {
  flex: 1 1 150px;
  min-width: 120px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tenant-city-territory-toolbar button {
  min-height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
}

.tenant-city-territory-toolbar button.active {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.1);
  color: #183b84;
}

.tenant-city-admin-territory-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.tenant-city-admin-points-list {
  display: grid;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
  padding-top: 2px;
}

.tenant-city-admin-points-list.hidden {
  display: none;
}

.tenant-city-admin-point-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 6px;
  border: 1px solid rgba(126, 143, 170, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.tenant-city-admin-point-index {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(50, 103, 227, 0.1);
  color: var(--info);
  font-size: 0.74rem;
  font-weight: 900;
}

.tenant-city-admin-point-row code {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-city-admin-point-remove {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  color: var(--danger);
  font-size: 1rem;
  line-height: 1;
}

.tenant-city-admin-map-card .tenant-city-territory-drawing,
.tenant-city-admin-map-card .leaflet-container.tenant-city-territory-drawing {
  cursor: crosshair;
}

.tenant-city-admin-map-card .tenant-city-center-setting,
.tenant-city-admin-map-card .leaflet-container.tenant-city-center-setting {
  cursor: cell;
}

.establishment-admin-suggestions {
  min-height: 0;
}

.establishment-admin-map-card {
  margin-top: 4px;
  position: relative;
  z-index: 0;
}

.establishment-admin-map-card .ride-window-map-frame,
.establishment-admin-map-card .ride-window-map-canvas {
  min-height: clamp(240px, 32vh, 360px);
}

.tenant-city-admin-form > .tenant-city-admin-map-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1 1 0;
  min-height: 260px;
  margin-top: 0;
  overflow: hidden;
}

.tenant-city-admin-map-card .ride-window-map-shell {
  display: grid;
  min-height: 0;
  height: 100%;
}

.tenant-city-admin-map-card .ride-window-map-frame,
.tenant-city-admin-map-card .ride-window-map-canvas {
  min-height: 0;
  height: 100%;
}

.tenant-city-admin-form > .dialog-actions {
  position: static;
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
  padding: 12px 0 0;
  border-top: 1px solid rgba(126, 143, 170, 0.18);
  background: transparent;
}

.server-log-card {
  width: min(980px, 100%);
  height: auto;
  max-height: min(820px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.server-log-toolbar {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.4fr)
    repeat(4, minmax(96px, 0.58fr))
    auto
    auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.server-log-search {
  width: 100%;
  min-width: 0;
}

.server-log-filters {
  display: contents;
}

.server-log-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.server-log-filters select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.server-log-toolbar > button {
  min-height: 40px;
  white-space: nowrap;
}

.server-log-list {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.server-log-card > .dialog-actions {
  flex: 0 0 auto;
  margin: 12px -2px -2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  justify-content: flex-start;
}

@media (max-width: 980px) {
  .server-log-toolbar {
    grid-template-columns:
      minmax(220px, 1fr)
      repeat(4, minmax(92px, 1fr))
      auto
      auto;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

.server-log-entry,
.server-log-empty {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 14px;
}

.server-log-empty {
  color: var(--muted);
}

.server-log-notice {
  border: 1px solid rgba(58, 139, 89, 0.28);
  border-radius: 14px;
  background: rgba(225, 247, 233, 0.92);
  color: #25643b;
  font-weight: 700;
  padding: 12px 14px;
}

.server-log-notice.error {
  border-color: rgba(184, 55, 47, 0.28);
  background: rgba(255, 231, 229, 0.94);
  color: var(--danger);
}

.server-log-active-blocks {
  border: 1px solid rgba(217, 83, 79, 0.22);
  border-radius: 16px;
  background: rgba(255, 246, 244, 0.95);
  padding: 12px;
}

.server-log-active-blocks > header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.server-log-active-blocks > header strong {
  color: var(--danger);
}

.server-log-active-blocks > header span {
  color: var(--muted);
  font-size: 0.86rem;
}

.server-log-login-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px 12px;
}

.server-log-login-block + .server-log-login-block {
  margin-top: 8px;
}

.server-log-login-block > div {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.server-log-login-block span {
  color: var(--muted);
  font-size: 0.82rem;
}

.server-log-entry header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.server-log-entry header strong {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.server-log-entry header span,
.server-log-entry header time {
  color: var(--muted);
  font-size: 0.82rem;
}

.server-log-entry header .server-log-ip {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 700;
}

.server-log-entry p {
  margin: 0;
  font-weight: 600;
}

.server-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.server-log-entry-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.server-log-action {
  white-space: nowrap;
}

.server-log-entry.level-info {
  border-left: 5px solid rgba(74, 128, 234, 0.75);
}

.server-log-entry.level-warn {
  border-left: 5px solid rgba(231, 180, 61, 0.88);
}

.server-log-entry.level-error {
  border-left: 5px solid rgba(217, 83, 79, 0.88);
}

.statistics-card {
  width: min(1180px, 100%);
  height: min(1000px, calc(100vh - 8px));
  max-height: calc(100vh - 8px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.statistics-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.statistics-overview {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
  flex: 0 0 auto;
}

.statistics-overview-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: var(--text);
}

.statistics-overview-summary::-webkit-details-marker {
  display: none;
}

.statistics-overview-summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.95rem;
  transition: transform 160ms ease;
}

.statistics-overview:not([open]) .statistics-overview-summary::after {
  transform: rotate(-90deg);
}

.statistics-overview-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.statistics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.statistics-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 150px;
  font-weight: 600;
}

.statistics-toolbar .statistics-custom-range {
  min-width: 190px;
}

.statistics-toolbar select,
.statistics-toolbar input {
  min-height: 42px;
}

.statistics-card.is-loading .statistics-toolbar,
.statistics-card.is-loading .statistics-overview-summary,
.statistics-card.is-loading .statistics-table-section {
  cursor: progress;
}

.statistics-card.is-loading .statistics-table-section {
  opacity: 0.7;
}

.statistics-summary,
.statistics-notes {
  display: grid;
  gap: 14px;
}

.statistics-table-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.statistics-driver-table-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.statistics-driver-table-wrap > .statistics-block {
  flex: 1 1 auto;
  min-height: 0;
}

.statistics-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
}

.statistics-block-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.statistics-block-header h4 {
  margin: 0;
}

.statistics-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.statistics-metric-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.statistics-metric-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.statistics-metric-card strong {
  font-size: 1.05rem;
}

.statistics-metric-card.emphasis {
  background: rgba(34, 61, 117, 0.1);
}

.statistics-metric-card-wide {
  grid-column: span 2;
}

.statistics-table-wrap {
  flex: 1 1 auto;
  min-height: 260px;
  max-height: none;
  overflow: auto;
}

.statistics-table {
  width: 100%;
  table-layout: auto;
}

.statistics-table th,
.statistics-table td {
  width: auto;
  white-space: nowrap;
}

.statistics-table td strong {
  margin-right: 8px;
}

.statistics-note-list {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
}

.statistics-note-list p {
  margin: 0;
  font-weight: 600;
}

.driver-settings-section {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(20, 33, 61, 0.04);
}

#driver-settings-modal {
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#driver-settings-modal .dialog-card {
  --dialog-card-padding: 18px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#driver-settings-form {
  flex: 1 1 auto;
  min-height: 0;
  width: calc(100% + var(--dialog-card-padding) + var(--dialog-card-padding));
  margin: calc(0px - var(--dialog-card-padding)) calc(0px - var(--dialog-card-padding)) 0;
  padding: 0 var(--dialog-card-padding) var(--dialog-card-padding);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#driver-settings-form > .dialog-header:first-child {
  width: auto;
  margin: 0 calc(0px - var(--dialog-card-padding)) 16px;
}

.chat-card {
  width: min(1274px, calc(100vw - 48px));
  height: min(1040px, calc(100vh - 24px));
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-floating-backdrop {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  z-index: var(--z-floating-chat-layer);
  pointer-events: none;
}

.chat-floating-stack {
  position: fixed;
  inset: 0;
  z-index: var(--z-floating-chat-layer);
  pointer-events: none;
}

body.has-blocking-dialog .chat-floating-backdrop,
body.has-blocking-dialog .chat-floating-stack,
body:has(.dialog-backdrop:not(.hidden):not(.chat-floating-backdrop):not(.floating-nonblocking-backdrop):not(.map-nonblocking-dialog)) .chat-floating-backdrop,
body:has(.dialog-backdrop:not(.hidden):not(.chat-floating-backdrop):not(.floating-nonblocking-backdrop):not(.map-nonblocking-dialog)) .chat-floating-stack {
  z-index: 100 !important;
  pointer-events: none !important;
}

body.has-blocking-dialog .chat-floating-backdrop .chat-card,
body.has-blocking-dialog .chat-floating-stack .chat-card,
body:has(.dialog-backdrop:not(.hidden):not(.chat-floating-backdrop):not(.floating-nonblocking-backdrop):not(.map-nonblocking-dialog)) .chat-floating-backdrop .chat-card,
body:has(.dialog-backdrop:not(.hidden):not(.chat-floating-backdrop):not(.floating-nonblocking-backdrop):not(.map-nonblocking-dialog)) .chat-floating-stack .chat-card {
  visibility: hidden !important;
}

body:has(.dialog-backdrop.map-nonblocking-dialog:not(.hidden)) .chat-floating-backdrop,
body:has(.dialog-backdrop.map-nonblocking-dialog:not(.hidden)) .chat-floating-stack {
  z-index: var(--z-critical-popup-layer) !important;
}

.chat-floating-backdrop .chat-card,
.chat-floating-stack .chat-card[data-chat-floating-window="main"] {
  position: fixed;
  left: var(--chat-window-x, 24px);
  top: var(--chat-window-y, 24px);
  width: min(980px, calc(100vw - 16px));
  height: min(760px, calc(100vh - 16px));
  min-width: min(720px, calc(100vw - 16px));
  min-height: min(460px, calc(100vh - 16px));
  max-height: calc(100vh - 16px);
  pointer-events: auto;
  resize: both;
}

.dialog-backdrop.floating-nonblocking-backdrop .admin-card[data-floating-window] {
  position: fixed;
  left: var(--chat-window-x, 24px);
  top: var(--chat-window-y, 24px);
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  pointer-events: auto;
  resize: both;
}

.dialog-backdrop.floating-nonblocking-backdrop .dialog-card[data-floating-window] {
  position: fixed;
  left: var(--chat-window-x, 24px);
  top: var(--chat-window-y, 24px);
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  pointer-events: auto;
  resize: both;
}

.chat-floating-stack .admin-card[data-floating-window="settings"],
.dialog-backdrop.floating-nonblocking-backdrop .admin-card[data-floating-window="settings"] {
  width: min(720px, calc(100vw - 16px));
  height: min(800px, calc(100vh - 16px));
  min-width: min(440px, calc(100vw - 16px));
  min-height: min(420px, calc(100vh - 16px));
  max-height: calc(100vh - 16px);
  pointer-events: auto;
  resize: both;
}

.chat-floating-titlebar,
.chat-popout-titlebar {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.chat-floating-titlebar:active,
.chat-popout-titlebar:active {
  cursor: grabbing;
}

body.is-floating-window-dragging,
body.is-floating-window-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.chat-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  height: 100%;
  overflow: visible;
}

.chat-card .admin-card-scroll,
.chat-card .chat-layout {
  flex: 1 1 auto;
  min-height: 0;
}

.driver-chat-card .chat-layout {
  flex: 1 1 auto;
  min-height: 0;
}

.driver-chat-titlebar {
  margin-bottom: 12px;
}

.driver-chat-titlebar h3 {
  margin-bottom: 2px;
}

.driver-chat-titlebar p {
  margin: 0;
}

.driver-chat-titlebar .modal-close-button {
  margin-left: auto;
}

.driver-chat-actions {
  justify-content: flex-end;
}

.chat-card .admin-card-scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar,
.chat-panel {
  min-width: 0;
  min-height: 0;
}

.chat-sidebar {
  position: relative;
  z-index: 3;
  overflow: visible;
}

.chat-panel {
  position: relative;
  z-index: 1;
}

.chat-thread-list,
.chat-message-list {
  display: grid;
  gap: 10px;
  align-content: start;
  align-items: start;
}

.chat-sidebar-toolbar {
  position: relative;
  margin-bottom: 10px;
  z-index: 4;
}

.chat-thread-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(20, 33, 61, 0.1);
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
}

.chat-thread-search:focus {
  outline: none;
  border-color: rgba(31, 79, 150, 0.28);
  box-shadow: 0 0 0 3px rgba(31, 79, 150, 0.08);
}

.chat-search-results {
  position: fixed;
  top: var(--chat-search-top, 0px);
  left: var(--chat-search-left, 0px);
  right: auto;
  z-index: 90040;
  display: grid;
  gap: 8px;
  width: var(--chat-search-width, min(330px, calc(100vw - 56px)));
  max-width: calc(100vw - 56px);
  max-height: var(--chat-search-max-height, min(72vh, 620px));
  overflow: auto;
  pointer-events: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(4px);
}

.chat-search-result {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 14px;
  background: rgba(20, 33, 61, 0.04);
  text-align: left;
  color: inherit;
  pointer-events: auto;
}

.chat-search-result.active {
  border-color: rgba(217, 170, 44, 0.42);
  box-shadow: 0 0 0 1px rgba(217, 170, 44, 0.2);
}

.chat-search-result.is-unread,
.chat-thread-item.is-unread {
  border-color: rgba(31, 79, 150, 0.32);
  background:
    linear-gradient(135deg, rgba(31, 79, 150, 0.12), rgba(217, 170, 44, 0.18)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 26px rgba(31, 79, 150, 0.12);
}

.chat-search-result.is-unread .chat-search-copy strong,
.chat-thread-item.is-unread .chat-thread-copy strong {
  color: var(--text);
  font-weight: 800;
}

.chat-thread-item.is-unread .count-pill {
  min-width: 30px;
  min-height: 26px;
  padding: 4px 9px;
  background: #1f4f96;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(31, 79, 150, 0.22);
}

.chat-search-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chat-search-copy strong,
.chat-search-copy span,
.chat-search-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chat-search-copy small {
  color: var(--muted);
}

.chat-search-empty {
  padding: 10px 12px;
  color: var(--muted);
  text-align: center;
}

.chat-thread-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: rgba(20, 33, 61, 0.04);
}

.chat-thread-item.active {
  border-color: rgba(217, 170, 44, 0.42);
  box-shadow: 0 0 0 1px rgba(217, 170, 44, 0.2);
}

.chat-thread-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.chat-thread-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-thread-copy strong,
.chat-thread-copy span {
  line-height: 1.2;
}

.chat-avatar,
.chat-head-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(217, 170, 44, 0.28), rgba(31, 79, 150, 0.18));
  border: 1px solid rgba(20, 33, 61, 0.08);
}

.chat-avatar.is-online {
  border-color: rgba(38, 166, 91, 0.72);
  box-shadow: 0 0 0 2px rgba(38, 166, 91, 0.16);
}

.chat-avatar.is-offline {
  border-color: rgba(196, 64, 64, 0.72);
  box-shadow: 0 0 0 2px rgba(196, 64, 64, 0.14);
}

.chat-avatar.is-global {
  border-color: rgba(217, 170, 44, 0.72);
  box-shadow: 0 0 0 2px rgba(217, 170, 44, 0.16);
  background: linear-gradient(135deg, rgba(255, 227, 138, 0.38), rgba(31, 79, 150, 0.14));
}

.chat-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-avatar-fallback {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.chat-thread-close,
.chat-thread-popout {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  align-self: start;
  justify-content: center;
}

.chat-thread-popout {
  color: #1f4f96;
}

.chat-thread-item strong,
.chat-thread-item span,
.chat-thread-item time,
.chat-thread-header,
.chat-bubble p,
.chat-bubble header strong,
.chat-bubble header time {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chat-thread-item span,
.chat-thread-item time,
.chat-thread-header {
  color: var(--muted);
}

.chat-thread-list.chat-thread-list-searching {
  padding-top: 2px;
}

.chat-activity-text {
  color: #1f4f96;
  font-style: italic;
  font-weight: 600;
}

.chat-activity-dots {
  display: inline-flex;
  min-width: 1.1em;
  justify-content: flex-start;
}

.chat-activity-dots span {
  opacity: 0.15;
  animation: chatActivityDotPulse 1.2s infinite;
}

.chat-activity-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-activity-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chatActivityDotPulse {
  0%, 20% {
    opacity: 0.15;
  }

  40% {
    opacity: 1;
  }

  100% {
    opacity: 0.15;
  }
}

.chat-thread-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}

.chat-heads {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.chat-heads.has-minimized-window {
  z-index: var(--z-chat-head-layer) !important;
  isolation: isolate;
}

.chat-head {
  position: absolute;
  right: 18px;
  bottom: 18px;
  pointer-events: auto;
  width: min(270px, calc(100vw - 36px));
  min-height: 74px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(20, 33, 61, 0.1);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 30px rgba(17, 24, 39, 0.16);
  color: inherit;
  text-align: left;
  touch-action: none;
  transform: translate(var(--chat-head-x, 0px), var(--chat-head-y, 0px));
}

.chat-head.is-pending {
  animation: chat-head-pending-nudge 1.9s ease-in-out infinite;
}

.chat-head.is-minimized-window {
  z-index: 2;
}

.chat-head.is-pending:hover,
.chat-head.is-pending:active {
  animation-play-state: paused;
}

.chat-head-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chat-head-body strong,
.chat-head-body span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-head-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #a32020;
  font-size: 1rem;
  font-weight: 700;
}

body.dispatch-theme-dark .chat-head,
body.driver-page.driver-theme-dark .chat-head {
  border-color: rgba(172, 198, 255, 0.28);
  background:
    radial-gradient(circle at 18% 12%, rgba(115, 158, 236, 0.22), transparent 36%),
    linear-gradient(145deg, rgba(39, 60, 101, 0.98), rgba(18, 30, 55, 0.96));
  box-shadow:
    0 18px 38px rgba(4, 12, 28, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f7fbff;
}

body.dispatch-theme-dark .chat-head-body strong,
body.driver-page.driver-theme-dark .chat-head-body strong {
  color: #f7fbff;
}

body.dispatch-theme-dark .chat-head-body span,
body.driver-page.driver-theme-dark .chat-head-body span {
  color: rgba(226, 235, 255, 0.78);
}

body.dispatch-theme-dark .chat-head .chat-avatar,
body.dispatch-theme-dark .chat-head-avatar,
body.driver-page.driver-theme-dark .chat-head .chat-avatar,
body.driver-page.driver-theme-dark .chat-head-avatar {
  background: linear-gradient(135deg, rgba(212, 228, 255, 0.24), rgba(61, 103, 180, 0.32));
  border-color: rgba(178, 205, 255, 0.38);
}

body.dispatch-theme-dark .chat-head .chat-avatar-fallback,
body.driver-page.driver-theme-dark .chat-head .chat-avatar-fallback {
  color: #f7fbff;
}

body.dispatch-theme-dark .chat-head-close,
body.driver-page.driver-theme-dark .chat-head-close {
  background: rgba(255, 255, 255, 0.08);
  color: #ffd0d0;
}

body.dispatch-theme-midnight .chat-head,
body.driver-page.driver-theme-midnight .chat-head {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(38, 42, 52, 0.98), rgba(12, 13, 17, 0.96));
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #fafafa;
}

body.dispatch-theme-midnight .chat-head-body strong,
body.driver-page.driver-theme-midnight .chat-head-body strong {
  color: #fafafa;
}

body.dispatch-theme-midnight .chat-head-body span,
body.driver-page.driver-theme-midnight .chat-head-body span {
  color: rgba(243, 244, 246, 0.72);
}

body.dispatch-theme-midnight .chat-head .chat-avatar,
body.dispatch-theme-midnight .chat-head-avatar,
body.driver-page.driver-theme-midnight .chat-head .chat-avatar,
body.driver-page.driver-theme-midnight .chat-head-avatar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(82, 89, 106, 0.26));
  border-color: rgba(255, 255, 255, 0.24);
}

body.dispatch-theme-midnight .chat-head .chat-avatar-fallback,
body.driver-page.driver-theme-midnight .chat-head .chat-avatar-fallback {
  color: #fafafa;
}

body.dispatch-theme-midnight .chat-head-close,
body.driver-page.driver-theme-midnight .chat-head-close {
  background: rgba(255, 255, 255, 0.08);
  color: #ffd0d0;
}

body.dispatch-theme-space .chat-head,
body.driver-page.driver-theme-space .chat-head {
  border-color: rgba(126, 196, 255, 0.34);
  background:
    radial-gradient(circle at 18% 12%, rgba(85, 132, 255, 0.32), transparent 34%),
    radial-gradient(circle at 88% 18%, rgba(143, 108, 255, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(14, 25, 62, 0.98), rgba(5, 9, 28, 0.96));
  box-shadow:
    0 18px 40px rgba(3, 8, 28, 0.5),
    0 0 22px rgba(77, 205, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #f7fbff;
}

body.dispatch-theme-space .chat-head-body strong,
body.driver-page.driver-theme-space .chat-head-body strong {
  color: #f7fbff;
}

body.dispatch-theme-space .chat-head-body span,
body.driver-page.driver-theme-space .chat-head-body span {
  color: rgba(196, 232, 255, 0.8);
}

body.dispatch-theme-space .chat-head .chat-avatar,
body.dispatch-theme-space .chat-head-avatar,
body.driver-page.driver-theme-space .chat-head .chat-avatar,
body.driver-page.driver-theme-space .chat-head-avatar {
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(135deg, rgba(83, 116, 255, 0.28), rgba(77, 205, 255, 0.18));
  border-color: rgba(126, 196, 255, 0.46);
}

body.dispatch-theme-space .chat-head .chat-avatar-fallback,
body.driver-page.driver-theme-space .chat-head .chat-avatar-fallback {
  color: #f7fbff;
}

body.dispatch-theme-space .chat-head-close,
body.driver-page.driver-theme-space .chat-head-close {
  background: rgba(126, 196, 255, 0.1);
  color: #ffd0e6;
}

.chat-popout-windows {
  position: static;
  inset: auto;
  z-index: auto;
  pointer-events: none;
}

body.has-blocking-dialog .chat-popout-windows,
body:has(.dialog-backdrop:not(.hidden):not(.chat-floating-backdrop):not(.floating-nonblocking-backdrop):not(.map-nonblocking-dialog)) .chat-popout-windows {
  z-index: 100 !important;
  pointer-events: none !important;
}

.chat-popout-window {
  position: fixed;
  z-index: 1;
  left: var(--chat-window-x, 24px);
  top: var(--chat-window-y, 24px);
  width: min(420px, calc(100vw - 16px));
  height: min(580px, calc(100vh - 16px));
  min-width: min(330px, calc(100vw - 16px));
  min-height: min(360px, calc(100vh - 16px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--window-border);
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  box-shadow: var(--window-shadow);
  backdrop-filter: var(--window-glass-filter);
  -webkit-backdrop-filter: var(--window-glass-filter);
  pointer-events: auto;
  resize: both;
  overflow: hidden;
}

body.has-blocking-dialog .chat-popout-window,
body:has(.dialog-backdrop:not(.hidden):not(.chat-floating-backdrop):not(.floating-nonblocking-backdrop):not(.map-nonblocking-dialog)) .chat-popout-window {
  z-index: 1 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

body:has(.dialog-backdrop.map-nonblocking-dialog:not(.hidden)) .chat-popout-window {
  z-index: var(--z-critical-popup-layer) !important;
}

.chat-popout-titlebar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: -14px -14px 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px 20px 0 0;
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

.chat-popout-titlebar > .chat-avatar {
  width: 38px;
  height: 38px;
}

.chat-popout-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.chat-popout-title strong,
.chat-popout-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-popout-title span {
  color: var(--window-titlebar-muted);
  font-size: 0.82rem;
}

.chat-popout-actions {
  display: flex;
  gap: 6px;
}

.chat-popout-actions .modal-close-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  justify-content: center;
}

.chat-popout-actions .chat-popout-minimize {
  color: var(--window-titlebar-text);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(20, 33, 61, 0.36);
  font-size: 1.35rem;
  line-height: 1;
}

.chat-popout-actions .chat-popout-minimize:hover,
.chat-popout-actions .chat-popout-minimize:focus-visible {
  color: var(--window-titlebar-text);
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(20, 33, 61, 0.52);
}

.chat-popout-message-list {
  min-height: 0;
}

.chat-popout-compose textarea {
  min-height: 62px;
  max-height: 150px;
}

.chat-popout-status {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.chat-popout-compose-actions {
  justify-content: space-between;
}

.chat-popout-compose-actions .primary {
  margin-right: auto;
}

.chat-popout-compose-actions .chat-popout-footer-close {
  margin-left: auto;
}

@media (max-width: 640px) {
  .chat-floating-backdrop .chat-card,
  .chat-floating-stack .chat-card[data-chat-floating-window="main"] {
    width: calc(100vw - 16px);
    height: min(86vh, calc(100vh - 16px));
    height: min(86dvh, calc(100dvh - 16px));
    min-width: calc(100vw - 16px);
    min-height: min(420px, calc(100vh - 16px));
    min-height: min(420px, calc(100dvh - 16px));
    resize: none;
  }

  .dialog-backdrop.floating-nonblocking-backdrop .admin-card[data-floating-window] {
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    resize: none;
  }

  .chat-floating-stack .admin-card[data-floating-window="settings"],
  .dialog-backdrop.floating-nonblocking-backdrop .admin-card[data-floating-window="settings"] {
    width: calc(100vw - 16px);
    height: min(86vh, calc(100vh - 16px));
    height: min(86dvh, calc(100dvh - 16px));
    min-width: calc(100vw - 16px);
    min-height: min(420px, calc(100vh - 16px));
    min-height: min(420px, calc(100dvh - 16px));
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    resize: none;
  }

  .chat-popout-window {
    width: calc(100vw - 16px);
    height: min(72vh, calc(100vh - 16px));
    height: min(72dvh, calc(100dvh - 16px));
    min-width: calc(100vw - 16px);
    min-height: min(340px, calc(100vh - 16px));
    min-height: min(340px, calc(100dvh - 16px));
    resize: none;
  }
}

@keyframes chat-head-pending-nudge {
  0%,
  100% {
    transform: translate(var(--chat-head-x, 0px), var(--chat-head-y, 0px));
  }

  18% {
    transform: translate(calc(var(--chat-head-x, 0px) - 4px), var(--chat-head-y, 0px));
  }

  36% {
    transform: translate(calc(var(--chat-head-x, 0px) + 4px), var(--chat-head-y, 0px));
  }

  54% {
    transform: translate(calc(var(--chat-head-x, 0px) - 3px), var(--chat-head-y, 0px));
  }

  72% {
    transform: translate(calc(var(--chat-head-x, 0px) + 3px), var(--chat-head-y, 0px));
  }
}

.chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.driver-chat-card .chat-panel {
  grid-template-rows: minmax(0, 1fr) auto;
}

.chat-thread-header {
  font-size: 0.95rem;
}

.chat-message-list {
  padding: 6px;
  border-radius: 18px;
  background: rgba(20, 33, 61, 0.04);
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  user-select: text;
  -webkit-user-select: text;
}

.chat-bubble {
  justify-self: start;
  align-self: start;
  max-width: min(84%, 580px);
  height: fit-content;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 33, 61, 0.08);
  user-select: text;
  -webkit-user-select: text;
}

.chat-bubble.mine {
  justify-self: end;
  background: linear-gradient(135deg, rgba(247, 200, 75, 0.22), rgba(217, 170, 44, 0.12));
  border-radius: 18px 18px 6px 18px;
}

.chat-bubble header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-bubble audio {
  width: min(100%, 240px);
  height: 28px;
}

.chat-audio-row {
  display: grid;
  grid-template-columns: minmax(0, 240px) auto;
  gap: 8px;
  align-items: center;
  justify-content: start;
  max-width: 290px;
}

.chat-audio-row.is-missing {
  grid-template-columns: minmax(0, 1fr);
  max-width: min(100%, 340px);
}

.chat-audio-row.is-missing audio,
.chat-audio-row.is-missing .chat-audio-save {
  display: none;
}

.chat-audio-error {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: min(100%, 340px);
  padding: 8px 10px;
  border: 1px solid rgba(176, 42, 42, 0.3);
  border-radius: 8px;
  background: rgba(176, 42, 42, 0.1);
  color: #8d1f1f;
  font-size: 0.82rem;
  line-height: 1.35;
}

.chat-audio-error[hidden] {
  display: none;
}

.chat-audio-error::before {
  content: "!";
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: #b02a2a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.chat-audio-save {
  min-width: 38px;
  min-height: 38px;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  padding-inline: 10px;
}

.chat-message-delivery {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  color: rgba(20, 33, 61, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
}

.chat-message-delivery.is-received {
  background: rgba(31, 79, 150, 0.12);
  color: #1f4f96;
}

.chat-message-delivery.is-seen {
  background: rgba(29, 122, 90, 0.14);
  color: #0b5a3b;
}

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

.chat-message-action {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

.chat-message-edit-wrap {
  display: grid;
  gap: 8px;
}

.chat-message-edit-input {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border-radius: 12px;
}

.chat-confirm-card {
  width: min(420px, 100%);
}

.driver-note-card {
  width: min(620px, calc(100vw - 24px));
}

.driver-note-header {
  align-items: center;
}

.driver-note-body {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 22px 24px 20px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--control-selected-bg, rgba(50, 103, 227, 0.12)) 68%, transparent), transparent 42%),
    color-mix(in srgb, var(--surface-strong) 72%, transparent);
}

.driver-note-text {
  width: min(100%, 520px);
  margin: 0;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--control-border, rgba(126, 143, 170, 0.36)) 72%, transparent);
  border-radius: 12px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--control-bg-strong, #fff) 92%, transparent), color-mix(in srgb, var(--control-bg-soft, rgba(20, 33, 61, 0.06)) 74%, transparent));
  color: var(--control-text, var(--text));
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 52%, transparent),
    0 14px 30px color-mix(in srgb, var(--accent, #14213d) 12%, transparent);
}

.driver-note-actions {
  justify-content: center;
  padding-top: 12px;
}

.driver-note-actions .primary {
  min-width: 126px;
  justify-content: center;
}

.chat-compose {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  padding-top: 4px;
  background: inherit;
}

.chat-compose textarea {
  resize: vertical;
  min-height: 72px;
}

.chat-compose-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-compose-recording textarea {
  display: none;
}

.chat-compose-recording .chat-recorder {
  display: grid;
  min-height: 112px;
  align-content: center;
}

.chat-recorder {
  --chat-recorder-accent: var(--accent, #1f4f96);
  --chat-recorder-warm: #f1b938;
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(28px, 1fr);
  gap: 12px;
  padding: 14px 16px 15px;
  border-radius: 18px;
  border: 1px solid rgba(31, 79, 150, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.92)),
    rgba(248, 250, 255, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 28px rgba(20, 33, 61, 0.08);
  overflow: hidden;
}

.chat-recorder-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-recorder-topline strong {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.1;
}

.chat-recorder-topline strong::before {
  content: "";
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  background:
    center / 21px 21px no-repeat url("/assets/Mic-Icon.webp?v=2026-06-04-001"),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(229, 236, 249, 0.92));
  border: 1px solid rgba(31, 79, 150, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 5px rgba(31, 79, 150, 0.06);
  animation: chat-recorder-mic-pulse 1.8s ease-in-out infinite;
}

.chat-recorder-timer {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.08);
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.chat-recorder-progress {
  width: 100%;
  height: 10px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(31, 79, 150, 0.1);
  box-shadow:
    inset 0 1px 2px rgba(20, 33, 61, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.chat-recorder-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--chat-recorder-warm), var(--chat-recorder-accent));
  box-shadow: 0 0 16px rgba(31, 79, 150, 0.22);
  transition: width 120ms linear;
}

.chat-recorder-meter {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 4px 0;
  border-radius: 12px;
  overflow: hidden;
}

.chat-recorder-meter-bar {
  flex: 1 1 0;
  min-width: 4px;
  height: 20%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 229, 139, 0.98), rgba(31, 79, 150, 0.92));
  box-shadow: 0 0 12px rgba(31, 79, 150, 0.14);
  transform-origin: center;
  transition: height 90ms ease, opacity 90ms ease, filter 90ms ease;
}

body.dispatch-theme-dark .chat-recorder,
body.dispatch-theme-midnight .chat-recorder,
body.dispatch-theme-space .chat-recorder,
body.driver-page.driver-theme-dark .chat-recorder,
body.driver-page.driver-theme-midnight .chat-recorder,
body.driver-page.driver-theme-space .chat-recorder {
  --chat-recorder-accent: #78dcff;
  --chat-recorder-warm: #f6d365;
  border-color: rgba(146, 184, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(24, 35, 61, 0.96), rgba(10, 16, 35, 0.9)),
    rgba(14, 22, 43, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 34px rgba(0, 0, 0, 0.24);
}

body.dispatch-theme-girly .chat-recorder,
body.driver-page.driver-theme-girly .chat-recorder {
  --chat-recorder-accent: #d568a8;
  --chat-recorder-warm: #f7c84b;
  border-color: rgba(213, 104, 168, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 247, 252, 0.98), rgba(255, 237, 248, 0.92)),
    rgba(255, 246, 251, 0.96);
}

body.dispatch-theme-fire .chat-recorder,
body.driver-page.driver-theme-fire .chat-recorder {
  --chat-recorder-accent: #ff5a1f;
  --chat-recorder-warm: #ffd447;
}

body.dispatch-theme-dark .chat-recorder-topline strong::before,
body.dispatch-theme-midnight .chat-recorder-topline strong::before,
body.dispatch-theme-space .chat-recorder-topline strong::before,
body.driver-page.driver-theme-dark .chat-recorder-topline strong::before,
body.driver-page.driver-theme-midnight .chat-recorder-topline strong::before,
body.driver-page.driver-theme-space .chat-recorder-topline strong::before {
  background:
    center / 21px 21px no-repeat url("/assets/Mic-Icon.webp?v=2026-06-04-001"),
    linear-gradient(145deg, rgba(35, 48, 79, 0.98), rgba(16, 25, 48, 0.94));
  border-color: rgba(146, 184, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 5px rgba(120, 220, 255, 0.08);
}

body.dispatch-theme-dark .chat-recorder-timer,
body.dispatch-theme-midnight .chat-recorder-timer,
body.dispatch-theme-space .chat-recorder-timer,
body.driver-page.driver-theme-dark .chat-recorder-timer,
body.driver-page.driver-theme-midnight .chat-recorder-timer,
body.driver-page.driver-theme-space .chat-recorder-timer {
  background: rgba(238, 245, 255, 0.1);
  color: #f7fbff;
}

body.dispatch-theme-dark .chat-recorder-progress,
body.dispatch-theme-midnight .chat-recorder-progress,
body.dispatch-theme-space .chat-recorder-progress,
body.driver-page.driver-theme-dark .chat-recorder-progress,
body.driver-page.driver-theme-midnight .chat-recorder-progress,
body.driver-page.driver-theme-space .chat-recorder-progress {
  background: rgba(238, 245, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

body.dispatch-theme-dark .chat-recorder-meter-bar,
body.dispatch-theme-midnight .chat-recorder-meter-bar,
body.dispatch-theme-space .chat-recorder-meter-bar,
body.driver-page.driver-theme-dark .chat-recorder-meter-bar,
body.driver-page.driver-theme-midnight .chat-recorder-meter-bar,
body.driver-page.driver-theme-space .chat-recorder-meter-bar {
  background: linear-gradient(180deg, rgba(246, 211, 101, 0.98), rgba(120, 220, 255, 0.9));
  box-shadow: 0 0 12px rgba(120, 220, 255, 0.16);
}

@keyframes chat-recorder-mic-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.maintenance-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 16px;
}

.maintenance-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.maintenance-kpi-card {
  min-height: 124px;
  align-content: start;
  gap: 10px;
  padding: 16px 18px;
  box-shadow: 0 14px 34px rgba(20, 33, 61, 0.08);
}

.maintenance-kpi-button {
  appearance: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.maintenance-kpi-button:hover {
  transform: translateY(-1px);
  border-color: rgba(50, 103, 227, 0.28);
  box-shadow: 0 18px 38px rgba(20, 33, 61, 0.12);
}

.maintenance-kpi-button:focus-visible {
  outline: 3px solid rgba(50, 103, 227, 0.28);
  outline-offset: 3px;
}

.maintenance-kpi-button.is-active {
  border-color: rgba(50, 103, 227, 0.45);
  box-shadow:
    0 16px 38px rgba(20, 33, 61, 0.14),
    inset 0 0 0 2px rgba(50, 103, 227, 0.26);
}

.maintenance-kpi-button.is-active small::after {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-left: 8px;
  border-radius: 999px;
  background: #1f4eaa;
  box-shadow: 0 0 0 4px rgba(50, 103, 227, 0.14);
}

.maintenance-reset-filters {
  flex: 0 0 auto;
  min-height: 34px;
  white-space: nowrap;
}

.maintenance-active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 10px;
  margin-top: -4px;
}

.maintenance-filter-chip {
  appearance: none;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(100%, 340px);
  padding: 5px 9px;
  border: 1px solid rgba(50, 103, 227, 0.2);
  border-radius: 999px;
  background: rgba(50, 103, 227, 0.08);
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1;
  cursor: pointer;
}

.maintenance-filter-chip span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.maintenance-filter-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-filter-chip b {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.12);
  font-size: 0.9rem;
  line-height: 1;
}

.maintenance-filter-chip:hover {
  border-color: rgba(50, 103, 227, 0.36);
  background: rgba(50, 103, 227, 0.12);
}

.maintenance-filter-chip:focus-visible {
  outline: 2px solid rgba(50, 103, 227, 0.35);
  outline-offset: 2px;
}

.maintenance-kpi-card strong {
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.maintenance-kpi-card small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.maintenance-kpi-card.emphasis {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.22), transparent 38%),
    rgba(255, 255, 255, 0.94);
}

.maintenance-kpi-card.tone-danger {
  background:
    radial-gradient(circle at top left, rgba(216, 80, 68, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.94);
}

.maintenance-kpi-card.tone-info {
  background:
    radial-gradient(circle at top left, rgba(50, 103, 227, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.94);
}

.maintenance-kpi-card.tone-warning {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.18), transparent 36%),
    rgba(255, 255, 255, 0.94);
}

.maintenance-table-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: min(56vh, 620px);
}

.maintenance-table-panel .table-wrap {
  height: 100%;
}

.maintenance-table-panel .dispatch-table th[data-maintenance-sort-header] {
  padding: 0;
}

.maintenance-sort-button {
  appearance: none;
  width: 100%;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px 5px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.maintenance-sort-button:hover,
.maintenance-sort-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.maintenance-sort-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.78);
  outline-offset: -2px;
}

.maintenance-sort-indicator {
  width: 9px;
  height: 9px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  opacity: 0.55;
}

.maintenance-sort-indicator::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid currentColor;
  opacity: 0.55;
}

.maintenance-sort-button.is-active .maintenance-sort-indicator {
  opacity: 1;
}

.maintenance-sort-button.is-active .maintenance-sort-indicator::before {
  opacity: 0.95;
}

.maintenance-sort-button.is-desc .maintenance-sort-indicator::before {
  transform: rotate(180deg);
}

.maintenance-row {
  outline: 0;
}

.maintenance-row td {
  transition: background 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.maintenance-row:hover td {
  background: rgba(50, 103, 227, 0.06);
}

.maintenance-row:focus-visible td {
  box-shadow: inset 0 0 0 2px rgba(50, 103, 227, 0.36);
}

.maintenance-row.due-overdue td:first-child {
  box-shadow: inset 4px 0 0 rgba(184, 55, 47, 0.82);
}

.maintenance-row.due-today td:first-child {
  box-shadow: inset 4px 0 0 rgba(226, 159, 31, 0.82);
}

.maintenance-row.due-soon td:first-child {
  box-shadow: inset 4px 0 0 rgba(50, 103, 227, 0.58);
}

.maintenance-row.status-in_progress td:first-child {
  box-shadow: inset 4px 0 0 rgba(50, 103, 227, 0.72);
}

.maintenance-row.status-in_progress.due-overdue td:first-child {
  box-shadow: inset 4px 0 0 rgba(184, 55, 47, 0.82);
}

.maintenance-row.status-in_progress.due-today td:first-child {
  box-shadow: inset 4px 0 0 rgba(226, 159, 31, 0.82);
}

.maintenance-row.status-completed {
  opacity: 0.76;
}

.maintenance-due-text.due-overdue,
.maintenance-date-cell.due-overdue {
  color: #9a231b;
  font-weight: 800;
}

.maintenance-due-text.due-today,
.maintenance-date-cell.due-today {
  color: #8a5a06;
  font-weight: 800;
}

.maintenance-due-text.due-soon,
.maintenance-date-cell.due-soon {
  color: #1f4eaa;
  font-weight: 700;
}

.maintenance-cell-stack {
  display: grid;
  gap: 2px;
}

.maintenance-cell-stack strong {
  font-size: 0.84rem;
}

.maintenance-cell-stack span {
  color: var(--muted);
  font-size: 0.74rem;
}

.maintenance-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.maintenance-status-pill.tone-success {
  color: #0b5a3b;
  background: rgba(29, 122, 90, 0.12);
  border-color: rgba(29, 122, 90, 0.18);
}

.maintenance-status-pill.tone-info {
  color: #1f4eaa;
  background: rgba(50, 103, 227, 0.12);
  border-color: rgba(50, 103, 227, 0.18);
}

.maintenance-status-pill.tone-warning {
  color: #8a5a06;
  background: rgba(247, 200, 75, 0.18);
  border-color: rgba(226, 159, 31, 0.18);
}

.maintenance-status-pill.tone-danger {
  color: #9a231b;
  background: rgba(184, 55, 47, 0.12);
  border-color: rgba(184, 55, 47, 0.18);
}

.maintenance-empty-table {
  padding: 34px 18px !important;
}

.maintenance-empty-table strong,
.maintenance-empty-table span {
  display: block;
}

.maintenance-empty-table strong {
  margin-bottom: 6px;
}

.maintenance-empty-table span {
  color: var(--muted);
}

.maintenance-empty-table.is-filtered {
  background:
    radial-gradient(circle at top left, rgba(50, 103, 227, 0.08), transparent 32%),
    rgba(255, 255, 255, 0.86);
}

.maintenance-empty-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.maintenance-empty-actions .ghost {
  min-height: 34px;
}

.maintenance-form-grid .full {
  grid-column: 1 / -1;
}

.maintenance-modal-card {
  width: min(860px, 100%);
}

.maintenance-modal-card .admin-card-footer {
  justify-content: flex-end;
  align-items: center;
}

.maintenance-modal-card .admin-card-footer .primary,
.maintenance-modal-card .admin-card-footer .ghost {
  flex: 0 0 auto;
}

body.dispatch-theme-dark .chat-thread-item,
body.dispatch-theme-dark .chat-message-list,
body.dispatch-theme-dark .chat-bubble,
body.dispatch-theme-dark .chat-popout-window,
body.driver-page.driver-theme-dark .chat-thread-item,
body.driver-page.driver-theme-dark .chat-message-list,
body.driver-page.driver-theme-dark .chat-bubble {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(220, 230, 251, 0.08);
  color: var(--text);
}

body.dispatch-theme-dark .chat-bubble.mine,
body.driver-page.driver-theme-dark .chat-bubble.mine {
  background: linear-gradient(135deg, rgba(247, 200, 75, 0.2), rgba(45, 79, 150, 0.18));
}

body.dispatch-theme-dark .chat-message-delivery,
body.driver-page.driver-theme-dark .chat-message-delivery,
body.dispatch-theme-space .chat-message-delivery,
body.driver-page.driver-theme-space .chat-message-delivery {
  background: rgba(226, 235, 255, 0.1);
  color: rgba(226, 235, 255, 0.82);
}

body.dispatch-theme-dark .chat-message-delivery.is-received,
body.driver-page.driver-theme-dark .chat-message-delivery.is-received,
body.dispatch-theme-space .chat-message-delivery.is-received,
body.driver-page.driver-theme-space .chat-message-delivery.is-received {
  background: rgba(126, 196, 255, 0.14);
  color: #c9edff;
}

body.dispatch-theme-dark .chat-message-delivery.is-seen,
body.driver-page.driver-theme-dark .chat-message-delivery.is-seen,
body.dispatch-theme-space .chat-message-delivery.is-seen,
body.driver-page.driver-theme-space .chat-message-delivery.is-seen {
  background: rgba(74, 222, 128, 0.14);
  color: #bdf8d0;
}

body.dispatch-theme-midnight .chat-thread-item,
body.dispatch-theme-midnight .chat-message-list,
body.dispatch-theme-midnight .chat-bubble,
body.dispatch-theme-midnight .chat-popout-window,
body.driver-page.driver-theme-midnight .chat-thread-item,
body.driver-page.driver-theme-midnight .chat-message-list,
body.driver-page.driver-theme-midnight .chat-bubble {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

body.dispatch-theme-midnight .chat-bubble.mine,
body.driver-page.driver-theme-midnight .chat-bubble.mine {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(71, 77, 88, 0.22));
}

body.dispatch-theme-midnight .chat-message-delivery,
body.driver-page.driver-theme-midnight .chat-message-delivery {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(243, 244, 246, 0.78);
}

body.dispatch-theme-midnight .chat-message-delivery.is-received,
body.driver-page.driver-theme-midnight .chat-message-delivery.is-received {
  background: rgba(156, 163, 175, 0.16);
  color: #f7f7fa;
}

body.dispatch-theme-midnight .chat-message-delivery.is-seen,
body.driver-page.driver-theme-midnight .chat-message-delivery.is-seen {
  background: rgba(74, 222, 128, 0.12);
  color: #bdf8d0;
}

.driver-fare-estimate-card {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 61, 0.18), transparent 38%),
    rgba(255, 248, 228, 0.78);
}

.driver-fare-estimate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.driver-fare-estimate-header span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-fare-estimate-header strong {
  font-size: 1.15rem;
}

.driver-fare-estimate-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.driver-fare-estimate-grid div {
  display: grid;
  gap: 4px;
}

.driver-fare-estimate-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.driver-fare-estimate-grid strong {
  font-size: 0.98rem;
}

body.driver-page.driver-theme-dark .driver-fare-estimate-card,
body.dispatch-theme-dark .settings-subsection {
  background:
    radial-gradient(circle at top left, rgba(255, 214, 61, 0.08), transparent 38%),
    rgba(31, 44, 69, 0.94);
  border-color: rgba(220, 230, 251, 0.08);
}

.driver-settings-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
  gap: 12px;
  align-items: center;
}

.driver-settings-range-row input[type="range"] {
  --driver-volume-progress: 50%;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.driver-settings-range-row input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--range-track-border, rgba(109, 126, 153, 0.18));
  background:
    linear-gradient(
      90deg,
      var(--range-fill, rgba(29, 53, 107, 0.9)) 0%,
      var(--range-fill, rgba(29, 53, 107, 0.9)) var(--driver-volume-progress),
      var(--range-track-bg, rgba(20, 33, 61, 0.1)) var(--driver-volume-progress),
      var(--range-track-bg, rgba(20, 33, 61, 0.1)) 100%
    );
  box-shadow: inset 0 1px 2px rgba(20, 33, 61, 0.08);
}

.driver-settings-range-row input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -6px;
  border: 3px solid var(--range-thumb-border, #ffffff);
  border-radius: 999px;
  background: var(--range-thumb-bg, #14213d);
  box-shadow: var(--range-thumb-shadow, 0 4px 12px rgba(20, 33, 61, 0.22));
  appearance: none;
  -webkit-appearance: none;
}

.driver-settings-range-row input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow:
    var(--range-thumb-shadow, 0 4px 12px rgba(20, 33, 61, 0.22)),
    0 0 0 4px var(--control-focus, rgba(50, 103, 227, 0.14));
}

.driver-settings-range-row input[type="range"].driver-volume-boosted::-webkit-slider-runnable-track {
  background:
    linear-gradient(
      90deg,
      var(--range-fill, rgba(29, 53, 107, 0.9)) 0%,
      var(--range-fill, rgba(29, 53, 107, 0.9)) 50%,
      var(--range-fill-boost, rgba(255, 194, 61, 0.95)) 50%,
      var(--range-fill-boost, rgba(255, 194, 61, 0.95)) var(--driver-volume-progress),
      var(--range-track-bg, rgba(20, 33, 61, 0.1)) var(--driver-volume-progress),
      var(--range-track-bg, rgba(20, 33, 61, 0.1)) 100%
    );
}

.driver-settings-range-row input[type="range"]::-moz-range-track {
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--range-track-border, rgba(109, 126, 153, 0.18));
  background: var(--range-track-bg, rgba(20, 33, 61, 0.1));
  box-shadow: inset 0 1px 2px rgba(20, 33, 61, 0.08);
}

.driver-settings-range-row input[type="range"]::-moz-range-progress {
  height: 12px;
  border-radius: 999px;
  background: var(--range-fill, rgba(29, 53, 107, 0.9));
}

.driver-settings-range-row input[type="range"].driver-volume-boosted::-moz-range-progress {
  background: linear-gradient(90deg, var(--range-fill, rgba(29, 53, 107, 0.9)) 0%, var(--range-fill, rgba(29, 53, 107, 0.9)) 50%, var(--range-fill-boost, rgba(255, 194, 61, 0.95)) 50%, var(--range-fill-boost, rgba(255, 194, 61, 0.95)) 100%);
}

.driver-settings-range-row input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid var(--range-thumb-border, #ffffff);
  border-radius: 999px;
  background: var(--range-thumb-bg, #14213d);
  box-shadow: var(--range-thumb-shadow, 0 4px 12px rgba(20, 33, 61, 0.22));
}

.driver-settings-range-row input[type="range"]:focus-visible::-moz-range-thumb {
  box-shadow:
    var(--range-thumb-shadow, 0 4px 12px rgba(20, 33, 61, 0.22)),
    0 0 0 4px var(--control-focus, rgba(50, 103, 227, 0.14));
}

.driver-volume-number-input {
  width: 78px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--control-border, rgba(109, 126, 153, 0.28));
  border-radius: 10px;
  background: var(--control-bg, rgba(255, 255, 255, 0.9));
  color: var(--control-text, #14213d);
  font: inherit;
  font-weight: 700;
  text-align: center;
}

.driver-volume-number-input:focus {
  outline: 2px solid var(--control-focus, rgba(91, 133, 255, 0.3));
  border-color: var(--control-border-strong, rgba(91, 133, 255, 0.62));
}

.driver-settings-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.driver-settings-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.map-default-coordinates-field {
  display: grid;
  gap: 8px;
}

.map-default-coordinates-field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.map-default-coordinates-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.map-default-coordinates-inputs label {
  gap: 5px;
}

.map-default-coordinates-inputs label span {
  font-size: 0.72rem;
}

.driver-settings-help {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.driver-screensaver {
  --screensaver-shift-x: 0px;
  --screensaver-shift-y: 0px;
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(36, 47, 72, 0.2), transparent 42%),
    #020406;
  color: #eef3ff;
  pointer-events: auto;
  touch-action: none;
}

.driver-screensaver-content {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  transform: translate(var(--screensaver-shift-x), var(--screensaver-shift-y));
  transition: transform 4.8s ease-in-out;
  will-change: transform;
}

.driver-screensaver-driver {
  position: absolute;
  top: clamp(14px, 5vh, 44px);
  right: clamp(14px, 4vw, 44px);
  display: grid;
  gap: 4px;
  min-width: min(190px, 42vw);
  max-width: min(280px, 46vw);
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(238, 243, 255, 0.12);
  background:
    radial-gradient(circle at top left, rgba(140, 225, 155, 0.12), transparent 48%),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  text-align: right;
  transform: translate(var(--screensaver-shift-x), var(--screensaver-shift-y));
  transition: transform 4.8s ease-in-out;
  will-change: transform;
}

.driver-screensaver-driver strong {
  color: #f8fbff;
  font-size: clamp(1.5rem, 4vw, 2.45rem);
  line-height: 1;
  letter-spacing: 0.03em;
}

.driver-screensaver-driver span {
  color: rgba(238, 243, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-screensaver-summary {
  position: absolute;
  top: clamp(14px, 5vh, 44px);
  left: 50%;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: min(520px, calc(100vw - 32px));
  transform: translate(calc(-50% + var(--screensaver-shift-x)), var(--screensaver-shift-y));
  transition: transform 4.8s ease-in-out;
  will-change: transform;
}

.driver-screensaver-summary-card {
  display: grid;
  gap: 4px;
  min-width: min(190px, 44vw);
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(238, 243, 255, 0.12);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 61, 0.12), transparent 46%),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  text-align: center;
}

.driver-screensaver-summary-card span {
  color: rgba(238, 243, 255, 0.66);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.driver-screensaver-summary-card strong {
  color: #f8fbff;
  font-size: clamp(1.4rem, 4vw, 2.25rem);
  line-height: 1;
  letter-spacing: 0.03em;
}

@media (max-width: 520px) {
  .driver-screensaver-driver {
    top: clamp(82px, 13vh, 112px);
    right: 10px;
    min-width: 0;
    max-width: min(180px, 46vw);
    padding: 10px 12px;
    border-radius: 14px;
  }

  .driver-screensaver-driver span {
    font-size: 0.62rem;
    letter-spacing: 0.09em;
  }

  .driver-screensaver-summary {
    gap: 8px;
    width: calc(100vw - 20px);
  }

  .driver-screensaver-summary-card {
    min-width: 0;
    flex: 1 1 0;
    padding: 10px 12px;
    border-radius: 14px;
  }

  .driver-screensaver-summary-card span {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }
}

.driver-screensaver-content .eyebrow,
.driver-screensaver-content span {
  color: rgba(238, 243, 255, 0.7);
}

.driver-screensaver-content strong {
  font-size: clamp(2.8rem, 10vw, 5.6rem);
  line-height: 1;
  letter-spacing: 0.04em;
}

.driver-screensaver-ride {
  display: grid;
  gap: 8px;
  max-width: min(820px, 92vw);
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(238, 243, 255, 0.1);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.24);
}

.driver-screensaver-ride-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.driver-screensaver-ride-header span {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(140, 225, 155, 0.95);
}

.driver-screensaver-ride span {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-screensaver-ride strong {
  font-size: clamp(1.15rem, 3.3vw, 2rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  word-break: break-word;
}

.driver-screensaver-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.driver-screensaver-meta-row {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.driver-screensaver-meta-row strong {
  font-size: clamp(1rem, 2.8vw, 1.8rem);
  line-height: 1.15;
}

.driver-screensaver-fare {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.driver-screensaver-fare strong {
  font-size: clamp(1.05rem, 2.8vw, 1.7rem);
  line-height: 1.2;
}

.floating-window {
  position: fixed;
  z-index: 1;
  width: min(720px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 30px 90px rgba(20, 33, 61, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  backdrop-filter: var(--window-glass-filter);
  -webkit-backdrop-filter: var(--window-glass-filter);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

body.dispatch-theme-dark .floating-window,
body.dispatch-theme-midnight .floating-window,
body.dispatch-theme-space .floating-window {
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border-color: rgba(220, 230, 251, 0.18);
  box-shadow:
    0 32px 92px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .floating-window {
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border-color: rgba(255, 255, 255, 0.11);
  box-shadow:
    0 32px 92px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

body.dispatch-theme-fire .floating-window {
  background:
    linear-gradient(145deg, var(--window-glass-base-strong), var(--window-glass-base)),
    var(--window-glass-base);
  border-color: rgba(255, 190, 82, 0.48);
  box-shadow:
    0 34px 96px rgba(118, 18, 0, 0.46),
    inset 0 1px 0 rgba(255, 220, 128, 0.12);
}

.floating-window.window-opening {
  animation: floating-window-enter var(--ui-motion-duration) var(--ui-motion-ease);
}

.floating-window.missing {
  width: 360px;
}

.window-layer .ride-window-modal-backdrop {
  display: block;
  pointer-events: none;
  padding: 0;
  background: transparent;
  z-index: var(--ride-window-z, var(--z-floating-window-layer)) !important;
}

.ride-window-modal-card {
  position: fixed;
  z-index: 1;
  left: var(--ride-window-x, 80px);
  top: var(--ride-window-y, 110px);
  width: var(--ride-window-width, 720px);
  height: var(--ride-window-height, 620px);
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: var(--window-glass-filter);
  -webkit-backdrop-filter: var(--window-glass-filter);
}

.ride-window-modal-card.missing {
  width: min(440px, calc(100vw - 24px));
  height: auto;
}

.ride-window-modal-titlebar {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 16px;
  align-items: flex-start;
  border-radius: 18px 18px 0 0;
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
  cursor: move;
  user-select: none;
}

.ride-window-modal-titlebar h3 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.15;
}

.ride-window-modal-titlebar .muted {
  margin: 3px 0 0;
  color: var(--window-titlebar-muted);
}

.ride-window-modal-close {
  color: #fff;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.96), rgba(153, 27, 27, 0.92));
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.ride-window-modal-close:hover {
  color: #fff;
  background: linear-gradient(145deg, #ef4444, #991b1b);
  border-color: rgba(255, 255, 255, 0.62);
}

.ride-window-modal-body {
  padding: 14px;
}

.ride-window-modal-backdrop.ride-window-modal-opening {
  animation: ride-window-modal-backdrop-enter var(--ui-motion-duration) var(--ui-motion-ease);
}

.ride-window-modal-backdrop.ride-window-modal-opening .ride-window-modal-card {
  animation: ride-window-modal-card-enter var(--ui-motion-duration) var(--ui-motion-ease);
}

@keyframes ride-window-modal-backdrop-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ride-window-modal-card-enter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.975);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
  cursor: move;
  user-select: none;
}

.window-header span {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--window-titlebar-muted);
}

.window-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--window-titlebar-text);
  font-size: 1.2rem;
}

@keyframes floating-window-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.982);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-boot-loader,
  .app-boot-spinner,
  #auth-view,
  #app-view,
  #driver-auth-view,
  #driver-app-view,
  .dialog-backdrop,
  .dialog-card,
  .floating-window {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-boot-spinner {
    animation: app-boot-reduced-pulse 1.65s ease-in-out infinite !important;
  }
}

@keyframes app-boot-reduced-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

body.dispatch-theme-test .primary,
body.driver-page.driver-theme-test .primary {
  background: linear-gradient(135deg, #f7c84b, #d9aa2c);
  color: #2d2412;
}

body.dispatch-theme-test .dispatch-table th,
body.driver-page.driver-theme-test .dispatch-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

body.dispatch-theme-test .window-header,
body.driver-page.driver-theme-test .window-header {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-test .window-header span,
body.driver-page.driver-theme-test .window-header span {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-test .window-close,
body.driver-page.driver-theme-test .window-close {
  background: rgba(45, 36, 18, 0.12);
  color: #2d2412;
}

body.dispatch-theme-test .ride-window-modal-titlebar {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-test .ride-window-modal-titlebar .muted {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-test .ride-window-modal-close {
  background: rgba(45, 36, 18, 0.12);
  border-color: rgba(45, 36, 18, 0.32);
  color: #2d2412;
}

body.dispatch-theme-dark .window-header,
body.driver-page.driver-theme-dark .window-header {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-dark .window-header span,
body.driver-page.driver-theme-dark .window-header span {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-dark .window-close,
body.driver-page.driver-theme-dark .window-close {
  background: rgba(255, 255, 255, 0.1);
  color: #f4f7ff;
}

body.dispatch-theme-dark .ride-window-modal-titlebar {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-dark .ride-window-modal-titlebar .muted {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-midnight .window-header,
body.driver-page.driver-theme-midnight .window-header {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-midnight .window-header span,
body.driver-page.driver-theme-midnight .window-header span {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-midnight .window-close,
body.driver-page.driver-theme-midnight .window-close {
  background: rgba(255, 255, 255, 0.08);
  color: #fafafa;
}

body.dispatch-theme-midnight .ride-window-modal-titlebar {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-midnight .ride-window-modal-titlebar .muted {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-girly .window-header,
body.driver-page.driver-theme-girly .window-header {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-girly .window-header span,
body.driver-page.driver-theme-girly .window-header span {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-girly .window-close,
body.driver-page.driver-theme-girly .window-close {
  background: rgba(255, 255, 255, 0.18);
  color: #fff8ff;
}

body.dispatch-theme-girly .ride-window-modal-titlebar {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-girly .ride-window-modal-titlebar .muted {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-girly .ride-window-modal-close {
  background: rgba(81, 32, 61, 0.12);
  border-color: rgba(81, 32, 61, 0.32);
  color: #51203d;
}

body.dispatch-theme-space .window-header,
body.driver-page.driver-theme-space .window-header {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-space .window-header span,
body.driver-page.driver-theme-space .window-header span {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-space .window-close,
body.driver-page.driver-theme-space .window-close {
  background: rgba(158, 231, 255, 0.12);
  color: #f7fbff;
  border-color: rgba(225, 235, 255, 0.52);
}

body.dispatch-theme-space .ride-window-modal-titlebar {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-space .ride-window-modal-titlebar .muted {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-space .ride-window-modal-close {
  background: rgba(158, 231, 255, 0.12);
  border-color: rgba(225, 235, 255, 0.52);
  color: #f7fbff;
}

body.dispatch-theme-fire .ride-window-modal-titlebar {
  background: var(--window-titlebar-bg);
  color: var(--window-titlebar-text);
}

body.dispatch-theme-fire .ride-window-modal-titlebar .muted {
  color: var(--window-titlebar-muted);
}

body.dispatch-theme-test .ride-window-modal-titlebar .ride-window-modal-close,
body.dispatch-theme-dark .ride-window-modal-titlebar .ride-window-modal-close,
body.dispatch-theme-midnight .ride-window-modal-titlebar .ride-window-modal-close,
body.dispatch-theme-girly .ride-window-modal-titlebar .ride-window-modal-close,
body.dispatch-theme-space .ride-window-modal-titlebar .ride-window-modal-close,
body.dispatch-theme-fire .ride-window-modal-titlebar .ride-window-modal-close {
  color: #fff;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.96), rgba(153, 27, 27, 0.92));
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body.dispatch-theme-test .ride-window-modal-titlebar .ride-window-modal-close:hover,
body.dispatch-theme-dark .ride-window-modal-titlebar .ride-window-modal-close:hover,
body.dispatch-theme-midnight .ride-window-modal-titlebar .ride-window-modal-close:hover,
body.dispatch-theme-girly .ride-window-modal-titlebar .ride-window-modal-close:hover,
body.dispatch-theme-space .ride-window-modal-titlebar .ride-window-modal-close:hover,
body.dispatch-theme-fire .ride-window-modal-titlebar .ride-window-modal-close:hover {
  color: #fff;
  background: linear-gradient(145deg, #ef4444, #991b1b);
  border-color: rgba(255, 255, 255, 0.62);
}

.window-body {
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.window-resize {
	border:0;
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 5px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(20, 33, 61, 0.32) 43% 48%, transparent 49%),
    linear-gradient(135deg, transparent 0 62%, rgba(20, 33, 61, 0.28) 63% 68%, transparent 69%);
 opacity: 0.50;
}

.window-resize:hover {
  transform: none;
  opacity: 1;
}

.ride-window-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  flex: 1 1 auto;
  gap: 14px;
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.ride-window-content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding-right: 2px;
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.ride-window-bottom {
  flex: 0 0 auto;
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 2px;
  background: linear-gradient(180deg, var(--window-surface-soft), var(--window-surface-strong));
  backdrop-filter: var(--window-glass-filter-soft);
  -webkit-backdrop-filter: var(--window-glass-filter-soft);
}

.ride-window-top-grid {
  align-items: end;
}

.window-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.window-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.window-form-grid .full {
  grid-column: 1 / -1;
}

.ride-window-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(260px, 0.94fr);
  gap: 16px;
  align-items: start;
}

.ride-window-main-column {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ride-window-side-column {
  min-width: 0;
}

.ride-window-address-grid {
  display: grid;
  grid-template-columns: minmax(92px, 108px) minmax(0, 1.2fr) minmax(150px, 0.88fr);
  gap: 12px;
  align-items: start;
}

.ride-window-address-grid label,
.ride-window-main-column > label,
.ride-window-two-column label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.ride-window-establishment-field {
  grid-column: 1 / -1;
}

.inline-input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.clearable-input-field {
  position: relative;
  display: block;
}

.clearable-input-field input {
  width: 100%;
}

.inline-clear-button {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: none;
}

.inline-clear-button:hover:not(:disabled),
.inline-clear-button:focus-visible {
  background: rgba(20, 33, 61, 0.08);
  transform: translateY(-50%);
  box-shadow: none;
}

.inline-clear-button:active:not(:disabled) {
  transform: translateY(-50%) scale(0.94);
}

.establishment-save-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1rem;
}

.address-suggestion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.establishment-suggestion-delete-button {
  width: 42px;
  min-width: 42px;
  height: auto;
  border-radius: 14px;
  font-size: 1rem;
}

.establishment-inline-notice {
  margin-top: -4px;
}

.establishment-picker {
  grid-column: 1 / -1;
  position: static;
  margin-top: -4px;
}

.establishment-picker-panel {
  position: absolute;
  z-index: 1901;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  width: min(540px, calc(100vw - 20px));
  max-height: min(470px, calc(100dvh - 20px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--window-surface-strong);
  box-shadow: 0 20px 48px rgba(20, 33, 61, 0.18);
  overflow: hidden;
  pointer-events: auto;
}

.establishment-picker-panel.ride-window-floating-popover {
  position: fixed;
  margin: 0;
}

.establishment-picker-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 2px 6px;
  border-bottom: 1px solid var(--line);
}

.establishment-picker-header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.establishment-picker-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
}

.establishment-picker-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.establishment-picker-item {
  border: 1px solid rgba(52, 91, 183, 0.1);
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
}

.establishment-picker-panel:not(.driver-picker-panel) .establishment-picker-item {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 3px;
}

.establishment-picker-item > strong,
.establishment-picker-item > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.establishment-picker-item > strong {
  font-weight: 900;
  overflow-wrap: normal;
  word-break: normal;
}

.establishment-picker-panel:not(.driver-picker-panel) .establishment-picker-item > strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.15;
}

.establishment-picker-panel:not(.driver-picker-panel) .establishment-picker-item > span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.establishment-picker-item.is-active {
  border-color: rgba(52, 91, 183, 0.42);
  background: rgba(52, 91, 183, 0.13);
  box-shadow: inset 3px 0 0 rgba(52, 91, 183, 0.7);
}

.establishment-picker-empty {
  padding: 12px;
}

.establishment-picker-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.driver-picker-field {
  position: relative;
  display: block;
  width: 100%;
}

.driver-picker-input {
  width: 100%;
  padding-right: 44px;
}

.driver-picker-clear-button {
  right: 8px;
}

.reservation-clear-field input[type="datetime-local"] {
  background-image: none;
  padding-right: 42px;
}

.reservation-clear-button {
  right: 8px;
}

.driver-picker {
  position: static;
  margin-top: -4px;
}

.driver-picker-panel {
  width: min(520px, calc(100vw - 20px));
  max-height: min(430px, calc(100dvh - 20px));
}

.city-picker {
  grid-column: 1 / -1;
  position: static;
  margin-top: -4px;
}

.city-picker-panel {
  width: min(420px, calc(100vw - 20px));
  max-height: min(380px, calc(100dvh - 20px));
}

.city-picker-item.is-selected {
  border-color: rgba(24, 55, 100, 0.42);
  background: rgba(255, 212, 59, 0.16);
}

.driver-picker-list {
  gap: 6px;
}

.driver-picker-item {
  display: grid;
  gap: 4px;
  text-align: left;
}

.driver-picker-item.is-selected {
  border-color: rgba(24, 55, 100, 0.42);
  background: rgba(255, 212, 59, 0.16);
}

.driver-picker-main {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.driver-picker-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-picker-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.driver-picker-status-available,
.driver-picker-status-round_trip {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
}

.driver-picker-status-busy {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
}

.driver-picker-status-signal_loss {
  background: rgba(124, 58, 237, 0.13);
  color: #6d28d9;
}

.driver-picker-empty {
  border-radius: 12px;
}

.ride-window-civic-field input {
  text-align: center;
}

.ride-window-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ride-window-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ride-window-series-panel {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--control-border) 78%, rgba(23, 163, 145, 0.28));
  border-radius: 12px;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--control-bg-soft) 72%, rgba(23, 163, 145, 0.14)),
      color-mix(in srgb, var(--control-bg) 84%, rgba(247, 200, 75, 0.12))
    ),
    var(--control-bg);
  color: var(--control-text);
}

.ride-window-series-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.ride-window-series-toggle.has-series {
  border-color: color-mix(in srgb, var(--control-border-strong) 68%, rgba(23, 163, 145, 0.38));
  background: color-mix(in srgb, var(--control-bg-soft) 70%, rgba(23, 163, 145, 0.16));
  color: var(--control-text);
}

.ride-window-series-toggle strong {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--control-bg-soft);
  color: var(--control-text);
  font-size: 0.74rem;
}

.ride-window-series-name-field,
.ride-window-series-date-row label {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
}

.ride-window-series-name-field {
  width: min(100%, 340px);
}

.ride-window-series-date-row {
  display: grid;
  grid-template-columns: minmax(0, 180px) auto;
  justify-content: start;
  gap: 8px;
  align-items: end;
}

.ride-window-series-date-row label {
  width: min(100%, 180px);
}

.ride-window-series-date-row input[type="date"] {
  width: 100%;
}

.ride-window-series-add {
  min-height: 42px;
  padding-inline: 14px;
}

.ride-window-series-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ride-window-series-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 32px 5px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--control-border) 70%, transparent);
  background: color-mix(in srgb, var(--control-bg-soft) 74%, var(--control-bg-strong));
  color: var(--control-text);
  font-size: 0.8rem;
  font-weight: 900;
}

.ride-window-series-remove {
  right: 2px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  font-size: 1rem;
}

.ride-window-series-empty {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.ride-window-note-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ride-window-checkbox {
  display: inline-flex;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--control-border);
  border-radius: 12px;
  background: var(--control-bg-soft);
  color: var(--control-text);
  font-size: 0.88rem;
  font-weight: 800;
}

.ride-window-checkbox input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.ride-window-full {
  min-width: 0;
}

.ride-window-coordinates input[disabled] {
  background: rgba(20, 33, 61, 0.05);
  color: var(--muted);
}

.ride-window-map-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  background: linear-gradient(180deg, rgba(244, 247, 255, 0.95), rgba(232, 237, 249, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.ride-window-map-card.empty {
  min-height: 280px;
  align-items: center;
}

.ride-window-map-frame {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  background: #dfe7f7;
}

.ride-window-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.ride-window-map-loading {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  background:
    radial-gradient(circle at top left, rgba(50, 103, 227, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(244, 247, 255, 0.96), rgba(232, 237, 249, 0.92));
}

.ride-window-map-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 260px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(20, 33, 61, 0.2);
  background:
    radial-gradient(circle at top left, rgba(50, 103, 227, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(237, 241, 248, 0.92));
  text-align: center;
}

.ride-window-map-empty strong {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text);
}

.ride-window-map-empty span,
.ride-window-map-meta span {
  color: var(--muted);
  font-size: 0.82rem;
}

.ride-window-map-meta {
  display: grid;
  gap: 4px;
}

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

.ride-window-map-actions .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
}

.address-row {
  display: grid;
  grid-template-columns: minmax(88px, 118px) minmax(0, 1fr);
  gap: 12px;
}

.address-row label {
  min-width: 0;
}

.address-row .civic-field input {
  text-align: center;
}

.civic-field {
  position: relative;
}

.civic-field input.input-warning {
  border-color: rgba(184, 55, 47, 0.72);
  box-shadow: 0 0 0 3px rgba(184, 55, 47, 0.14);
  background: rgba(184, 55, 47, 0.04);
  padding-right: 34px;
}

.civic-warning {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 12;
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(184, 55, 47, 0.1);
  border: 1px solid rgba(184, 55, 47, 0.28);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.civic-warning-tooltip {
  position: fixed;
  z-index: 100000;
  width: min(260px, calc(100vw - 20px));
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(184, 55, 47, 0.22);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
}

.civic-warning-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.window-inline-hint,
.window-inline-warning {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.window-inline-hint {
  background: rgba(50, 103, 227, 0.08);
  color: var(--info);
}

.window-inline-warning {
  background: rgba(184, 55, 47, 0.12);
  color: var(--danger);
  border: 1px solid rgba(184, 55, 47, 0.18);
}

.address-suggestions {
  grid-column: 1 / -1;
  margin-top: -4px;
}

.address-suggestions.address-suggestions-popover {
  position: absolute;
  z-index: 1900;
  margin-top: 0;
  min-width: 240px;
  padding: 8px;
  border: 1px solid var(--window-border);
  border-radius: 14px;
  background: var(--window-surface-strong);
  box-shadow: 0 22px 58px rgba(20, 33, 61, 0.22);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.address-suggestions.address-suggestions-popover:empty {
  display: none;
}

.suggestion-list {
  display: grid;
  gap: 6px;
}

.address-suggestion {
  border: 0px;
  width: 100%;
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(20, 33, 61, 0.05);
  color: var(--text);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.address-suggestion.is-active {
  background: rgba(52, 91, 183, 0.13);
  box-shadow: inset 3px 0 0 rgba(52, 91, 183, 0.7);
}

.address-suggestion-copy {
  display: grid;
  min-width: 0;
}

.address-suggestion-copy strong,
.address-suggestion-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-suggestion-copy span,
.suggestion-hint,
.suggestion-attribution {
  color: var(--muted);
  font-size: 0.78rem;
}

.suggestion-attribution {
  margin-top: 6px;
}

.pull-refresh-indicator {
  position: fixed;
  left: 50%;
  top: max(8px, env(safe-area-inset-top, 0px));
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--window-border, rgba(219, 225, 234, 0.9));
  border-radius: 999px;
  background: var(--window-surface-strong, rgba(255, 255, 255, 0.96));
  color: var(--text, #152033);
  box-shadow:
    0 18px 46px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -72px, 0) scale(0.96);
  transition:
    opacity 160ms ease,
    transform 180ms cubic-bezier(0.19, 1, 0.22, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pull-refresh-indicator.is-visible {
  transition:
    opacity 80ms ease,
    transform 80ms ease;
}

.pull-refresh-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(52, 91, 183, 0.22);
  border-top-color: var(--primary, #193a75);
  border-radius: 999px;
  transition: transform 120ms ease, border-color 120ms ease;
}

.pull-refresh-indicator.is-armed .pull-refresh-spinner {
  transform: rotate(180deg);
  border-top-color: var(--success, #249760);
}

.pull-refresh-indicator.is-refreshing .pull-refresh-spinner {
  animation: pull-refresh-spin 0.75s linear infinite;
}

.pull-refresh-label {
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 800;
}

@keyframes pull-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.window-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20, 33, 61, 0.05);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.window-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge.available,
.badge.waiting {
  background: rgba(247, 200, 75, 0.18);
  color: #9a6300;
}

.badge.busy,
.badge.round_trip,
.badge.assigned,
.badge.in_progress {
  background: rgba(50, 103, 227, 0.12);
  color: var(--info);
}

.badge.round_trip {
  background: rgba(73, 184, 102, 0.18);
  color: #1f8d44;
}

.badge.offline,
.badge.completed {
  background: rgba(37, 111, 77, 0.14);
  color: var(--success);
}

.error {
  color: var(--danger);
  margin-top: 8px;
  min-height: 20px;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none;
}

#auth-view,
#app-view,
#driver-auth-view,
#driver-app-view,
#map-auth-view,
#map-app-view,
#maintenance-auth-view,
#maintenance-app-view {
  opacity: 1;
  transform: none;
  transition: opacity var(--ui-view-motion-duration) ease;
  will-change: opacity;
  position: relative;
  z-index: 0;
}

#auth-view.ui-opening,
#app-view.ui-opening,
#driver-auth-view.ui-opening,
#driver-app-view.ui-opening,
#map-auth-view.ui-opening,
#map-app-view.ui-opening,
#maintenance-auth-view.ui-opening,
#maintenance-app-view.ui-opening,
#auth-view.ui-closing,
#app-view.ui-closing,
#driver-auth-view.ui-closing,
#driver-app-view.ui-closing,
#map-auth-view.ui-closing,
#map-app-view.ui-closing,
#maintenance-auth-view.ui-closing,
#maintenance-app-view.ui-closing {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 1;
}

#auth-view.hidden,
#app-view.hidden,
#driver-auth-view.hidden,
#driver-app-view.hidden,
#map-auth-view.hidden,
#map-app-view.hidden,
#maintenance-auth-view.hidden,
#maintenance-app-view.hidden {
  display: none !important;
}

body.app-booting #auth-view,
body.app-booting #app-view,
body.app-booting #driver-auth-view,
body.app-booting #driver-app-view,
body.app-booting #map-auth-view,
body.app-booting #map-app-view,
body.app-booting #maintenance-auth-view,
body.app-booting #maintenance-app-view {
  visibility: hidden;
}

body.page-leaving .app-shell {
  opacity: 0;
  transform: translateY(10px) scale(0.992);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

html.map-page-entering body .app-shell {
  opacity: 0;
  transform: translateY(10px) scale(0.992);
}

html.map-page-entering body.page-enter-active .app-shell {
  opacity: 1;
  transform: none;
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

html.maintenance-page-entering body .app-shell {
  opacity: 0;
  transform: translateY(10px) scale(0.992);
}

html.maintenance-page-entering body.page-enter-active .app-shell {
  opacity: 1;
  transform: none;
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

.map-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(170px, 0.24fr);
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: clip;
  transition:
    grid-template-columns 240ms ease,
    gap 240ms ease;
}

.map-layout.map-side-collapsed {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.map-canvas-panel,
.map-side-panel {
  min-width: 0;
}

.map-canvas-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
}

.map-canvas {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 420px;
}

.map-side {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  transform: translateX(0);
  opacity: 1;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
  will-change: transform, opacity;
}

.map-layout.map-side-collapsed .map-side {
  position: absolute;
  top: 0;
  right: 0;
  width: min(280px, 30vw);
  max-width: calc(100vw - 24px);
  transform: translateX(calc(100% + 18px));
  opacity: 0;
  pointer-events: none;
}

.map-side-close,
.map-side-open {
  position: absolute;
  z-index: 520;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(91, 109, 138, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(8, 17, 36, 0.14);
  backdrop-filter: blur(4px);
}

.map-side-close {
  top: 8px;
  right: 8px;
}

.map-side-open {
  top: 14px;
  right: 14px;
}

.map-side-close span,
.map-side-open span {
  display: inline-flex;
  transform: translateY(-1px);
  color: #526077;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.map-side-open.hidden {
  display: none !important;
}

.map-context-menu {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 7px;
  min-width: 210px;
  padding: 10px;
  border: 1px solid rgba(20, 33, 61, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 54px rgba(8, 17, 36, 0.22);
  backdrop-filter: blur(4px);
}

.map-context-menu.hidden {
  display: none !important;
}

.map-context-menu-heading {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.map-context-menu-coordinates {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(20, 33, 61, 0.06);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.map-context-menu-button {
  justify-content: flex-start;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 11px;
  font-weight: 800;
}

.map-location-history-card {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  min-width: min(430px, calc(100vw - 24px));
  min-height: 310px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: none;
}

.map-draggable-dialog .dialog-card {
  transform: translate(var(--map-dialog-x, 0px), var(--map-dialog-y, 0px)) scale(1);
}

.dialog-backdrop.map-nonblocking-dialog {
  background: transparent;
  pointer-events: none;
}

.dialog-backdrop.map-nonblocking-dialog .dialog-card {
  pointer-events: auto;
}

#map-zone-editor-modal.map-nonblocking-dialog {
  align-items: flex-start;
  padding-top: clamp(6px, calc(7vh - 50px), 46px);
  padding-bottom: 16px;
}

.map-draggable-dialog.is-dragging .dialog-card {
  transition: none;
  user-select: none;
}

.map-draggable-dialog.is-resizing .dialog-card {
  transition: none;
  user-select: none;
}

.map-draggable-dialog .dialog-header {
  cursor: grab;
  user-select: none;
}

.map-draggable-dialog.is-dragging .dialog-header {
  cursor: grabbing;
}

.map-location-history-card .dialog-form {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.map-location-history-card .dialog-header {
  flex: 0 0 auto;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 58px 12px 16px !important;
  border-radius: 18px 18px 0 0 !important;
}

.map-location-history-card .dialog-header .modal-close-button {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
}

.map-location-history-body {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.map-location-history-body .dialog-actions {
  margin-top: auto;
  padding-right: 12px;
}

.map-settings-card {
  width: min(920px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#map-settings-form {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(360px, 1.08fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 0 18px 18px;
  overflow: hidden;
}

#map-settings-form > .dialog-header {
  grid-column: 1 / -1;
  margin: 0 -18px 0 !important;
}

#map-settings-form > .driver-settings-section {
  min-height: 0;
  overflow: hidden;
}

.map-settings-display-section {
  align-content: start;
  overflow-y: auto !important;
  padding-right: 14px;
}

.map-settings-zones-section {
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  align-content: stretch;
}

#map-settings-form .map-zones-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#map-settings-form .dialog-actions {
  grid-column: 1 / -1;
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .map-settings-card {
    width: min(560px, calc(100vw - 20px));
  }

  #map-settings-form {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    overflow-y: auto;
    padding: 0 14px 14px;
  }

  #map-settings-form > .dialog-header,
  #map-settings-form > .dialog-actions {
    grid-column: 1;
  }

  #map-settings-form > .dialog-header {
    margin-inline: -14px !important;
  }

  .map-settings-display-section,
  .map-settings-zones-section {
    overflow: visible !important;
  }

  #map-settings-form .map-zones-list {
    max-height: min(360px, 46dvh);
  }
}

.map-location-history-resize-grip {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  width: 18px;
  height: 18px;
  pointer-events: auto;
  touch-action: none;
  cursor: nwse-resize;
  border-radius: 5px;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(20, 33, 61, 0.34) 43% 48%, transparent 49%),
    linear-gradient(135deg, transparent 0 62%, rgba(20, 33, 61, 0.28) 63% 68%, transparent 69%);
  opacity: 0.72;
}

.map-history-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.map-history-filters label {
  min-width: 0;
}

.map-history-filters .map-history-ride-field,
.map-history-filters label:has(#map-history-ride) {
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
}

#map-history-ride {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#map-history-ride option {
  white-space: normal;
}

.map-history-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -2px;
}

.map-history-presets button {
  min-height: 36px;
  padding: 8px 12px;
  font-weight: 800;
}

.map-history-presets button.is-active {
  background: linear-gradient(135deg, rgba(29, 53, 107, 0.96), rgba(48, 83, 151, 0.9));
  color: #fff;
}

.map-history-timeline {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(29, 53, 107, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(238, 243, 251, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.map-history-timeline.hidden {
  display: none;
}

.map-history-timeline-header,
.map-history-timeline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-history-timeline-title {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#map-history-timeline-time,
#map-history-timeline-meta {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

#map-history-slider {
  width: 100%;
  accent-color: var(--range-fill, var(--accent));
}

.map-history-timeline-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.map-history-timeline-actions button {
  min-height: 34px;
  padding: 7px 12px;
  font-weight: 800;
}

.map-location-history-line {
  filter: drop-shadow(0 5px 10px rgba(29, 53, 107, 0.28));
}

.map-location-history-progress-line {
  filter: drop-shadow(0 4px 10px rgba(244, 173, 35, 0.35));
}

.map-side-panel .board-header,
.map-side-panel .map-legend,
.map-side-panel .map-list {
  padding-left: 12px;
  padding-right: 12px;
}

.map-legend {
  display: grid;
  gap: 6px;
  padding: 0 16px 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.map-legend-dot.ride,
.map-marker-ride {
  background: linear-gradient(135deg, #f6a000, #ffcf5a);
  color: #4d3300;
}

.map-legend-dot.ride-fresh,
.map-marker-ride-fresh {
  background: linear-gradient(135deg, #2fc95f 0%, #7fe36a 58%, #b8ef7a 100%);
  color: #1d4c14;
}

.map-legend-dot.ride-warm,
.map-marker-ride-warm {
  background: linear-gradient(135deg, #b8ef7a 0%, #ffe45c 52%, #ffd23f 100%);
  color: #5b4200;
}

.map-legend-dot.ride-stale,
.map-marker-ride-stale {
  background: linear-gradient(135deg, #ffd23f 0%, #ffa22c 52%, #ff7a18 100%);
  color: #4d3300;
}

.map-legend-dot.ride-old,
.map-marker-ride-old {
  background: linear-gradient(135deg, #ff7a18 0%, #ff3d1f 54%, #ff0000 100%);
  color: #ffffff;
}

.map-legend-dot.ride-critical,
.map-marker-ride-critical {
  background: rgb(255, 0, 0);
  color: #ffffff;
}

.map-legend-dot.available,
.map-marker-available {
  background: linear-gradient(135deg, #7fd63e, #b9ef68);
  color: #1f4300;
}

.map-legend-dot.unavailable,
.map-marker-unavailable {
  background: linear-gradient(135deg, #d7dce5, #f0f3f8);
  color: #435066;
}

.map-legend-dot.busy,
.map-marker-busy {
  background: linear-gradient(135deg, #55c9db, #9cecff);
  color: #083b4f;
}

.map-legend-dot.in_progress,
.map-marker-in_progress {
  background: linear-gradient(135deg, #064e3b, #0f766e);
  color: #ecfff5;
}

.map-legend-dot.round_trip,
.map-marker-round_trip {
  background: linear-gradient(135deg, #052e2b, #166534);
  color: #ecfff5;
}

.map-legend-dot.signal_loss,
.map-marker-signal_loss {
  background: linear-gradient(135deg, #9c63ee, #d0afff);
  color: #3e1577;
}

.map-list {
  display: grid;
  gap: 6px;
  padding: 0 16px 12px;
}

.map-list.empty {
  color: var(--muted);
  font-size: 0.84rem;
}

.map-list-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(20, 33, 61, 0.05);
}

.map-list-item strong {
  font-size: 0.8rem;
}

.map-list-item span {
  color: var(--muted);
  font-size: 0.75rem;
}

.map-ops-header {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 12px;
}

.map-ops-primary {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.map-ops-clock {
  display: grid;
  gap: 2px;
}

.map-ops-clock span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.map-ops-clock strong {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.map-ops-summary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.map-ops-actions {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.map-ops-actions .topbar-action-button {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
}

.map-ops-actions .topbar-png-button::after {
  inset: 2%;
}

.map-ops-actions .map-zones-button.is-zones-hidden::after {
  opacity: 0.64;
  filter: var(--topbar-button-icon-filter) saturate(0.72) contrast(0.96);
}

.map-ops-actions .toolbar-icon {
  width: 28px;
  height: 28px;
}

.map-zone-toggle-button .map-zone-toggle-slash {
  opacity: 0;
  transition: opacity 160ms ease;
}

.map-zone-toggle-button.is-zones-hidden {
  background: rgba(239, 68, 68, 0.1);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.14);
}

.map-zone-toggle-button.is-zones-hidden .map-zone-toggle-slash {
  opacity: 1;
}

.map-ops-card {
  min-width: 130px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(20, 33, 61, 0.06);
  border: 1px solid rgba(20, 33, 61, 0.08);
  display: grid;
  gap: 2px;
}

.map-ops-free-drivers-card {
  width: fit-content;
  max-width: min(720px, 58vw);
  min-width: 150px;
  padding: 8px 10px;
  align-content: start;
}

.map-ops-card-menu {
  position: relative;
  z-index: 35;
}

.map-ops-menu-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: -2px 0 0 -2px;
  padding: 2px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.map-ops-menu-trigger:hover,
.map-ops-menu-trigger:focus-visible,
.map-ops-menu-trigger[aria-expanded="true"] {
  background: rgba(20, 33, 61, 0.08);
  color: var(--text);
  outline: none;
}

.map-ops-jump-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 24px));
  max-height: min(420px, calc(100vh - 140px));
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(20, 33, 61, 0.14);
  box-shadow: 0 16px 34px rgba(20, 33, 61, 0.16);
  z-index: 1200;
}

.map-ops-jump-menu.hidden {
  display: none !important;
}

.map-ops-jump-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.map-ops-jump-list {
  display: grid;
  gap: 6px;
}

.map-ops-jump-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(20, 33, 61, 0.08);
  border-radius: 11px;
  background: rgba(20, 33, 61, 0.04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.map-ops-jump-item:hover,
.map-ops-jump-item:focus-visible {
  background: rgba(206, 239, 97, 0.26);
  border-color: rgba(114, 159, 14, 0.28);
  outline: none;
}

.map-ops-jump-item strong {
  font-size: 0.88rem;
}

.map-ops-jump-item span,
.map-ops-jump-empty {
  color: var(--muted);
  font-size: 0.78rem;
}

.map-ops-jump-empty {
  margin: 0;
}

body.dispatch-theme-dark .map-side-panel .board-header,
body.dispatch-theme-dark .map-side-panel .map-legend,
body.dispatch-theme-dark .map-side-panel .map-list,
body.dispatch-theme-dark .map-list-item,
body.dispatch-theme-dark .map-ops-card {
  color: var(--text);
}

body.dispatch-theme-dark .map-list-item {
  background: rgba(255, 255, 255, 0.04);
}

body.dispatch-theme-dark .map-ops-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(220, 230, 251, 0.08);
}

body.dispatch-theme-dark .map-side-close,
body.dispatch-theme-dark .map-side-open,
body.dispatch-theme-dark .map-context-menu,
body.dispatch-theme-dark .map-ops-jump-menu {
  border-color: rgba(220, 230, 251, 0.12);
  background: rgba(31, 44, 69, 0.9);
}

body.dispatch-theme-midnight .map-side-close,
body.dispatch-theme-midnight .map-side-open,
body.dispatch-theme-midnight .map-context-menu,
body.dispatch-theme-midnight .map-ops-jump-menu {
  border-color: rgba(220, 230, 251, 0.12);
  background: rgba(17, 23, 36, 0.88);
}

body.dispatch-theme-dark .map-side-close span,
body.dispatch-theme-dark .map-side-open span,
body.dispatch-theme-midnight .map-side-close span,
body.dispatch-theme-midnight .map-side-open span {
  color: #d7e0ef;
}

body.dispatch-theme-dark .map-context-menu-coordinates,
body.dispatch-theme-midnight .map-context-menu-coordinates {
  background: rgba(255, 255, 255, 0.06);
}

body.dispatch-theme-midnight .map-list-item {
  background: rgba(255, 255, 255, 0.025);
}

body.dispatch-theme-dark .map-ops-jump-item,
body.dispatch-theme-midnight .map-ops-jump-item {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-dark .map-ops-jump-item:hover,
body.dispatch-theme-dark .map-ops-jump-item:focus-visible,
body.dispatch-theme-midnight .map-ops-jump-item:hover,
body.dispatch-theme-midnight .map-ops-jump-item:focus-visible {
  background: rgba(206, 239, 97, 0.18);
  border-color: rgba(206, 239, 97, 0.26);
}

body.dispatch-theme-midnight .map-ops-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

body.dispatch-theme-midnight .map-side-panel .board-header,
body.dispatch-theme-midnight .map-side-panel .map-legend,
body.dispatch-theme-midnight .map-side-panel .map-list,
body.dispatch-theme-midnight .map-list-item,
body.dispatch-theme-midnight .map-ops-card,
body.dispatch-theme-midnight .map-ops-clock strong {
  color: var(--text);
}

body.dispatch-theme-midnight .leaflet-popup-content-wrapper {
  background: rgba(18, 19, 23, 0.98);
  color: var(--text);
}

body.dispatch-theme-midnight .leaflet-popup-tip {
  background: rgba(18, 19, 23, 0.98);
}

.map-ops-card span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.map-ops-card strong {
  font-size: 1rem;
}

.map-free-driver-strip {
  display: flex;
  flex-wrap: nowrap;
  align-content: flex-start;
  gap: 4px;
  min-height: 30px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.map-free-driver-strip .map-driver-tile {
  flex: 0 0 auto;
}

.map-free-driver-strip.empty {
  display: block;
  min-height: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.map-driver-tile {
  flex: 0 0 auto;
  min-width: 46px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 9px;
  border-color: rgba(179, 234, 36, 0.34);
  background: rgba(179, 234, 36, 0.22);
  color: #435800;
  gap: 0;
}

.map-driver-tile strong {
  font-size: 1.18rem;
  line-height: 1;
  letter-spacing: 0;
}

body.dispatch-theme-dark .map-driver-tile {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.26), rgba(185, 239, 104, 0.18));
  border-color: rgba(127, 214, 62, 0.28);
  color: #e9ffd4;
}

body.dispatch-theme-midnight .map-driver-tile {
  background: linear-gradient(135deg, rgba(127, 214, 62, 0.2), rgba(185, 239, 104, 0.12));
  border-color: rgba(127, 214, 62, 0.22);
  color: #efffdf;
}

.map-zones-list {
  display: grid;
  gap: 8px;
}

.map-zones-list.empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.map-zone-row {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(128, 145, 170, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
}

.map-zone-row span:not(.map-zone-swatch) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.map-zone-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.map-zone-draw-toolbar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 1800;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 10px 12px;
  border: 1px solid rgba(128, 145, 170, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(20, 33, 61, 0.18);
  transform: translateX(-50%);
}

.map-zone-draw-toolbar.hidden {
  display: none;
}

.map-zone-draw-toolbar span {
  color: var(--muted);
  white-space: nowrap;
}

.map-zone-drawing {
  cursor: crosshair;
}

.map-zone-editor-card {
  --dialog-card-padding: 0px;
  width: min(1020px, calc(100vw - 24px));
  min-height: min(620px, calc(100dvh - 24px));
  max-height: min(860px, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(248, 250, 252, 0.99)),
    #f8fafc;
  border-color: rgba(128, 145, 170, 0.34);
  box-shadow:
    0 26px 74px rgba(15, 23, 42, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.map-zone-editor-card::before {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 245, 249, 0.96)),
    #f8fafc;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.map-zone-editor-card > .dialog-header {
  flex: 0 0 auto;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 16px !important;
}

#map-zone-editor-modal.is-point-add-mode {
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(72px, 9vh, 118px) 16px 16px;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-card {
  width: min(360px, calc(100vw - 24px));
  min-height: auto;
  max-height: min(520px, calc(100dvh - 112px));
  overflow: hidden;
  opacity: 1;
}

#map-zone-editor-modal.is-point-add-mode .dialog-header {
  margin: 0 !important;
  padding: 10px 12px !important;
  border-radius: 18px 18px 0 0 !important;
}

#map-zone-editor-modal.is-point-add-mode .dialog-header h3 {
  font-size: 0.94rem;
}

#map-zone-editor-modal.is-point-add-mode .dialog-header .muted {
  display: none;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-list-panel,
#map-zone-editor-modal.is-point-add-mode .map-zone-points-list {
  display: none;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-form {
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-fields {
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-fields label:first-child {
  grid-column: 1 / -1;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-fields label {
  gap: 4px;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-fields label > span {
  font-size: 0.72rem;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-tools button {
  min-height: 36px;
  padding-inline: 10px;
}

#map-zone-editor-modal.is-point-add-mode .map-zone-editor-count {
  grid-column: 1 / -1;
  justify-self: end;
  margin-left: 0;
}

#map-zone-editor-modal.is-point-add-mode .dialog-actions {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}

#map-zone-editor-modal.is-point-add-mode #map-zone-delete-editor,
#map-zone-editor-modal.is-point-add-mode #map-zone-editor-close {
  display: none;
}

.map-zone-editor-layout {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  flex: 1 1 auto;
  gap: 16px;
  padding: 16px 18px 18px;
  min-height: 0;
  overflow: hidden;
}

.map-zone-editor-list-panel,
.map-zone-editor-form {
  border: 1px solid rgba(128, 145, 170, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.map-zone-editor-list-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

.map-zone-editor-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid rgba(128, 145, 170, 0.16);
}

.map-zone-editor-transfer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(128, 145, 170, 0.16);
}

.map-zone-import-file {
  display: none;
}

.map-zone-editor-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 10px;
}

.map-zone-editor-list-item {
  display: grid;
  grid-template-columns: 16px auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-color);
  text-align: left;
}

.map-zone-editor-list-item.active {
  border-color: rgba(28, 53, 100, 0.28);
  background: rgba(28, 53, 100, 0.08);
}

.map-zone-editor-list-item span:not(.map-zone-swatch) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.map-zone-editor-form {
  display: grid;
  grid-template-rows: max-content max-content minmax(0, 1fr) max-content max-content;
  align-content: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  gap: 14px;
  padding: 14px;
}

.map-zone-editor-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.5fr) 96px;
  gap: 12px;
}

.map-zone-editor-fields label {
  display: grid;
  gap: 6px;
}

.map-zone-color-field {
  min-width: 0;
}

.map-zone-color-picker {
  --map-zone-current-color: #1c3564;
  position: relative;
  display: grid;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 5px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(241, 245, 249, 0.72)),
    repeating-conic-gradient(rgba(148, 163, 184, 0.32) 0% 25%, rgba(255, 255, 255, 0.72) 0% 50%) 50% / 14px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 1px 2px rgba(15, 23, 42, 0.08);
  cursor: pointer;
}

.map-zone-color-picker:focus-within {
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

body.dispatch-theme-dark .map-zone-color-picker,
body.dispatch-theme-midnight .map-zone-color-picker {
  color-scheme: dark;
  border-color: rgba(226, 232, 240, 0.22);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.66)),
    repeating-conic-gradient(rgba(148, 163, 184, 0.18) 0% 25%, rgba(15, 23, 42, 0.42) 0% 50%) 50% / 14px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.26);
}

body.dispatch-theme-dark .map-zone-color-picker:hover,
body.dispatch-theme-midnight .map-zone-color-picker:hover {
  border-color: rgba(226, 232, 240, 0.34);
}

body.dispatch-theme-dark .map-zone-color-picker:focus-within,
body.dispatch-theme-midnight .map-zone-color-picker:focus-within {
  border-color: rgba(125, 170, 255, 0.72);
  box-shadow:
    0 0 0 3px rgba(80, 130, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.map-zone-color-swatch {
  display: block;
  width: 100%;
  min-height: 30px;
  border-radius: 8px;
  background: var(--map-zone-current-color);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset 0 0 0 999px rgba(255, 255, 255, 0.02),
    0 0 0 1px rgba(15, 23, 42, 0.2);
}

body.dispatch-theme-dark .map-zone-color-swatch,
body.dispatch-theme-midnight .map-zone-color-swatch {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(2, 6, 23, 0.14)),
    var(--map-zone-current-color);
  box-shadow:
    inset 0 0 0 1px rgba(248, 250, 252, 0.26),
    inset 0 -10px 18px rgba(2, 6, 23, 0.2),
    0 0 0 1px rgba(2, 6, 23, 0.58),
    0 8px 18px rgba(2, 6, 23, 0.24);
}

#map-zone-color {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.map-zone-editor-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.map-zone-editor-tools .active {
  border-color: rgba(37, 99, 235, 0.32);
  background: rgba(37, 99, 235, 0.1);
  color: #183b84;
}

.map-zone-editor-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
}

.map-zone-points-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(128, 145, 170, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.map-zone-point-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.map-zone-point-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.map-zone-editor-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.map-zone-editor-form #map-zone-editor-message {
  align-self: start;
  margin: 0;
  min-height: 0;
}

.map-zone-editor-form > .dialog-actions {
  display: flex;
  align-self: end;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  margin: 0;
}

.map-zone-editor-form > .dialog-actions button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 999px;
}

#map-zone-save-editor {
  min-width: 138px;
}

body.dispatch-theme-dark .map-zone-editor-card,
body.dispatch-theme-midnight .map-zone-editor-card,
body.dispatch-theme-space .map-zone-editor-card {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.94)),
    #0f172a;
  border-color: rgba(226, 232, 240, 0.18);
  box-shadow:
    0 26px 76px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.dispatch-theme-dark .map-zone-editor-card::before,
body.dispatch-theme-midnight .map-zone-editor-card::before,
body.dispatch-theme-space .map-zone-editor-card::before {
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96)),
    #0f172a;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.dispatch-theme-dark .map-zone-editor-list-panel,
body.dispatch-theme-dark .map-zone-editor-form,
body.dispatch-theme-midnight .map-zone-editor-list-panel,
body.dispatch-theme-midnight .map-zone-editor-form,
body.dispatch-theme-space .map-zone-editor-list-panel,
body.dispatch-theme-space .map-zone-editor-form {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

body.dispatch-theme-dark .map-zone-points-list,
body.dispatch-theme-midnight .map-zone-points-list,
body.dispatch-theme-space .map-zone-points-list {
  border-color: rgba(226, 232, 240, 0.14);
  background: rgba(2, 6, 23, 0.42);
}

body.dispatch-theme-dark .map-zone-point-row,
body.dispatch-theme-midnight .map-zone-point-row,
body.dispatch-theme-space .map-zone-point-row {
  background: rgba(15, 23, 42, 0.9);
}

.map-zone-vertex-marker {
  display: grid;
  place-items: center;
}

.map-zone-vertex-marker span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #1c3564;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(22, 34, 56, 0.28);
}

@media (max-width: 760px) {
  #map-zone-editor-modal.is-point-add-mode {
    justify-content: center;
    padding: 10px;
  }

  #map-zone-editor-modal.is-point-add-mode .map-zone-editor-card {
    width: min(360px, calc(100vw - 20px));
    max-height: min(460px, calc(100dvh - 92px));
  }

  .map-zone-editor-layout {
    grid-template-columns: 1fr;
  }

  .map-zone-editor-fields {
    grid-template-columns: 1fr;
  }
}

.driver-location-map-card {
  width: min(720px, calc(100vw - 32px));
}

.driver-location-map-canvas {
  width: 100%;
  height: min(460px, 58vh);
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(128, 145, 170, 0.22);
  border-radius: 18px;
  background: #eef3f9;
}

.map-marker-wrapper {
  background: transparent;
  border: 0;
  overflow: visible !important;
}

.map-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(8, 17, 36, 0.18);
  isolation: isolate;
}

.map-marker-number {
  position: relative;
  z-index: 2;
  line-height: 1;
}

.map-car-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 25px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 18px rgba(8, 17, 36, 0.16);
}

.map-car-icon {
  font-size: 1.5rem;
  line-height: 1;
  transform: translateY(-1px);
}

.map-car-number {
  position: absolute;
  right: -6px;
  top: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  background: #13213d;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(8, 17, 36, 0.18);
}

.map-car-marker-available {
  background: linear-gradient(135deg, #7fd63e, #b9ef68);
  color: #1f4300;
}

.map-car-marker-unavailable {
  background: linear-gradient(135deg, #d7dce5, #f0f3f8);
  color: #435066;
}

.map-car-marker-busy {
  background: linear-gradient(135deg, #55c9db, #9cecff);
  color: #083b4f;
}

.map-car-marker-in_progress {
  background: linear-gradient(135deg, #064e3b, #0f766e);
  color: #ecfff5;
  box-shadow:
    0 10px 24px rgba(8, 17, 36, 0.24),
    0 0 0 4px rgba(6, 95, 70, 0.16);
}

.map-car-marker-round_trip {
  background: linear-gradient(135deg, #052e2b, #166534);
  color: #ecfff5;
  box-shadow:
    0 10px 24px rgba(8, 17, 36, 0.24),
    0 0 0 4px rgba(22, 101, 52, 0.18);
}

.map-car-marker-offline {
  background: linear-gradient(135deg, #d0d4dc, #e8ebf0);
  color: #586172;
}

.map-car-marker-signal_loss {
  background: linear-gradient(135deg, #9c63ee, #d0afff);
  color: #3e1577;
}

.map-popup {
  display: grid;
  gap: 4px;
  min-width: 190px;
  font-size: 0.83rem;
}

.map-call-leaflet-popup .leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 33, 61, 0.12);
  box-shadow: 0 18px 34px rgba(8, 17, 36, 0.18);
}

.map-call-leaflet-popup .leaflet-popup-content {
  margin: 0;
}

.map-call-popup {
  --map-call-accent: #2fc95f;
  --map-call-tint: rgba(47, 201, 95, 0.14);
  display: grid;
  gap: 4px;
  min-width: 214px;
  max-width: min(300px, 72vw);
  padding: 10px 12px 10px 14px;
  border-left: 4px solid var(--map-call-accent);
  background:
    linear-gradient(90deg, var(--map-call-tint), rgba(255, 255, 255, 0.98) 34%),
    rgba(255, 255, 255, 0.98);
  color: #14213d;
}

.map-call-popup.is-age-warm {
  --map-call-accent: #ffd23f;
  --map-call-tint: rgba(255, 226, 92, 0.2);
}

.map-call-popup.is-age-stale {
  --map-call-accent: #ff7a18;
  --map-call-tint: rgba(255, 122, 24, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.14);
}

.map-call-popup.is-age-old,
.map-call-popup.is-age-critical,
.map-call-popup.is-burning {
  --map-call-accent: #ff3d1f;
  --map-call-tint: rgba(255, 61, 31, 0.2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 61, 31, 0.22),
    0 0 18px rgba(255, 61, 31, 0.18);
}

.map-call-popup.is-burning {
  animation: map-call-popup-pulse 1.15s ease-in-out infinite alternate;
}

.map-call-popup-title,
.map-call-popup-main {
  font-weight: 900;
}

.map-call-popup-main,
.map-call-popup-address {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-call-popup-address {
  color: rgba(20, 33, 61, 0.78);
}

.map-call-popup-age-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.map-call-popup-age-row > span:first-child {
  color: #5f6f89;
  font-weight: 800;
}

.map-call-age-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 950;
  line-height: 1.15;
  white-space: nowrap;
}

.map-call-age-pill.is-fresh {
  background: linear-gradient(135deg, rgba(47, 201, 95, 0.2) 0%, rgba(127, 227, 106, 0.24) 58%, rgba(184, 239, 122, 0.28) 100%);
  color: #1d4c14;
}

.map-call-age-pill.is-warm {
  background: linear-gradient(135deg, rgba(184, 239, 122, 0.22) 0%, rgba(255, 228, 92, 0.28) 52%, rgba(255, 210, 63, 0.3) 100%);
  color: #5b4200;
}

.map-call-age-pill.is-stale {
  background: linear-gradient(135deg, rgba(255, 210, 63, 0.28) 0%, rgba(255, 162, 44, 0.3) 52%, rgba(255, 122, 24, 0.32) 100%);
  color: #7a3200;
}

.map-call-age-pill.is-old,
.map-call-age-pill.is-critical {
  background: linear-gradient(135deg, #ff7a18 0%, #ff3d1f 54%, #ff0000 100%);
  color: #ffffff;
}

.map-marker-ride.is-age-old,
.map-marker-ride.is-age-critical,
.map-marker-ride.is-burning {
  box-shadow:
    0 10px 24px rgba(8, 17, 36, 0.18),
    0 0 0 3px rgba(255, 61, 31, 0.1),
    0 0 14px rgba(255, 61, 31, 0.24);
}

.map-marker-ride.is-burning::before,
.map-marker-ride.is-burning::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

.map-marker-ride.is-burning::before {
  background:
    radial-gradient(circle, rgba(255, 241, 126, 0.34) 0 24%, rgba(255, 122, 24, 0.22) 43%, rgba(255, 61, 31, 0.08) 62%, transparent 76%);
  filter: blur(4px);
}

.map-marker-ride.is-burning::after {
  inset: -8px;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(255, 236, 116, 0.34) 0 22%, rgba(255, 122, 24, 0.22) 38%, rgba(255, 61, 31, 0.08) 56%, transparent 72%);
  filter: blur(4px);
  opacity: 0.58;
  transform-origin: 50% 50%;
}

.map-marker-ride.is-burning {
  animation: map-call-marker-pulse 1.05s ease-in-out infinite alternate;
}

.map-marker-ride.is-burning::before {
  animation: map-call-burning-glow 1.05s ease-in-out infinite alternate;
}

.map-marker-ride.is-burning::after {
  animation: map-call-burning-flare 1.8s ease-in-out infinite;
}

body.dispatch-theme-dark .map-call-popup,
body.dispatch-theme-midnight .map-call-popup,
body.dispatch-theme-space .map-call-popup,
body.dispatch-theme-fire .map-call-popup {
  background:
    linear-gradient(90deg, var(--map-call-tint), rgba(18, 25, 43, 0.96) 36%),
    rgba(18, 25, 43, 0.96);
  color: var(--text);
}

body.dispatch-theme-fire .map-call-popup {
  background:
    linear-gradient(90deg, var(--map-call-tint), rgba(79, 14, 2, 0.96) 36%),
    rgba(79, 14, 2, 0.96);
}

body.dispatch-theme-dark .map-call-popup-address,
body.dispatch-theme-midnight .map-call-popup-address,
body.dispatch-theme-space .map-call-popup-address,
body.dispatch-theme-fire .map-call-popup-address {
  color: rgba(230, 238, 255, 0.78);
}

body.dispatch-theme-dark .map-call-popup-age-row > span:first-child,
body.dispatch-theme-midnight .map-call-popup-age-row > span:first-child,
body.dispatch-theme-space .map-call-popup-age-row > span:first-child,
body.dispatch-theme-fire .map-call-popup-age-row > span:first-child {
  color: rgba(230, 238, 255, 0.72);
}

body.dispatch-theme-dark .map-call-leaflet-popup .leaflet-popup-tip,
body.dispatch-theme-midnight .map-call-leaflet-popup .leaflet-popup-tip,
body.dispatch-theme-space .map-call-leaflet-popup .leaflet-popup-tip {
  background: rgba(18, 25, 43, 0.96);
}

body.dispatch-theme-fire .map-call-leaflet-popup .leaflet-popup-tip {
  background: rgba(79, 14, 2, 0.96);
}

@keyframes map-call-popup-pulse {
  from {
    box-shadow:
      inset 0 0 0 1px rgba(255, 61, 31, 0.2),
      0 0 14px rgba(255, 61, 31, 0.16);
  }
  to {
    box-shadow:
      inset 0 0 0 1px rgba(255, 61, 31, 0.32),
      0 0 24px rgba(255, 61, 31, 0.28);
  }
}

@keyframes map-call-marker-pulse {
  from {
    transform: scale(1);
    box-shadow:
      0 10px 24px rgba(8, 17, 36, 0.18),
      0 0 0 2px rgba(255, 61, 31, 0.08),
      0 0 10px rgba(255, 61, 31, 0.2);
  }
  to {
    transform: scale(1.035);
    box-shadow:
      0 11px 25px rgba(8, 17, 36, 0.2),
      0 0 0 4px rgba(255, 61, 31, 0.11),
      0 0 16px rgba(255, 61, 31, 0.28);
  }
}

@keyframes map-call-burning-glow {
  from {
    opacity: 0.42;
    transform: scale(0.94);
  }
  to {
    opacity: 0.76;
    transform: scale(1.07);
  }
}

@keyframes map-call-burning-flare {
  0% {
    opacity: 0.28;
    transform: translateY(1px) scale(0.94);
  }
  50% {
    opacity: 0.58;
    transform: translateY(1px) scale(1.04);
  }
  100% {
    opacity: 0.32;
    transform: translateY(1px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-call-popup.is-burning,
  .map-marker-ride.is-burning,
  .map-marker-ride.is-burning::before,
  .map-marker-ride.is-burning::after {
    animation: none;
  }
}

.map-popup-warning {
  margin-top: 2px;
  color: #92400e;
  font-weight: 800;
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
}

.leaflet-container {
  font: inherit;
}

.leaflet-container .leaflet-tile {
  border: 0 !important;
  outline: 1px solid transparent;
}

body.app-resolution-scaled .leaflet-container .leaflet-tile {
  width: 257px !important;
  height: 257px !important;
}

body.map-fullscreen-active {
  overflow: hidden;
}

body.maintenance-fullscreen-active {
  overflow: hidden;
}

body.dispatch-fullscreen-active {
  overflow: hidden;
}

.app-shell:fullscreen {
  width: 100%;
  min-height: 100vh;
  padding: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.22), transparent 22%),
    radial-gradient(circle at bottom right, rgba(50, 103, 227, 0.14), transparent 28%),
    linear-gradient(160deg, #eef3f8, #f8fafc 45%, #eef2f7);
}

.app-shell:fullscreen::backdrop {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.22), transparent 22%),
    radial-gradient(circle at bottom right, rgba(50, 103, 227, 0.14), transparent 28%),
    linear-gradient(160deg, #eef3f8, #f8fafc 45%, #eef2f7);
}

body.dispatch-fullscreen-active .app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.22), transparent 22%),
    radial-gradient(circle at bottom right, rgba(50, 103, 227, 0.14), transparent 28%),
    linear-gradient(160deg, #eef3f8, #f8fafc 45%, #eef2f7);
}

body.dispatch-fullscreen-active.app-resolution-scaled .app-shell {
  width: min(1920px, calc((100% - 12px) / var(--app-scale-width-factor)));
  min-height: calc((100vh - 8px) / var(--app-scale-active));
  min-height: calc((100dvh - 8px) / var(--app-scale-active));
}

body.dispatch-fullscreen-active.app-resolution-scale-zoom .app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body.dispatch-fullscreen-active.dispatch-theme-dark:not(.driver-page) .app-shell {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.dispatch-fullscreen-active.dispatch-theme-test:not(.driver-page) .app-shell {
  background:
    radial-gradient(circle at top left, rgba(255, 211, 119, 0.08), transparent 22%),
    radial-gradient(circle at bottom right, rgba(72, 122, 247, 0.12), transparent 28%),
    linear-gradient(160deg, #141925, #1a2130 45%, #121824);
}

body.dispatch-fullscreen-active.dispatch-theme-midnight:not(.driver-page) .app-shell {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.dispatch-fullscreen-active.dispatch-theme-girly:not(.driver-page) .app-shell {
  background:
    radial-gradient(circle at top left, rgba(255, 200, 235, 0.55), transparent 23%),
    radial-gradient(circle at top right, rgba(203, 183, 255, 0.32), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 233, 161, 0.28), transparent 24%),
    linear-gradient(160deg, #fff5fb, #fff9fd 48%, #fef1fb);
}

body.dispatch-fullscreen-active.dispatch-theme-space:not(.driver-page) .app-shell {
  background:
    radial-gradient(circle at 18% 18%, rgba(84, 190, 255, 0.28), transparent 18%),
    radial-gradient(circle at 78% 14%, rgba(155, 115, 255, 0.34), transparent 22%),
    radial-gradient(circle at 52% 112%, rgba(45, 255, 214, 0.16), transparent 28%),
    linear-gradient(160deg, #050816 0%, #0d1230 42%, #111a3f 68%, #060817 100%);
}

body.map-fullscreen-active .app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.map-fullscreen-active #map-app-view {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  padding: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(120, 160, 215, 0.16), transparent 42%),
    linear-gradient(180deg, #edf3ff 0%, #f6f8fc 56%, #edf1f7 100%);
}

body.map-fullscreen-active.dispatch-theme-dark #map-app-view {
  background:
    radial-gradient(circle at top, rgba(247, 200, 75, 0.08), transparent 40%),
    linear-gradient(180deg, #192840 0%, #213250 52%, #17243a 100%);
}

body.map-fullscreen-active.dispatch-theme-test #map-app-view {
  background:
    radial-gradient(circle at top, rgba(255, 211, 119, 0.08), transparent 40%),
    linear-gradient(180deg, #1b2230 0%, #222b3a 52%, #1a2230 100%);
}

body.map-fullscreen-active.dispatch-theme-midnight #map-app-view {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 40%),
    linear-gradient(180deg, #0a0b0d 0%, #101114 52%, #090a0c 100%);
}

body.map-fullscreen-active.dispatch-theme-girly #map-app-view {
  background:
    radial-gradient(circle at top, rgba(255, 214, 238, 0.5), transparent 40%),
    linear-gradient(180deg, #fff6fb 0%, #fff9fd 56%, #fef0fb 100%);
}

body.map-fullscreen-active.dispatch-theme-space #map-app-view {
  background:
    radial-gradient(circle at top, rgba(158, 231, 255, 0.14), transparent 40%),
    radial-gradient(circle at 82% 10%, rgba(143, 108, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #050816 0%, #0d1230 52%, #060817 100%);
}

body.map-fullscreen-active .topbar {
  display: none;
}

body.map-fullscreen-active .map-layout {
  grid-template-columns: minmax(0, 1fr) minmax(168px, 0.18fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
}

body.map-fullscreen-active .map-layout.map-side-collapsed {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

body.map-fullscreen-active .map-canvas-panel {
  height: 100%;
  min-height: 0;
}

body.map-fullscreen-active .map-canvas {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

body.map-fullscreen-active .map-side {
  gap: 8px;
}

body.map-fullscreen-active .map-layout.map-side-collapsed .map-side {
  width: min(260px, 28vw);
}

body.map-fullscreen-active .map-side-panel .board-header,
body.map-fullscreen-active .map-side-panel .map-legend,
body.map-fullscreen-active .map-side-panel .map-list {
  padding-left: 10px;
  padding-right: 10px;
}

body.map-fullscreen-active .map-side-panel .board-header {
  padding-bottom: 8px;
}

body.map-fullscreen-active .map-legend,
body.map-fullscreen-active .map-list {
  font-size: 0.74rem;
}

body.maintenance-fullscreen-active .app-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.maintenance-fullscreen-active #maintenance-app-view {
  min-height: 100vh;
  padding: 10px;
  background:
    radial-gradient(circle at top, rgba(120, 160, 215, 0.16), transparent 42%),
    linear-gradient(180deg, #edf3ff 0%, #f6f8fc 56%, #edf1f7 100%);
}

body.maintenance-fullscreen-active.dispatch-theme-dark #maintenance-app-view {
  background:
    radial-gradient(circle at top, rgba(247, 200, 75, 0.08), transparent 40%),
    linear-gradient(180deg, #192840 0%, #213250 52%, #17243a 100%);
}

body.maintenance-fullscreen-active.dispatch-theme-test #maintenance-app-view {
  background:
    radial-gradient(circle at top, rgba(255, 211, 119, 0.08), transparent 40%),
    linear-gradient(180deg, #1b2230 0%, #222b3a 52%, #1a2230 100%);
}

body.maintenance-fullscreen-active.dispatch-theme-midnight #maintenance-app-view {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 40%),
    linear-gradient(180deg, #0a0b0d 0%, #101114 52%, #090a0c 100%);
}

body.maintenance-fullscreen-active.dispatch-theme-girly #maintenance-app-view {
  background:
    radial-gradient(circle at top, rgba(255, 214, 238, 0.5), transparent 40%),
    linear-gradient(180deg, #fff6fb 0%, #fff9fd 56%, #fef0fb 100%);
}

body.maintenance-fullscreen-active.dispatch-theme-space #maintenance-app-view {
  background:
    radial-gradient(circle at top, rgba(158, 231, 255, 0.14), transparent 40%),
    radial-gradient(circle at 82% 10%, rgba(143, 108, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #050816 0%, #0d1230 52%, #060817 100%);
}

body.maintenance-fullscreen-active .maintenance-layout {
  min-height: calc(100vh - 108px);
}

body.maintenance-fullscreen-active .maintenance-table-panel {
  min-height: calc(100vh - 270px);
}

@media (max-width: 1100px) {
  .dispatch-layout,
  .auth-layout,
  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    height: 56vh;
    min-height: 360px;
  }

  .map-ops-header {
    display: grid;
    justify-content: stretch;
  }

  .map-ops-primary {
    justify-content: flex-start;
  }

  .map-ops-free-drivers-card {
    width: fit-content;
    max-width: min(100%, 96vw);
  }

  .map-ops-summary {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .app-shell {
    width: min(100%, calc(100% - 10px));
    padding: 6px 0 10px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .connected-drivers-panel {
    width: 100%;
  }

  .stat {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .stat strong {
    font-size: 1.35rem;
  }

  .left-column {
    grid-template-rows: auto;
  }

  .table-wrap,
  .future-wrap,
  .assigned-wrap,
  .assigned-panel {
    max-height: none;
    min-height: 0;
  }

  .assigned-panel {
    min-height: 0;
  }

  .topbar {
    align-items: stretch;
    gap: 12px;
    margin-bottom: 10px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .clock-chip,
  .user-chip {
    min-width: 132px;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .eyebrow {
    margin-bottom: 6px;
    font-size: 0.66rem;
  }

  h1 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
  }

  h2 {
    font-size: 1.35rem;
  }

  .board-panel {
    border-radius: 16px;
  }

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

  .driver-empty-state,
  .driver-ride-card {
    padding: 18px;
    border-radius: 18px;
  }

  .driver-ride-card {
    gap: 14px;
  }

  .driver-ride-header h2 {
    font-size: clamp(1.45rem, 3vw, 2.1rem);
  }

  .driver-ride-details div {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .driver-fare-editor input {
    width: 92px;
  }

  .window-shell {
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
  }
}

@media (max-width: 1024px) {
  body.dispatch-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body.dispatch-page .app-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.dispatch-page #auth-view {
    flex: 0 0 auto;
    min-height: auto;
  }

  body.dispatch-page.dispatch-app-active #app-view,
  body.dispatch-page.dispatch-app-active #app-view > main {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  body.dispatch-page.dispatch-app-active .dispatch-layout {
    min-height: auto;
  }

  .driver-mobile-tabs {
    display: inline-flex !important;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .driver-mobile-tabs {
    display: inline-flex !important;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
  }
}

@media (pointer: coarse) and (orientation: landscape) and (max-height: 760px),
  (hover: none) and (orientation: landscape) and (max-height: 760px) {
  body.driver-page .driver-mobile-tabs {
    display: inline-flex !important;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
  }

  body.driver-page .driver-layout {
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.driver-page .driver-current-card,
  body.driver-page #driver-history-panel,
  body.driver-page #driver-settlement-panel {
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.driver-page #driver-history-panel,
  body.driver-page #driver-settlement-panel {
    display: flex;
    flex-direction: column;
  }

  body.driver-page #driver-history-panel .table-wrap,
  body.driver-page #driver-settlement-panel .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1024px) and (orientation: portrait) {
  body.driver-page .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 46px;
    gap: 6px;
    margin-bottom: 0;
    align-items: stretch;
  }

  body.driver-page .topbar-actions {
    display: contents;
  }

  body.driver-page #driver-location-summary {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body.driver-page .driver-topbar-overview {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  body.driver-page #driver-settings {
    grid-column: 3;
    grid-row: 1;
    width: 46px;
    min-width: 46px;
    justify-self: end;
    align-self: stretch;
  }

  body.driver-page .driver-metric-chip {
    min-width: 92px;
    padding: 6px 10px;
    border-radius: 10px;
    gap: 1px;
    box-shadow: 0 8px 16px rgba(20, 33, 61, 0.06);
  }

  body.driver-page .driver-metric-chip span {
    font-size: 0.56rem;
    letter-spacing: 0.07em;
  }

  body.driver-page .driver-metric-chip strong {
    font-size: 0.92rem;
    line-height: 1;
  }

  body.driver-page .driver-queue-popover {
    left: 0;
    right: auto;
    min-width: 200px;
    max-width: min(250px, 78vw);
    padding: 10px;
  }

  body.driver-page .driver-queue-item {
    font-size: 0.84rem;
    gap: 6px;
  }

  body.driver-page .clock-chip,
  body.driver-page .user-chip {
    min-width: 0;
    gap: 2px;
    padding: 6px 10px;
    border-radius: 10px;
  }

  body.driver-page .clock-chip span,
  body.driver-page .user-chip span {
    font-size: 0.6rem;
    letter-spacing: 0.07em;
  }

  body.driver-page .clock-chip strong,
  body.driver-page .user-chip strong {
    font-size: 0.95rem;
    line-height: 1.05;
  }

  body.driver-page .clock-chip {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  body.driver-page .user-chip {
    grid-column: 2 / 4;
    grid-row: 2;
    width: 100%;
  }

  body.driver-page #driver-fullscreen {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
  }

  body.driver-page #driver-panic-button {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
    min-width: 0;
  }

body.driver-page #driver-logout {
  grid-column: 3;
  grid-row: 3;
  width: 100%;
    min-height: 34px;
    padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.92rem;
}

body.driver-page:not(.driver-theme-dark):not(.driver-theme-midnight) #driver-logout {
  color: #8e221d;
  background: rgba(184, 55, 47, 0.12);
  border-color: rgba(184, 55, 47, 0.2);
}

  body.driver-page .driver-location-compact {
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 10px;
  }

  body.driver-page .driver-location-compact-text span {
    font-size: 0.56rem;
  }

  body.driver-page .driver-location-compact-text strong {
    font-size: 0.78rem;
  }

  body.driver-page .driver-mobile-tabs {
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
  }

  body.driver-page .driver-mobile-tabs .tab-button {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.92rem;
  }

  body.driver-page .driver-current-card,
  body.driver-page .driver-empty-state,
  body.driver-page .driver-ride-card {
    padding: 14px;
    border-radius: 16px;
  }

  body.driver-page .driver-ride-card {
    gap: 10px;
  }

  body.driver-page .driver-ride-header {
    gap: 10px;
    align-items: start;
  }

  body.driver-page .driver-ride-header-meta {
    gap: 6px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
  }

  body.driver-page .driver-ride-header h2 {
    font-size: clamp(1.15rem, 5vw, 1.7rem);
    line-height: 1;
  }

  body.driver-page .driver-ride-status {
    font-size: clamp(1.05rem, 4.8vw, 1.55rem);
  }

  body.driver-page .driver-ride-status-row {
    gap: 12px;
  }

  body.driver-page .driver-card-panic-button {
    min-width: 80px;
    min-height: 45px;
    padding: 8px 14px;
    font-size: 0.98rem;
  }

  body.driver-page .driver-ride-time-pill {
    min-width: 84px;
    height: 42px;
    padding: 6px 10px;
    font-size: 0.9rem;
    box-sizing: border-box;
  }

  body.driver-page .driver-active-timer-block {
    min-width: 96px;
    height: 42px;
    padding: 6px 10px;
    border-radius: 999px;
    gap: 3px;
  }

  body.driver-page .driver-active-timer-block span,
  body.driver-page .driver-active-timer-block strong {
    line-height: 1;
  }

  body.driver-page .driver-active-timer-block span {
    font-size: 0.64rem;
  }

  body.driver-page .driver-active-timer-block strong {
    font-size: 0.95rem;
  }

  body.driver-page .driver-ride-details {
    gap: 8px;
  }

  body.driver-page .driver-ride-details div {
    padding: 10px 12px;
    border-radius: 12px;
  }

  body.driver-page .driver-ride-details span {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  body.driver-page .driver-fare-editor,
  body.driver-page .driver-map-links,
  body.driver-page .driver-payment-actions,
  body.driver-page .driver-actions {
    gap: 6px;
  }

  body.driver-page .driver-fare-editor input {
    min-height: 38px;
    padding: 8px 10px;
  }

  body.driver-page .driver-fare-editor button,
  body.driver-page .driver-map-links button,
  body.driver-page .driver-map-links .button-link,
  body.driver-page .driver-payment-actions button,
  body.driver-page .driver-actions button {
    min-height: 38px;
    padding: 8px 12px;
  }

  body.driver-page .driver-location-card {
    gap: 8px;
    padding: 9px 10px;
    margin: 6px 0 0;
    border-radius: 12px;
  }

  body.driver-page .driver-location-text span {
    font-size: 0.64rem;
  }

  body.driver-page .driver-location-text strong {
    font-size: 0.84rem;
  }

  body.driver-page .driver-location-text p {
    font-size: 0.72rem;
  }

  body.driver-page .driver-location-card .ghost.small {
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  body.driver-page #driver-history-panel .board-header {
    gap: 6px;
    padding-bottom: 2px;
  }

  body.driver-page #driver-history-panel .board-header > div:first-child {
    margin-bottom: 0;
  }

  body.driver-page #driver-history-panel .eyebrow {
    margin-bottom: 0;
    font-size: 0.78rem;
  }

  body.driver-page .driver-history-actions {
    gap: 6px;
    align-items: flex-start;
  }

  body.driver-page .driver-history-tabs.reservation-tabs {
    width: auto;
    max-width: 100%;
    align-self: flex-start;
  }
}

@media (min-width: 861px) and (max-width: 1100px) and (orientation: landscape) {
  body.driver-page.driver-fullscreen-active .app-signature {
    display: none;
  }

  body.driver-page.driver-fullscreen-active .app-shell,
  body.driver-page.driver-fullscreen-active #driver-app-view {
    min-height: 100dvh;
    height: auto;
  }

  #app-view .topbar {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(150px, auto) minmax(250px, 0.8fr);
    align-items: center;
    gap: 8px;
    min-height: 0;
    margin-bottom: 8px;
  }

  #app-view .topbar-connected-panel {
    grid-column: 1;
    min-width: 0;
  }

  #app-view .dispatch-brand-center {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    grid-column: 2;
    justify-content: center;
    pointer-events: auto;
    margin-bottom: 0;
  }

  #app-view .dispatch-brand-logo {
    width: clamp(150px, 17vw, 190px);
    /* max-height: 62px; */
    pointer-events: auto;
  }

  #app-view .topbar-actions {
    grid-column: 3;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }

  #app-view .clock-chip,
  #app-view .user-chip {
    min-width: 112px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  #app-view .dispatch-layout {
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
    gap: 8px;
    min-height: calc(100vh - 134px);
  }

  #app-view .left-column,
  #app-view .right-column {
    gap: 8px;
  }

  #app-view .left-column {
    grid-template-rows: minmax(0, 1fr) minmax(0, 0.78fr);
  }

  #app-view .board-panel {
    border-radius: 16px;
  }

  #app-view .board-header {
    padding: 10px 12px 8px;
  }

  #app-view .board-header-actions {
    gap: 6px;
  }

  #app-view .driver-strip-wrap {
    padding: 8px 8px 6px;
  }

  #app-view .driver-strip-header {
    gap: 6px;
  }

  #app-view .dispatch-table {
    font-size: 0.74rem;
  }

  #app-view .dispatch-table th,
  #app-view .dispatch-table td {
    padding: 4px 6px;
    height: 24px;
    max-height: 24px;
    line-height: 1.05;
  }

  #app-view .dispatch-table th {
    font-size: 0.6rem;
    padding-left: 18px;
    padding-right: 10px;
  }

  #app-view .column-drag-handle {
    left: 4px;
    font-size: 0.54rem;
  }

  #app-view .table-wrap {
    max-height: calc(31vh - 10px);
  }

  #app-view .left-column .board-panel:first-child .table-wrap {
    min-height: 120px;
  }

  #app-view .future-wrap {
    max-height: calc(18vh - 8px);
  }

  #app-view .assigned-wrap {
    max-height: calc(100vh - 190px);
  }

  #app-view .ghost,
  #app-view .primary,
  #app-view button,
  #app-view .button-link {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  #app-view .count-pill {
    min-width: 32px;
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.78rem;
  }

  #app-view .inline-toolbar-field {
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
  }

  #app-view .inline-toolbar-field input {
    width: 52px;
    padding: 4px 6px;
  }

  #app-view .connected-drivers-wrap,
  #app-view .connected-drivers-empty {
    min-height: 0;
  }

  #app-view {
    font-size: 0.88rem;
  }

  body:not(.driver-page) .app-shell {
    width: min(100%, calc(100% - 8px));
    padding: 4px 0 8px;
  }

  body.driver-page .driver-ride-header-meta {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .app-shell:fullscreen,
  body.dispatch-fullscreen-active .app-shell {
    display: block;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell:fullscreen #app-view,
  body.dispatch-fullscreen-active .app-shell #app-view {
    display: block;
    flex: none;
    min-height: auto;
  }

  .app-shell:fullscreen #app-view > main,
  body.dispatch-fullscreen-active .app-shell #app-view > main {
    flex: none;
    min-height: auto;
  }

  .app-shell:fullscreen .dispatch-layout,
  body.dispatch-fullscreen-active .app-shell .dispatch-layout {
    display: grid;
    min-height: auto;
  }
}

@media (max-width: 860px), (max-width: 1024px) and (orientation: portrait) {
  body.driver-page {
    --driver-mobile-top-inset: max(env(safe-area-inset-top, 0px), var(--driver-visual-viewport-offset-top, 0px));
    --driver-mobile-frame-height: calc(var(--driver-visual-viewport-height, 100dvh) + var(--driver-mobile-top-inset));
    min-height: var(--driver-mobile-frame-height);
    height: var(--driver-mobile-frame-height);
    overflow: hidden;
  }

  body.driver-page .app-shell {
    min-height: var(--driver-mobile-frame-height);
    height: var(--driver-mobile-frame-height);
    padding-top: calc(var(--driver-mobile-top-inset) + var(--driver-viewport-correction-top, 0px));
    padding-bottom: 0;
  }

  body.driver-page #driver-app-view {
    height: 100%;
  }

  .topbar,
  .topbar-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .window-form-grid,
  .cred-grid,
  .portal-grid,
  .establishment-admin-layout,
  .establishment-admin-grid,
  .driver-ride-details,
  .stats {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100%, calc(100% - 8px));
    padding-bottom: 0;
  }

  #driver-app-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .driver-layout {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .driver-panel-section {
    min-height: 0;
  }

  .driver-current-card,
  .driver-history-panel,
  #driver-history-panel,
  #driver-settlement-panel {
    position: relative;
    z-index: 32;
    height: 100%;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.driver-page .driver-current-card {
    width: 100%;
    max-width: min(1180px, 100%);
    margin-inline: auto;
  }

  body.driver-page .driver-current-card.driver-panel-hidden,
  body.driver-page #driver-history-panel.driver-panel-hidden,
  body.driver-page #driver-settlement-panel.driver-panel-hidden {
    display: none;
  }

  .auth-hero,
  .auth-panel {
    padding: 20px;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions > * {
    width: 100%;
  }

  .topbar-actions > .icon-button {
    width: 46px;
    min-width: 46px;
  }

  #app-view .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
  }

  #app-view .dispatch-brand-center {
    grid-column: 1;
    order: -1;
    justify-content: center;
    margin-bottom: 4px;
  }

  /* #app-view .dispatch-brand-logo { */
    /* width: clamp(150px, 45vw, 220px); */
    /* max-height: 72px; */
  /* } */

  #app-view .topbar-connected-panel,
  #app-view .topbar-actions {
    grid-column: 1;
    width: 100%;
  }

  #app-view .topbar-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  #app-view .topbar-actions > * {
    width: auto;
  }

  #app-view .clock-chip,
  #app-view .user-chip {
    flex: 1 1 132px;
    min-width: 0;
  }

  #app-view .topbar-actions > .icon-button {
    flex: 0 0 46px;
  }

  .clock-chip,
  .user-chip {
    min-width: 0;
  }

  .board-header {
    align-items: flex-start;
  }

  .board-header-actions,
  .reservation-tabs {
    width: 100%;
  }

  body.driver-page .driver-mobile-tabs.reservation-tabs {
    width: auto;
    max-width: 100%;
    align-self: flex-start;
  }

  .board-header-actions {
    justify-content: flex-start;
  }

  .driver-history-filters {
    width: 100%;
  }

  .driver-history-filters .inline-toolbar-field {
    flex: 1 1 180px;
  }

  .driver-history-filters .inline-toolbar-field input {
    width: 100%;
  }

  .driver-history-filters .inline-toolbar-field select {
    width: 100%;
  }

  .driver-actions,
  .driver-map-links,
  .driver-fare-editor,
  .driver-payment-actions {
    width: auto;
  }

  body.driver-page.driver-app-active .driver-enhanced-ride-card .driver-actions {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    z-index: 36;
    margin: 0 -4px -4px;
    padding: 8px;
    border: 1px solid rgba(226, 232, 240, 0.78);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  body.driver-page.driver-theme-dark.driver-app-active .driver-enhanced-ride-card .driver-actions,
  body.driver-page.driver-theme-midnight.driver-app-active .driver-enhanced-ride-card .driver-actions,
  body.driver-page.driver-theme-space.driver-app-active .driver-enhanced-ride-card .driver-actions {
    border-color: rgba(220, 230, 251, 0.18);
    background: rgba(15, 23, 42, 0.82);
  }

  .driver-actions > *,
  .driver-map-links > *,
  .driver-fare-editor > *,
  .driver-payment-actions > * {
    flex: 1 1 140px;
  }

  .driver-current-fare-actions .driver-payment-actions {
    width: auto;
  }

  .driver-current-fare-actions .driver-payment-actions > * {
    flex: 0 0 auto;
  }

  .driver-fare-editor.compact {
    flex-wrap: wrap;
  }

  .driver-fare-editor.compact input {
    width: 100%;
  }

  .driver-current-card,
  .driver-empty-state,
  .driver-ride-card {
    min-height: 0;
  }

  #driver-history-panel,
  #driver-settlement-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  #driver-history-panel .table-wrap,
  #driver-settlement-panel .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .portal-shell {
    width: min(100%, calc(100% - 20px));
    gap: 18px;
  }

  .portal-grid {
    gap: 12px;
  }

  .portal-card {
    min-height: 0;
    padding: 18px;
    border-radius: 22px;
    gap: 10px;
    justify-content: flex-start;
  }

  .taxiflow-home .portal-card {
    min-height: 0;
  }

  .portal-card strong,
  .taxiflow-home .portal-card strong {
    margin: 0;
    font-size: clamp(1.35rem, 5.4vw, 1.8rem);
    letter-spacing: -0.035em;
  }

  .portal-card p {
    max-width: none;
    line-height: 1.42;
  }

  .portal-brand-logo {
    width: min(340px, 100%);
    margin-bottom: 18px;
  }
}

@media (max-width: 520px) {
  .portal-shell {
    width: min(100%, calc(100% - 14px));
    gap: 14px;
  }

  .portal-grid {
    gap: 10px;
  }

  .portal-card {
    padding: 16px;
    border-radius: 20px;
  }

  .portal-card strong,
  .taxiflow-home .portal-card strong {
    font-size: clamp(1.22rem, 5.8vw, 1.55rem);
  }

  .portal-card p {
    font-size: 0.94rem;
  }
}

@media (orientation: landscape) and (max-width: 1180px) and (max-height: 620px) {
  body.landing-page,
  body:has(.taxiflow-home) {
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .portal-shell {
    width: min(100%, calc(100% - 18px));
    min-height: 100dvh;
    gap: clamp(5px, 1.5vh, 10px);
  }

  .portal-content {
    justify-content: flex-start;
    gap: clamp(6px, 1.5vh, 10px);
    padding: max(4px, env(safe-area-inset-top, 0px)) 0 8px;
  }

  .portal-hero {
    width: min(760px, 100%);
    display: grid;
    justify-items: center;
    gap: 1px;
  }

  .portal-brand-logo {
    width: min(300px, 44vw);
    max-height: clamp(62px, 22vh, 118px);
    margin-bottom: 2px;
    object-fit: contain;
  }

  .taxiflow-home .portal-brand-logo {
    width: min(330px, 46vw);
    max-height: clamp(68px, 24vh, 126px);
  }

  .portal-hero .eyebrow {
    margin-bottom: 1px;
    font-size: clamp(0.56rem, 1.35vw, 0.68rem);
  }

  .portal-hero h1 {
    margin: 0;
    font-size: clamp(1.12rem, 3.4vw, 1.85rem);
    line-height: 1.02;
  }

  .portal-hero .lede {
    max-width: 720px;
    margin: 2px 0 0;
    font-size: clamp(0.72rem, 1.65vw, 0.9rem);
    line-height: 1.18;
  }

  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: clamp(5px, 1.5vh, 8px);
    width: min(760px, 100%);
  }

  .portal-card {
    min-height: clamp(74px, 17vh, 112px);
    padding: clamp(8px, 1.9vh, 12px) clamp(12px, 2.2vw, 16px);
    border-radius: 14px;
    gap: 3px;
  }

  .taxiflow-home .portal-card {
    min-height: clamp(70px, 16vh, 104px);
  }

  .portal-card strong,
  .taxiflow-home .portal-card strong {
    margin: 0;
    font-size: clamp(0.98rem, 2.55vw, 1.34rem);
    line-height: 1.08;
    letter-spacing: 0;
  }

  .portal-card p {
    margin: 0;
    font-size: clamp(0.7rem, 1.45vw, 0.84rem);
    line-height: 1.16;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

@media (orientation: landscape) and (max-width: 1180px) and (max-height: 430px) {
  .portal-content {
    gap: 5px;
    padding-top: 3px;
  }

  .portal-brand-logo {
    width: min(248px, 40vw);
    max-height: clamp(48px, 20vh, 76px);
    margin-bottom: 0;
  }

  .taxiflow-home .portal-brand-logo {
    width: min(270px, 42vw);
    max-height: clamp(52px, 21vh, 82px);
  }

  .portal-hero .lede {
    display: none;
  }

  .portal-card,
  .taxiflow-home .portal-card {
    min-height: clamp(56px, 16vh, 78px);
    padding: 6px 10px;
    border-radius: 12px;
  }

  .portal-card p {
    display: none;
  }
}

@media (max-width: 1024px) and (orientation: portrait) {
  .app-shell {
    width: min(100%, calc(100% - 8px));
  }

  .dispatch-layout {
    grid-template-columns: 1fr;
  }

  .left-column,
  .right-column {
    gap: 8px;
  }

  .left-column {
    grid-template-rows: auto;
  }

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

  .connected-drivers-panel {
    width: 100%;
  }

  .board-panel {
    border-radius: 16px;
  }

  .dispatch-table {
    font-size: 0.75rem;
  }

  .dispatch-table th,
  .dispatch-table td {
    padding: 4px 6px;
    height: 26px;
    max-height: 26px;
    line-height: 1.05;
  }

  .dispatch-table th {
    font-size: 0.62rem;
  }

  .count-pill {
    min-width: 34px;
    min-height: 30px;
    padding: 4px 8px;
    font-size: 0.82rem;
  }

  .ghost,
  .primary,
  button {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .inline-toolbar-field {
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
  }

  .inline-toolbar-field input {
    width: 56px;
    padding: 5px 6px;
  }

  .window-shell {
    left: 8px !important;
    top: 76px !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    height: auto !important;
    max-height: calc(100vh - 88px) !important;
  }

  .ride-window-modal-card {
    left: 8px !important;
    top: 76px !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    height: auto !important;
    max-height: calc(100dvh - 88px) !important;
  }

  .window-form-grid {
    grid-template-columns: 1fr;
  }

  .window-actions {
    flex-direction: column;
  }

  .window-shell .window-header,
  .window-shell .window-body,
  .window-shell .window-footer {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ride-window-layout {
    grid-template-columns: 1fr;
  }

  .ride-window-side-column {
    order: -1;
  }
}

@media (max-width: 768px) {
  .app-shell {
    width: 100%;
    padding: 0;
  }

  .topbar,
  .stats,
  .dispatch-layout,
  .driver-layout {
    gap: 8px;
  }

  .topbar {
    margin-bottom: 8px;
  }

  .board-panel,
  .stat,
  .auth-panel,
  .auth-hero {
    border-radius: 14px;
  }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
  }

  .ride-window-address-grid,
  .ride-window-series-date-row,
  .ride-window-two-column,
  .window-form-grid {
    grid-template-columns: 1fr;
  }

  .ride-window-map-frame,
  .ride-window-map-frame iframe,
  .ride-window-map-card.empty {
    min-height: 220px;
  }

  .chat-card,
  .driver-chat-card,
  .maintenance-modal-card {
    width: 100%;
  }

  .chat-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .chat-message-list {
    max-height: 40vh;
  }

  .maintenance-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .chat-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .chat-search-results {
    width: 100%;
    max-width: 100%;
  }

  .chat-sidebar {
    order: 2;
  }

  .chat-panel {
    order: 1;
  }

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

@media (max-width: 1024px) {
  body.driver-page .chat-sidebar {
    order: 1;
  }

  body.driver-page .chat-panel {
    order: 2;
  }

  body.driver-page .chat-thread-list {
    max-height: 24vh;
    overflow: auto;
  }
}

@media (max-width: 640px) {
  .map-location-history-card {
    width: 100%;
    min-width: 0;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    resize: none;
  }

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

  #driver-settings-modal {
    align-items: stretch;
    justify-content: flex-start;
    padding: 8px;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  #driver-settings-modal .dialog-card {
    --dialog-card-padding: 14px;
    width: 100%;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: var(--dialog-card-padding);
    border-radius: 16px;
  }

  #driver-settings-form {
    gap: 10px;
    padding: 0 var(--dialog-card-padding) var(--dialog-card-padding);
  }

  #driver-settings-form .dialog-header {
    margin-bottom: 4px;
  }

  #driver-settings-form .dialog-header h3,
  #driver-settings-form .dialog-header p {
    margin-top: 0;
  }

  #driver-settings-form .driver-settings-section {
    gap: 9px;
    padding: 10px;
    border-radius: 12px;
  }

  #driver-settings-form .dialog-actions {
    gap: 8px;
  }

  #driver-settings-form .dialog-actions button {
    flex: 1 1 120px;
    min-height: 42px;
    padding-inline: 12px;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .chat-compose-actions {
    align-items: stretch;
  }

  .chat-compose-actions .primary,
  .chat-compose-actions .ghost {
    width: 100%;
  }
}

@media (max-width: 1024px), (min-width: 861px) and (max-width: 1100px) and (orientation: landscape), (orientation: landscape) and (max-height: 560px) {
  .topbar-actions {
    position: relative;
    gap: 8px;
  }

  .topbar-action-menu {
    position: relative;
    flex: 0 0 auto;
    order: 999;
    width: auto;
    min-width: 46px;
  }

  .topbar-action-menu > summary {
    display: inline-flex;
    list-style: none;
    cursor: pointer;
  }

  .topbar-action-menu > summary::-webkit-details-marker {
    display: none;
  }

  .topbar-action-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 95;
    display: none;
    grid-template-columns: repeat(2, 46px);
    gap: 8px;
    width: max-content;
    min-width: 112px;
    padding: 8px;
    border: 1px solid rgba(219, 225, 234, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 42px rgba(20, 33, 61, 0.18);
    backdrop-filter: blur(4px);
  }

  .topbar-action-menu[open] .topbar-action-menu-panel {
    display: grid;
  }

  .topbar-action-menu-panel > .topbar-action-button {
    width: 46px;
    min-width: 46px;
  }

  .topbar-actions > .topbar-action-menu,
  #app-view .topbar-actions > .topbar-action-menu {
    width: auto;
  }

  body.driver-page .topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  body.driver-page #driver-fullscreen,
  body.driver-page #driver-logout {
    grid-column: auto;
    grid-row: auto;
    width: 46px;
  }

  body.dispatch-theme-dark .topbar-action-menu-panel,
  body.driver-page.driver-theme-dark .topbar-action-menu-panel {
    border-color: rgba(220, 230, 251, 0.12);
    background: rgba(31, 44, 69, 0.96);
    box-shadow: 0 24px 54px rgba(5, 16, 34, 0.34);
  }

  body.dispatch-theme-midnight .topbar-action-menu-panel,
  body.driver-page.driver-theme-midnight .topbar-action-menu-panel {
    border-color: rgba(220, 230, 251, 0.12);
    background: rgba(17, 23, 36, 0.96);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
  }
}

@media (max-width: 1024px) and (orientation: portrait) {
  body.driver-page .topbar {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) 46px;
    gap: 6px;
    align-items: stretch;
    overflow: visible;
  }

  body.driver-page .topbar-actions {
    display: contents !important;
  }

  body.driver-page #driver-location-summary {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  body.driver-page .driver-topbar-overview {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  body.driver-page .driver-metric-chip {
    width: 100%;
    min-width: 0;
  }

  body.driver-page .driver-queue-popover {
    left: auto;
    right: 0;
    min-width: min(220px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    overflow-wrap: anywhere;
  }

  body.driver-page .topbar-action-menu {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: stretch;
    width: 46px;
    min-width: 46px;
  }

  body.driver-page .topbar-action-menu > summary {
    display: inline-flex !important;
    width: 46px;
    min-width: 46px;
    height: 100%;
  }

  body.driver-page .topbar-action-menu-panel {
    left: auto;
    right: 0;
    max-width: calc(100vw - 16px);
  }

  body.driver-page .topbar-action-menu-panel > .topbar-action-button {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 46px;
    min-width: 46px;
    align-self: center;
    justify-self: center;
  }

  body.driver-page .clock-chip {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  body.driver-page .user-chip {
    grid-column: 2 / 4;
    grid-row: 2;
    width: 100%;
  }
}

@media (max-width: 860px), (max-width: 1024px) and (orientation: portrait) {
  body.driver-page .app-shell {
    padding-top: calc(var(--driver-mobile-top-inset, 0px) + var(--driver-viewport-correction-top, 0px));
    padding-bottom: 0;
  }
}

#app-view .left-column {
  grid-template-rows: minmax(0, 1fr);
}

#app-view .dispatch-left-panel {
  min-height: 0;
  height: 100%;
}

#app-view .dispatch-left-shell {
  display: grid;
  grid-template-columns: 83px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}

#app-view .dispatch-left-content {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
  min-width: 0;
  min-height: 0;
}

#app-view .auto-dispatch-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

#app-view .auto-dispatch-modal-card .auto-dispatch-panel {
  grid-column: auto;
  grid-row: auto;
}

#app-view .dispatch-left-content > .board-header {
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
}

#app-view .dispatch-left-content > .board-header .board-header-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: max-content;
}

#app-view .dispatch-left-tabs {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-start;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  overflow: visible;
}

#app-view .dispatch-left-tabs .tab-button {
  min-height: 36px;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

#app-view .dispatch-left-tabs .tab-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container (max-width: 560px) {
  #app-view .dispatch-left-content .auto-dispatch-open-button {
    min-width: 48px;
    padding-inline: 10px;
  }

  #app-view .dispatch-left-content .auto-dispatch-open-label-full {
    display: none;
  }

  #app-view .dispatch-left-content .auto-dispatch-open-label-short {
    display: inline-flex;
  }
}

#app-view .dispatch-left-tab-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#app-view .dispatch-left-tab-panel.hidden {
  display: none;
}

#app-view .dispatch-left-tab-panel .table-wrap,
#app-view .dispatch-left-tab-panel .future-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

#app-view .dispatch-reservation-subtabs {
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

#app-view .reservation-data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

#app-view .reservation-data-actions .ghost.small {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

#app-view .dispatch-driver-rail {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 6px 4px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

#app-view .dispatch-driver-rail .driver-strip-header {
  display: none;
}

#app-view .dispatch-driver-rail .driver-strip {
  flex: 1 1 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-height: 0;
  height: 100%;
  padding: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
}

#app-view .dispatch-driver-rail .driver-tile {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 5px 3px;
  border-radius: 8px;
  gap: 2px;
}

#app-view .dispatch-driver-rail .driver-tile strong {
  max-width: 68px;
  font-size: 0.95rem;
}

#app-view .dispatch-driver-rail .driver-tile span {
  max-width: 68px;
  font-size: 0.6rem;
}

#app-view .dispatch-driver-rail .empty-strip {
  align-self: center;
  padding: 4px 0;
  font-size: 0.66rem;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 860px) and (orientation: landscape) {
  body.dispatch-page.dispatch-app-active #app-view .topbar {
    display: grid;
    grid-template-columns: max-content minmax(96px, 1fr) max-content;
    align-items: center;
    gap: 6px;
    min-height: 0;
    margin-bottom: 8px;
  }

  body.dispatch-page.dispatch-app-active #app-view .topbar-connected-panel {
    grid-column: 1;
    justify-self: start;
    width: max-content;
    max-width: min(240px, 34vw);
    margin-bottom: 0;
    padding: 7px;
    border-radius: 14px;
  }

  body.dispatch-page.dispatch-app-active #app-view .connected-drivers-row {
    grid-template-columns: minmax(0, auto) auto;
    justify-content: start;
    gap: 7px;
    width: max-content;
    max-width: 100%;
  }

  body.dispatch-page.dispatch-app-active #app-view .connected-drivers-wrap {
    max-width: min(178px, calc(34vw - 46px));
  }

  body.dispatch-page.dispatch-app-active #app-view .connected-drivers-panel .count-pill {
    min-width: 30px;
    min-height: 28px;
    padding: 4px 7px;
  }

  body.dispatch-page.dispatch-app-active #app-view .dispatch-brand-center {
    grid-column: 2;
    order: 0;
    justify-content: center;
    margin-bottom: 0;
  }

  /* body.dispatch-page.dispatch-app-active #app-view .dispatch-brand-logo { */
    /* width: clamp(104px, 16vw, 150px); */
    /* max-height: 58px; */
  /* } */

  body.dispatch-page.dispatch-app-active #app-view .topbar-actions {
    grid-column: 3;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    width: auto;
    gap: 6px;
  }

  body.dispatch-page.dispatch-app-active #app-view .topbar-actions > * {
    width: auto;
  }

  body.dispatch-page.dispatch-app-active #app-view .clock-chip {
    flex: 0 1 92px;
    min-width: 86px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  body.dispatch-page.dispatch-app-active #app-view .user-chip {
    flex: 0 1 122px;
    min-width: 104px;
    padding: 8px 9px;
    border-radius: 12px;
  }

  body.dispatch-page.dispatch-app-active #app-view .clock-chip span,
  body.dispatch-page.dispatch-app-active #app-view .user-chip span {
    font-size: 0.62rem;
  }

  body.dispatch-page.dispatch-app-active #app-view .clock-chip strong,
  body.dispatch-page.dispatch-app-active #app-view .user-chip strong {
    font-size: 0.82rem;
  }
}

@media (min-width: 1101px) and (max-width: 1500px) and (max-height: 760px) {
  body.dispatch-page.dispatch-app-active #app-view,
  body.dispatch-page.dispatch-app-active #app-view > main {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.dispatch-page.dispatch-app-active #app-view .topbar {
    grid-template-columns: minmax(250px, 0.9fr) minmax(160px, auto) minmax(250px, 0.9fr);
    gap: 8px;
    min-height: 0;
    margin-bottom: 8px;
  }

  body.dispatch-page.dispatch-app-active #app-view .topbar-connected-panel {
    max-width: min(300px, 100%);
    margin-bottom: 0;
    padding: 8px;
    border-radius: 16px;
  }

  body.dispatch-page.dispatch-app-active #app-view .dispatch-brand-logo {
    width: clamp(190px, 20vw, 260px);
    max-height: 92px;
  }

  body.dispatch-page.dispatch-app-active #app-view .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  body.dispatch-page.dispatch-app-active #app-view .clock-chip {
    min-width: 112px;
    padding: 9px 12px;
    border-radius: 13px;
  }

  body.dispatch-page.dispatch-app-active #app-view .user-chip {
    min-width: 150px;
    padding: 9px 12px;
    border-radius: 13px;
  }

  body.dispatch-page.dispatch-app-active .dispatch-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
    gap: 8px;
    min-height: calc(100dvh - 134px);
  }

  body.dispatch-page.dispatch-app-active .dispatch-left-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body.dispatch-page.dispatch-app-active #app-view .board-header {
    gap: 8px;
    padding: 9px 10px;
  }

  body.dispatch-page.dispatch-app-active #app-view .dispatch-left-content > .board-header .board-header-actions {
    gap: 6px;
  }

  body.dispatch-page.dispatch-app-active #app-view .dispatch-left-tabs {
    flex: 1 1 auto;
    width: auto;
  }

  body.dispatch-page.dispatch-app-active #app-view .dispatch-left-tabs .tab-button {
    min-height: 32px;
    padding-inline: 10px;
  }

  body.dispatch-page.dispatch-app-active #app-view .board-header-actions > button,
  body.dispatch-page.dispatch-app-active #app-view .board-header-actions > .button-link {
    flex: 0 0 auto;
  }

  body.dispatch-page.dispatch-app-active #app-view .auto-dispatch-open-button {
    min-width: 48px;
    padding-inline: 10px;
  }

  body.dispatch-page.dispatch-app-active #app-view .auto-dispatch-open-label-full {
    display: none;
  }

  body.dispatch-page.dispatch-app-active #app-view .auto-dispatch-open-label-short {
    display: inline-flex;
  }

  body.dispatch-page.dispatch-app-active #app-view .inline-toolbar-field {
    gap: 6px;
    padding: 5px 8px;
  }

  body.dispatch-page.dispatch-app-active #app-view .inline-toolbar-field input {
    width: 56px;
    padding: 5px 7px;
  }
}

@media (max-height: 760px) {
  body.dispatch-page #assigned-history-modal .assigned-history-modal-search-field.inline-toolbar-field {
    flex: 0 1 255px !important;
    max-width: min(255px, 100%) !important;
    min-width: min(220px, 100%) !important;
  }

  body.dispatch-page #assigned-history-modal .assigned-history-modal-search-field.inline-toolbar-field > #assigned-history-modal-search {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

@media (min-width: 861px) and (max-width: 1100px) and (orientation: landscape) {
  body.dispatch-page.dispatch-app-active #app-view,
  body.dispatch-page.dispatch-app-active #app-view > main {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.dispatch-page.dispatch-app-active .dispatch-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    min-height: calc(100dvh - 132px);
  }

  body.dispatch-page.dispatch-app-active .board-header-actions > button,
  body.dispatch-page.dispatch-app-active .board-header-actions > .button-link {
    max-width: 13ch;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.dispatch-page.dispatch-app-active .dispatch-left-shell {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  body.dispatch-page.dispatch-app-active .dispatch-driver-rail {
    padding: 7px 6px;
  }

  body.dispatch-page.dispatch-app-active .dispatch-driver-rail .driver-strip {
    padding: 5px;
  }

  body.dispatch-page.dispatch-app-active .dispatch-driver-rail .empty-strip {
    font-size: 0.7rem;
    line-height: 1.18;
    overflow-wrap: normal;
  }
}

@media (min-width: 861px) and (max-width: 1100px) and (orientation: landscape) and (max-height: 560px) {
  body.dispatch-page.dispatch-fullscreen-active .app-shell {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.dispatch-page.dispatch-fullscreen-active #app-view {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }

  body.dispatch-page.dispatch-fullscreen-active #app-view > main {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.dispatch-page.dispatch-fullscreen-active .dispatch-layout {
    min-height: calc(100dvh - 132px);
  }
}

@media (max-width: 900px) {
  #auth-view.auth-layout,
  #driver-auth-view.auth-layout,
  #map-auth-view.auth-layout,
  #maintenance-auth-view.auth-layout {
    padding: 24px 22px;
  }

  #auth-view.auth-layout::before,
  #driver-auth-view.auth-layout::before,
  #map-auth-view.auth-layout::before,
  #maintenance-auth-view.auth-layout::before {
    height: 160px;
  }

  #auth-view.auth-layout::after,
  #driver-auth-view.auth-layout::after,
  #map-auth-view.auth-layout::after,
  #maintenance-auth-view.auth-layout::after {
    top: 104px;
  }

  #auth-view .auth-hero,
  #driver-auth-view .auth-hero,
  #map-auth-view .auth-hero,
  #maintenance-auth-view .auth-hero {
    min-height: 0;
    padding: 0;
    border-radius: 0;
  }

  #auth-view .auth-brand-mark,
  #driver-auth-view .auth-brand-mark,
  #map-auth-view .auth-brand-mark,
  #maintenance-auth-view .auth-brand-mark {
    width: min(250px, 72%);
    height: 106px;
    margin-bottom: 34px;
  }

  #auth-view .auth-hero-title,
  #driver-auth-view .auth-hero-title,
  #map-auth-view .auth-hero-title,
  #maintenance-auth-view .auth-hero-title {
    max-width: 400px;
    font-size: 1.45rem;
    line-height: 1.08;
  }

  #auth-view .auth-panel,
  #driver-auth-view .auth-panel,
  #map-auth-view .auth-panel,
  #maintenance-auth-view .auth-panel {
    padding: 28px;
    border-radius: 22px;
  }
}

@media (orientation: landscape) and (max-width: 1024px) and (max-height: 620px) {
  #auth-view.auth-layout,
  #driver-auth-view.auth-layout,
  #map-auth-view.auth-layout,
  #maintenance-auth-view.auth-layout {
    width: min(1180px, 100%);
    min-height: min(560px, calc(100vh - 46px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.65fr);
    grid-template-rows: 1fr auto;
    grid-template-areas:
      "brand form"
      "note form";
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  #auth-view.auth-layout::before,
  #driver-auth-view.auth-layout::before,
  #map-auth-view.auth-layout::before,
  #maintenance-auth-view.auth-layout::before {
    inset: 0 auto 0 0;
    width: 62%;
    height: auto;
  }

  #auth-view.auth-layout::after,
  #driver-auth-view.auth-layout::after,
  #map-auth-view.auth-layout::after,
  #maintenance-auth-view.auth-layout::after {
    top: auto;
    right: 36%;
    bottom: -120px;
    width: 430px;
    height: 210px;
  }

  #auth-view .auth-hero,
  #driver-auth-view .auth-hero,
  #map-auth-view .auth-hero,
  #maintenance-auth-view .auth-hero {
    grid-area: brand;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 32px 40px 22px;
    text-align: left;
  }

  #auth-view .auth-brand-mark,
  #driver-auth-view .auth-brand-mark,
  #map-auth-view .auth-brand-mark,
  #maintenance-auth-view .auth-brand-mark {
    width: min(270px, 52%);
    height: 118px;
    margin: 0 0 24px;
  }

  #auth-view .auth-hero-title,
  #driver-auth-view .auth-hero-title,
  #map-auth-view .auth-hero-title,
  #maintenance-auth-view .auth-hero-title {
    margin: 0;
    color: white;
  }

  #auth-view .lede,
  #driver-auth-view .lede,
  #map-auth-view .lede,
  #maintenance-auth-view .lede {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 1rem;
  }

  #auth-view .auth-panel,
  #driver-auth-view .auth-panel,
  #map-auth-view .auth-panel,
  #maintenance-auth-view .auth-panel {
    grid-area: form;
    align-self: center;
    width: min(360px, 100%);
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #auth-view .credentials,
  #driver-auth-view .credentials,
  #map-auth-view .credentials,
  #maintenance-auth-view .credentials {
    grid-area: note;
    align-self: end;
    width: calc(100% - 80px);
    margin: 0 40px 34px;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }

  #auth-view .credentials p,
  #driver-auth-view .credentials p,
  #map-auth-view .credentials p,
  #maintenance-auth-view .credentials p {
    color: rgba(255, 255, 255, 0.74);
  }
}

#auth-view.hidden,
#driver-auth-view.hidden,
#map-auth-view.hidden,
#maintenance-auth-view.hidden {
  display: none !important;
}

body.client-page {
  min-height: 100vh;
  user-select: text;
  -webkit-user-select: text;
  background:
    linear-gradient(135deg, rgba(255, 230, 0, 0.2), transparent 28%),
    linear-gradient(315deg, rgba(29, 122, 90, 0.14), transparent 28%),
    linear-gradient(160deg, #f6f8fb, #edf2f7 50%, #f9fafb);
}

.client-shell {
  width: min(1060px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px 0 28px;
}

.client-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  margin-bottom: 14px;
}

.client-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.client-brand-logo-wrap {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  overflow: hidden;
}

.client-brand-logo {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.client-brand-label,
.client-brand-subtitle {
  display: block;
}

.client-brand-label {
  font-size: 1rem;
  font-weight: 800;
}

.client-brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.client-dispatch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 34px rgba(20, 33, 61, 0.08);
}

.client-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 14px;
  align-items: start;
}

.client-request-panel,
.client-summary-panel {
  border: 1px solid rgba(219, 225, 234, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.client-request-panel {
  padding: clamp(18px, 3vw, 28px);
}

.client-section-heading {
  max-width: 680px;
  margin-bottom: 18px;
}

.client-section-heading h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0;
  color: #13213a;
}

.client-section-heading p:last-child {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.client-module-notice {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(190, 24, 93, 0.22);
  border-radius: 8px;
  background: rgba(255, 241, 242, 0.92);
  color: #7f1d1d;
}

.client-module-notice strong {
  color: #7f1d1d;
}

.client-module-notice span {
  color: #991b1b;
  font-size: 0.9rem;
}

body.client-page.client-module-locked .client-account-panel,
body.client-page.client-module-locked .client-ride-form,
body.client-page.client-module-locked .client-summary-panel {
  opacity: 0.56;
}

.client-ride-form {
  display: grid;
  gap: 11px;
}

.client-account-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.86);
}

.client-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-account-header strong {
  min-width: 0;
  overflow: hidden;
  color: #13213a;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-account-fields {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 8px;
}

.client-account-fields input,
.client-account-code-panel input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 0 11px;
}

.client-account-actions,
.client-account-code-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.client-account-actions button,
.client-account-code-panel button {
  min-height: 34px;
  border-radius: 8px;
}

.client-account-code-panel input {
  width: 142px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.client-account-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.client-account-message.success {
  color: #137a4d;
  font-weight: 800;
}

.client-account-message.error {
  color: var(--danger);
  font-weight: 800;
}

.client-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.client-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.client-field input,
.client-field select,
.client-field textarea {
  width: 100%;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.client-field input,
.client-field select {
  min-height: 40px;
  padding: 0 12px;
}

.client-field textarea {
  min-height: 64px;
  padding: 9px 12px;
  resize: vertical;
}

.client-field input:focus,
.client-field select:focus,
.client-field textarea:focus {
  outline: 3px solid rgba(50, 103, 227, 0.16);
  border-color: #3267e3;
}

.client-field input.is-invalid,
.client-field select.is-invalid,
.client-field textarea.is-invalid {
  border-color: #b8372f;
  box-shadow: 0 0 0 3px rgba(184, 55, 47, 0.12);
}

.client-field input[readonly] {
  background: #eef3f8;
  color: var(--muted);
  cursor: default;
}

.client-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.client-route-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(230px, 1fr);
  gap: 10px 14px;
  align-items: start;
}

.client-field-stack {
  position: relative;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.client-location-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: var(--z-popup-layer);
  display: grid;
  gap: 5px;
  max-height: min(340px, calc(100vh - 24px));
  margin-top: 0;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 52px rgba(20, 33, 61, 0.18);
  backdrop-filter: blur(4px);
}

.client-city-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: var(--z-popup-layer);
  display: grid;
  gap: 5px;
  max-height: min(260px, calc(100vh - 24px));
  margin-top: 0;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 52px rgba(20, 33, 61, 0.18);
  backdrop-filter: blur(4px);
}

.client-location-suggestions:empty,
.client-city-suggestions:empty {
  display: none;
}

.client-city-suggestion {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.client-location-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(241, 245, 249, 0.72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.client-city-suggestion.is-active,
.client-location-suggestion.is-active,
.client-city-suggestion:hover,
.client-location-suggestion:hover {
  border-color: rgba(52, 91, 183, 0.24);
  background: rgba(52, 91, 183, 0.13);
  box-shadow: inset 3px 0 0 rgba(52, 91, 183, 0.7);
}

.client-location-searching {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px dashed #cfd7e3;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.client-suggestion-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.client-suggestion-copy strong,
.client-suggestion-copy span,
.client-suggestion-copy small {
  overflow-wrap: anywhere;
}

.client-suggestion-copy span {
  color: var(--muted);
  font-size: 0.82rem;
}

.client-suggestion-copy small {
  justify-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3f8;
  color: #3267e3;
  font-size: 0.72rem;
  font-weight: 800;
}

.client-suggestion-provider,
.suggestion-provider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #3267e3;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.client-suggestion-badges,
.suggestion-provider-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.client-suggestion-provider.invalid,
.suggestion-provider-icon.invalid {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #b45309;
}

.client-distance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.client-payment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.client-payment-option {
  min-height: 38px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.client-payment-option.active {
  border-color: #14213d;
  background: #14213d;
  color: #fff;
}

.client-stops-section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: rgba(238, 243, 248, 0.56);
}

.client-stops-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-stops-header span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-stops-header button {
  min-height: 34px;
  border-radius: 8px;
}

.client-stops-list {
  display: grid;
  gap: 10px;
}

.client-stop-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.client-stop-row button {
  min-height: 40px;
  border-radius: 8px;
}

.client-test-payment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px dashed rgba(50, 103, 227, 0.36);
  border-radius: 8px;
  background: rgba(50, 103, 227, 0.06);
}

.client-test-payment button {
  min-height: 36px;
  border-radius: 8px;
}

.client-test-payment span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.client-submit {
  min-height: 42px;
}

.client-submit:disabled {
  cursor: wait;
  opacity: 0.72;
}

.client-form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.client-form-message.success {
  color: var(--success);
}

.client-form-message.error {
  color: var(--danger);
}

.client-summary-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.client-map-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
}

.client-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.client-map-header button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
}

.client-map-header button.active {
  border-color: #14213d;
  background: #14213d;
  color: #fff;
}

.client-route-map-wrap {
  position: relative;
  min-width: 0;
}

.client-route-map {
  width: 100%;
  min-height: 220px;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  overflow: hidden;
  background: #eef3f8;
}

.client-route-map.is-placing-points {
  cursor: crosshair;
}

.client-map-placement-banner {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: calc(100% - 24px);
  padding: 0 12px;
  border: 1px solid #14213d;
  border-radius: 999px;
  background: #14213d;
  color: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.26);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.client-map-placement-banner[hidden] {
  display: none;
}

.client-map-card.client-map-expanded {
  position: fixed;
  inset: 14px;
  z-index: 1200;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.client-map-card.client-map-expanded .client-route-map-wrap {
  min-height: 0;
  height: 100%;
}

.client-map-card.client-map-expanded .client-route-map {
  min-height: 0;
  height: 100%;
}

.client-route-marker-icon {
  background: transparent;
  border: 0;
}

.client-route-marker-letter {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 8px;
  background: #14213d;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-45deg);
}

.client-route-marker-letter::before {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: inherit;
  content: "";
}

.client-route-marker-letter {
  text-indent: -999px;
}

.client-route-marker-letter::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  content: attr(data-letter);
  text-indent: 0;
  transform: rotate(45deg);
}

.client-route-popup {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.client-route-popup span {
  color: #5f6f86;
  line-height: 1.35;
}

.client-route-popup button {
  min-height: 30px;
  border: 1px solid rgba(185, 28, 28, 0.26);
  border-radius: 8px;
  background: rgba(254, 242, 242, 0.94);
  color: #991b1b;
  font-weight: 900;
  cursor: pointer;
}

.client-route-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.client-service-load-card {
  min-width: 0;
  margin-top: 0;
  padding: 12px;
  border-radius: 8px;
}

.client-service-load-card .service-load-head {
  gap: 8px;
}

.client-service-load-card .service-load-details {
  white-space: normal;
}

.client-summary-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #fff;
}

.client-summary-card strong {
  font-size: 1.12rem;
}

.client-summary-card span:last-child {
  color: var(--muted);
  line-height: 1.4;
}

.client-summary-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-estimate-card {
  background: #101827;
  color: #fff;
}

.client-origin-demo-label {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgba(255, 230, 0, 0.26);
  border-radius: 999px;
  background: rgba(255, 230, 0, 0.12);
  color: #ffe600;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.client-estimate-card .client-summary-label,
.client-estimate-card span:last-child {
  color: rgba(255, 255, 255, 0.72);
}

.client-estimate-card strong {
  color: #ffe600;
  font-size: 2rem;
  letter-spacing: 0;
}

.client-estimate-breakdown {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.client-estimate-breakdown div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.client-estimate-breakdown div[hidden] {
  display: none;
}

.client-estimate-breakdown span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-estimate-help-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.client-estimate-help-icon {
  position: relative;
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(255, 230, 0, 0.58);
  border-radius: 50%;
  background: rgba(255, 230, 0, 0.12);
  color: #ffe600;
  font-size: 0.68rem;
  line-height: 1;
  cursor: help;
  text-transform: none;
}

.client-estimate-help-icon::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 30;
  width: min(260px, 70vw);
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #14213d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: normal;
}

.client-estimate-help-icon:hover::after,
.client-estimate-help-icon:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.client-estimate-breakdown strong {
  color: #fff;
  font-size: 0.92rem;
  text-align: right;
  white-space: nowrap;
}

.client-confirmation-card {
  border-color: rgba(29, 122, 90, 0.28);
  background: #f1fbf7;
}

.client-confirmation-card strong {
  color: #1d7a5a;
}

.client-confirmation-meta {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.client-confirmation-meta div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: baseline;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(29, 122, 90, 0.14);
}

.client-confirmation-meta span,
.client-confirmation-meta strong {
  min-width: 0;
}

.client-confirmation-meta span {
  color: rgba(21, 32, 51, 0.62);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-confirmation-meta strong {
  color: #152033;
  font-size: 0.82rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.client-flow-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 8px;
  background: #eef3f8;
}

.client-flow-preview span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.client-flow-preview span.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(20, 33, 61, 0.08);
}

.client-modal[hidden] {
  display: none !important;
}

.client-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-critical-confirm-layer);
  display: grid;
  place-items: center;
  padding: 18px;
}

.client-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

.client-modal-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #dbe1ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(20, 33, 61, 0.26);
}

.client-modal-panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.client-modal-titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.client-confirm-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 14px;
  padding: 12px;
  border-radius: 8px;
  background: #eef3f8;
}

.client-confirm-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-confirm-summary strong {
  overflow-wrap: anywhere;
}

.client-confirm-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.client-payment-modal-panel {
  width: min(460px, 100%);
}

.client-payment-breakdown {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #eef3f8;
}

.client-payment-breakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.client-payment-breakdown span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-payment-breakdown strong {
  font-size: 1rem;
}

.client-payment-breakdown .client-payment-total-row {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #d5deea;
}

.client-payment-total-row strong {
  color: #14213d;
  font-size: 1.45rem;
}

.client-tip-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.client-tip-options button {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.client-tip-options button.active {
  border-color: #14213d;
  background: #14213d;
  color: #fff;
}

.client-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.client-modal-actions button {
  min-height: 42px;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .client-shell {
    width: min(100% - 22px, 680px);
    padding-top: 14px;
  }

  .client-topbar {
    align-items: flex-start;
  }

  .client-main {
    grid-template-columns: 1fr;
  }

  .client-account-fields {
    grid-template-columns: 1fr;
  }

  .client-summary-panel {
    position: static;
  }

  .client-summary-panel {
    grid-template-columns: 1fr;
  }

  .client-map-header {
    align-items: flex-start;
  }

  .client-map-actions {
    width: min(100%, 330px);
  }

  .client-map-actions button {
    flex: 1 1 98px;
  }

  .client-route-map {
    min-height: 210px;
  }
}

@media (max-width: 560px) {
  .client-field-grid,
  .client-route-grid,
  .client-payment-options,
  .client-flow-preview,
  .client-test-payment,
  .client-stop-row {
    grid-template-columns: 1fr;
  }

  .client-route-map {
    min-height: 240px;
  }

  .client-map-card.client-map-expanded {
    inset: 8px;
  }

  .client-map-card.client-map-expanded .client-route-map {
    min-height: 0;
    height: 100%;
  }

  .client-request-panel {
    padding: 14px;
  }

  .client-estimate-card strong {
    font-size: 1.75rem;
  }

  .client-shell {
    width: min(100% - 16px, 520px);
  }

  .client-section-heading h1 {
    font-size: 1.8rem;
  }

  .client-section-heading p:last-child {
    font-size: 0.84rem;
  }

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

/* Driver page visual refresh */
body.driver-page.driver-app-active {
  --driver-visual-yellow: #ffd43b;
  --driver-visual-blue: #183764;
  --driver-visual-green: #188852;
  --driver-visual-ink: #111c33;
  background: linear-gradient(135deg, #f8fafc 0%, #eef3f8 52%, #e7edf6 100%);
}

body.driver-page.driver-app-active.driver-theme-test {
  background:
    radial-gradient(circle at top left, rgba(255, 216, 109, 0.26), transparent 22%),
    radial-gradient(circle at bottom right, rgba(72, 122, 247, 0.12), transparent 28%),
    linear-gradient(135deg, #f8fafc 0%, #f1f4f8 52%, #e8eef7 100%);
}

body.driver-page.driver-app-active.driver-theme-dark {
  background:
    radial-gradient(circle at top left, rgba(247, 200, 75, 0.12), transparent 24%),
    radial-gradient(circle at bottom right, rgba(79, 124, 232, 0.2), transparent 30%),
    linear-gradient(160deg, #17243a, #1e2d49 45%, #152238);
}

body.driver-page.driver-app-active.driver-theme-midnight {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 22%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.035), transparent 26%),
    linear-gradient(160deg, #090a0c, #101115 48%, #07080a);
}

body.driver-page.driver-app-active.driver-theme-girly {
  background:
    radial-gradient(circle at top left, rgba(255, 200, 235, 0.55), transparent 23%),
    radial-gradient(circle at top right, rgba(203, 183, 255, 0.32), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 233, 161, 0.28), transparent 24%),
    linear-gradient(160deg, #fff5fb, #fff9fd 48%, #fef1fb);
}

body.driver-page.driver-app-active.driver-theme-space {
  background:
    radial-gradient(circle at 18% 18%, rgba(84, 190, 255, 0.28), transparent 18%),
    radial-gradient(circle at 78% 14%, rgba(155, 115, 255, 0.34), transparent 22%),
    radial-gradient(circle at 52% 112%, rgba(45, 255, 214, 0.16), transparent 28%),
    linear-gradient(160deg, #050816 0%, #0d1230 42%, #111a3f 68%, #060817 100%);
}

body.driver-page.driver-app-active .app-shell {
  position: relative;
  z-index: 1;
  gap: 10px;
}

body.driver-page.driver-app-active #driver-app-view > header,
body.driver-page.driver-app-active #driver-app-view > main,
body.driver-page.driver-app-active #driver-app-view > .driver-chat-heads,
body.driver-page.driver-app-active .app-signature {
  position: relative;
  z-index: 2;
}

body.driver-page.driver-app-active #driver-app-view > header {
  z-index: 60;
}

body.driver-page.driver-app-active #driver-app-view > main {
  z-index: 3;
}

body.driver-page.driver-app-active .topbar {
  margin-bottom: 10px;
  padding: 6px 8px 0;
}

body.driver-page.driver-app-active .driver-layout {
  gap: 10px;
  padding: 0 8px 8px;
}

body.driver-page.driver-app-active .driver-current-card {
  min-height: 0;
}

body.driver-page.driver-app-active.driver-theme-dark .driver-current-card,
body.driver-page.driver-app-active.driver-theme-midnight .driver-current-card,
body.driver-page.driver-app-active.driver-theme-girly .driver-current-card,
body.driver-page.driver-app-active.driver-theme-space .driver-current-card {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.driver-logout-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 2.125rem;
  font-weight: 900;
  line-height: 1;
}

.driver-viewport-taxi {
  --driver-taxi-width: clamp(252px, 36.4vw, 532px);
  position: fixed;
  inset: 0;
  z-index: 25;
  display: none;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint style;
}

body.driver-page.driver-app-active .driver-viewport-taxi {
  display: block;
}

body.driver-page.driver-app-active.driver-taxi-visual-disabled .driver-viewport-taxi {
  display: block;
}

body.driver-page.driver-screensaver-active .driver-viewport-taxi {
  display: none !important;
}

.driver-viewport-taxi::before {
  content: "";
  position: absolute;
  left: -12vw;
  right: -12vw;
  bottom: clamp(18px, 4vh, 42px);
  height: 29px;
  background:
    repeating-linear-gradient(90deg, transparent 0 50px, rgba(245, 247, 250, 0.46) 50px 66px, transparent 66px 116px),
    linear-gradient(180deg, #4b535d 0%, #383f48 48%, #2a3038 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: opacity;
}

body.driver-page.driver-theme-dark .driver-viewport-taxi::before {
  background:
    repeating-linear-gradient(90deg, transparent 0 50px, rgba(226, 232, 240, 0.2) 50px 66px, transparent 66px 116px),
    linear-gradient(180deg, #334155 0%, #1f2937 48%, #111827 100%);
  border-top-color: rgba(255, 255, 255, 0.1);
  opacity: 0.64;
}

body.driver-page.driver-theme-midnight .driver-viewport-taxi::before {
  background:
    repeating-linear-gradient(90deg, transparent 0 50px, rgba(255, 255, 255, 0.12) 50px 66px, transparent 66px 116px),
    linear-gradient(180deg, #20242c 0%, #151820 48%, #0a0c10 100%);
  border-top-color: rgba(255, 255, 255, 0.08);
  opacity: 0.6;
}

body.driver-page.driver-theme-girly .driver-viewport-taxi::before {
  background:
    repeating-linear-gradient(90deg, transparent 0 50px, rgba(255, 247, 252, 0.7) 50px 66px, transparent 66px 116px),
    linear-gradient(180deg, #deacc8 0%, #c98dae 48%, #a96d92 100%);
  border-top-color: rgba(255, 255, 255, 0.42);
}

.driver-viewport-taxi .driver-taxi-image {
  position: absolute;
  left: 0;
  bottom: clamp(24px, 4.6vh, 50px);
  z-index: 1;
  width: var(--driver-taxi-width);
  aspect-ratio: 800 / 296;
  max-width: none;
  margin: 0;
  opacity: 0;
  transform-origin: 50% 82%;
  user-select: none;
  backface-visibility: hidden;
  contain: layout paint style;
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.driver-viewport-taxi .driver-taxi-image::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 5%;
  z-index: 0;
  height: 18%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0) 68%);
  filter: blur(8px);
  transform: translate3d(0, 0, 0);
}

.driver-viewport-taxi .driver-taxi-body {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  user-select: none;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.driver-viewport-taxi .driver-taxi-wheel {
  position: absolute;
  top: 55.1%;
  z-index: 1;
  width: 16.5%;
  aspect-ratio: 1;
  max-width: none;
  object-fit: contain;
  transform: translate3d(0, 0, 0) rotate(0deg);
  transform-origin: 50% 50%;
  user-select: none;
  backface-visibility: hidden;
  will-change: transform;
}

.driver-viewport-taxi .driver-taxi-wheel-left {
  left: 9.88%;
}

.driver-viewport-taxi .driver-taxi-wheel-right {
  left: 73.5%;
}

.driver-viewport-taxi .driver-taxi-image-standard {
  opacity: 0.92;
  transform: translate3d(calc(100vw + 24px), 0, 0) rotate(-1deg);
}

.driver-viewport-taxi .driver-taxi-image-flipped {
  transform: translate3d(-120%, 0, 0) rotate(1deg);
}

body.driver-page[data-driver-ride-state="none"] .driver-viewport-taxi::before {
  opacity: 0.08;
}

body.driver-page[data-driver-ride-state="none"] .driver-viewport-taxi .driver-taxi-image {
  opacity: 0;
  animation: none;
}

body.driver-page[data-driver-ride-state="none"] .driver-viewport-taxi .driver-taxi-image-standard {
  transform: translate3d(calc(100vw + 24px), 0, 0) rotate(-1deg);
}

body.driver-page[data-driver-ride-state="none"] .driver-viewport-taxi .driver-taxi-image-flipped {
  transform: translate3d(-120%, 0, 0) rotate(1deg);
}

body.driver-page[data-driver-ride-state="received"] .driver-viewport-taxi .driver-taxi-image-standard {
 opacity: 0.50;
  animation: driver-taxi-enter 1.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

body.driver-page[data-driver-ride-state="received"] .driver-viewport-taxi .driver-taxi-image-standard .driver-taxi-wheel {
 opacity: 0.50;	
  animation: driver-taxi-wheel-spin-left 0.42s linear 4;
}

body.driver-page[data-driver-ride-state="received"] .driver-viewport-taxi .driver-taxi-image-flipped {
  opacity: 0;
  animation: none;
}

body.driver-page[data-driver-ride-state="accepted"] .driver-viewport-taxi .driver-taxi-image-standard {
 opacity: 0.50;
  animation: driver-taxi-cruise-standard 13s linear infinite;
}

body.driver-page[data-driver-ride-state="accepted"] .driver-viewport-taxi .driver-taxi-image-standard .driver-taxi-wheel {
 opacity: 0.50;
  animation: driver-taxi-wheel-spin-left 0.42s linear infinite;
}

body.driver-page[data-driver-ride-state="accepted"] .driver-viewport-taxi .driver-taxi-image-flipped {
 opacity: 0.50;
  animation: driver-taxi-cruise-flipped 13s linear infinite;
}

body.driver-page[data-driver-ride-state="accepted"] .driver-viewport-taxi .driver-taxi-image-flipped .driver-taxi-wheel {
 opacity: 0.50;
  animation: driver-taxi-wheel-spin-right 0.42s linear infinite;
}

body.driver-page[data-driver-ride-state="accepted-from-received"] .driver-viewport-taxi .driver-taxi-image-standard {
 opacity: 0.50;
  animation:
    driver-taxi-accepted-start-standard 6.5s ease-in-out 1,
    driver-taxi-cruise-standard 13s linear 6.5s infinite;
}

body.driver-page[data-driver-ride-state="accepted-from-received"] .driver-viewport-taxi .driver-taxi-image-standard .driver-taxi-wheel {
 opacity: 0.50;	
  animation: driver-taxi-wheel-spin-left 0.42s linear infinite;
}

body.driver-page[data-driver-ride-state="accepted-from-received"] .driver-viewport-taxi .driver-taxi-image-flipped {
 opacity: 0.50;
  animation:
    driver-taxi-accepted-start-flipped 6.5s ease-in-out 1,
    driver-taxi-cruise-flipped 13s linear 6.5s infinite;
}

body.driver-page[data-driver-ride-state="accepted-from-received"] .driver-viewport-taxi .driver-taxi-image-flipped .driver-taxi-wheel {
 opacity: 0.50;
  animation: driver-taxi-wheel-spin-right 0.42s linear infinite;
}

body.driver-page[data-driver-ride-state="refused"] .driver-viewport-taxi .driver-taxi-image-standard {
 opacity: 0.50;	
  animation: driver-taxi-refused-exit 2.8s ease-in forwards;
}

body.driver-page[data-driver-ride-state="refused"] .driver-viewport-taxi .driver-taxi-image-standard .driver-taxi-wheel {
 opacity: 0.50;
  animation: driver-taxi-wheel-exit-spin-left 0.42s linear infinite;
}

body.driver-page[data-driver-ride-state="refused"] .driver-viewport-taxi .driver-taxi-image-flipped {
  opacity: 0;
  animation: none;
}

@keyframes driver-taxi-wheel-spin-left {
  to {
    transform: translate3d(0, 0, 0) rotate(-360deg);
  }
}

@keyframes driver-taxi-wheel-spin-right {
  to {
    transform: translate3d(0, 0, 0) rotate(360deg);
  }
}

@keyframes driver-taxi-wheel-exit-spin-left {
  to {
    transform: translate3d(0, 0, 0) rotate(-360deg);
  }
}

@keyframes driver-taxi-wheel-exit-spin-right {
  to {
    transform: translate3d(0, 0, 0) rotate(360deg);
  }
}

@keyframes driver-taxi-enter {
  from {
    opacity: 0.92;
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(-1deg);
  }

  to {
    opacity: 0.92;
    transform: translate3d(calc(50vw - 50%), 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-refused-exit {
  from {
    opacity: 0.92;
    transform: translate3d(calc(50vw - 50%), 0, 0) rotate(-1deg);
  }

  to {
    opacity: 0.92;
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-accepted-start-standard {
  0% {
    opacity: 0.92;
    transform: translate3d(calc(50vw - 50%), 0, 0) rotate(-1deg);
  }

  44% {
    opacity: 0.92;
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }

  45%,
  100% {
    opacity: 0;
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-accepted-start-flipped {
  0%,
  49% {
    opacity: 0;
    transform: translate3d(-120%, 0, 0) rotate(1deg);
  }

  50% {
    opacity: 0.92;
    transform: translate3d(-120%, 0, 0) rotate(1deg);
  }

  94% {
    opacity: 0.92;
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(1deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(1deg);
  }
}

@keyframes driver-taxi-cruise-standard {
  0% {
    opacity: 0.92;
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(-1deg);
  }

  44% {
    opacity: 0.92;
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }

  45%,
  100% {
    opacity: 0;
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-cruise-flipped {
  0%,
  49% {
    opacity: 0;
    transform: translate3d(-120%, 0, 0) rotate(1deg);
  }

  50% {
    opacity: 0.92;
    transform: translate3d(-120%, 0, 0) rotate(1deg);
  }

  94% {
    opacity: 0.92;
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(1deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(1deg);
  }
}

.driver-enhanced-ride-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "header"
    "route"
    "assist"
    "details";
  align-items: stretch;
  gap: clamp(8px, 1.15vw, 14px);
  padding: clamp(14px, 1.65vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(100deg, transparent 0 47%, rgba(255, 212, 59, 0.16) 47% 53%, transparent 53% 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.9));
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.14);
}

body.driver-page .driver-enhanced-ride-card::before,
body.driver-page .driver-enhanced-ride-card::after,
body.driver-page .driver-enhanced-ride-card.effect-none::before,
body.driver-page .driver-enhanced-ride-card.effect-none::after {
  display: block;
}

body.driver-page .driver-enhanced-ride-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(24, 55, 100, 0.09) 58% 62%, transparent 62% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 56%);
  opacity: 0.9;
  pointer-events: none;
}

body.driver-page .driver-enhanced-ride-card.effect-sweep::before {
  background:
    linear-gradient(100deg, transparent 0%, transparent 36%, rgba(255, 255, 255, 0.16) 46%, rgba(255, 212, 59, 0.3) 50%, rgba(255, 255, 255, 0.16) 54%, transparent 64%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 56%);
  background-size: 220% 100%, 100% 100%;
  background-position: 130% 0, center;
  animation: driver-progress-sweep 2.8s ease-in-out infinite;
}

body.driver-page .driver-enhanced-ride-card.effect-pulse::before {
  background:
    linear-gradient(120deg, transparent 0 42%, rgba(255, 212, 59, 0.18) 42% 58%, transparent 58% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 58%);
  animation: driver-progress-pulse 2.2s ease-in-out infinite;
}

body.driver-page .driver-enhanced-ride-card.effect-glow::before {
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 212, 59, 0.2) 50%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 58%);
  animation: driver-progress-glow 3.2s ease-in-out infinite;
}

body.driver-page .driver-enhanced-ride-card::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  height: 2px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(24, 55, 100, 0.18), transparent);
  pointer-events: none;
}

.driver-enhanced-ride-card > * {
  position: relative;
  z-index: 2;
}

.driver-enhanced-ride-card .driver-ride-header {
  grid-area: header;
  align-items: center;
}

.driver-enhanced-ride-card .driver-ride-header-actions {
  display: inline-flex;
  flex: 1 1 260px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: min(100%, 172px);
}

.driver-enhanced-ride-card .driver-ride-header-actions > * {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.8rem;
  line-height: 1.12;
  white-space: normal;
}

.driver-enhanced-ride-card .driver-ride-header-actions .primary {
  min-width: min(132px, 100%);
  background: #183764;
  box-shadow: 0 16px 34px rgba(24, 55, 100, 0.22);
}

.driver-enhanced-ride-card .driver-ride-header-actions .ghost {
  min-width: min(122px, 100%);
}

.driver-enhanced-ride-card .driver-ride-status {
  --driver-status-rgb: 24, 136, 82;
  --driver-status-shine-rgb: 134, 239, 172;
  background:
    linear-gradient(
      90deg,
      rgba(var(--driver-status-rgb), 0.96) 0%,
      rgba(var(--driver-status-rgb), 0.96) 36%,
      rgba(var(--driver-status-shine-rgb), 0.98) 50%,
      rgba(var(--driver-status-rgb), 0.96) 64%,
      rgba(var(--driver-status-rgb), 0.96) 100%
    );
  background-size: 220% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: driver-status-shine 3s linear infinite;
  text-shadow: 0 10px 24px rgba(24, 136, 82, 0.14);
}

.driver-enhanced-ride-card .driver-ride-status.status-assigned {
  --driver-status-rgb: 184, 55, 47;
  --driver-status-shine-rgb: 252, 165, 165;
}

.driver-enhanced-ride-card .driver-ride-status.status-received {
  --driver-status-rgb: 69, 109, 216;
  --driver-status-shine-rgb: 147, 197, 253;
}

.driver-enhanced-ride-card .driver-ride-status.status-accepted {
  --driver-status-rgb: 24, 136, 82;
  --driver-status-shine-rgb: 134, 239, 172;
}

.driver-enhanced-ride-card .driver-ride-status.status-in_progress,
.driver-enhanced-ride-card .driver-ride-status.status-round_trip {
  --driver-status-rgb: 31, 109, 68;
  --driver-status-shine-rgb: 110, 231, 183;
}

@keyframes driver-status-shine {
  to {
    background-position: -220% center;
  }
}

.driver-enhanced-ride-card .driver-ride-time-pill,
.driver-enhanced-ride-card .driver-active-timer-block {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.driver-enhanced-ride-card .driver-active-timer-block {
  background: rgba(255, 248, 219, 0.92);
}

.driver-route-strip {
  grid-area: route;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
}

.driver-route-stop {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.driver-route-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--driver-visual-yellow);
  color: var(--driver-visual-ink);
  font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, 0.14);
}

.driver-route-stop.destination .driver-route-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.driver-ride-card.driver-destination-search-open {
  overflow: visible;
}

.driver-enhanced-ride-card.driver-destination-search-open .driver-route-strip {
  z-index: 30;
}

.driver-destination-search {
  position: relative;
  z-index: 6;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.driver-destination-search input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--control-border, rgba(148, 163, 184, 0.48));
  border-radius: 10px;
  background: var(--control-bg-strong, rgba(255, 255, 255, 0.96));
  color: var(--control-text, var(--driver-visual-ink));
  -webkit-text-fill-color: var(--control-text, var(--driver-visual-ink));
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.driver-destination-search input:focus {
  border-color: var(--control-border-strong, rgba(45, 90, 154, 0.72));
  outline: 2px solid var(--control-focus, rgba(45, 90, 154, 0.18));
  outline-offset: 1px;
}

.driver-destination-search-status {
  min-height: 13px;
  color: var(--control-muted, var(--muted));
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
}

.driver-location-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: calc(var(--z-popup-layer) + 2);
  display: grid;
  gap: 6px;
}

.driver-location-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--control-border, #dbe1ea);
  border-radius: 8px;
  background: var(--control-popover-bg, #fff);
  color: var(--control-text, var(--text));
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(20, 33, 61, 0.16);
}

.driver-location-suggestion:hover,
.driver-location-suggestion:focus-visible {
  border-color: var(--control-border-strong, rgba(45, 90, 154, 0.5));
  background: var(--control-bg-hover, #f8fbff);
  outline: none;
}

.driver-location-searching {
  min-height: 36px;
  padding: 9px 10px;
  border: 1px dashed var(--control-border, #cfd7e3);
  border-radius: 8px;
  background: var(--control-bg, rgba(255, 255, 255, 0.86));
  color: var(--control-muted, var(--muted));
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(20, 33, 61, 0.12);
}

.driver-route-stop span,
.driver-info-card span,
.driver-next-card span,
.driver-progress-heading span,
.driver-cue-copy span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.driver-route-stop strong,
.driver-info-card strong,
.driver-next-card strong,
.driver-progress-heading strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--driver-visual-ink);
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-route-stop .driver-location-suggestion span,
.driver-route-stop .driver-location-suggestion strong,
.driver-route-stop .driver-location-suggestion small {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.driver-route-stop .driver-location-suggestion .client-suggestion-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.driver-route-stop .driver-location-suggestion .client-suggestion-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-route-stop .driver-location-suggestion .client-suggestion-copy span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-route-stop .driver-location-suggestion .client-suggestion-copy small {
  justify-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3f8;
  color: #3267e3;
  font-size: 0.68rem;
  font-weight: 850;
}

.driver-route-stop .driver-location-suggestion .client-suggestion-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.driver-route-stop .driver-location-suggestion .client-suggestion-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

.driver-route-stop .driver-route-icon,
.driver-next-card .driver-next-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  color: inherit;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.driver-route-stop .driver-route-icon {
  color: var(--driver-visual-ink);
  font-size: 1rem;
}

.driver-route-stop.destination .driver-route-icon {
  color: #1d4ed8;
}

.driver-route-stop small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #66758c;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-enhanced-ride-card.is-concealed {
  border-color: rgba(69, 109, 216, 0.2);
  background:
    linear-gradient(100deg, transparent 0 46%, rgba(69, 109, 216, 0.1) 46% 54%, transparent 54% 100%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.9));
}

.driver-route-strip-concealed .driver-route-stop,
.driver-info-card.is-concealed {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(241, 245, 249, 0.96), rgba(255, 255, 255, 0.88));
}

.driver-route-stop.is-concealed .driver-route-icon,
.driver-route-stop.destination.is-concealed .driver-route-icon {
  background: rgba(69, 109, 216, 0.12);
  color: #456dd8;
}

.driver-concealed-value {
  color: #456dd8 !important;
  font-weight: 900;
}

.driver-next-card .driver-next-icon {
  color: #fff;
  font-size: 1.2rem;
}

.driver-info-card .driver-inline-payment-trace {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: inherit;
  text-transform: none;
}

.driver-route-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  border-radius: 999px;
  background: rgba(24, 55, 100, 0.08);
  color: var(--driver-visual-blue);
  font-weight: 900;
}

.driver-assist-panel {
  grid-area: assist;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
  gap: 9px;
  align-items: stretch;
}

.driver-next-card,
.driver-progress-card,
.driver-info-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.driver-next-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.driver-next-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, #183764, #2d5a9a);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(24, 55, 100, 0.2);
}

.driver-next-card small {
  display: block;
  margin-top: 3px;
  color: #66758c;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.driver-progress-card {
  display: grid;
  gap: 9px;
}

.driver-progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.driver-progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 55, 100, 0.1);
}

.driver-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--driver-progress, 42%);
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd43b, #188852);
  box-shadow: 0 0 18px rgba(24, 136, 82, 0.26);
  transition: width 260ms ease;
}

.driver-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.driver-progress-step {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #7a879a;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.driver-progress-step::before {
  content: "";
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(24, 55, 100, 0.12);
}

.driver-progress-step.active {
  color: var(--driver-visual-blue);
}

.driver-progress-step.active::before {
  background: var(--driver-visual-yellow);
}

.driver-cue-panel {
  grid-area: cue;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 212, 59, 0.18) 0 16%, transparent 16%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82));
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.driver-cue-panel.tone-warning {
  border-color: rgba(245, 158, 11, 0.22);
  background:
    linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0 16%, transparent 16%),
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 255, 255, 0.86));
}

.driver-cue-panel.tone-success {
  border-color: rgba(24, 136, 82, 0.2);
  background:
    linear-gradient(90deg, rgba(24, 136, 82, 0.14) 0 16%, transparent 16%),
    linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.86));
}

.driver-cue-turn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #183764;
  color: #fff;
  font-size: 1.65rem;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(24, 55, 100, 0.22);
}

.driver-cue-copy {
  min-width: 0;
}

.driver-cue-copy strong {
  display: block;
  overflow: hidden;
  color: var(--driver-visual-ink);
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-cue-copy small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #66758c;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-cue-distance {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 16px;
  background: rgba(24, 55, 100, 0.08);
  color: var(--driver-visual-blue);
  text-align: center;
}

.driver-cue-distance span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver-cue-distance strong {
  margin-top: 2px;
  font-size: 1rem;
  line-height: 1;
}

.driver-cue-badges {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.driver-cue-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(24, 55, 100, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #66758c;
  font-size: 0.7rem;
  font-weight: 900;
}

.driver-enhanced-ride-card .driver-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.driver-enhanced-ride-card .driver-actions > * {
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.8rem;
  line-height: 1.12;
  white-space: normal;
}

.driver-enhanced-ride-card .driver-actions .primary {
  min-width: min(216px, 100%);
  background: #183764;
  box-shadow: 0 16px 34px rgba(24, 55, 100, 0.22);
}

.driver-enhanced-ride-card .driver-actions .ghost {
  min-width: min(122px, 100%);
}

.driver-enhanced-ride-card .driver-ride-details {
  grid-area: details;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.driver-enhanced-ride-card .driver-ride-details > div {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.9);
}

.driver-enhanced-ride-card .driver-ride-details span {
  margin-bottom: 4px;
  font-size: 0.68rem;
  line-height: 1;
}

.driver-enhanced-ride-card .driver-info-card strong {
  font-size: 0.88rem;
  line-height: 1.15;
}

.driver-enhanced-ride-card .driver-current-fare-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.driver-enhanced-ride-card .driver-current-fare-actions .driver-payment-actions {
  margin-left: 0;
  gap: 5px;
}

.driver-enhanced-ride-card .driver-payment-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1;
}

.driver-enhanced-ride-card .driver-info-card.is-important {
  background: rgba(255, 248, 219, 0.95);
  border-color: rgba(245, 158, 11, 0.22);
}

.driver-enhanced-ride-card .driver-ride-details .full {
  grid-column: 1 / -1;
}

body.driver-page.driver-theme-dark .driver-enhanced-ride-card,
body.driver-page.driver-theme-midnight .driver-enhanced-ride-card {
  border-color: rgba(220, 230, 251, 0.14);
  background:
    linear-gradient(100deg, transparent 0 47%, rgba(255, 212, 59, 0.12) 47% 53%, transparent 53% 100%),
    linear-gradient(135deg, rgba(20, 28, 45, 0.96), rgba(15, 23, 42, 0.94));
}

body.driver-page.driver-theme-space .driver-enhanced-ride-card {
  border-color: rgba(146, 184, 255, 0.24);
  background:
    radial-gradient(circle at 12% 8%, rgba(158, 231, 255, 0.16), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(143, 108, 255, 0.16), transparent 36%),
    linear-gradient(100deg, transparent 0 47%, rgba(246, 211, 101, 0.1) 47% 53%, transparent 53% 100%),
    linear-gradient(135deg, rgba(10, 17, 46, 0.96), rgba(8, 13, 34, 0.92));
  box-shadow: 0 28px 86px rgba(3, 7, 22, 0.46);
}

body.driver-page.driver-theme-space .driver-enhanced-ride-card::before {
  background:
    linear-gradient(120deg, transparent 0 58%, rgba(158, 231, 255, 0.13) 58% 62%, transparent 62% 100%),
    radial-gradient(circle at 72% 18%, rgba(155, 114, 255, 0.16), transparent 36%);
  opacity: 0.82;
}

body.driver-page.driver-theme-space .driver-enhanced-ride-card::after {
  background: linear-gradient(90deg, transparent, rgba(158, 231, 255, 0.34), transparent);
}

body.driver-page.driver-theme-dark .driver-route-stop,
body.driver-page.driver-theme-dark .driver-next-card,
body.driver-page.driver-theme-dark .driver-progress-card,
body.driver-page.driver-theme-dark .driver-info-card,
body.driver-page.driver-theme-dark .driver-cue-panel,
body.driver-page.driver-theme-midnight .driver-route-stop,
body.driver-page.driver-theme-midnight .driver-next-card,
body.driver-page.driver-theme-midnight .driver-progress-card,
body.driver-page.driver-theme-midnight .driver-info-card,
body.driver-page.driver-theme-midnight .driver-cue-panel {
  border-color: rgba(220, 230, 251, 0.14);
  background: rgba(20, 28, 45, 0.8);
}

body.driver-page.driver-theme-space .driver-route-stop,
body.driver-page.driver-theme-space .driver-next-card,
body.driver-page.driver-theme-space .driver-progress-card,
body.driver-page.driver-theme-space .driver-info-card,
body.driver-page.driver-theme-space .driver-cue-panel {
  border-color: rgba(146, 184, 255, 0.24);
  background:
    radial-gradient(circle at 12% 12%, rgba(158, 231, 255, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(15, 23, 51, 0.84), rgba(7, 12, 32, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 38px rgba(3, 7, 22, 0.24);
}

body.driver-page.driver-theme-space .driver-enhanced-ride-card .driver-info-card.is-important {
  border-color: rgba(246, 211, 101, 0.34);
  background:
    radial-gradient(circle at 14% 12%, rgba(246, 211, 101, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(38, 30, 55, 0.86), rgba(12, 18, 48, 0.78));
}

body.driver-page.driver-theme-dark .driver-route-stop strong,
body.driver-page.driver-theme-dark .driver-info-card strong,
body.driver-page.driver-theme-dark .driver-next-card strong,
body.driver-page.driver-theme-dark .driver-progress-heading strong,
body.driver-page.driver-theme-dark .driver-cue-copy strong,
body.driver-page.driver-theme-midnight .driver-route-stop strong,
body.driver-page.driver-theme-midnight .driver-info-card strong,
body.driver-page.driver-theme-midnight .driver-next-card strong,
body.driver-page.driver-theme-midnight .driver-progress-heading strong,
body.driver-page.driver-theme-midnight .driver-cue-copy strong {
  color: #f3f6fb;
}

body.driver-page.driver-theme-space .driver-route-stop strong,
body.driver-page.driver-theme-space .driver-info-card strong,
body.driver-page.driver-theme-space .driver-next-card strong,
body.driver-page.driver-theme-space .driver-progress-heading strong,
body.driver-page.driver-theme-space .driver-cue-copy strong {
  color: #f7fbff;
}

body.driver-page.driver-theme-space .driver-route-stop small,
body.driver-page.driver-theme-space .driver-info-card small,
body.driver-page.driver-theme-space .driver-next-card small {
  color: #b9d0ff;
}

body.driver-page.driver-theme-space .driver-route-stop.destination .driver-route-icon {
  background: linear-gradient(135deg, #66e9ff, #5f7dff 58%, #9b72ff);
  color: #061022;
}

.driver-enhanced-ride-card .driver-ride-header-note.has-note {
  background:
    linear-gradient(135deg, rgba(255, 248, 220, 0.98), rgba(255, 255, 255, 0.94)),
    rgba(255, 248, 220, 0.92);
}

.driver-enhanced-ride-card .driver-ride-header-note.has-note strong {
  color: #111827;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.26;
  white-space: normal;
}

body.driver-page.driver-theme-dark .driver-enhanced-ride-card .driver-ride-header-note.has-note,
body.driver-page.driver-theme-midnight .driver-enhanced-ride-card .driver-ride-header-note.has-note {
  border-color: rgba(245, 158, 11, 0.56);
  border-left-color: #f59e0b;
  background:
    linear-gradient(135deg, rgba(77, 50, 12, 0.96), rgba(30, 41, 59, 0.92)),
    rgba(30, 41, 59, 0.92);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 237, 213, 0.12);
}

body.driver-page.driver-theme-space .driver-enhanced-ride-card .driver-ride-header-note.has-note {
  border-color: rgba(246, 211, 101, 0.46);
  border-left-color: #f6d365;
  background:
    radial-gradient(circle at 12% 14%, rgba(246, 211, 101, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(45, 35, 61, 0.94), rgba(12, 18, 48, 0.9));
  box-shadow:
    0 16px 38px rgba(3, 7, 22, 0.26),
    inset 0 1px 0 rgba(255, 237, 213, 0.12);
}

body.driver-page.driver-theme-dark .driver-enhanced-ride-card .driver-ride-header-note.has-note span,
body.driver-page.driver-theme-midnight .driver-enhanced-ride-card .driver-ride-header-note.has-note span {
  color: #fde68a;
}

body.driver-page.driver-theme-space .driver-enhanced-ride-card .driver-ride-header-note.has-note span {
  color: #f6d365;
}

body.driver-page.driver-theme-dark .driver-enhanced-ride-card .driver-ride-header-note.has-note strong,
body.driver-page.driver-theme-midnight .driver-enhanced-ride-card .driver-ride-header-note.has-note strong {
  color: #fff7ed;
}

body.driver-page.driver-theme-space .driver-enhanced-ride-card .driver-ride-header-note.has-note strong {
  color: #fff7ed;
}

body.driver-page.driver-theme-dark .driver-route-stop small,
body.driver-page.driver-theme-midnight .driver-route-stop small {
  color: #bdcae3;
}

body.driver-page.driver-theme-dark .driver-enhanced-ride-card.is-concealed,
body.driver-page.driver-theme-midnight .driver-enhanced-ride-card.is-concealed {
  border-color: rgba(147, 197, 253, 0.22);
  background:
    linear-gradient(100deg, transparent 0 46%, rgba(96, 165, 250, 0.12) 46% 54%, transparent 54% 100%),
    linear-gradient(135deg, rgba(20, 28, 45, 0.96), rgba(15, 23, 42, 0.94));
}

body.driver-page.driver-theme-dark .driver-route-strip-concealed .driver-route-stop,
body.driver-page.driver-theme-dark .driver-info-card.is-concealed,
body.driver-page.driver-theme-midnight .driver-route-strip-concealed .driver-route-stop,
body.driver-page.driver-theme-midnight .driver-info-card.is-concealed {
  background: rgba(20, 28, 45, 0.72);
}

body.driver-page.driver-theme-space .driver-route-strip-concealed .driver-route-stop,
body.driver-page.driver-theme-space .driver-info-card.is-concealed {
  background:
    radial-gradient(circle at 14% 12%, rgba(146, 184, 255, 0.1), transparent 36%),
    rgba(12, 18, 48, 0.68);
}

body.driver-page.driver-theme-dark .driver-concealed-value,
body.driver-page.driver-theme-midnight .driver-concealed-value {
  color: #93c5fd !important;
}

body.driver-page.driver-theme-space .driver-concealed-value {
  color: #9ee7ff !important;
}

body.driver-page.driver-theme-dark .driver-destination-search input,
body.driver-page.driver-theme-midnight .driver-destination-search input {
  border-color: rgba(220, 230, 251, 0.2);
  background: rgba(15, 23, 42, 0.9);
  color: #f3f6fb;
}

body.driver-page.driver-theme-dark .driver-location-suggestion,
body.driver-page.driver-theme-midnight .driver-location-suggestion,
body.driver-page.driver-theme-dark .driver-location-searching,
body.driver-page.driver-theme-midnight .driver-location-searching {
  border-color: rgba(220, 230, 251, 0.18);
  background: rgba(20, 28, 45, 0.98);
  color: #f3f6fb;
}

body.driver-page.driver-theme-dark .driver-route-stop .driver-location-suggestion .client-suggestion-copy strong,
body.driver-page.driver-theme-midnight .driver-route-stop .driver-location-suggestion .client-suggestion-copy strong {
  color: #f3f6fb;
}

body.driver-page.driver-theme-space .driver-route-stop .driver-location-suggestion .client-suggestion-copy strong {
  color: #f7fbff;
}

@media (orientation: landscape) and (max-height: 620px) {
  body.driver-page.driver-app-active .topbar {
    margin-bottom: 6px;
  }

  body.driver-page.driver-app-active .driver-layout {
    gap: 7px;
  }

  .driver-enhanced-ride-card {
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
  }

  .driver-enhanced-ride-card .driver-ride-status {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
  }

  .driver-enhanced-ride-card .driver-ride-details {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .driver-enhanced-ride-card .driver-ride-details > div,
  .driver-route-stop {
    padding: 8px;
    border-radius: 12px;
  }

  .driver-destination-search input {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  .driver-destination-search-status {
    display: none;
  }

  .driver-cue-panel {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 14px;
  }

  .driver-cue-turn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 1.35rem;
  }

  .driver-cue-copy small,
  .driver-cue-badges {
    display: none;
  }

  .driver-cue-distance {
    min-width: 74px;
    min-height: 42px;
    padding: 6px 8px;
    border-radius: 14px;
  }

  body.driver-page.driver-app-active .driver-current-card {
    position: relative;
    z-index: 32;
  }

  body.driver-page.driver-app-active .driver-enhanced-ride-card .driver-actions {
    position: relative;
    z-index: 36;
    padding: 7px;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  body.driver-page.driver-theme-dark.driver-app-active .driver-enhanced-ride-card .driver-actions,
  body.driver-page.driver-theme-midnight.driver-app-active .driver-enhanced-ride-card .driver-actions,
  body.driver-page.driver-theme-space.driver-app-active .driver-enhanced-ride-card .driver-actions {
    border-color: rgba(220, 230, 251, 0.18);
    background: rgba(15, 23, 42, 0.82);
  }

  .driver-viewport-taxi {
    --driver-taxi-width: clamp(196px, 31.5vw, 329px);
    z-index: 20;
  }

  .driver-viewport-taxi::before {
    bottom: -10px;
  }

  .driver-viewport-taxi .driver-taxi-image {
    bottom: 2px;
  }
}

@media (max-width: 760px), (orientation: portrait) and (max-width: 1024px) {
  .driver-enhanced-ride-card {
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .driver-enhanced-ride-card .driver-ride-header {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }

  .driver-enhanced-ride-card .driver-ride-header-main {
    flex: 0 1 auto;
    width: 100%;
    min-height: 0;
  }

  .driver-enhanced-ride-card .driver-ride-header-meta {
    margin-left: 0;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .driver-enhanced-ride-card .driver-ride-header-actions {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .driver-enhanced-ride-card .driver-ride-header-actions > * {
    flex: 1 1 140px;
    min-height: 38px;
  }

  .driver-route-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .driver-route-arrow {
    width: 34px;
    min-height: 30px;
    height: 30px;
    justify-self: center;
    transform: rotate(90deg);
  }

  .driver-route-stop {
    min-height: 76px;
    padding: 10px;
  }

  .driver-route-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .driver-assist-panel,
  .driver-enhanced-ride-card .driver-ride-details {
    grid-template-columns: 1fr;
  }

  .driver-progress-heading {
    flex-direction: column;
    gap: 6px;
  }

  .driver-cue-panel {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
    border-radius: 16px;
  }

  .driver-cue-turn {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    font-size: 1.38rem;
  }

  .driver-cue-distance {
    min-width: 76px;
    min-height: 42px;
    padding: 6px 8px;
    text-align: left;
  }

  .driver-cue-copy small,
  .driver-cue-badges {
    display: none;
  }

  .driver-cue-copy strong,
  .driver-route-stop strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .driver-route-stop small {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .driver-viewport-taxi {
    --driver-taxi-width: clamp(175px, 47.6vw, 273px);
    z-index: 5;
  }

  .driver-viewport-taxi::before {
    bottom: -8px;
    height: 21px;
	opacity: 0.5;
  }

  .driver-viewport-taxi .driver-taxi-image {
    bottom: 3px;
    transform-style: flat;
    will-change: transform;
  }

  .driver-viewport-taxi .driver-taxi-image::before {
    filter: none;
    opacity: 0.45;
  }

  .driver-viewport-taxi .driver-taxi-wheel {
    animation: none !important;
    will-change: auto;
  }

  body.driver-page[data-driver-ride-state="received"] .driver-viewport-taxi .driver-taxi-image-standard {
    opacity: 0.5;
    animation: driver-taxi-enter-mobile 1.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
  }

  body.driver-page[data-driver-ride-state="accepted"] .driver-viewport-taxi .driver-taxi-image-standard {
    opacity: 0.5;
    animation: driver-taxi-cruise-standard-mobile 13s linear infinite;
  }

  body.driver-page[data-driver-ride-state="accepted"] .driver-viewport-taxi .driver-taxi-image-flipped {
    opacity: 0.5;
    animation: driver-taxi-cruise-flipped-mobile 13s linear infinite;
  }

  body.driver-page[data-driver-ride-state="accepted-from-received"] .driver-viewport-taxi .driver-taxi-image-standard {
    opacity: 0.5;
    animation:
      driver-taxi-accepted-start-standard-mobile 6.5s ease-in-out 1,
      driver-taxi-cruise-standard-mobile 13s linear 6.5s infinite;
  }

  body.driver-page[data-driver-ride-state="accepted-from-received"] .driver-viewport-taxi .driver-taxi-image-flipped {
    opacity: 0.5;
    animation:
      driver-taxi-accepted-start-flipped-mobile 6.5s ease-in-out 1,
      driver-taxi-cruise-flipped-mobile 13s linear 6.5s infinite;
  }

  body.driver-page[data-driver-ride-state="refused"] .driver-viewport-taxi .driver-taxi-image-standard {
    opacity: 0.5;
    animation: driver-taxi-refused-exit-mobile 2.8s ease-in forwards;
  }

  body.driver-page #driver-logout.icon-button,
  body.driver-page .topbar-action-menu-panel #driver-logout.icon-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 50%;
    align-self: center;
    justify-self: end;
  }
}

@keyframes driver-taxi-enter-mobile {
  from {
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(-1deg);
  }

  to {
    transform: translate3d(calc(50vw - 50%), 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-refused-exit-mobile {
  from {
    transform: translate3d(calc(50vw - 50%), 0, 0) rotate(-1deg);
  }

  to {
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-accepted-start-standard-mobile {
  0% {
    transform: translate3d(calc(50vw - 50%), 0, 0) rotate(-1deg);
  }

  44%,
  100% {
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-accepted-start-flipped-mobile {
  0%,
  49% {
    transform: translate3d(-120%, 0, 0) rotate(1deg);
  }

  94%,
  100% {
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(1deg);
  }
}

@keyframes driver-taxi-cruise-standard-mobile {
  0% {
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(-1deg);
  }

  44%,
  100% {
    transform: translate3d(-120%, 0, 0) rotate(-1deg);
  }
}

@keyframes driver-taxi-cruise-flipped-mobile {
  0%,
  49% {
    transform: translate3d(-120%, 0, 0) rotate(1deg);
  }

  94%,
  100% {
    transform: translate3d(calc(100vw + 24px), 0, 0) rotate(1deg);
  }
}

body.driver-page.driver-taxi-visual-disabled .driver-viewport-taxi::before {
  opacity: 0.18;
}

body.driver-page.driver-taxi-visual-disabled .driver-viewport-taxi .driver-taxi-image,
body.driver-page.driver-taxi-visual-disabled .driver-viewport-taxi .driver-taxi-wheel {
  animation: none !important;
  will-change: auto;
}

body.driver-page.driver-taxi-visual-disabled .driver-viewport-taxi .driver-taxi-image-standard {
  opacity: 0.56 !important;
  transform: translate3d(calc(100vw - var(--driver-taxi-width) - clamp(12px, 2.4vw, 34px)), 0, 0) rotate(-1deg) !important;
}

body.driver-page.driver-taxi-visual-disabled .driver-viewport-taxi .driver-taxi-image-flipped {
  opacity: 0 !important;
  transform: translate3d(-120%, 0, 0) rotate(1deg) !important;
}

@media (orientation: landscape) and (max-width: 960px) {
  body.driver-page {
    overflow: hidden;
  }

  body.driver-page .app-shell {
    width: 100%;
    padding: max(4px, env(safe-area-inset-top, 0px)) 8px max(4px, env(safe-area-inset-bottom, 0px));
  }

  body.driver-page #driver-app-view {
    min-height: 0;
  }

  body.driver-page .topbar,
  body.driver-page.driver-app-active .topbar {
    display: flex;
    flex-direction: row !important;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    min-height: 0;
    margin-bottom: 6px;
    padding: 0;
    overflow: visible;
  }

  body.driver-page .driver-topbar-overview {
    flex: 0 0 clamp(172px, 24vw, 218px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    max-width: none;
    min-width: 0;
    overflow: visible;
  }

  body.driver-page .driver-metric-chip {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    gap: 1px;
    padding: 7px 9px;
    border-radius: 10px;
  }

  body.driver-page .driver-metric-chip span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  body.driver-page .driver-metric-chip strong {
    font-size: 0.98rem;
    line-height: 1.05;
  }

  body.driver-page .topbar-actions {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row !important;
    align-items: stretch;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    width: auto;
    min-width: 0;
    margin-left: 0;
  }

  body.driver-page .topbar-actions > * {
    width: auto;
  }

  body.driver-page .clock-chip,
  body.driver-page .user-chip {
    flex: 1 1 100px;
    min-width: 0;
    min-height: 46px;
    gap: 2px;
    padding: 7px 9px;
    border-radius: 10px;
  }

  body.driver-page .user-chip {
    flex-basis: 124px;
  }

  body.driver-page .clock-chip span,
  body.driver-page .user-chip span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  body.driver-page .clock-chip strong,
  body.driver-page .user-chip strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.98rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.driver-page #driver-location-summary {
    flex: 0 1 126px;
    min-width: 108px;
  }

  body.driver-page .driver-location-compact {
    min-height: 46px;
    gap: 6px;
    padding: 6px 7px;
    border-radius: 10px;
  }

  body.driver-page .driver-location-compact-text span {
    font-size: 0.56rem;
  }

  body.driver-page .driver-location-compact-text strong {
    font-size: 0.78rem;
    line-height: 1.05;
  }

  body.driver-page .driver-location-compact button {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 9px;
    font-size: 0.78rem;
  }

  body.driver-page .topbar-action-button,
  body.driver-page .topbar-action-menu,
  body.driver-page .topbar-action-menu > summary {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 48px;
    height: auto;
  }

  body.driver-page .topbar-action-menu {
    align-self: stretch;
  }

  body.driver-page .topbar-action-menu > summary {
    display: inline-flex !important;
    padding: 0;
  }

  body.driver-page .topbar-action-menu-panel {
    left: auto;
    right: 0;
    max-width: calc(100vw - 16px);
  }

  body.driver-page .driver-layout,
  body.driver-page.driver-app-active .driver-layout {
    gap: 6px;
    padding: 0;
    overflow: hidden;
  }

  body.driver-page .driver-actions {
    width: fit-content;
    max-width: 100%;
  }

  body.driver-page .driver-actions > *,
  body.driver-page .driver-enhanced-ride-card .driver-ride-header-actions > * {
    flex: 0 1 auto;
  }

  body.driver-page .driver-mobile-tabs {
    gap: 4px;
    max-width: calc(100vw - 16px);
    padding: 3px;
    border-radius: 12px;
  }

  body.driver-page .driver-mobile-tabs .tab-button {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.86rem;
  }

  body.driver-page .driver-current-card {
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.driver-page .driver-empty-state,
  body.driver-page .driver-ride-card {
    min-height: 0;
    padding: 12px;
    border-radius: 16px;
  }

  body.driver-page .app-signature {
    display: none;
  }

  body.driver-page[data-driver-ride-state="none"] .driver-viewport-taxi {
    display: none !important;
  }

  body.driver-page:not([data-driver-ride-state="none"]) .driver-viewport-taxi {
    --driver-taxi-width: clamp(150px, 24vw, 220px);
    z-index: 0;
    opacity: 0.38;
  }

  body.driver-page:not([data-driver-ride-state="none"]) .driver-viewport-taxi::before {
    bottom: -16px;
    height: 18px;
    opacity: 0.35;
  }

  body.driver-page:not([data-driver-ride-state="none"]) .driver-viewport-taxi .driver-taxi-image {
    bottom: 0;
  }
}

body.driver-page.driver-settlement-panel-active .driver-viewport-taxi,
body.driver-page.driver-settlement-panel-active.driver-app-active .driver-viewport-taxi,
body.driver-page.driver-settlement-panel-active:not([data-driver-ride-state="none"]) .driver-viewport-taxi {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

body.driver-page.driver-settlement-panel-active #driver-settlement-panel {
  overflow: auto !important;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

body.driver-page.driver-settlement-panel-active .driver-settlement-content {
  overflow: visible !important;
}

body.driver-page.driver-settlement-panel-active .driver-settlement-table-wrap {
  flex: 0 0 auto !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
}

@media (min-width: 1181px) {
  body.driver-page.driver-settlement-panel-active .driver-settlement-side {
    align-self: start !important;
    max-height: calc(100dvh - 152px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 4px;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1180px) {
  body.driver-page.driver-settlement-panel-active #driver-settlement-panel {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(210px, 240px) !important;
    overflow: visible !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-sheet {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    min-height: auto !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table-wrap {
    flex: none !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-side {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-self: start !important;
    margin-top: 0 !important;
    overflow: visible !important;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  body.driver-page.driver-settlement-panel-active .driver-settlement-content {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: auto !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-sheet {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-meta,
  body.driver-page.driver-settlement-panel-active .driver-settlement-table-wrap,
  body.driver-page.driver-settlement-panel-active .driver-settlement-side {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table {
    width: 640px !important;
    min-width: 640px !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-side {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    margin-top: 10px !important;
  }
}

@media (max-width: 1180px) and (orientation: landscape) and (max-height: 760px) {
  body.driver-page.driver-settlement-panel-active .driver-settlement-table-wrap {
    min-height: 0 !important;
    max-height: none !important;
  }
}

@media (max-width: 640px) {
  body.driver-page.driver-settlement-panel-active .driver-settlement-side {
    margin-top: 10px !important;
    grid-template-columns: 1fr !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table {
    width: 580px !important;
    min-width: 580px !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table th:first-child,
  body.driver-page.driver-settlement-panel-active .driver-settlement-row-number {
    width: 38px !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table th:nth-child(3),
  body.driver-page.driver-settlement-panel-active .driver-settlement-table td:nth-child(3) {
    width: 130px !important;
  }

  body.driver-page.driver-settlement-panel-active .driver-settlement-table th:nth-child(4),
  body.driver-page.driver-settlement-panel-active .driver-settlement-table td:nth-child(4),
  body.driver-page.driver-settlement-panel-active .driver-settlement-table th:nth-child(5),
  body.driver-page.driver-settlement-panel-active .driver-settlement-table td:nth-child(5) {
    width: 78px !important;
  }
}

body.dispatch-page.dispatch-app-active #dispatch-panel.dispatch-layout {
  min-height: 0;
}

body.dispatch-page.dispatch-app-active #app-view .right-column,
body.dispatch-page.dispatch-app-active #app-view .assigned-panel {
  min-height: 0;
}

body.dispatch-page.dispatch-app-active #app-view .assigned-wrap {
  flex: 1 1 0;
  max-height: none;
  min-height: 0;
}

body.dispatch-page #dispatch-waiting-panel .table-wrap,
body.dispatch-page #dispatch-reservation-panel .table-wrap,
body.dispatch-page .assigned-panel > .table-wrap {
  overflow-x: auto;
  overflow-y: auto;
}

@media (min-width: 861px) {
  body.dispatch-page.dispatch-app-active {
    overflow: hidden;
  }

  body.dispatch-page.dispatch-app-active .app-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.dispatch-page.dispatch-app-active #app-view,
  body.dispatch-page.dispatch-app-active #app-view > main,
  body.dispatch-page.dispatch-app-active #dispatch-panel.dispatch-layout,
  body.dispatch-page.dispatch-app-active #app-view .left-column,
  body.dispatch-page.dispatch-app-active #app-view .right-column,
  body.dispatch-page.dispatch-app-active #app-view .board-panel,
  body.dispatch-page.dispatch-app-active #app-view .dispatch-left-shell,
  body.dispatch-page.dispatch-app-active #app-view .dispatch-left-content,
  body.dispatch-page.dispatch-app-active #app-view .dispatch-left-tab-panel {
    min-height: 0;
  }

  body.dispatch-page.dispatch-app-active #app-view,
  body.dispatch-page.dispatch-app-active #app-view > main {
    flex: 1 1 auto;
    overflow: hidden;
  }

  body.dispatch-page.dispatch-app-active #dispatch-panel.dispatch-layout {
    flex: 1 1 auto;
    overflow: hidden;
  }

  body.dispatch-page.dispatch-app-active #dispatch-waiting-panel .table-wrap,
  body.dispatch-page.dispatch-app-active #dispatch-reservation-panel .table-wrap,
  body.dispatch-page.dispatch-app-active #app-view .assigned-panel > .table-wrap {
    flex: 1 1 0;
    max-height: none;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.assigned-history-wrap .dispatch-table,
#driver-history-panel .dispatch-table,
#driver-settlement-panel .dispatch-table {
  --history-table-header-bg: var(--table-header-bg);
  --history-table-header-text: var(--table-header-text);
  --history-table-header-border: var(--table-header-border);
  --history-table-header-bottom: var(--table-header-bottom);
  --history-table-header-columns: 12;
}

#driver-history-panel .dispatch-table {
  --history-table-header-columns: 8;
}

#driver-settlement-panel .dispatch-table {
  --history-table-header-columns: 5;
}

.maintenance-table-panel .dispatch-table {
  --history-table-header-bg: var(--table-header-bg);
  --history-table-header-text: var(--table-header-text);
  --history-table-header-border: var(--table-header-border);
  --history-table-header-bottom: var(--table-header-bottom);
  --history-table-header-columns: 10;
}

.assigned-history-wrap .dispatch-table th,
#driver-history-panel .dispatch-table th,
#driver-settlement-panel .dispatch-table th,
.maintenance-table-panel .dispatch-table th {
  --animated-header-base-image: var(--table-header-bg);
  --animated-header-base-size: 220% 100%;
  --animated-header-base-position: 50%;
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

.assigned-history-wrap .dispatch-table th:nth-child(1) { --history-table-header-position-x: 0%; }
.assigned-history-wrap .dispatch-table th:nth-child(2) { --history-table-header-position-x: 9.091%; }
.assigned-history-wrap .dispatch-table th:nth-child(3) { --history-table-header-position-x: 18.182%; }
.assigned-history-wrap .dispatch-table th:nth-child(4) { --history-table-header-position-x: 27.273%; }
.assigned-history-wrap .dispatch-table th:nth-child(5) { --history-table-header-position-x: 36.364%; }
.assigned-history-wrap .dispatch-table th:nth-child(6) { --history-table-header-position-x: 45.455%; }
.assigned-history-wrap .dispatch-table th:nth-child(7) { --history-table-header-position-x: 54.545%; }
.assigned-history-wrap .dispatch-table th:nth-child(8) { --history-table-header-position-x: 63.636%; }
.assigned-history-wrap .dispatch-table th:nth-child(9) { --history-table-header-position-x: 72.727%; }
.assigned-history-wrap .dispatch-table th:nth-child(10) { --history-table-header-position-x: 81.818%; }
.assigned-history-wrap .dispatch-table th:nth-child(11) { --history-table-header-position-x: 90.909%; }
.assigned-history-wrap .dispatch-table th:nth-child(12) { --history-table-header-position-x: 100%; }

#driver-history-panel .dispatch-table th:nth-child(1) { --history-table-header-position-x: 0%; }
#driver-history-panel .dispatch-table th:nth-child(2) { --history-table-header-position-x: 14.286%; }
#driver-history-panel .dispatch-table th:nth-child(3) { --history-table-header-position-x: 28.571%; }
#driver-history-panel .dispatch-table th:nth-child(4) { --history-table-header-position-x: 42.857%; }
#driver-history-panel .dispatch-table th:nth-child(5) { --history-table-header-position-x: 57.143%; }
#driver-history-panel .dispatch-table th:nth-child(6) { --history-table-header-position-x: 71.429%; }
#driver-history-panel .dispatch-table th:nth-child(7) { --history-table-header-position-x: 85.714%; }
#driver-history-panel .dispatch-table th:nth-child(8) { --history-table-header-position-x: 100%; }

#driver-settlement-panel .dispatch-table th:nth-child(1) { --history-table-header-position-x: 0%; }
#driver-settlement-panel .dispatch-table th:nth-child(2) { --history-table-header-position-x: 25%; }
#driver-settlement-panel .dispatch-table th:nth-child(3) { --history-table-header-position-x: 50%; }
#driver-settlement-panel .dispatch-table th:nth-child(4) { --history-table-header-position-x: 75%; }
#driver-settlement-panel .dispatch-table th:nth-child(5) { --history-table-header-position-x: 100%; }

.maintenance-table-panel .dispatch-table th:nth-child(1) { --history-table-header-position-x: 0%; }
.maintenance-table-panel .dispatch-table th:nth-child(2) { --history-table-header-position-x: 11.111%; }
.maintenance-table-panel .dispatch-table th:nth-child(3) { --history-table-header-position-x: 22.222%; }
.maintenance-table-panel .dispatch-table th:nth-child(4) { --history-table-header-position-x: 33.333%; }
.maintenance-table-panel .dispatch-table th:nth-child(5) { --history-table-header-position-x: 44.444%; }
.maintenance-table-panel .dispatch-table th:nth-child(6) { --history-table-header-position-x: 55.556%; }
.maintenance-table-panel .dispatch-table th:nth-child(7) { --history-table-header-position-x: 66.667%; }
.maintenance-table-panel .dispatch-table th:nth-child(8) { --history-table-header-position-x: 77.778%; }
.maintenance-table-panel .dispatch-table th:nth-child(9) { --history-table-header-position-x: 88.889%; }
.maintenance-table-panel .dispatch-table th:nth-child(10) { --history-table-header-position-x: 100%; }

.dispatch-table th,
body[class*="dispatch-theme-"] .dispatch-table th,
body.driver-page[class*="driver-theme-"] .dispatch-table th,
body.driver-page[class*="driver-theme-"] .dispatch-table thead th {
  --animated-header-base-image: var(--table-header-bg);
  --animated-header-base-size: 220% 100%;
  --animated-header-base-position: 50%;
  --animated-header-drift: 32%;
  background-image: var(--animated-header-base-image);
  background-repeat: no-repeat;
  background-size: var(--animated-header-base-size);
  animation: taxiflow-header-gradient-drift 8.5s ease-in-out infinite alternate;
}

.assigned-history-wrap .dispatch-table th,
#driver-history-panel .dispatch-table th,
#driver-settlement-panel .dispatch-table th,
.maintenance-table-panel .dispatch-table th,
body[class*="dispatch-theme-"] .assigned-history-wrap .dispatch-table th,
body[class*="dispatch-theme-"] .maintenance-table-panel .dispatch-table th,
body.driver-page[class*="driver-theme-"] #driver-history-panel .dispatch-table th,
body.driver-page[class*="driver-theme-"] #driver-history-panel .dispatch-table thead th,
body.driver-page[class*="driver-theme-"] #driver-settlement-panel .dispatch-table th,
body.driver-page[class*="driver-theme-"] #driver-settlement-panel .dispatch-table thead th {
  --animated-header-base-image: var(--table-header-bg);
  --animated-header-base-size: 220% 100%;
  --animated-header-base-position: 50%;
  --animated-header-drift: 32%;
  color: var(--table-header-text);
  border-right-color: var(--table-header-border);
  border-bottom-color: var(--table-header-bottom);
}

.dialog-card:not(.ride-window-modal-card) > .dialog-header,
.dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child,
.chat-popout-titlebar,
.ride-window-modal-titlebar,
.window-header {
  --animated-titlebar-base-position: 50%;
  --animated-titlebar-drift: 36%;
  background-image: var(--window-titlebar-bg);
  background-repeat: no-repeat;
  background-size: 220% 100%;
  animation: taxiflow-titlebar-gradient-drift 9s ease-in-out infinite alternate;
}

.platform-admin-dialog-header {
  --animated-titlebar-base-position: 50%;
  --animated-titlebar-drift: 36%;
  background-image: var(--window-titlebar-bg) !important;
  background-repeat: no-repeat !important;
  background-size: 220% 100% !important;
  animation: taxiflow-titlebar-gradient-drift 9s ease-in-out infinite alternate;
}

@keyframes taxiflow-header-gradient-drift {
  from {
    background-position: calc(var(--animated-header-base-position) - var(--animated-header-drift)) 0;
  }

  to {
    background-position: calc(var(--animated-header-base-position) + var(--animated-header-drift)) 0;
  }
}

@keyframes taxiflow-titlebar-gradient-drift {
  from {
    background-position: calc(var(--animated-titlebar-base-position) - var(--animated-titlebar-drift)) 0;
  }

  to {
    background-position: calc(var(--animated-titlebar-base-position) + var(--animated-titlebar-drift)) 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dispatch-table th,
  body[class*="dispatch-theme-"] .dispatch-table th,
  body.driver-page[class*="driver-theme-"] .dispatch-table th,
    body.driver-page[class*="driver-theme-"] .dispatch-table thead th,
    .assigned-history-wrap .dispatch-table th,
    #driver-history-panel .dispatch-table th,
    #driver-settlement-panel .dispatch-table th,
    .maintenance-table-panel .dispatch-table th,
  .dialog-card:not(.ride-window-modal-card) > .dialog-header,
  .dialog-card:not(.ride-window-modal-card) > .dialog-form > .dialog-header:first-child,
  .chat-popout-titlebar,
  .ride-window-modal-titlebar,
  .window-header,
  .platform-admin-dialog-header {
    animation: none !important;
  }
}

@media screen {
  #settlement-print-modal.settlement-print-modal {
    padding: 24px;
    align-items: center;
    justify-content: center;
  }

  #settlement-print-modal .dialog-card.settlement-print-card {
    box-sizing: border-box;
    width: min(1440px, calc(100vw - 48px)) !important;
    max-width: min(1440px, calc(100vw - 48px)) !important;
    height: min(900px, calc(100vh - 48px));
    max-height: calc(100vh - 48px) !important;
    padding: 0 !important;
    border-radius: 16px !important;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0;
    overflow: hidden;
  }

  #settlement-print-modal .dialog-card.settlement-print-card::before {
    border-radius: inherit;
  }

  #settlement-print-modal .settlement-print-header {
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
    padding: 14px 18px;
    border-radius: 16px 16px 0 0;
    color: var(--window-titlebar-text);
  }

  #settlement-print-modal .settlement-print-header .modal-close-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    margin-left: auto;
  }

  #settlement-print-modal .settlement-print-header .eyebrow,
  #settlement-print-modal .settlement-print-header h3,
  #settlement-print-modal .settlement-print-header .muted {
    color: inherit;
  }

  #settlement-print-modal .settlement-print-body {
    min-height: 0;
    padding: 16px;
    overflow: auto;
    background: rgba(241, 245, 249, 0.72);
  }

  #settlement-print-modal .settlement-print-document {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    padding: 16px;
  }

  #settlement-print-modal .settlement-document {
    box-sizing: border-box;
    width: 100%;
    min-width: 1120px;
    padding: 16px;
  }

  #settlement-print-modal .settlement-document-meta {
    grid-template-columns: minmax(220px, 1fr) 180px 132px 160px;
    gap: 8px;
  }

  #settlement-print-modal .settlement-document-meta > div {
    min-width: 0;
  }

  #settlement-print-modal .settlement-document-meta > div:nth-child(2) strong {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }

  #settlement-print-modal .settlement-document-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    align-items: start;
  }

  #settlement-print-modal .settlement-print-layout {
    grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
    align-items: start;
  }

  #settlement-print-modal .settlement-document-table {
    min-width: 0;
    table-layout: fixed;
  }

  #settlement-print-modal .settlement-print-table {
    min-width: 0;
    table-layout: fixed;
  }

  #settlement-print-modal .settlement-print-table th:first-child,
  #settlement-print-modal .settlement-print-table td:first-child {
    width: 42px;
  }

  #settlement-print-modal .settlement-print-table th:nth-child(3),
  #settlement-print-modal .settlement-print-table td:nth-child(3) {
    width: 128px;
  }

  #settlement-print-modal .settlement-print-table th:nth-child(4),
  #settlement-print-modal .settlement-print-table th:nth-child(5),
  #settlement-print-modal .settlement-print-table td:nth-child(4),
  #settlement-print-modal .settlement-print-table td:nth-child(5) {
    width: 104px;
  }

  #settlement-print-modal .settlement-print-table td:nth-child(2) {
    overflow-wrap: anywhere;
  }

  #settlement-print-modal .settlement-document-table th:first-child,
  #settlement-print-modal .settlement-document-table td:first-child {
    width: 42px;
  }

  #settlement-print-modal .settlement-document-table th:nth-child(3),
  #settlement-print-modal .settlement-document-table td:nth-child(3) {
    width: 136px;
  }

  #settlement-print-modal .settlement-document-table th:nth-child(4),
  #settlement-print-modal .settlement-document-table th:nth-child(5),
  #settlement-print-modal .settlement-document-table td:nth-child(4),
  #settlement-print-modal .settlement-document-table td:nth-child(5) {
    width: 100px;
  }

  #settlement-print-modal .settlement-document-table td:nth-child(2) {
    overflow-wrap: anywhere;
  }

  #settlement-print-modal .settlement-print-side {
    min-width: 0;
  }

  #settlement-print-modal .settlement-document-side {
    min-width: 0;
  }

  #settlement-print-modal .settlement-print-actions {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid rgba(126, 143, 170, 0.22);
    background: rgba(255, 255, 255, 0.78);
    justify-content: flex-end;
  }

  .settlement-print-bubbles {
    left: 14px;
    bottom: 14px;
    width: min(286px, calc(100vw - 28px));
    max-height: min(46vh, 380px);
    gap: 7px;
    padding: 2px 4px 2px 2px;
  }

  .settlement-print-bubble-title {
    pointer-events: auto;
    padding: 7px 10px;
    border: 1px solid rgba(126, 143, 170, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--muted);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
  }

  .settlement-print-bubble {
    min-height: 58px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-radius: 14px;
    animation-duration: 2.5s;
  }

  .settlement-print-bubble-badge {
    width: 40px;
    height: 40px;
    font-size: 0.78rem;
  }

  .settlement-print-bubble-body strong {
    font-size: 0.84rem;
  }

  .settlement-print-bubble-body span {
    font-size: 0.72rem;
  }

  body.dispatch-theme-dark .settlement-print-bubble-title,
  body.dispatch-theme-midnight .settlement-print-bubble-title,
  body.dispatch-theme-space .settlement-print-bubble-title {
    border-color: rgba(220, 230, 251, 0.16);
    background: rgba(15, 23, 42, 0.82);
    color: rgba(226, 247, 244, 0.78);
  }
}

@media screen and (max-width: 980px) {
  #settlement-print-modal.settlement-print-modal {
    padding: 10px;
  }

  #settlement-print-modal .dialog-card.settlement-print-card {
    width: min(100%, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
    height: min(880px, calc(100vh - 20px));
    max-height: calc(100vh - 20px) !important;
  }

  #settlement-print-modal .settlement-print-layout,
  #settlement-print-modal .settlement-print-meta,
  #settlement-print-modal .settlement-document-layout,
  #settlement-print-modal .settlement-document-meta {
    grid-template-columns: 1fr;
  }

  #settlement-print-modal .settlement-document {
    min-width: 760px;
  }

  #settlement-print-modal .settlement-print-table-wrap,
  #settlement-print-modal .settlement-document-table-wrap {
    overflow: auto;
  }

  #settlement-print-modal .settlement-print-table,
  #settlement-print-modal .settlement-document-table {
    min-width: 660px;
  }
}
