@import url(https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap);
:root {
    --panel-bg: #ffffff;
    --panel-border: #e5e9f2;
    --panel-shadow: 0 24px 50px rgba(10, 25, 49, 0.15);
    --accent: #0074d9;
    --accent-dark: #0058a8;
    --warm: #ffb347;
    --ink: #0f172a;
    --muted: #5a6472;
    --surface: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
    color: var(--ink);
    background: #ffffff;
}

body.ride-layout .ride-page {
    padding-bottom: 520px;
}

body.ride-layout footer,
body.ride-layout .footer-light,
body.ride-layout .new_footer,
body.ride-layout .sub-footer,
body.ride-layout .footer-end {
    position: relative;
    z-index: 5;
    background: #ffffff;
}

body.ride-layout .new_footer {
    box-shadow: 0 -18px 40px rgba(15, 23, 42, 0.12);
}

.ride-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.ride-map {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 0;
    background: radial-gradient(circle at top left, rgba(0, 116, 217, 0.1), transparent 55%),
        radial-gradient(circle at bottom right, rgba(0, 116, 217, 0.08), transparent 60%),
        #ffffff;
}

.ride-panel {
    position: absolute;
    top: 32px;
    left: 32px;
    bottom: 32px;
    width: 520px;
    max-width: calc(100vw - 48px);
    z-index: 2;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 26px;
    box-shadow: var(--panel-shadow);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: slideIn 0.6s ease-out;
}

.panel-header {
    padding: 24px 24px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.panel-title {
    margin-top: 16px;
    font-size: 22px;
    font-weight: 700;
}

.panel-title-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.panel-title-row .panel-title {
    margin-top: 0;
}

.toggle-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    border-radius: 18px;
    padding: 6px;
    gap: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.toggle-btn {
    border: none;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #3aa4ff 100%);
    box-shadow: 0 8px 16px rgba(0, 116, 217, 0.25);
}

.panel-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
    max-height: none;
}

.field-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface);
    border-radius: 16px;
    padding: 12px 14px 12px 40px;
    border: 1px solid rgba(0, 116, 217, 0.12);
    box-shadow: 0 10px 20px rgba(0, 116, 217, 0.08);
}

.location-dot {
    position: absolute;
    left: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.pickup-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 116, 217, 0.2);
}

.drop-dot {
    background: var(--warm);
    box-shadow: 0 0 0 4px rgba(255, 179, 71, 0.2);
}

.text-input,
.select-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    outline: none;
}

.text-input::-moz-placeholder {
    color: rgba(28, 26, 22, 0.4);
}

.text-input::placeholder {
    color: rgba(28, 26, 22, 0.4);
}

.time-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.select-input {
    background: var(--surface);
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.schedule-input {
    display: none;
    background: var(--surface);
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.schedule-input.is-visible {
    display: block;
}

.schedule-input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.2);
}

.detail-schedule {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 116, 217, 0.08);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 600;
}

.tracking-schedule {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 116, 217, 0.08);
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 600;
}

.vehicle-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 auto;
    overflow: hidden;
    min-height: 0;
}

.orders-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.orders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.orders-open {
    border: 1px solid rgba(0, 116, 217, 0.2);
    background: rgba(0, 116, 217, 0.08);
    color: var(--accent-dark);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.orders-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: #f4f7ff;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid #e3ecff;
}

.orders-tab {
    border: none;
    background: transparent;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.orders-tab.is-active {
    background: #ffffff;
    color: var(--accent);
    box-shadow: 0 8px 16px rgba(0, 116, 217, 0.15);
}

.orders-list {
    display: grid;
    gap: 12px;
}

.orders-list.is-loading {
    min-height: 120px;
}

.order-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 116, 217, 0.12);
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 116, 217, 0.08);
}

.order-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(0, 116, 217, 0.15);
    color: var(--accent-dark);
    display: grid;
    place-items: center;
    font-weight: 800;
    overflow: hidden;
}

.order-icon img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}

.order-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.order-title {
    font-weight: 700;
    font-size: 14px;
}

.order-sub {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-side {
    display: grid;
    gap: 6px;
    justify-items: end;
}

.order-status {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-dark);
}

.order-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--ink);
}

.order-track {
    border: none;
    background: rgba(0, 116, 217, 0.12);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.order-invoice,
.orders-detail-invoice {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-dark);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 116, 217, 0.08);
}

.order-invoice:hover,
.orders-detail-invoice:hover {
    text-decoration: underline;
}

.orders-drawer {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 10004;
}

.orders-drawer.is-hidden {
    display: none;
}

.orders-drawer-card {
    width: min(1100px, 96vw);
    height: min(720px, 92vh);
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.orders-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e6edf6;
}

.orders-drawer-title {
    font-size: 20px;
    font-weight: 700;
}

.orders-drawer-subtitle {
    font-size: 13px;
    color: var(--muted);
}

.orders-drawer-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 12px 24px;
    background: #f7f9ff;
    border-bottom: 1px solid #e6edf6;
}

.orders-drawer-tab {
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
}

.orders-drawer-tab.is-active {
    background: #ffffff;
    color: var(--accent);
    box-shadow: 0 8px 18px rgba(0, 116, 217, 0.15);
}

.orders-drawer-body {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.9fr);
    gap: 0;
    height: 100%;
    min-height: 0;
}

.orders-drawer-list {
    padding: 16px 20px;
    overflow-y: auto;
    display: grid;
    gap: 12px;
    border-right: 1px solid #e6edf6;
}

.orders-drawer-list.is-loading {
    min-height: 140px;
}

.orders-drawer-item {
    border: 1px solid rgba(0, 116, 217, 0.12);
    background: #ffffff;
    border-radius: 16px;
    padding: 12px 14px;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.orders-drawer-item.is-active {
    border-color: var(--accent);
    box-shadow: 0 12px 20px rgba(0, 116, 217, 0.2);
    transform: translateY(-1px);
}

.orders-drawer-item-title {
    font-weight: 700;
    font-size: 14px;
}

.orders-drawer-item-sub {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orders-drawer-item-side {
    display: grid;
    gap: 6px;
    justify-items: end;
    font-size: 12px;
    color: var(--muted);
}

.orders-drawer-item-side strong {
    color: var(--ink);
    font-size: 14px;
}

.orders-drawer-detail {
    padding: 20px 24px;
    overflow-y: auto;
    background: #f8fbff;
}

.orders-drawer-placeholder {
    color: var(--muted);
    font-size: 14px;
}

.orders-detail-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 12px;
}

.orders-detail-hero {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #edf2ff;
    display: grid;
    place-items: center;
    min-height: 160px;
}

.orders-detail-hero img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}

.orders-detail-fallback {
    font-weight: 800;
    font-size: 24px;
    color: var(--accent-dark);
}

.orders-detail-title {
    font-size: 18px;
    font-weight: 700;
}

.orders-detail-status {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-dark);
}

.orders-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
}

.orders-detail-row-sub {
    padding-left: 12px;
    opacity: 0.85;
}

.orders-detail-row strong {
    color: var(--ink);
    font-weight: 700;
}

.orders-detail-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

.orders-drawer-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #e6edf6;
    background: #ffffff;
}

.orders-page {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

@media (max-width: 960px) {
    .orders-drawer-body {
        grid-template-columns: 1fr;
    }
    .orders-drawer-detail {
        border-top: 1px solid #e6edf6;
    }
}

.section-title {
    font-size: 15px;
    font-weight: 700;
}

.vehicle-list {
    display: grid;
    gap: 10px;
    overflow: visible;
    padding-right: 6px;
    flex: 1;
    min-height: 0;
}

.ride-panel::-webkit-scrollbar,
.panel-body::-webkit-scrollbar {
    width: 8px;
}

.ride-panel::-webkit-scrollbar-thumb,
.panel-body::-webkit-scrollbar-thumb {
    background: rgba(28, 26, 22, 0.2);
    border-radius: 999px;
}

.ride-panel::-webkit-scrollbar-track,
.panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.vehicle-list.is-loading {
    min-height: 120px;
}

.vehicle-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 116, 217, 0.12);
    border-radius: 20px;
    box-shadow: 0 16px 26px rgba(0, 116, 217, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    text-align: left;
    min-width: 0;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.vehicle-card.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.vehicle-card.is-disabled:hover {
    transform: none;
    box-shadow: none;
}

.vehicle-card.is-selected {
    border-color: var(--accent);
    box-shadow: 0 12px 24px rgba(0, 116, 217, 0.25);
}

.vehicle-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(0, 116, 217, 0.2), rgba(58, 164, 255, 0.2));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.vehicle-icon img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}

.vehicle-icon-text {
    font-weight: 700;
    color: var(--accent-dark);
    font-size: 12px;
    letter-spacing: 0.08em;
}

.vehicle-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vehicle-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-sub {
    font-size: 12px;
    color: var(--muted);
}

.vehicle-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-dark);
    white-space: nowrap;
}

.vehicle-empty {
    padding: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    color: var(--muted);
    font-size: 13px;
}

.vehicle-skeleton {
    display: grid;
    gap: 10px;
}

.vehicle-skeleton div {
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(90deg, #f0e6da, #f7f1ea, #f0e6da);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

.panel-actions {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 14px 24px;
    margin: 0 -24px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    order: -1;
}

.book-btn {
    padding: 14px;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.book-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 116, 217, 0.25);
}

.ride-message {
    min-height: 18px;
    font-size: 13px;
    font-weight: 600;
}

.ride-message[data-tone="error"] {
    color: #b42318;
}

.ride-message[data-tone="success"] {
    color: #067647;
}

.ride-message {
    padding: 8px 12px;
    border-radius: 10px;
    background: transparent;
}

.ride-message[data-tone="error"] {
    background: rgba(255, 230, 230, 0.85);
}

.ride-message[data-tone="success"] {
    background: rgba(214, 255, 234, 0.9);
}

.for-others-fields[hidden] {
    display: none !important;
}

.for-others-fields.is-highlight .field-label {
    color: var(--accent-dark);
}

.for-others-fields.is-highlight .text-input {
    border-color: rgba(0, 116, 217, 0.6);
    box-shadow: 0 0 0 2px rgba(0, 116, 217, 0.15);
    background: #f4f9ff;
}

.field-error {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #b42318;
}

.field-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--accent-dark);
    font-weight: 600;
}

.field-hint.is-hidden {
    display: none;
}

.field-hint-action {
    margin-top: 8px;
}

.field-hint-action.is-hidden {
    display: none;
}

.text-input.is-invalid {
    border-color: #fca5a5;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
    background: #fff5f5;
}

.map-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    z-index: 3;
}

.map-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.map-overlay-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 18px 24px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
    max-width: 280px;
    text-align: center;
}

.map-overlay-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.map-overlay-body {
    font-size: 13px;
    color: var(--muted);
}

.pac-container {
    z-index: 100000;
    font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
}

.ride-login {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 10000;
}

.ride-login.is-hidden {
    display: none;
}

.login-card {
    width: min(420px, 92vw);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    padding: 24px;
    text-align: center;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 18px;
}

.login-actions {
    display: grid;
    gap: 10px;
}

.text-input.is-locked {
    background: #f1f4f8;
    color: #96a0b0;
    cursor: not-allowed;
}

.ride-detail {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    padding: 24px;
    z-index: 10000;
}

.ride-detail.is-hidden {
    display: none;
}

.ride-detail-card {
    width: min(420px, 100%);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ride-success {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 10001;
}

.ride-success.is-hidden {
    display: none;
}

.success-card {
    width: min(420px, 92vw);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    padding: 28px;
    text-align: center;
}

.success-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0, 116, 217, 0.15);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
    margin: 0 auto 12px;
    font-size: 24px;
}

.success-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.success-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 18px;
}

.success-actions {
    display: grid;
    gap: 10px;
}

.ghost-btn {
    border: 1px solid var(--panel-border);
    background: #ffffff;
    color: var(--ink);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.ride-confirm {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10005;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ride-confirm.is-hidden {
    display: none;
}

.ride-page:has(.ride-confirm:not(.is-hidden)) .ride-detail {
    pointer-events: none;
}

.ride-pending {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    z-index: 10003;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ride-pending.is-hidden {
    display: none;
}

.pending-card {
    width: min(520px, 92vw);
    max-height: min(90vh, calc(100dvh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    padding: 24px;
    text-align: left;
    flex-shrink: 0;
    margin: auto;
}

.pending-card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pending-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.pending-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 14px;
}

.pending-amount {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pending-breakdown {
    display: grid;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 14px;
}

.pending-breakdown-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--ink);
}

.pending-breakdown-row span {
    color: var(--muted);
}

.pending-breakdown-total {
    font-weight: 700;
}

.pending-section {
    background: #f7f9ff;
    border: 1px solid #e3ecff;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 0;
}

.pending-actions {
    display: grid;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.pending-message {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-dark);
}

.pending-message[data-tone="error"] {
    color: #b42318;
}

.pending-message[data-tone="success"] {
    color: #067647;
}

.confirm-card {
    width: min(560px, 94vw);
    max-height: min(90vh, calc(100dvh - 48px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    margin: auto;
    flex-shrink: 0;
    text-align: left;
}

.confirm-header {
    padding: 24px 24px 0;
}

.confirm-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.confirm-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.confirm-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px;
    -webkit-overflow-scrolling: touch;
}

.confirm-summary {
    display: grid;
    gap: 12px;
    padding: 16px;
    background: #f7f9ff;
    border: 1px solid #e3ecff;
    border-radius: 14px;
    margin-bottom: 16px;
}

.confirm-row {
    display: grid;
    grid-template-columns: minmax(110px, 34%) 1fr;
    gap: 8px 12px;
    align-items: start;
}

.confirm-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.confirm-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.45;
    word-break: break-word;
}

.confirm-breakdown-wrap {
    padding: 16px;
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    background: #ffffff;
}

.confirm-breakdown-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 10px;
}

.confirm-breakdown {
    display: grid;
    gap: 8px;
}

.confirm-breakdown .detail-row {
    font-size: 14px;
}

.confirm-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--panel-border);
    font-size: 15px;
    font-weight: 700;
}

.confirm-total-row strong {
    font-size: 20px;
    color: var(--accent);
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--panel-border);
    background: #ffffff;
}

.confirm-actions .book-btn,
.confirm-actions .ghost-btn {
    width: 100%;
    min-height: 44px;
}

@media (max-width: 520px) {
    .confirm-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .confirm-actions {
        grid-template-columns: 1fr;
    }
}

.ride-tracking {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 10003;
}

.ride-tracking.is-hidden {
    display: none;
}

.tracking-card {
    width: min(520px, 92vw);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    padding: 20px 22px 24px;
}

.tracking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tracking-title {
    font-size: 18px;
    font-weight: 700;
}

.tracking-body {
    margin-top: 18px;
    display: grid;
    gap: 14px;
    justify-items: center;
}

.tracking-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid rgba(0, 116, 217, 0.15);
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

.tracking-spinner.is-hidden {
    display: none;
}

.tracking-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
}

.tracking-address {
    width: 100%;
    background: #f7f9ff;
    border: 1px solid #e3ecff;
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 6px;
}

.tracking-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.tracking-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.tracking-driver {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.tracking-driver-card {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e6edff;
    background: #f6f9ff;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    font-size: 13px;
}

.tracking-driver-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(0, 116, 217, 0.15);
    color: var(--accent-dark);
    display: grid;
    place-items: center;
    font-weight: 700;
    overflow: hidden;
}

.tracking-driver-avatar img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    display: block;
}

.tracking-driver-meta {
    display: grid;
    gap: 4px;
}

.tracking-driver-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.tracking-driver-sub {
    font-size: 12px;
    color: var(--muted);
}

.tracking-driver-rating {
    text-align: right;
    font-size: 12px;
    color: var(--muted);
}

.tracking-driver-rating strong {
    display: block;
    font-size: 14px;
    color: var(--accent-dark);
}

.tracking-otp {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0, 116, 217, 0.12);
    color: var(--accent);
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.08em;
}

.ghost-btn.is-hidden {
    display: none;
}

.ghost-btn.is-loading {
    color: transparent;
    pointer-events: none;
}

.ghost-btn.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(0, 116, 217, 0.2);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

.tracking-cancel-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}

.tracking-cancel-status[data-tone="error"] {
    color: #b42318;
}

.tracking-cancel-status[data-tone="success"] {
    color: #067647;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e6edf6;
}

.detail-back {
    border: none;
    background: transparent;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.detail-title {
    font-weight: 700;
}

.detail-body {
    padding: 16px 20px;
    overflow-y: auto;
}

.detail-hero img {
    width: 100%;
    border-radius: 18px;
    -o-object-fit: cover;
       object-fit: cover;
    background: #f1f5f9;
}

.detail-hero-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    align-items: center;
}

.detail-name {
    font-size: 18px;
    font-weight: 700;
}

.detail-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
}

.detail-section {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f8fbff;
    border-radius: 16px;
    border: 1px solid #e6edf6;
}

.detail-section-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 10px;
    font-weight: 600;
}

.detail-breakdown {
    display: grid;
    gap: 8px;
}

.breakdown-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 4px;
}

.breakdown-section-title:first-child {
    margin-top: 0;
}

.breakdown-item-label {
    color: var(--ink);
}

.breakdown-accent {
    color: #1cb0d4;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.detail-divider {
    height: 1px;
    background: #e6edf6;
    margin: 12px 0;
}

.detail-metrics {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
}

.detail-metrics strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
}

.detail-note {
    margin-top: 16px;
    padding: 12px 14px;
    background: #f7f9ff;
    border: 1px solid #e3ecff;
    border-radius: 14px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.detail-note-title {
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-note p {
    margin: 0;
}

.detail-promo {
    display: grid;
    gap: 10px;
}

.promo-toggle {
    border: 1px dashed var(--accent);
    background: #ffffff;
    color: var(--accent);
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.promo-list {
    display: grid;
    gap: 10px;
}

.promo-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e6edf6;
    border-radius: 12px;
}

.promo-card-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.promo-card-media img {
    display: block;
    width: 68px;
    height: 44px;
    -o-object-fit: cover;
       object-fit: cover;
    border-radius: 8px;
}

.promo-card-copy {
    min-width: 0;
}

.promo-name {
    font-weight: 700;
}

.promo-desc {
    font-size: 12px;
    color: var(--muted);
}

.promo-apply {
    border: none;
    background: var(--accent);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.promo-applied-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-dark);
    white-space: nowrap;
}

.promo-card.is-applied {
    border-color: #bbf7d0;
    background: #f8fff9;
}

.promo-applied-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.promo-applied-row.is-hidden {
    display: none;
}

.promo-applied-text {
    font-size: 12px;
    font-weight: 600;
    color: #198754;
}

.promo-remove {
    border: none;
    background: transparent;
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    flex-shrink: 0;
}

.promo-remove:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.promo-remove-inline {
    border: 1px solid #dc3545;
    background: #ffffff;
    color: #dc3545;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    flex-shrink: 0;
}

.promo-message {
    font-size: 12px;
    color: var(--muted);
}

.promo-message.is-success {
    color: #198754;
    font-weight: 600;
}

.promo-message.is-error {
    color: #dc3545;
    font-weight: 600;
}

.detail-payments {
    display: grid;
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.detail-actions {
    padding: 16px 20px 20px;
    border-top: 1px solid #e6edf6;
    background: #ffffff;
}

.payment-detail {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.payment-wallet.is-hidden,
.payment-stripe.is-hidden {
    display: none;
}

.wallet-label {
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wallet-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
    margin: 6px 0;
}

.wallet-note {
    font-size: 12px;
    color: var(--muted);
}

.wallet-topup {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(0, 116, 217, 0.2);
    background: #f7faff;
    display: grid;
    gap: 10px;
}

.wallet-topup.is-hidden {
    display: none;
}

.wallet-topup-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-dark);
}

.wallet-topup-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.wallet-topup-message {
    font-size: 12px;
    color: var(--muted);
}

.wallet-stripe-card {
    padding: 10px 12px;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: #ffffff;
}

.wallet-summary {
    margin-top: 4px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 116, 217, 0.15);
    background: #f7faff;
    display: grid;
    gap: 10px;
}

.wallet-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-summary-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-dark);
}

.wallet-summary-actions {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wallet-pending {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 227, 227, 0.65);
    border: 1px solid rgba(255, 191, 191, 0.9);
    margin-top: 2px;
}

.wallet-pending.is-hidden {
    display: none;
}

.wallet-pending-title {
    font-size: 12px;
    font-weight: 600;
    color: #7a1a1a;
}

.wallet-pending-amount {
    font-size: 14px;
    font-weight: 700;
    color: #b42318;
}

.wallet-topup-toggle {
    border: none;
    background: rgba(0, 116, 217, 0.12);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.wallet-topup-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wallet-toggle {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(0, 116, 217, 0.2);
    background: #ffffff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.wallet-toggle-icon {
    width: 16px;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 116, 217, 0.5);
    position: relative;
}

.wallet-toggle-icon::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    top: 2px;
    left: 5px;
}

.wallet-toggle.is-off .wallet-toggle-icon {
    background: rgba(15, 23, 42, 0.3);
}

.wallet-toggle.is-off .wallet-toggle-icon::after {
    left: 5px;
    background: rgba(255, 255, 255, 0.8);
}

.stripe-card {
    padding: 12px;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: #ffffff;
}

.stripe-error {
    margin-top: 6px;
    font-size: 12px;
    color: #c23b22;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 960px) {
    .ride-panel {
        left: 16px;
        right: 16px;
        width: auto;
    }
}

@media (max-width: 720px) {
    .ride-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: 82vh;
        border-radius: 28px 28px 0 0;
        animation: slideUp 0.5s ease-out;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

