:root {
    --primary: #0084d1;
    --primary-soft: #e6f4fd;
    --bg: #f7fafc;
    --card: #fff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family:
        'Inter',
        system-ui,
        -apple-system,
        sans-serif;
    background: var(--bg);
    color: var(--text);
}
a {
    color: var(--primary);
}
.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 60px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
}
.brand img {
    display: block;
    width: 150px;
    height: 46px;
    flex: none;
    object-fit: contain;
}
nav {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}
nav a {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
nav a.active,
nav a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
nav a.out {
    color: var(--red);
}
nav a.out:hover {
    background: #fee2e2;
    color: var(--red);
}
main {
    padding: 24px 16px 56px;
}
h1 {
    font-size: 24px;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}
h2 {
    font-size: 16px;
    margin: 0 0 12px;
}
.sub {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 20px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.tile {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}
.tile .label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.tile .value {
    font-size: 22px;
    font-weight: 800;
    margin-top: 4px;
}
.tile .value.green {
    color: var(--green);
}
.tile .value.red {
    color: var(--red);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th {
    text-align: left;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.table-scroll {
    overflow-x: auto;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.badge.ok {
    background: #dcfce7;
    color: #166534;
}
.badge.due {
    background: #fee2e2;
    color: #991b1b;
}
.badge.live {
    background: #fef3c7;
    color: #92400e;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn:hover {
    opacity: 0.9;
}
.btn.sm {
    padding: 5px 9px;
    font-size: 12px;
}
.btn.ghost {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
}
.btn.danger {
    background: #fff;
    color: var(--red);
    border: 1px solid #fecaca;
}
.btn.green {
    background: var(--green);
}
form .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
}
.timezone-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--primary-soft);
    border-color: var(--primary);
}
.payment-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.payment-option {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text) !important;
    cursor: pointer;
}
.payment-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary) !important;
}
.payment-option input {
    width: auto !important;
    margin: 0;
    accent-color: var(--primary);
}
.payment-option:focus-within {
    outline: 2px solid var(--primary-soft);
    border-color: var(--primary);
}
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}
.filters select,
.filters input {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
}
.chk {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.actions {
    display: flex;
    gap: 6px;
}
.field > .btn {
    margin-top: 7px;
}
.trip-measurements {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
}
.gps-coordinate {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}
.location-attribution {
    flex-basis: 100%;
    color: var(--muted);
    font-size: 10px;
}
.gps-capture-control[hidden],
.gps-coordinate[hidden],
.trip-measurements[hidden],
.log-only-field[hidden] {
    display: none !important;
}
.billing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    max-width: 680px;
}
.billing-price {
    margin: 2px 0 12px;
    color: var(--text);
    font-size: 30px;
    font-weight: 800;
}
.billing-price span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}
.billing-plans .btn {
    width: 100%;
    justify-content: center;
}
.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.ride-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: 0 0 16px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #f1f5f9;
}
.ride-tab {
    display: flex;
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.ride-tab-title {
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}
.ride-tab-description {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}
.ride-tab.active {
    border-color: #cbd5e1;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.ride-tab.active .ride-tab-description {
    color: #526176;
}
.ride-tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}
.schedule-note {
    margin-top: -4px;
    padding: 10px 12px;
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
}
.driver-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.driver-admin-head h2 {
    margin: 0;
}
.driver-admin-note {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.driver-count {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.driver-identity {
    display: flex;
    align-items: center;
    min-width: 210px;
}
.driver-details,
.driver-meta {
    display: block;
}
.driver-details strong {
    display: block;
    color: var(--text);
    font-size: 13px;
}
.driver-meta {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}
.primary-admin-label {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    background: #e8f4ff;
    color: #075985;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.driver-type-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.driver-delete-form {
    display: inline-flex;
}
.driver-report-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.driver-report-heading h2 {
    margin: 0;
}
.admin-report-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.admin-report-heading h2 {
    margin: 0;
}
.notice {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}
.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 16px;
}
.auth-wrap {
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.auth-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    width: 100%;
    max-width: 400px;
}
.auth-brand {
    display: flex;
    justify-content: center;
    margin: 0 auto 14px;
}
.auth-brand img {
    display: block;
    width: min(140px, 100%);
    height: auto;
    object-fit: contain;
}
.auth-card h1 {
    text-align: center;
    margin-bottom: 4px;
}
.auth-card .sub {
    text-align: center;
    margin-bottom: 18px;
}
.auth-card input {
    margin-bottom: 12px;
}
.auth-card .btn {
    width: 100%;
    justify-content: center;
}
.auth-vehicle-wrap {
    background:
        radial-gradient(ellipse at 15% 12%, rgba(34, 197, 94, 0.09), transparent 38%),
        radial-gradient(ellipse at 90% 90%, rgba(0, 132, 209, 0.09), transparent 40%);
}
.auth-vehicle-card {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    max-width: 1000px;
    min-height: 570px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 26px 76px rgba(15, 23, 42, 0.15);
    animation: auth-arrive 0.5s ease-out both;
}
.auth-vehicle-visual {
    position: relative;
    min-height: 570px;
    overflow: hidden;
    background: #162c36;
    color: #fff;
}
.auth-vehicle-visual > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 53% center;
}
.auth-visual-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(9, 24, 31, 0.12) 0%,
        rgba(9, 24, 31, 0.05) 36%,
        rgba(9, 24, 31, 0.82) 100%
    );
}
.auth-visual-top,
.auth-visual-copy,
.auth-visual-foot {
    position: absolute;
    z-index: 1;
    left: 34px;
    right: 34px;
}
.auth-visual-top {
    top: 32px;
}
.auth-visual-tag {
    display: inline-flex;
    padding: 9px 11px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    background: rgba(13, 29, 36, 0.3);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    backdrop-filter: blur(8px);
}
.auth-visual-copy {
    bottom: 92px;
}
.auth-visual-copy p {
    margin: 0 0 12px;
    color: #d4f06a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
}
.auth-visual-copy h2 {
    margin: 0;
    font-size: 42px;
    line-height: 1.04;
}
.auth-visual-copy > span {
    display: block;
    margin-top: 13px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}
.auth-visual-foot {
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}
.auth-visual-foot span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d4f06a;
    box-shadow: 0 0 0 4px rgba(212, 240, 106, 0.18);
}
.auth-vehicle-form {
    align-self: center;
    padding: 44px 48px;
}
.auth-vehicle-form .auth-brand {
    justify-content: flex-start;
    margin: 0 0 24px;
}
.auth-vehicle-form .auth-brand img {
    width: 126px;
}
.auth-form-kicker {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
}
.auth-vehicle-form h1 {
    text-align: left;
    margin-bottom: 8px;
    font-size: 29px;
}
.auth-vehicle-form > .sub {
    margin-bottom: 24px;
    text-align: left;
    line-height: 1.6;
}
.auth-vehicle-form .field label {
    margin-bottom: 7px;
    color: var(--text);
    font-size: 13px;
}
.auth-vehicle-form .field input {
    min-height: 45px;
    margin-bottom: 16px;
    padding: 10px 12px;
}
.auth-vehicle-form .btn {
    min-height: 46px;
    margin-top: 3px;
    box-shadow: 0 6px 14px rgba(0, 132, 209, 0.2);
}
.auth-form-utility {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 17px;
    font-size: 12px;
    font-weight: 600;
}
.auth-form-utility a {
    color: var(--primary);
    text-decoration: none;
}
.auth-form-utility a:hover,
.auth-switch a:hover {
    text-decoration: underline;
}
.auth-switch {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.auth-switch a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.auth-switch a span {
    font-size: 16px;
}
.auth-register-card {
    min-height: 620px;
}
.auth-register-card .auth-vehicle-visual {
    min-height: 620px;
}
.auth-register-card .auth-vehicle-form {
    padding-top: 38px;
    padding-bottom: 38px;
}
@keyframes auth-arrive {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.forgot-wrap {
    background:
        radial-gradient(ellipse at 18% 20%, rgba(0, 132, 209, 0.09), transparent 44%),
        radial-gradient(ellipse at 82% 80%, rgba(34, 197, 94, 0.07), transparent 38%);
}
.forgot-card {
    display: grid;
    grid-template-columns: 0.88fr 1fr;
    max-width: 860px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}
.forgot-story {
    position: relative;
    display: flex;
    min-height: 440px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 34px;
    background: #073b4c;
    color: #fff;
}
.forgot-story:before {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        135deg,
        transparent 0 18px,
        rgba(255, 255, 255, 0.035) 18px 19px
    );
    content: '';
}
.forgot-story:after {
    position: absolute;
    right: -110px;
    bottom: -150px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(126, 221, 190, 0.28);
    border-radius: 50%;
    box-shadow:
        0 0 0 32px rgba(126, 221, 190, 0.035),
        0 0 0 66px rgba(126, 221, 190, 0.025);
    content: '';
}
.forgot-eyebrow,
.forgot-route,
.forgot-kicker,
.forgot-headline,
.forgot-story-note {
    position: relative;
    z-index: 1;
}
.forgot-eyebrow {
    color: #9be3c3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}
.forgot-route {
    width: 54px;
    height: 54px;
    margin-top: 58px;
    border: 1px solid rgba(155, 227, 195, 0.6);
    border-radius: 50%;
}
.forgot-route:before {
    position: absolute;
    top: 25px;
    left: 12px;
    width: 30px;
    height: 1px;
    background: #9be3c3;
    content: '';
    transform: rotate(-42deg);
}
.forgot-route:after,
.forgot-route span {
    position: absolute;
    width: 7px;
    height: 7px;
    border: 2px solid #9be3c3;
    border-radius: 50%;
    background: #073b4c;
    content: '';
}
.forgot-route:after {
    top: 11px;
    right: 10px;
}
.forgot-route span {
    bottom: 10px;
    left: 11px;
}
.forgot-kicker {
    margin: 28px 0 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
}
.forgot-headline {
    margin: 0;
    font-size: 32px;
    font-weight: 750;
    line-height: 1.12;
}
.forgot-story-note {
    max-width: 250px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.6;
}
.forgot-form-panel {
    align-self: center;
    padding: 42px 44px;
}
.forgot-form-panel .auth-brand {
    justify-content: flex-start;
    margin: 0 0 22px;
}
.forgot-form-panel .auth-brand img {
    width: 126px;
}
.forgot-form-panel h1 {
    text-align: left;
    margin-bottom: 8px;
    font-size: 27px;
}
.forgot-form-panel .sub {
    text-align: left;
    margin-bottom: 24px;
    line-height: 1.6;
}
.forgot-form-panel .notice {
    margin-bottom: 18px;
}
.forgot-form-panel .field label {
    margin-bottom: 7px;
    color: var(--text);
    font-size: 13px;
}
.forgot-form-panel .field input {
    min-height: 44px;
    padding: 10px 12px;
    margin-bottom: 18px;
}
.forgot-form-panel .btn {
    min-height: 44px;
    box-shadow: 0 5px 12px rgba(0, 132, 209, 0.2);
}
.forgot-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.forgot-back-link:hover {
    color: var(--primary);
}
.forgot-back-link span {
    font-size: 17px;
    line-height: 1;
}
.reset-wrap {
    background:
        radial-gradient(ellipse at 84% 18%, rgba(34, 197, 94, 0.1), transparent 42%),
        radial-gradient(ellipse at 12% 82%, rgba(245, 158, 11, 0.08), transparent 38%);
}
.reset-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    max-width: 900px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.13);
}
.reset-story {
    position: relative;
    display: flex;
    min-height: 500px;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 34px;
    background: #173f35;
    color: #fff;
}
.reset-story:before {
    position: absolute;
    right: -120px;
    top: 80px;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(212, 240, 106, 0.24);
    border-radius: 50%;
    box-shadow:
        0 0 0 28px rgba(212, 240, 106, 0.035),
        0 0 0 62px rgba(212, 240, 106, 0.025);
    content: '';
}
.reset-story:after {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        145deg,
        transparent 0 23px,
        rgba(255, 255, 255, 0.025) 23px 24px
    );
    content: '';
}
.reset-eyebrow,
.reset-emblem,
.reset-story-copy,
.reset-secure-note {
    position: relative;
    z-index: 1;
}
.reset-eyebrow {
    color: #d4f06a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.11em;
}
.reset-emblem {
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    margin: 44px 0 0;
    border: 1px solid rgba(212, 240, 106, 0.45);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.055);
    transform: rotate(-7deg);
}
.reset-lock {
    position: relative;
    display: block;
    width: 25px;
    height: 21px;
    margin-top: 9px;
    border: 2px solid #d4f06a;
    border-radius: 5px;
}
.reset-lock:before {
    position: absolute;
    left: 5px;
    top: -14px;
    width: 11px;
    height: 14px;
    border: 2px solid #d4f06a;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    content: '';
}
.reset-lock:after {
    position: absolute;
    top: 6px;
    left: 9px;
    width: 3px;
    height: 6px;
    border-radius: 3px;
    background: #d4f06a;
    content: '';
}
.reset-story-copy {
    margin-top: auto;
    padding-top: 36px;
}
.reset-kicker {
    margin: 0 0 8px;
    color: #d4f06a;
    font-size: 14px;
    font-weight: 700;
}
.reset-story-copy h2 {
    margin: 0;
    font-size: 31px;
    line-height: 1.12;
}
.reset-story-copy > p:last-child {
    max-width: 260px;
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.65;
}
.reset-secure-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 12px;
}
.reset-secure-note span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d4f06a;
    box-shadow: 0 0 0 4px rgba(212, 240, 106, 0.13);
}
.reset-form-panel {
    align-self: center;
    padding: 42px 48px;
}
.reset-form-panel .auth-brand {
    justify-content: flex-start;
    margin: 0 0 22px;
}
.reset-form-panel .auth-brand img {
    width: 126px;
}
.reset-form-panel h1 {
    text-align: left;
    margin-bottom: 8px;
    font-size: 27px;
}
.reset-form-panel .sub {
    text-align: left;
    margin-bottom: 22px;
    line-height: 1.6;
}
.reset-form-panel .field label {
    margin-bottom: 7px;
    color: var(--text);
    font-size: 13px;
}
.reset-form-panel .field input {
    min-height: 44px;
    padding: 10px 12px;
    margin-bottom: 17px;
}
.reset-form-panel .btn {
    min-height: 44px;
    margin-top: 2px;
    box-shadow: 0 5px 12px rgba(0, 132, 209, 0.2);
}
.reset-feedback {
    margin-bottom: 18px;
}
.reset-expired-copy {
    margin-top: 0;
}
.reset-request-link {
    text-decoration: none;
}
.reset-back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 4px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.reset-back-link:hover {
    text-decoration: underline;
}
.reset-back-link span {
    font-size: 18px;
}
.bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 160px;
    padding: 8px 0;
}
.bars .bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}
.bars .bar .fill {
    width: 70%;
    max-width: 46px;
    background: var(--primary);
    border-radius: 6px 6px 0 0;
    min-height: 2px;
}
.bars .bar .fill.exp {
    background: #fca5a5;
}
.bars .bar .cap {
    font-size: 11px;
    color: var(--muted);
}
.bars .bar .amt {
    font-size: 10px;
    font-weight: 700;
    color: var(--text);
}
.foot {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 18px 0;
    font-size: 13px;
    color: var(--muted);
}
.foot-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.foot strong {
    color: var(--text);
}
.foot a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.foot a:hover {
    text-decoration: underline;
}
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: rgba(247, 250, 252, 0.96);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.16s ease,
        visibility 0.16s ease;
}
.page-loader.is-visible {
    opacity: 1;
    visibility: visible;
}
.page-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(260px, calc(100vw - 48px));
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
}
.page-loader-content > img {
    width: min(260px, 100%);
    height: auto;
    aspect-ratio: 1167 / 355;
    object-fit: contain;
}
.page-loader-content p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}
.loader-track {
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--primary-soft);
}
.loader-track span {
    display: block;
    width: 38%;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    animation: loader-travel 1s ease-in-out infinite;
}
@keyframes loader-travel {
    from {
        transform: translateX(-110%);
    }
    to {
        transform: translateX(280%);
    }
}
.muted {
    color: var(--muted);
}
.right {
    text-align: right;
}
.mb0 {
    margin-bottom: 0;
}
@media (max-width: 640px) {
    .bar-inner {
        height: auto;
        padding: 10px 0;
    }
    .foot-inner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}
@media (max-width: 760px) {
    .auth-vehicle-card,
    .auth-register-card {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: 0;
    }
    .auth-vehicle-visual,
    .auth-register-card .auth-vehicle-visual {
        min-height: 275px;
    }
    .auth-visual-top,
    .auth-visual-copy,
    .auth-visual-foot {
        left: 24px;
        right: 24px;
    }
    .auth-visual-top {
        top: 22px;
    }
    .auth-visual-copy {
        bottom: 57px;
    }
    .auth-visual-copy h2 {
        font-size: 34px;
    }
    .auth-visual-copy p {
        margin-bottom: 8px;
    }
    .auth-visual-copy > span {
        margin-top: 8px;
        font-size: 13px;
    }
    .auth-visual-foot {
        bottom: 20px;
    }
    .auth-vehicle-form,
    .auth-register-card .auth-vehicle-form {
        padding: 30px 28px;
    }
    .auth-vehicle-form .auth-brand {
        justify-content: flex-start;
        margin-bottom: 18px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .auth-vehicle-card {
        animation: none;
    }
}
@media (max-width: 700px) {
    .forgot-card {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .forgot-story {
        min-height: 190px;
        padding: 22px 24px;
    }
    .forgot-route {
        position: absolute;
        top: 22px;
        right: 26px;
        margin: 0;
    }
    .forgot-kicker {
        margin-top: 34px;
    }
    .forgot-headline {
        font-size: 27px;
    }
    .forgot-story-note {
        margin-top: 10px;
    }
    .forgot-form-panel {
        padding: 30px 26px;
    }
}
@media (max-width: 700px) {
    .reset-card {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
    .reset-story {
        min-height: 230px;
        padding: 22px 24px;
    }
    .reset-emblem {
        position: absolute;
        top: 50px;
        right: 25px;
        width: 56px;
        height: 56px;
        margin: 0;
        border-radius: 18px;
    }
    .reset-story-copy {
        padding-top: 58px;
    }
    .reset-story-copy h2 {
        font-size: 27px;
    }
    .reset-story-copy > p:last-child {
        max-width: 240px;
        margin-top: 9px;
    }
    .reset-secure-note {
        margin-top: 16px;
    }
    .reset-form-panel {
        padding: 30px 26px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .page-loader {
        transition: none;
    }
    .loader-track span {
        animation: none;
        transform: translateX(80%);
    }
}

/* Shared dark glass theme for admin, driver and account pages. */
:root {
    color-scheme: dark;
    --primary: #69d9f3;
    --primary-soft: rgba(78, 203, 237, 0.12);
    --bg: #080e1c;
    --card: rgba(20, 31, 52, 0.78);
    --text: #edf3ff;
    --muted: #a3b2cb;
    --border: rgba(172, 197, 237, 0.15);
    --green: #6ee7b7;
    --red: #fda4af;
    --amber: #fcd387;
    --glass-shadow: 0 18px 50px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
html {
    min-height: 100%;
    background: var(--bg);
}
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(22, 126, 157, 0.2), transparent 45%),
        radial-gradient(ellipse at 100% 35%, rgba(100, 70, 187, 0.15), transparent 48%), var(--bg);
    background-attachment: fixed;
}
::selection {
    background: rgba(105, 217, 243, 0.3);
    color: #fff;
}
.wrap {
    width: 100%;
    max-width: 1200px;
    padding-left: 24px;
    padding-right: 24px;
}
main.wrap {
    flex: 1;
    padding-top: 36px;
    padding-bottom: 64px;
}
.topbar {
    background: rgba(10, 18, 33, 0.88);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}
.bar-inner {
    height: auto;
    min-height: 82px;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 18px;
}
.brand {
    padding: 5px 12px;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
}
.brand img {
    width: 130px;
    height: 40px;
}
.account-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}
.workspace-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.workspace-label:before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(110, 231, 183, 0.5);
}
nav {
    gap: 4px;
}
nav a {
    border: 1px solid transparent;
    padding: 8px 10px;
    transition:
        background 0.18s,
        color 0.18s,
        border-color 0.18s;
}
nav a.active,
nav a:hover {
    background: var(--primary-soft);
    border-color: rgba(105, 217, 243, 0.2);
    color: var(--primary);
}
nav a.out:hover {
    background: rgba(253, 164, 175, 0.1);
    border-color: rgba(253, 164, 175, 0.2);
}
h1 {
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -0.035em;
    margin-bottom: 7px;
}
h2 {
    font-size: 17px;
    letter-spacing: -0.015em;
}
.sub {
    line-height: 1.65;
    margin-bottom: 26px;
}
.grid {
    gap: 16px;
    margin-bottom: 24px;
}
.card,
.tile,
.auth-card,
.page-loader-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 65%), var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}
.card {
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
}
.tile {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 21px 22px;
}
.tile:before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
    box-shadow: 0 0 16px rgba(105, 217, 243, 0.35);
}
.tile:nth-child(2):before {
    background: var(--green);
}
.tile:nth-child(3):before {
    background: var(--amber);
}
.tile:nth-child(4):before {
    background: #b9a5ff;
}
.tile .label {
    font-size: 10px;
    letter-spacing: 0.1em;
}
.tile .value {
    font-size: 28px;
    letter-spacing: -0.035em;
    margin-top: 10px;
    font-variant-numeric: tabular-nums;
}
.table-scroll {
    border: 1px solid var(--border);
    border-radius: 12px;
}
th {
    background: rgba(5, 13, 26, 0.36);
    font-size: 10px;
    letter-spacing: 0.09em;
    padding: 13px 14px;
}
td {
    padding: 15px 14px;
    border-bottom-color: rgba(172, 197, 237, 0.09);
}
tr:last-child td {
    border-bottom: 0;
}
tbody tr:hover td {
    background: rgba(105, 217, 243, 0.035);
}
.badge {
    padding: 4px 10px;
    border: 1px solid transparent;
    letter-spacing: 0.015em;
}
.badge.ok,
.notice {
    background: rgba(52, 211, 153, 0.1);
    color: #9aefc9;
    border-color: rgba(110, 231, 183, 0.2);
}
.badge.due,
.error {
    background: rgba(251, 113, 133, 0.1);
    color: #ffb3bf;
    border-color: rgba(253, 164, 175, 0.22);
}
.badge.live {
    background: rgba(251, 191, 36, 0.1);
    color: #fcd387;
    border-color: rgba(252, 211, 135, 0.2);
}
.btn {
    justify-content: center;
    background: linear-gradient(135deg, #74e3f3, #60bddf);
    color: #071824;
    border: 1px solid rgba(178, 239, 255, 0.25);
    border-radius: 10px;
    min-height: 40px;
    padding: 9px 16px;
    box-shadow: 0 4px 16px rgba(49, 173, 209, 0.12);
    transition:
        filter 0.18s,
        background 0.18s,
        box-shadow 0.18s;
}
.btn:hover {
    opacity: 1;
    filter: brightness(1.1);
    box-shadow: 0 5px 20px rgba(49, 173, 209, 0.22);
}
.btn.sm {
    min-height: 30px;
    padding: 5px 10px;
}
.btn.ghost {
    background: rgba(105, 217, 243, 0.055);
    color: var(--primary);
    border-color: rgba(105, 217, 243, 0.2);
    box-shadow: none;
}
.btn.danger {
    background: rgba(253, 164, 175, 0.07);
    color: var(--red);
    border-color: rgba(253, 164, 175, 0.22);
    box-shadow: none;
}
.btn.green {
    background: linear-gradient(135deg, #6ee7b7, #45bfab);
    color: #08231d;
}
.btn:disabled {
    filter: none;
    box-shadow: none;
}
.actions {
    flex-wrap: wrap;
    gap: 8px;
}
form .row {
    gap: 16px;
    margin-bottom: 18px;
}
.field label {
    color: #bdcbe0;
    margin-bottom: 7px;
}
.field input,
.field select,
.field textarea,
.filters select,
.filters input {
    background: rgba(5, 12, 25, 0.58);
    color: var(--text);
    border-color: rgba(172, 197, 237, 0.18);
    padding: 11px 12px;
    min-height: 43px;
    border-radius: 10px;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
}
input::placeholder,
textarea::placeholder {
    color: #7f90ac;
    opacity: 1;
}
select option {
    background: #142034;
    color: var(--text);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(105, 217, 243, 0.12);
}
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
input[type='checkbox'],
input[type='radio'] {
    accent-color: var(--primary);
}
input[type='file']::file-selector-button {
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    margin-right: 12px;
    cursor: pointer;
}
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}
.payment-option {
    background: rgba(5, 12, 25, 0.4);
    border-radius: 10px;
    min-height: 43px;
}
.payment-option:has(input:checked) {
    background: var(--primary-soft);
}
.ride-tabs {
    background: rgba(5, 12, 25, 0.4);
    border-radius: 13px;
    padding: 6px;
    gap: 6px;
}
.ride-tab {
    border-radius: 9px;
    min-height: 66px;
}
.ride-tab.active {
    background: rgba(105, 217, 243, 0.1);
    border-color: rgba(105, 217, 243, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.ride-tab.active .ride-tab-description {
    color: #b5d4e0;
}
.trip-measurements {
    background: rgba(105, 217, 243, 0.045);
    border-radius: 10px;
}
.schedule-note {
    border-radius: 8px;
}
.driver-count {
    background: rgba(172, 197, 237, 0.06);
    border-radius: 999px;
}
.primary-admin-label {
    background: rgba(185, 165, 255, 0.12);
    color: #d1bfff;
    border: 1px solid rgba(185, 165, 255, 0.2);
}
.notice,
.error {
    border-radius: 12px;
    padding: 13px 16px;
}
.auth-card {
    border-radius: 22px;
}
.auth-brand img {
    background: transparent;
    border-radius: 0;
    padding: 0;
}
.auth-vehicle-wrap,
.forgot-wrap,
.reset-wrap {
    background: transparent;
}
.auth-vehicle-form,
.forgot-form-panel,
.reset-form-panel {
    background: rgba(10, 19, 35, 0.28);
}
.auth-vehicle-form .btn,
.forgot-form-panel .btn,
.reset-form-panel .btn {
    box-shadow: 0 5px 20px rgba(49, 173, 209, 0.16);
}
.billing-plans {
    gap: 20px;
}
.bars .bar .fill {
    background: linear-gradient(0deg, #2788ae, #69d9f3);
    box-shadow: 0 0 18px rgba(105, 217, 243, 0.12);
}
.bars .bar .fill.exp {
    background: linear-gradient(0deg, #ad536d, #fda4af);
}
.foot {
    background: rgba(10, 18, 33, 0.7);
    border-top-color: var(--border);
    padding: 22px 0;
}
.page-loader {
    background: rgba(5, 11, 23, 0.84);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.page-loader-content {
    border-radius: 20px;
}
.page-loader-content > img {
    background: rgba(255, 255, 255, 0.94);
    padding: 10px;
    border-radius: 10px;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card,
    .tile,
    .auth-card,
    .page-loader-content {
        background: #142034;
    }
    .topbar {
        background: #0c1527;
    }
}
@media (max-width: 1000px) {
    .account-nav {
        gap: 8px;
    }
    .workspace-label {
        display: none;
    }
}
@media (max-width: 760px) {
    .wrap {
        padding-left: 18px;
        padding-right: 18px;
    }
    main.wrap {
        padding-top: 26px;
        padding-bottom: 40px;
    }
    .bar-inner {
        justify-content: center;
        gap: 12px;
    }
    .account-nav {
        width: 100%;
        justify-content: center;
    }
    nav {
        justify-content: center;
    }
    nav a {
        font-size: 12px;
        padding: 7px 9px;
    }
    h1 {
        font-size: 26px;
    }
    .card {
        padding: 18px;
        border-radius: 16px;
    }
    .auth-vehicle-card,
    .forgot-card,
    .reset-card {
        padding: 0;
    }
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .tile {
        padding: 17px 16px;
    }
    .tile .value {
        font-size: 24px;
    }
    .driver-admin-head {
        align-items: flex-start;
    }
    .driver-count {
        font-size: 11px;
    }
}
@media (max-width: 380px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .payment-choice,
    .ride-tabs {
        grid-template-columns: 1fr;
    }
    .driver-admin-head {
        flex-wrap: wrap;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Preserve the transparent MPCS artwork and render it in white throughout the app. */
img[src='assets/BLUE%20WEBISTE.png'] {
    filter: brightness(0) invert(1);
}

/* Phase 1 additions follow the existing dark-glass palette. */
.quick-actions {
    margin: 0 0 24px;
}
.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
}
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.analytics-grid .card:first-child {
    grid-column: 1/-1;
}
.chart-box {
    position: relative;
    height: 260px;
    min-width: 0;
}
.analytics-controls {
    margin-bottom: 18px;
    align-items: end;
}
.analytics-controls label,
.ride-filters label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}
.ride-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 14px;
    margin: 16px 0;
}
.ride-filters input,
.ride-filters select,
.analytics-controls input,
.analytics-controls select,
#calendar-date,
#calendar-status {
    min-height: 43px;
    width: 100%;
    background: #0d192b;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px;
    font: inherit;
}
.ride-filters input[type='checkbox'] {
    width: auto;
    min-height: 20px;
}
.ride-filters .actions {
    align-self: end;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}
.upcoming-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.upcoming-item:last-child {
    border-bottom: 0;
}
.upcoming-item p {
    margin: 5px 0;
    overflow-wrap: anywhere;
}
.upcoming-item h3 {
    margin: 0;
    font-size: 16px;
}
.upcoming-item .actions {
    flex-shrink: 0;
    max-width: 55%;
}
.upcoming-item form {
    margin: 0;
}
.repeat-options {
    margin: 16px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.repeat-options summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 12px;
}
fieldset {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}
legend {
    font-size: 13px;
    padding: 0 7px;
}
.ride-detail {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px;
}
.ride-detail dt {
    color: var(--muted);
}
.ride-detail dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.ride-notes {
    white-space: pre-wrap;
}
:focus-visible {
    outline: 3px solid #7dd3fc;
    outline-offset: 4px;
}
.toast {
    margin-bottom: 22px;
}
.error a {
    color: #fff;
    text-decoration: underline;
}
#ride-calendar {
    --fc-border-color: rgba(172, 197, 237, 0.22);
    --fc-page-bg-color: #101c30;
    --fc-neutral-bg-color: #18263c;
    --fc-list-event-hover-bg-color: #22344e;
    --fc-today-bg-color: rgba(125, 211, 252, 0.08);
    --fc-button-bg-color: #1c3650;
    --fc-button-border-color: #36526f;
    --fc-button-hover-bg-color: #2c4f70;
    --fc-button-active-bg-color: #075985;
}
.fc .fc-toolbar-title {
    font-size: 22px;
}
.fc .fc-button {
    min-height: 40px;
}
.fc a {
    color: var(--text);
}
.fc-event {
    cursor: pointer;
}
.fc-event-title {
    font-weight: 600;
}
.fc-list-day-text,
.fc-list-day-side-text {
    color: var(--text) !important;
}
.fc .fc-list-event:focus td {
    background: #22344e;
}
.account-nav {
    min-width: 0;
}
nav a {
    white-space: nowrap;
}
@media (max-width: 800px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    .upcoming-item {
        align-items: flex-start;
        flex-direction: column;
    }
    .upcoming-item .actions {
        max-width: 100%;
        flex-shrink: 1;
    }
    .fc .fc-toolbar {
        flex-wrap: wrap;
        gap: 12px;
    }
    .fc .fc-toolbar-title {
        font-size: 18px;
    }
    .fc .fc-toolbar-chunk {
        max-width: 100%;
    }
    .ride-detail {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .ride-detail dd {
        margin-bottom: 12px;
    }
    .ride-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .phase-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .account-nav {
        justify-content: flex-start;
        width: 100%;
    }
    nav {
        max-width: 100%;
    }
    .fc .fc-button {
        font-size: 12px;
        padding: 7px;
    }
    .chart-box {
        height: 230px;
    }
}
@media (max-width: 420px) {
    #ride-calendar .fc-list-table {
        table-layout: fixed;
        width: 100%;
    }
    #ride-calendar .fc-list-event-time {
        width: 64px;
        white-space: normal;
    }
    #ride-calendar .fc-list-event-graphic {
        width: 22px;
        padding-left: 6px;
        padding-right: 6px;
    }
    #ride-calendar .fc-list-event-title {
        overflow-wrap: anywhere;
    }
    .ride-filters {
        grid-template-columns: 1fr;
    }
    .wrap {
        padding-left: 14px;
        padding-right: 14px;
    }
    .card {
        padding: 16px;
    }
    .fc .fc-toolbar-chunk {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    .phase-stats .tile {
        padding: 16px 12px;
    }
}
.analytics-grid {
    min-width: 0;
    width: 100%;
}
.analytics-grid > .card {
    min-width: 0;
    max-width: 100%;
}
.chart-box canvas {
    max-width: 100%;
}
.public-booking {
    max-width: 900px;
    margin: 0 auto;
}
.booking-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.live-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.live-panel-heading h2,
.live-panel-heading h3 {
    margin: 4px 0;
}
.live-progress {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 22px 0;
    flex-wrap: wrap;
}
.live-progress li {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
}
.live-progress li.reached {
    background: #103f4b;
    color: #b4f2e5;
    border-color: #2c7278;
}
#live-map {
    height: 340px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin: 16px 0;
    z-index: 0;
    background: #122138;
}
.live-car-marker {
    font-size: 25px;
    background: #fff;
    border: 2px solid #0284c7;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    box-shadow: 0 2px 8px #0006;
}
.live-booking-panel .leaflet-control-attribution {
    color: #152238;
    background: #ffffffed;
}
.live-booking-panel .leaflet-control-attribution a {
    color: #075985;
}
.live-booking-panel {
    min-width: 0;
}
.live-booking-panel [hidden] {
    display: none !important;
}
#live-requests h3 {
    margin: 0;
}
.live-booking-panel .actions {
    margin-top: 14px;
}
@media (max-width: 600px) {
    #live-map {
        height: 290px;
    }
    .live-progress {
        gap: 5px;
    }
    .live-progress li {
        font-size: 11px;
        padding: 6px 8px;
    }
}

/* Account notifications */
.notification-widget {
    position: relative;
    align-self: flex-end;
    margin-bottom: 8px;
}
.notification-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    font-size: 0.85rem;
}
.notification-count {
    border-radius: 20px;
    background: #ef4444;
    color: white;
    padding: 1px 6px;
    font-size: 0.75rem;
}
.notification-inbox {
    position: absolute;
    right: 0;
    top: 100%;
    width: min(390px, calc(100vw - 40px));
    max-height: 70vh;
    overflow: auto;
    z-index: 100;
    background: #111c30;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 18px 55px #0009;
    color: #e2e8f0;
}
.notification-inbox[hidden],
.notification-count[hidden] {
    display: none;
}
.notification-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.notification-heading button,
.notification-item button {
    font-size: 0.75rem;
    padding: 5px 8px;
}
.notification-item {
    padding: 12px 8px;
    border-bottom: 1px solid #334155;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.notification-item.unread {
    background: #2563eb18;
    border-left: 3px solid #60a5fa;
}
.notification-item a {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    overflow-wrap: anywhere;
}
.notification-item a:focus-visible,
.notification-toggle:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
}
.notification-item span,
.notification-item small,
.notification-inbox > small {
    font-size: 0.8rem;
    color: #b4c4dc;
}
.notification-toasts {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 120;
    width: min(380px, calc(100vw - 40px));
    display: grid;
    gap: 10px;
}
.notification-toasts .notification-item {
    background: #14233b;
    border: 1px solid #4b678e;
    border-radius: 12px;
    box-shadow: 0 8px 30px #0006;
    padding: 15px;
}
@media (max-width: 600px) {
    .notification-widget {
        align-self: flex-start;
    }
    .notification-inbox {
        left: 0;
        right: auto;
    }
    .notification-toasts {
        bottom: 12px;
    }
}
.notification-toggle {
    position: relative;
    display: inline-flex;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid #40516a;
    border-radius: 50%;
    background: #142036;
    color: #d9e5f7;
    cursor: pointer;
    transition:
        background 0.18s,
        border-color 0.18s;
}
.notification-toggle:hover,
.notification-toggle[aria-expanded='true'] {
    background: #233752;
    border-color: #83b5ff;
}
.notification-toggle.has-unread {
    color: #fff;
    border-color: #628aca;
}
.notification-bell {
    display: block;
    flex: none;
}
.notification-toggle .notification-count {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 21px;
    height: 21px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #101a2c;
    border-radius: 12px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 2px 7px #0005;
}
.notification-toggle .notification-count[hidden] {
    display: none;
}
@media (prefers-reduced-motion: no-preference) {
    .notification-toggle.has-unread .notification-bell {
        animation: notification-ring 0.5s ease-out;
    }
}
@keyframes notification-ring {
    0%,
    100% {
        transform: rotate(0);
    }
    25% {
        transform: rotate(14deg);
    }
    75% {
        transform: rotate(-12deg);
    }
}

.driver-online-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 26px;
    margin: 24px 0;
    border: 1px solid #345579;
    border-radius: 18px;
    background: linear-gradient(120deg, #172d48, #101d30);
}
.driver-online-card h2 {
    margin: 9px 0;
    font-size: 1.55rem;
}
.driver-online-card p {
    margin: 0;
    color: #bdcde2;
    max-width: 560px;
}
.driver-online-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #bdcde2;
}
.driver-online-status > span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
}
.driver-online-card.is-online {
    border-color: #2d8d6f;
}
.is-online .driver-online-status {
    color: #86efac;
}
.is-online .driver-online-status > span {
    background: #4ade80;
    box-shadow: 0 0 0 4px #4ade801a;
}
.driver-online-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.driver-online-controls form {
    margin: 0;
    width: 100%;
}
.driver-online-controls .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
}
.driver-online-controls .driver-go-online {
    background: #38d99a;
    color: #082719;
    border: 1px solid #63e7b2;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 30px;
    box-shadow: 0 6px 24px #12b98122;
}
.driver-go-online:hover {
    filter: brightness(1.08);
}
.driver-online-controls small {
    color: #aec3dd;
    font-size: 0.75rem;
    text-align: center;
}
@media (max-width: 650px) {
    .driver-online-card {
        flex-direction: column;
        align-items: stretch;
        padding: 22px;
        gap: 20px;
    }
    .driver-online-controls {
        align-items: stretch;
    }
    .driver-online-card h2 {
        font-size: 1.35rem;
    }
}

/* Consistent controls and spacing across account pages. */
button,
input,
select,
textarea {
    font-family: inherit;
}
.btn {
    gap: 8px;
    min-height: 44px;
    padding: 11px 16px;
    line-height: 1.25;
    vertical-align: middle;
    text-align: center;
    font-weight: 650;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.btn.sm {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.25;
}
.btn svg,
.btn .lucide {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
    vertical-align: middle;
}
.btn.sm svg,
.btn.sm .lucide {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}
.actions {
    align-items: center;
    gap: 10px;
    row-gap: 10px;
}
.actions > form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    max-width: 100%;
    gap: 10px;
    flex-wrap: wrap;
}
.actions > form > .btn {
    align-self: center;
}
.quick-actions {
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 26px;
}
.filters {
    gap: 12px;
    align-items: center;
}
.filters > form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
}
.filters label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
form .row {
    align-items: start;
    column-gap: 18px;
    row-gap: 18px;
}
.field > .btn {
    margin-top: 10px;
}
nav {
    align-items: center;
    gap: 6px;
    row-gap: 8px;
}
nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    line-height: 1.25;
}
.account-nav {
    column-gap: 16px;
    row-gap: 12px;
}
.notification-widget {
    align-self: center;
    margin: 0;
}
.notification-toggle {
    flex-shrink: 0;
    line-height: 1;
}
.notification-heading {
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.notification-heading button,
.notification-item button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid #405775;
    border-radius: 8px;
    background: #20334e;
    color: #e0edff;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    flex-shrink: 0;
}
.notification-heading button:hover,
.notification-item button:hover {
    background: #2b4568;
}
.notification-heading button:disabled,
.notification-item button:disabled {
    opacity: 0.5;
    cursor: default;
}
.notification-item {
    gap: 12px;
    padding: 14px 10px;
}
.notification-item a {
    gap: 7px;
    line-height: 1.45;
}
.notification-inbox > small {
    display: block;
    margin-top: 12px;
    line-height: 1.5;
}
.live-booking-panel .actions {
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
#live-availability-label {
    line-height: 1.5;
}
.upcoming-item .actions {
    row-gap: 10px;
}
.driver-online-controls {
    gap: 12px;
}
.driver-online-controls .btn svg {
    margin: 0;
}
@media (max-width: 650px) {
    .quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .quick-actions > .btn {
        width: 100%;
        height: 100%;
        min-height: 46px;
        padding: 11px 12px;
        font-size: 13px;
    }
    .actions > .btn,
    .actions > form {
        max-width: 100%;
    }
    .upcoming-item .actions {
        width: 100%;
    }
    .notification-widget {
        align-self: center;
    }
    .live-panel-heading {
        align-items: center;
        gap: 12px;
    }
    .driver-online-controls .btn {
        min-height: 48px;
    }
}
@media (pointer: coarse) {
    .btn.sm {
        min-height: 44px;
    }
    .notification-heading button,
    .notification-item button {
        min-height: 40px;
    }
}

.notification-toggle,
.notification-toggle.has-unread {
    color: #d9e5f7;
    border-color: #40516a;
    background: #142036;
    box-shadow: none;
}
.notification-toggle:hover,
.notification-toggle[aria-expanded='true'] {
    background: #233752;
    border-color: #83b5ff;
}
.notification-emoji {
    width: 24px;
    height: 24px;
    font-size: 22px;
    line-height: 24px;
    text-align: center;
    filter: none;
}

/* Bare bell: retain a comfortable hit area without an outer frame. */
.notification-toggle,
.notification-toggle.has-unread,
.notification-toggle:hover,
.notification-toggle[aria-expanded='true'] {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    filter: none;
}
.notification-toggle .notification-count {
    border: 0;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #ef3340;
    color: #fff;
    box-shadow: none;
}
.notification-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.account-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}
.account-name {
    font-size: 14px;
    font-weight: 650;
    color: var(--text);
    line-height: 1.4;
    overflow-wrap: anywhere;
    min-width: 0;
}
.account-identity .notification-widget {
    flex: none;
}
@media (max-width: 650px) {
    .account-identity {
        width: 100%;
        justify-content: flex-end;
        gap: 12px;
    }
    .account-identity .notification-inbox {
        left: auto;
        right: 0;
    }
}

.dashboard-welcome {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 7px;
    min-width: 0;
}
.dashboard-welcome h1 {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}
.dashboard-welcome .notification-widget {
    flex: none;
    align-self: center;
}
.dashboard-welcome .notification-inbox {
    left: 0;
    right: auto;
}
@media (max-width: 650px) {
    .dashboard-welcome {
        gap: 10px;
    }
    .dashboard-welcome .notification-widget {
        position: static;
    }
    .dashboard-welcome {
        position: relative;
    }
    .dashboard-welcome .notification-inbox {
        top: 100%;
        left: 0;
        right: auto;
    }
}

/* Passenger dashboard layout */
.passenger-dashboard {
    padding-top: 8px;
}
.passenger-welcome {
    padding: 8px 0 28px;
}
.passenger-welcome > .auth-form-kicker {
    display: block;
    margin-bottom: 12px;
}
.passenger-welcome .sub {
    margin: 10px 0 20px;
    max-width: 680px;
}
.passenger-shortcuts {
    gap: 10px;
}
.passenger-booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
    margin-bottom: 30px;
}
.passenger-booking-main {
    min-width: 0;
}
.passenger-booking-main > .card {
    margin-bottom: 0;
    padding: 26px;
}
.passenger-dashboard .live-panel-heading h2 {
    font-size: 24px;
    line-height: 1.25;
    margin-top: 8px;
}
.passenger-dashboard .live-panel-heading .badge {
    line-height: 1.5;
    white-space: normal;
}
.passenger-dashboard .muted {
    line-height: 1.65;
    font-size: 13px;
}
.passenger-dashboard #live-request-form .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0;
}
.passenger-dashboard #live-request-form > .row:first-of-type > .field:first-child {
    grid-column: 1/-1;
}
.passenger-dashboard #live-request-form label.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    min-width: 0;
}
.passenger-dashboard #live-request-form .field input,
.passenger-dashboard #live-request-form .field select {
    min-height: 46px;
    margin: 0;
}
.passenger-dashboard #live-request-form .field small {
    font-size: 11px;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.5;
}
.passenger-dashboard #live-pickup-gps {
    align-self: flex-start;
    margin: 0;
    font-size: 11px;
}
.passenger-dashboard #live-request-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
}
.passenger-guide {
    padding: 24px;
}
.passenger-guide h2 {
    font-size: 20px;
    margin: 10px 0 22px;
}
.passenger-guide ol {
    list-style: none;
    counter-reset: booking-step;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 24px;
}
.passenger-guide li {
    counter-increment: booking-step;
    position: relative;
    padding-left: 40px;
    line-height: 1.5;
}
.passenger-guide li:before {
    content: counter(booking-step);
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}
.passenger-guide li strong {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
}
.passenger-guide li span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}
.passenger-advance {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}
.passenger-advance > svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
    margin-bottom: 8px;
}
.passenger-advance h3 {
    font-size: 14px;
    margin: 0 0 8px;
}
.passenger-advance p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.65;
    margin: 0;
}
.passenger-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.passenger-section-heading h2 {
    font-size: 23px;
    margin: 6px 0 0;
}
.passenger-booking-list {
    padding: 24px;
}
.passenger-booking-list .filters {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.passenger-empty {
    text-align: center;
    padding: 32px 16px;
}
.passenger-empty > svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}
.passenger-empty h3 {
    font-size: 17px;
    margin: 0 0 8px;
}
.passenger-empty p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 400px;
}
#passenger-bookings,
#live-booking-panel {
    scroll-margin-top: 130px;
}
@media (max-width: 950px) {
    .passenger-booking-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .passenger-guide ol {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }
    .passenger-advance {
        margin-top: 22px;
    }
    .passenger-guide {
        margin: 0;
    }
}
@media (max-width: 600px) {
    .passenger-welcome {
        padding-bottom: 24px;
    }
    .passenger-welcome h1 {
        font-size: 25px;
    }
    .passenger-booking-main > .card,
    .passenger-guide,
    .passenger-booking-list {
        padding: 20px;
    }
    .passenger-dashboard #live-request-form .row {
        grid-template-columns: minmax(0, 1fr);
    }
    .passenger-guide ol {
        grid-template-columns: 1fr;
    }
    .passenger-shortcuts {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .passenger-shortcuts > .btn:first-child {
        grid-column: 1/-1;
    }
    .passenger-section-heading {
        align-items: flex-start;
    }
    .passenger-section-heading .badge {
        margin-top: 8px;
    }
    .passenger-booking-list .filters form,
    .passenger-booking-list .filters label {
        width: 100%;
    }
    .passenger-booking-list .filters select {
        flex: 1;
        min-width: 0;
    }
    .passenger-booking-list .upcoming-item .actions {
        display: flex;
        flex-wrap: wrap;
    }
    .passenger-dashboard .live-panel-heading h2 {
        font-size: 21px;
    }
}

.driver-online-controls [hidden] {
    display: none !important;
}
.driver-online-controls [data-online-message] {
    max-width: 280px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--muted);
    text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
    .driver-go-online.is-live {
        animation: driver-live-pulse 1.8s ease-in-out infinite;
    }
}
@keyframes driver-live-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(56, 217, 154, 0.12);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(56, 217, 154, 0.18);
        filter: brightness(1.15);
    }
}

.ride-filters label.payment-due-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    align-self: end;
    justify-self: start;
    min-height: 36px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--text);
    font-size: 12px;
    line-height: 1.3;
    cursor: pointer;
}
.ride-filters .payment-due-toggle input[type='checkbox'] {
    appearance: auto;
    width: 15px;
    height: 15px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 15px;
    accent-color: var(--primary);
}
.ride-filters .payment-due-toggle:has(input:checked) {
    border-color: var(--primary);
    color: var(--primary);
}
.ride-filters .payment-due-toggle:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* Compact availability label above the driver card heading. */
.driver-online-card .driver-online-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
    color: #b9c9de;
    font-size: 11px;
    font-weight: 650;
    line-height: 16px;
    letter-spacing: 0.02em;
    vertical-align: middle;
}
.driver-online-card .driver-online-status > span:first-child {
    display: block;
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: none;
}
.driver-online-card .driver-online-status > [data-online-label] {
    display: inline;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.driver-online-card.is-online .driver-online-status {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.08);
    color: #9aefc0;
}
.driver-online-card.is-online .driver-online-status > span:first-child {
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}
.driver-online-card h2 {
    margin: 12px 0 8px;
    line-height: 1.3;
}

.live-driver-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 8px 0 28px;
}
.live-driver-intro h1 {
    margin-top: 10px;
}
.live-driver-intro .sub {
    margin: 0;
    max-width: 640px;
}
.live-driver-intro > .btn {
    flex-shrink: 0;
}
.live-driver-workspace .live-booking-panel {
    padding: 28px;
    border-radius: 20px;
}
.live-driver-workspace .live-panel-heading h2 {
    font-size: 23px;
}
.driver-live-availability {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: linear-gradient(120deg, #172d48, #101d30);
}
.driver-live-availability h3 {
    font-size: 21px;
    margin: 12px 0 8px;
    line-height: 1.3;
}
.driver-live-availability p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}
.driver-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 650;
    color: #bdcde2;
    line-height: 1.5;
}
.driver-live-status:before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    flex: none;
}
.driver-is-online .driver-live-status {
    color: #86efac;
}
.driver-is-online .driver-live-status:before {
    background: #4ade80;
    box-shadow: 0 0 0 4px #4ade8018;
}
.driver-is-online .driver-live-availability {
    border-color: #2d8d6f;
}
.driver-live-availability .btn {
    min-width: 160px;
    min-height: 50px;
    font-size: 15px;
}
.driver-is-online #live-availability {
    background: #173b32;
    color: #9aefc0;
    border-color: #2d8d6f;
    box-shadow: none;
}
.driver-live-privacy {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    margin: 16px 0 26px;
}
.driver-live-privacy svg {
    width: 17px;
    height: 17px;
    flex: none;
    color: #86c8d8;
    margin-top: 2px;
}
.driver-request-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 12px;
}
.driver-request-heading h3 {
    font-size: 17px;
    margin: 0;
}
.driver-request-empty {
    text-align: center;
    padding: 32px 20px !important;
    border: 1px dashed #38516f;
    border-radius: 12px;
    background: #10203560;
    font-size: 14px;
    line-height: 1.6;
}
.live-driver-workspace #live-requests .upcoming-item {
    background: #13243b;
    border: 1px solid #345579;
    border-radius: 14px;
    padding: 20px;
    margin: 12px 0;
    align-items: flex-start;
}
.live-driver-workspace #live-requests .upcoming-item .actions {
    max-width: none;
    margin-top: 0;
    flex-direction: column;
    align-items: stretch;
}
.live-driver-workspace #live-requests .upcoming-item .btn {
    min-height: 42px;
}
.live-driver-workspace #live-trip {
    margin-top: 26px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}
.live-driver-workspace #live-trip-title {
    font-size: 22px;
}
.driver-live-help {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.driver-live-help > div {
    padding: 20px;
    background: #12203880;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.driver-live-help svg {
    display: block;
    width: 22px;
    height: 22px;
    color: var(--primary);
    margin-bottom: 14px;
}
.driver-live-help strong {
    font-size: 14px;
}
.driver-live-help p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.65;
    margin: 8px 0 0;
}
@media (max-width: 700px) {
    .live-driver-intro {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }
    .live-driver-intro h1 {
        font-size: 26px;
    }
    .live-driver-workspace .live-booking-panel {
        padding: 20px;
    }
    .driver-live-availability {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 20px;
    }
    .driver-live-availability .btn {
        width: 100%;
    }
    .driver-live-help {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .live-driver-workspace #live-requests .upcoming-item {
        flex-direction: column;
    }
    .live-driver-workspace #live-requests .upcoming-item .actions {
        width: 100%;
    }
    .live-driver-workspace .live-progress {
        gap: 6px;
    }
    .live-driver-workspace .live-panel-heading .badge {
        white-space: normal;
    }
}

.fare-widget {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
}
.fare-map {
    height: 300px;
    border-radius: 12px;
    margin: 12px 0;
    z-index: 0;
}
.page-loader-content > img {
    filter: brightness(0) invert(1);
    background: transparent;
    padding: 10px;
}
.page-loader-content {
    background: #142034;
}

.fare-payable {
    font-size: 1.35rem;
    font-weight: 750;
    color: var(--text);
    margin: 16px 0 8px;
}

.pickup-verification {
    margin: 16px 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.pickup-code {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    font-variant-numeric: tabular-nums;
    margin: 12px 0;
}

.address-suggestions {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card, #142034);
    margin: 6px 0;
    position: relative;
    z-index: 5;
}
.address-suggestions[hidden] {
    display: none;
}
.address-suggestions button {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 12px;
    text-align: left;
    white-space: normal;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
}
.address-suggestions button:hover,
.address-suggestions button[aria-selected='true'] {
    background: rgba(56, 189, 248, 0.15);
}
.address-suggestions p {
    font-size: 0.85rem;
    margin: 0;
    padding: 12px;
}
[data-fare-map-options] > summary {
    cursor: pointer;
    padding: 10px 0;
    font-weight: 600;
}

/* Shared responsive layout: keep content flexible and overflow inside tables/navigation. */
.wrap,
.card,
.tile,
.field,
form,
.analytics-grid > *,
.passenger-booking-layout > *,
.upcoming-item > *,
.driver-online-card > * {
    min-width: 0;
}
img,
video,
canvas {
    max-width: 100%;
}
input,
select,
textarea {
    min-width: 0;
    max-width: 100%;
}
textarea {
    resize: vertical;
}
.card p,
.tile .value,
.ride-detail dd,
.upcoming-item strong,
.address-suggestions button,
.driver-online-controls small {
    overflow-wrap: anywhere;
}
.actions {
    flex-wrap: wrap;
    align-items: center;
}
.btn {
    max-width: 100%;
    white-space: normal;
    justify-content: center;
    text-align: center;
}
.table-scroll {
    width: 100%;
    max-width: 100%;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.table-scroll table {
    min-width: 600px;
}
.topbar .brand {
    flex-shrink: 0;
}
.account-nav {
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
}
.account-nav nav {
    min-width: 0;
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding-bottom: 4px;
}
.account-nav nav a {
    flex-shrink: 0;
    white-space: nowrap;
}
form .row {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.fare-widget {
    max-width: 100%;
}
.fare-map,
#live-map {
    width: 100%;
}
.address-suggestions {
    max-width: 100%;
}
.driver-online-controls {
    max-width: 320px;
    flex: 0 1 320px;
}
.notification-widget {
    flex-shrink: 0;
}
@media (min-width: 1440px) {
    .wrap {
        max-width: 1320px;
    }
}
@media (max-width: 1024px) {
    .auth-vehicle-form,
    .auth-register-card .auth-vehicle-form {
        padding: 30px;
    }
    .driver-online-card {
        gap: 20px;
    }
    .driver-online-controls {
        flex-basis: 260px;
    }
    .ride-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .topbar .bar-inner {
        gap: 10px;
        min-height: 0;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .account-nav {
        flex: 1 1 100%;
        width: 100%;
        gap: 8px;
    }
    .account-nav nav {
        width: 0;
    }
    .driver-online-card {
        flex-direction: column;
        align-items: stretch;
    }
    .driver-online-controls {
        flex: auto;
        max-width: none;
        width: 100%;
        align-items: stretch;
    }
    .driver-online-controls small,
    .driver-online-controls [data-online-message] {
        max-width: none;
        text-align: left;
    }
    .driver-report-heading,
    .passenger-section-heading {
        flex-wrap: wrap;
        gap: 12px;
    }
    .fare-map,
    #live-map {
        height: 280px;
    }
    .actions > .btn {
        min-height: 44px;
    }
    .notification-inbox {
        max-width: calc(100vw - 28px);
    }
}
@media (max-width: 600px) {
    form .row {
        grid-template-columns: minmax(0, 1fr);
    }
    .field input,
    .field select,
    .field textarea,
    .filters input,
    .filters select {
        font-size: 16px;
        min-height: 44px;
    }
    .field textarea {
        min-height: 88px;
    }
    .auth-wrap,
    .forgot-wrap,
    .reset-wrap {
        padding: 20px 0;
    }
    .auth-vehicle-form,
    .auth-register-card .auth-vehicle-form {
        padding: 24px 20px;
    }
    .auth-vehicle-visual,
    .auth-register-card .auth-vehicle-visual {
        min-height: 220px;
    }
    .fare-widget,
    .pickup-verification {
        padding: 12px;
    }
    .fare-widget .actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }
    .fare-widget .actions .btn,
    #live-trip-actions .btn {
        width: 100%;
    }
    #live-trip-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }
    .fare-payable {
        font-size: 1.15rem;
    }
    .passenger-section-heading .badge {
        white-space: normal;
    }
    .filters form {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
        max-width: 100%;
    }
    .filters form > label {
        min-width: 0;
        max-width: 100%;
    }
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    .ride-tabs {
        grid-template-columns: minmax(0, 1fr);
    }
    .billing-plans {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 360px) {
    .wrap {
        padding-left: 10px;
        padding-right: 10px;
    }
    .card,
    .passenger-booking-main > .card,
    .passenger-guide,
    .passenger-booking-list,
    .live-driver-workspace .live-booking-panel {
        padding: 12px;
    }
    h1,
    .passenger-welcome h1,
    .live-driver-intro h1 {
        font-size: 23px;
    }
    .passenger-shortcuts {
        grid-template-columns: minmax(0, 1fr);
    }
    .fare-map,
    #live-map {
        height: 240px;
    }
    .pickup-code {
        font-size: 1.8rem;
        letter-spacing: 0.2em;
    }
}
@media (pointer: coarse) {
    .btn,
    .notification-toggle,
    .account-nav nav a,
    .address-suggestions button {
        min-height: 44px;
    }
}
@media (max-width: 600px) {
    .btn {
        min-height: 44px;
    }
}

.notification-heading {
    flex-wrap: wrap;
    gap: 10px;
}
.notification-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.notification-tools button {
    min-height: 36px;
}
.notification-tools button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compact phone header with an expandable navigation panel. */
.mobile-nav-toggle {
    display: none;
}
@media (max-width: 760px) {
    .topbar.has-mobile-nav .bar-inner {
        justify-content: space-between;
        flex-wrap: nowrap;
        min-height: 66px;
        gap: 12px;
    }
    .topbar.has-mobile-nav .brand {
        padding: 0;
        min-width: 0;
    }
    .topbar.has-mobile-nav .brand img {
        width: 112px;
        height: auto;
        max-height: 38px;
    }
    .topbar.has-mobile-nav .account-nav {
        flex: 0 0 auto;
        width: auto;
        justify-content: flex-end;
        gap: 10px;
    }
    .has-mobile-nav .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        min-height: 44px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #14243b;
        color: var(--text);
        font: inherit;
        font-size: 13px;
        font-weight: 650;
        cursor: pointer;
    }
    .mobile-nav-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 18px;
    }
    .mobile-nav-icon span {
        display: block;
        height: 2px;
        width: 18px;
        background: currentColor;
        border-radius: 2px;
        transition:
            transform 0.15s,
            opacity 0.15s;
    }
    .nav-is-open .mobile-nav-icon span:first-child {
        transform: translateY(6px) rotate(45deg);
    }
    .nav-is-open .mobile-nav-icon span:nth-child(2) {
        opacity: 0;
    }
    .nav-is-open .mobile-nav-icon span:last-child {
        transform: translateY(-6px) rotate(-45deg);
    }
    .topbar.has-mobile-nav .account-nav nav {
        display: none;
    }
    .topbar.has-mobile-nav.nav-is-open .account-nav nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 12px;
        gap: 8px;
        background: #101e33;
        border: 1px solid #345579;
        border-radius: 16px;
        box-shadow: 0 18px 48px #0008;
        z-index: 20;
    }
    .has-mobile-nav .account-nav nav a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 12px;
        white-space: normal;
        overflow-wrap: anywhere;
        border: 1px solid var(--border);
        background: #14243b;
    }
    .has-mobile-nav .account-nav nav a.active {
        background: var(--primary-soft);
        border-color: var(--primary);
    }
    .has-mobile-nav .account-nav nav a.out {
        grid-column: 1/-1;
        background: rgba(253, 164, 175, 0.08);
    }
    .has-mobile-nav .notification-inbox {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 76px;
        width: auto;
        max-width: none;
        max-height: calc(100dvh - 96px);
        overflow-y: auto;
    }
    .mobile-nav-toggle:focus-visible {
        outline: 2px solid var(--primary);
        outline-offset: 3px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .mobile-nav-icon span {
        transition: none;
    }
}

.policy-page {
    max-width: 900px;
    margin: 0 auto 24px;
    line-height: 1.75;
}
.policy-page h2 {
    margin-top: 28px;
}
.policy-page p {
    overflow-wrap: anywhere;
}
.policy-page .actions {
    margin-top: 24px;
}
.auth-policy-links {
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    margin: 16px 0;
}
.footer-policy-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    font-size: 12px;
}
.footer-policy-links button {
    border: 0;
    background: none;
    padding: 8px 0;
    color: var(--primary);
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}
.cookie-notice[hidden] {
    display: none !important;
}
.cookie-notice {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: 1100px;
    margin: auto;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    background: #13243b;
    border: 1px solid #345579;
    border-radius: 16px;
    box-shadow: 0 12px 48px #0008;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
}
.cookie-notice h2 {
    margin: 0 0 8px;
    font-size: 17px;
}
.cookie-notice p {
    margin: 0;
    line-height: 1.6;
    font-size: 13px;
}
.cookie-notice > div {
    min-width: 0;
}
.cookie-notice-actions {
    flex-shrink: 0;
    max-width: 260px;
}
.cookie-notice-actions .btn {
    min-height: 44px;
}
.cookie-notice-actions [data-cookie-status] {
    font-size: 12px;
    margin-top: 8px;
}
.cookie-notice-visible {
    padding-bottom: calc(var(--cookie-notice-height, 180px) + 40px);
}
@media (max-width: 600px) {
    .cookie-notice {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 16px;
        gap: 14px;
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-notice-actions {
        max-width: none;
    }
    .cookie-notice-actions .btn {
        width: 100%;
    }
    .footer-policy-links {
        gap: 14px;
    }
    .policy-page h1 {
        font-size: 26px;
    }
}

.testing-notice {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-left: 3px solid #fbbf24;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.07);
    color: var(--text);
    font-size: 13px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.testing-notice strong {
    display: block;
    color: #fcd34d;
    margin-bottom: 6px;
}
.testing-notice p {
    margin: 6px 0 0;
}
.testing-notice a {
    font-weight: 600;
}

.trip-tracking-strip[hidden] {
    display: none !important;
}
.trip-tracking-strip {
    padding: 16px;
    margin-top: 24px;
    border: 1px solid #2d8d6f;
    border-radius: 12px;
    background: #10332e;
}
.trip-tracking-strip p {
    margin: 0 0 10px;
    font-size: 14px;
}
.trip-tracking-strip small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.trip-tracking-strip {
    margin: 0 0 20px;
}

.rate-password-dialog {
    width: min(420px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow: auto;
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid #64748b;
    border-radius: 16px;
    background: var(--card, #182235);
    color: inherit;
    box-shadow: 0 20px 70px #0006;
}
.rate-password-dialog::backdrop {
    background: #0009;
}
.rate-password-dialog h2 {
    margin-top: 0;
}
.rate-password-dialog .actions {
    margin-top: 20px;
}

.driver-pickup-verification {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.driver-pickup-verification[hidden] {
    display: none;
}
.driver-pickup-verification .field {
    flex: 1 1 180px;
    margin: 0;
}
.driver-pickup-verification input {
    width: 100%;
    font-variant-numeric: tabular-nums;
}
.driver-pickup-verification .btn {
    min-height: 44px;
}
@media (max-width: 600px) {
    .driver-pickup-verification {
        gap: 12px;
    }
    .driver-pickup-verification > div {
        width: 100%;
    }
    .driver-pickup-verification .btn {
        width: 100%;
    }
}

.dashboard-main-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.dashboard-more {
    position: relative;
}
.dashboard-more > summary {
    list-style: none;
    cursor: pointer;
}
.dashboard-more > summary::-webkit-details-marker {
    display: none;
}
.dashboard-more[open] > .actions {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 20;
    min-width: 220px;
    padding: 12px;
    background: var(--card, #182235);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 30px #0004;
}
.dashboard-more .actions a {
    width: 100%;
}
.dashboard-offline-entry > summary {
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
}
.dashboard-offline-content {
    padding-top: 18px;
}
.dashboard-reports {
    margin: 20px 0;
}
.dashboard-reports > summary {
    cursor: pointer;
    width: fit-content;
}
.dashboard-reports[open] > summary {
    margin-bottom: 16px;
}
#live-booking-panel .upcoming-item {
    flex-wrap: wrap;
}
#live-booking-panel .actions {
    flex-wrap: wrap;
}
@media (max-width: 760px) {
    .dashboard-main-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-main-actions > .btn,
    .dashboard-more > summary {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
        text-align: center;
    }
    .dashboard-more[open] > .actions {
        min-width: 0;
        width: min(260px, calc(100vw - 40px));
    }
    #live-booking-panel .upcoming-item {
        flex-direction: column;
        align-items: stretch;
    }
    #live-booking-panel .upcoming-item > .actions {
        width: 100%;
    }
    #live-booking-panel .upcoming-item > .actions > .btn {
        flex: 1;
        min-height: 44px;
    }
}

.shared-ride-public {
    max-width: 760px;
    margin: 20px auto;
}
.shared-ride-public h1 {
    overflow-wrap: anywhere;
}
.shared-ride-public .notice {
    margin: 20px 0;
}
.shared-ride-public input,
.shared-ride-public textarea {
    max-width: 100%;
    box-sizing: border-box;
}
@media (max-width: 600px) {
    .shared-ride-public .actions {
        display: flex;
        flex-direction: column;
    }
    .shared-ride-public .actions .btn {
        width: 100%;
        box-sizing: border-box;
    }
}

.service-area-strip {
    margin: 8px 0 16px;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}
.service-area-page {
    max-width: 1000px;
    margin: 16px auto;
}
.service-area-page .notice p {
    margin-bottom: 0;
}
#service-area-map {
    height: 380px;
    width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}
.service-community-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 24px;
    padding-left: 22px;
}
.service-area-page .actions {
    flex-wrap: wrap;
}
@media (max-width: 760px) {
    .service-community-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #service-area-map {
        height: 300px;
    }
}
@media (max-width: 400px) {
    .service-community-list {
        grid-template-columns: 1fr;
    }
    #service-area-map {
        height: 260px;
    }
}

/* Consistent spacing for cards, number boxes, charts and form rows. */
main.wrap {
    padding-top: 24px;
    padding-bottom: 40px;
}
.grid {
    gap: 14px;
    margin-bottom: 18px;
    align-items: stretch;
}
.card {
    padding: 20px;
    margin-bottom: 18px;
    border-radius: 16px;
}
.tile {
    padding: 16px 18px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}
.tile .label {
    line-height: 1.45;
    min-height: 29px;
}
.tile .value {
    margin-top: 6px;
    line-height: 1.15;
}
.analytics-grid {
    gap: 16px;
    margin-bottom: 18px;
    align-items: stretch;
}
.analytics-grid > .card {
    margin-bottom: 0;
}
#admin-statistics > .phase-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
form .row {
    column-gap: 14px;
    row-gap: 14px;
    margin-bottom: 14px;
}
.passenger-dashboard #live-request-form .row {
    gap: 14px;
    margin: 16px 0;
}
@media (max-width: 1000px) and (min-width: 641px) {
    #admin-statistics > .phase-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    main.wrap {
        padding-top: 16px;
        padding-bottom: 28px;
    }
    .grid,
    .analytics-grid {
        gap: 12px;
        margin-bottom: 16px;
    }
    .card {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 14px;
    }
    .tile {
        padding: 14px;
        min-height: 96px;
    }
    .tile .value {
        font-size: 25px;
    }
    #admin-statistics > .phase-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Red indicates that the driver is currently offline. */
.driver-online-controls .driver-go-online[aria-pressed='false'],
#live-availability[aria-pressed='false'] {
    background: #b42318;
    color: #fff;
    border-color: #f87171;
    box-shadow: 0 4px 14px rgba(180, 35, 24, 0.2);
}
.driver-online-controls .driver-go-online[aria-pressed='false']:hover,
#live-availability[aria-pressed='false']:hover {
    background: #991b1b;
}

.driver-go-online[aria-busy='true'],
#live-availability[aria-busy='true'] {
    animation: none;
    cursor: wait;
    opacity: 0.85;
}
.driver-go-online[aria-busy='true']::after,
#live-availability[aria-busy='true']::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: availability-spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes availability-spin {
    to {
        transform: rotate(360deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    .driver-go-online[aria-busy='true']::after,
    #live-availability[aria-busy='true']::after {
        animation: none;
    }
}

.availability-toggle {
    min-width: 160px;
}
.availability-toggle > .btn {
    width: 100%;
}
.availability-car-track {
    position: relative;
    height: 36px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    margin-bottom: 8px;
    border-bottom: 2px dashed #64748b66;
    color: #38d99a;
}
.availability-car-track[hidden] {
    display: none;
}
.availability-car {
    position: absolute;
    left: 0;
    bottom: 2px;
    display: block;
    width: 56px;
    height: 28px;
    animation: availability-drive 2s linear forwards;
}
.availability-car-track[data-direction='offline'] {
    color: #f87171;
}
.availability-car-track[data-direction='offline'] .availability-car {
    animation-direction: reverse;
}
.availability-car-track[data-direction='offline'] svg {
    transform: scaleX(-1);
}
@keyframes availability-drive {
    from {
        left: 0;
    }
    to {
        left: calc(100% - 56px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .availability-car {
        animation: none;
        left: calc(50% - 28px);
    }
}
@media (max-width: 700px) {
    .availability-toggle {
        width: 100%;
        min-width: 0;
    }
}

.live-car-marker {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: #fff;
    border: 2px solid #0284c7;
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 2px 10px #0005;
    overflow: visible;
}
.live-car-marker .live-driver-car {
    display: block;
    width: 24px;
    height: 34px;
    max-width: none;
    flex: none;
    pointer-events: none;
}

/* Top-down vehicle marker with a transparent footprint. */
.live-car-marker {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: visible;
}
.live-car-marker .live-driver-car {
    width: 36px;
    height: 64px;
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.42));
    pointer-events: none;
}

.live-passenger-marker {
    background: transparent;
    border: 0;
    box-shadow: none;
    line-height: 0;
}
.live-passenger-marker svg {
    display: block;
    width: 40px;
    height: 48px;
    max-width: none;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.address-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 13px;
}
.address-match[hidden] {
    display: none;
}
.address-match span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ride-address-line {
    display: block;
    overflow-wrap: anywhere;
    margin: 4px 0;
}
.request-preview-map {
    height: 240px;
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    margin-top: 12px;
    z-index: 0;
}
#live-requests .upcoming-item > div:first-child {
    min-width: 0;
    flex: 1;
}
@media (max-width: 600px) {
    .request-preview-map {
        height: 210px;
    }
}

.live-trip-contact {
    margin: -2px 0 12px;
}
.live-trip-contact[hidden] {
    display: none;
}

.badge.pickup-accepted {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.live-dropoff-marker {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.live-dropoff-marker svg {
    display: block;
    width: 32px;
    height: 48px;
    max-width: none;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

/* Keep completion feedback out of the action row's layout. */
.trip-completion-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}
.trip-completion-control #live-completion-notice {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 1001;
    width: min(300px, calc(100vw - 64px));
    box-sizing: border-box;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #fda4af;
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    box-shadow: 0 4px 16px #0002;
    font-size: 13px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}
.trip-completion-control #live-completion-notice[hidden] {
    display: none;
}
@media (max-width: 600px) {
    #live-trip-actions .trip-completion-control {
        width: 100%;
    }
    .trip-completion-control #live-completion-notice {
        width: 100%;
    }
}
