:root {
    --taxi-black: #0A0A0A;
    --taxi-yellow: #FFC107;
    --taxi-white: #FFFFFF;
    --taxi-dark: #1C1C1C;
    --taxi-ink: #151515;
    --taxi-muted: #6C757D;
    --taxi-line: #E7E2D6;
    --taxi-surface: #F7F6F2;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--taxi-surface);
    color: var(--taxi-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--taxi-black);
    color: var(--taxi-white);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
}

.brand:hover {
    color: inherit;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    background: var(--taxi-yellow);
    color: var(--taxi-black);
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: #B8B8B8;
    font-size: 0.78rem;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav a,
.btn-ghost {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border-radius: 8px;
}

.sidebar-nav a {
    color: #D9D9D9;
    padding: 10px 12px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #202020;
    color: var(--taxi-yellow);
}

.sidebar svg,
.topbar svg,
.btn svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.sidebar-profile {
    margin-top: auto;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: #171717;
    border: 1px solid #2C2C2C;
    border-radius: 8px;
}

.sidebar-profile strong,
.sidebar-profile small {
    display: block;
}

.sidebar-profile small {
    color: #AFAFAF;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--taxi-yellow);
    color: var(--taxi-black);
    display: inline-grid;
    place-items: center;
    font-weight: 800;
}

.main-panel {
    padding: 28px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.topbar h1,
.panel h2,
.panel h3,
.auth-card h1,
.setup-card h1 {
    margin: 0;
    font-weight: 850;
    letter-spacing: 0;
}

.topbar h1 {
    font-size: clamp(1.6rem, 2vw, 2.35rem);
}

.eyebrow {
    text-transform: uppercase;
    font-weight: 800;
    color: var(--taxi-muted);
    font-size: 0.72rem;
}

.topbar-actions,
.table-actions,
.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    border-radius: 8px;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
}

.btn-taxi {
    background: var(--taxi-yellow);
    border-color: var(--taxi-yellow);
    color: var(--taxi-black);
}

.btn-taxi:hover,
.btn-taxi:focus {
    background: #F3B700;
    border-color: #F3B700;
    color: var(--taxi-black);
}

.btn-ghost {
    background: var(--taxi-white);
    border: 1px solid var(--taxi-line);
    color: var(--taxi-black);
    justify-content: center;
    width: 42px;
}

.notification-dot {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 99px;
    background: #DC3545;
    color: #fff;
    font-size: 0.72rem;
    display: inline-grid;
    place-items: center;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric-card,
.panel,
.auth-card,
.setup-card {
    background: var(--taxi-white);
    border: 1px solid var(--taxi-line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(10, 10, 10, 0.06);
}

.metric-card {
    min-height: 130px;
    padding: 22px;
    display: grid;
    align-content: space-between;
    border-top: 5px solid var(--taxi-yellow);
}

.metric-card span {
    color: var(--taxi-muted);
    font-weight: 750;
}

.metric-card strong {
    font-size: clamp(1.7rem, 3vw, 2.65rem);
}

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

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }

.panel {
    padding: 20px;
    min-width: 0;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.panel h2 {
    font-size: 1.12rem;
}

.panel h3 {
    font-size: 1.08rem;
}

.stack-form {
    display: grid;
    gap: 14px;
}

.stack-form label,
.setup-grid label {
    display: grid;
    gap: 6px;
    color: #444;
    font-weight: 700;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #D8D3C7;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--taxi-yellow);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.inline-input {
    width: min(150px, 100%);
    border: 0;
    border-bottom: 1px solid #D8D3C7;
    background: transparent;
    color: inherit;
    outline: 0;
}

.address-results {
    position: relative;
    z-index: 40;
    display: grid;
    gap: 6px;
}

.address-result {
    width: 100%;
    border: 1px solid var(--taxi-line);
    border-radius: 8px;
    background: #FCFBF8;
    color: var(--taxi-ink);
    padding: 10px 12px;
    text-align: left;
    font-weight: 650;
    display: grid;
    gap: 3px;
}

.address-result:hover,
.address-result:focus {
    border-color: var(--taxi-yellow);
    background: #FFF8DC;
}

.address-result strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.address-result small {
    color: var(--taxi-muted);
    font-weight: 650;
    line-height: 1.25;
}

.map-marker-wrap {
    background: transparent;
    border: 0;
}

.map-marker {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 10px 24px rgba(10, 10, 10, 0.26);
    font-size: 20px;
}

.taxi-marker {
    background: var(--taxi-yellow);
}

.passenger-marker {
    background: #0D6EFD;
}

.destination-marker {
    background: #198754;
}

.route-summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    align-items: center;
    border: 1px solid var(--taxi-line);
    border-radius: 8px;
    background: #FCFBF8;
    padding: 10px 12px;
    color: var(--taxi-ink);
}

.route-summary:empty {
    display: none;
}

.route-summary span {
    color: var(--taxi-muted);
    font-weight: 750;
}

.pricing-formula {
    display: grid;
    gap: 8px;
    border: 1px solid var(--taxi-line);
    border-radius: 8px;
    background: #FCFBF8;
    padding: 16px;
}

.pricing-formula span {
    color: var(--taxi-muted);
    font-weight: 750;
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table th {
    color: var(--taxi-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.text-bg-taxi {
    color: #0A0A0A !important;
    background: var(--taxi-yellow) !important;
}

.status-pill,
.status-dot {
    display: inline-flex;
    align-items: center;
}

.status-pill {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.78rem;
}

.status-pill.available,
.status-dot.available { background: #D1E7DD; color: #0F5132; }
.status-pill.busy,
.status-dot.busy { background: #FFF3CD; color: #664D03; }
.status-pill.offline,
.status-dot.offline { background: #E2E3E5; color: #41464B; }

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.driver-strip,
.list-lines,
.trip-list,
.notification-list,
.detail-list,
.trip-log {
    display: grid;
    gap: 10px;
}

.driver-strip > div,
.list-lines a,
.detail-list > div,
.notification-list article {
    border: 1px solid var(--taxi-line);
    border-radius: 8px;
    padding: 12px;
    background: #FCFBF8;
}

.list-lines a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--taxi-ink);
    gap: 10px;
}

.driver-strip small,
.detail-list span,
.trip-card p,
.vehicle-card p,
.notification-list small {
    color: var(--taxi-muted);
}

.detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.trip-focus,
.trip-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.trip-card {
    padding: 16px;
    border: 1px solid var(--taxi-line);
    border-radius: 8px;
    background: #FCFBF8;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.vehicle-card {
    border: 1px solid var(--taxi-line);
    border-radius: 8px;
    padding: 16px;
    background: #FCFBF8;
}

.plate {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    border: 2px solid var(--taxi-black);
    border-radius: 6px;
    background: var(--taxi-white);
    font-weight: 900;
    letter-spacing: 0;
}

.hero-panel {
    min-height: 290px;
    display: grid;
    align-content: center;
    gap: 18px;
    background:
        linear-gradient(115deg, rgba(10, 10, 10, 0.93), rgba(28, 28, 28, 0.74)),
        repeating-linear-gradient(45deg, rgba(255, 193, 7, 0.18) 0 12px, transparent 12px 24px);
    color: var(--taxi-white);
}

.hero-panel h2 {
    max-width: 720px;
    font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.map-box {
    min-height: 430px;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

.map-preview .map-box {
    min-height: 480px;
}

.map-panel {
    padding: 0;
}

.map-panel .map-box {
    border-radius: 8px;
}

.trip-log {
    margin-top: 18px;
    color: var(--taxi-muted);
}

.notification-list article {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.notification-list article.unread {
    border-left: 5px solid var(--taxi-yellow);
}

.empty-state {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--taxi-muted);
}

.empty-state.small {
    min-height: 110px;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(10, 10, 10, 0.96), rgba(28, 28, 28, 0.90)),
        repeating-linear-gradient(90deg, rgba(255, 193, 7, 0.14) 0 18px, transparent 18px 36px);
}

.client-body {
    min-height: 100vh;
    background: var(--taxi-black);
    color: var(--taxi-white);
}

.client-nav {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(16px, 4vw, 44px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.client-shell {
    min-height: calc(100vh - 78px);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.client-stage {
    position: relative;
    min-height: 620px;
    display: grid;
    align-content: end;
    overflow: hidden;
    padding: clamp(24px, 5vw, 56px);
}

.client-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(10, 10, 10, 0.10), rgba(10, 10, 10, 0.88)),
        repeating-linear-gradient(45deg, rgba(255, 193, 7, 0.16) 0 16px, transparent 16px 32px);
    pointer-events: none;
}

.client-copy {
    position: relative;
    z-index: 2;
    max-width: 740px;
}

.client-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 6vw, 5.6rem);
    line-height: 0.98;
    font-weight: 900;
}

.client-copy p:not(.eyebrow) {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
}

.client-map {
    position: absolute;
    inset: 0;
    z-index: 0;
    min-height: 100%;
    border-radius: 0;
    opacity: 0.68;
}

.client-request {
    background: var(--taxi-white);
    color: var(--taxi-ink);
    padding: clamp(22px, 4vw, 42px);
    display: grid;
    align-content: center;
}

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

.auth-card,
.setup-card {
    width: min(100%, 460px);
    padding: 30px;
}

.setup-card {
    width: min(100%, 980px);
}

.auth-brand {
    margin-bottom: 24px;
    color: var(--taxi-black);
}

.auth-card p,
.setup-card p {
    color: var(--taxi-muted);
}

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

.setup-grid section {
    display: grid;
    gap: 12px;
}

.setup-grid button {
    grid-column: 1 / -1;
}

@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 16px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .sidebar-profile {
        margin-top: 0;
    }

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

    .span-4,
    .span-5,
    .span-6,
    .span-7,
    .span-8 {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .main-panel {
        padding: 16px;
    }

    .topbar,
    .trip-focus,
    .trip-card,
    .notification-list article,
    .list-lines a {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .metric-grid,
    .setup-grid,
    .client-shell {
        grid-template-columns: 1fr;
    }

    .client-stage {
        min-height: 430px;
    }

    .inline-form {
        flex-wrap: wrap;
    }

    .map-box {
        min-height: 340px;
    }

    .two-fields {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sidebar,
    .topbar-actions,
    .btn,
    form {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .main-panel {
        padding: 0;
    }

    .panel,
    .metric-card {
        box-shadow: none;
    }
}
