html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* Blazor conditional-render modals: override Bootstrap's display:none on .modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop > .modal {
    position: relative;
    display: block !important;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Product discount */
.product-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.product-price-original {
    font-size: 0.8rem;
    color: #6c757d;
    text-decoration: line-through;
}

.discount-badge {
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1em 0.4em;
    border-radius: 0.25rem;
}

.discount-badge-sm {
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.05em 0.35em;
    border-radius: 0.2rem;
    vertical-align: middle;
}

.product-row-original {
    font-size: 0.75rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 0.25rem;
}

/* Product image upload */
.image-preview-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.input-file {
    display: block;
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: #6c757d;
}

.btn-link-danger {
    background: none;
    border: none;
    padding: 0;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
}

/* ── Toast notifications ─────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    z-index: 9999;
    pointer-events: none;
}

.toast-msg {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: .5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    font-size: .9rem;
    font-weight: 500;
    min-width: 220px;
    max-width: 360px;
    pointer-events: auto;
    animation: toast-in .2s ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.toast-msg.info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }
.toast-msg.success { background: #f0fdf4; color: #166534; border-left: 4px solid #22c55e; }
.toast-msg.warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }

.toast-text { flex: 1; }

.toast-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    opacity: .6;
    padding: 0;
}
.toast-dismiss:hover { opacity: 1; }

/* ── Order tracking page ─────────────────────────────────────────────────── */
.tracking-page { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }

.tracking-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.tracking-header h2 { margin: 0; font-size: 1.4rem; }

.status-chip {
    padding: .25rem .75rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.status-chip.pending       { background: #f3f4f6; color: #374151; }
.status-chip.confirmed     { background: #dbeafe; color: #1e40af; }
.status-chip.preparing     { background: #fef9c3; color: #854d0e; }
.status-chip.readyforpickup { background: #ede9fe; color: #5b21b6; }
.status-chip.pickedup      { background: #fce7f3; color: #9d174d; }
.status-chip.ontheway      { background: #d1fae5; color: #065f46; }
.status-chip.delivered     { background: #dcfce7; color: #14532d; }
.status-chip.cancelled     { background: #fee2e2; color: #991b1b; }

/* Status timeline */
.status-timeline {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: .5rem 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.timeline-step.done::after,
.timeline-step.active::after  { background: #22c55e; }

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid #d1d5db;
    z-index: 1;
    transition: background .3s;
}
.timeline-step.done .timeline-dot   { background: #22c55e; border-color: #16a34a; }
.timeline-step.active .timeline-dot { background: #3b82f6; border-color: #2563eb; box-shadow: 0 0 0 4px rgba(59,130,246,.2); }

.timeline-label {
    font-size: .65rem;
    margin-top: .35rem;
    color: #6b7280;
    text-align: center;
    white-space: nowrap;
}
.timeline-step.done .timeline-label   { color: #16a34a; font-weight: 600; }
.timeline-step.active .timeline-label { color: #2563eb; font-weight: 700; }

/* ETA banner */
.eta-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: .5rem;
    padding: .75rem 1rem;
    color: #1e40af;
    font-size: .95rem;
}

/* Map */
.map-section { display: flex; flex-direction: column; gap: .5rem; }
.map-label { font-size: .82rem; color: #6b7280; margin: 0; }
.delivery-map { height: 280px; border-radius: .5rem; border: 1px solid #e5e7eb; background: #f3f4f6; }
.map-placeholder {
    text-align: center;
    padding: 1rem;
    color: #9ca3af;
    font-size: .85rem;
}

/* Order summary card */
.order-summary-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: 1rem 1.25rem;
}
.order-summary-card h4 { margin: 0 0 .75rem; font-size: 1rem; }
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    padding: .2rem 0;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    border-top: 1px solid #e5e7eb;
    margin-top: .5rem;
    padding-top: .5rem;
}

.order-totals {
    display: flex;
    gap: 1rem;
    font-size: .85rem;
    color: #6b7280;
    margin-top: .5rem;
}

/* ── Star ratings ────────────────────────────────────────────────────────── */
.stars {
    display: inline-flex;
    gap: 0.1rem;
}

.star {
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.1s;
    user-select: none;
    line-height: 1;
}

.star.filled { color: #f59e0b; }
.star.empty  { color: #d1d5db; }

/* ── Review card ─────────────────────────────────────────────────────────── */
.review-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .75rem 1rem;
    margin-bottom: .75rem;
}

.review-rating { margin-bottom: .25rem; }

.review-comment {
    font-size: .9rem;
    color: #374151;
    margin: .25rem 0;
}

.review-date {
    font-size: .75rem;
    color: #9ca3af;
}

/* ── Address card ────────────────────────────────────────────────────────── */
.address-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .75rem 1rem;
    margin-bottom: .75rem;
}

.address-card.default {
    border-color: #22c55e;
    background: #f0fdf4;
}

.address-label {
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: .2rem;
}

.address-detail {
    font-size: .85rem;
    color: #6b7280;
}

.address-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* ── Promo section ───────────────────────────────────────────────────────── */
.promo-row {
    padding: .5rem 0;
}

.promo-input {
    max-width: 180px;
}

.promo-badge {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    padding: .2em .75em;
}

/* ── Profile tabs ────────────────────────────────────────────────────────── */
.profile-tabs {
    display: flex;
    gap: .5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}

.profile-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: .5rem 1.25rem;
    font-size: .95rem;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}

.profile-tab-btn:hover { color: #1b6ec2; }

.profile-tab-btn.active {
    color: #1b6ec2;
    border-bottom-color: #1b6ec2;
    font-weight: 600;
}

/* ── Loyalty ─────────────────────────────────────────────────────────────── */
.loyalty-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    border-radius: .75rem;
    padding: 1.5rem 2rem;
    display: inline-block;
    min-width: 220px;
    text-align: center;
}

.loyalty-points-big {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e40af;
    line-height: 1;
}

.loyalty-tx-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: .88rem;
}

.tx-date  { color: #9ca3af; min-width: 90px; }
.tx-reason { flex: 1; color: #374151; }
.tx-points { font-weight: 600; }
.tx-points.positive { color: #16a34a; }
.tx-points.negative { color: #dc2626; }

/* ── Schedule section ────────────────────────────────────────────────────── */
.schedule-toggle {
    padding: .5rem 0;
}

.schedule-picker {
    max-width: 260px;
    margin-top: .5rem;
}

/* ── Favorite heart button ───────────────────────────────────────────────── */
.btn-favorite {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    color: #9ca3af;
    transition: color .15s, background .15s;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.btn-favorite:hover { color: #ef4444; background: #fff; }
.btn-favorite.favorited { color: #ef4444; }

/* Position heart on store card image corner */
.store-card-image .btn-favorite {
    position: absolute;
    top: .5rem;
    right: .5rem;
}

/* ── Order actions ───────────────────────────────────────────────────────── */
.order-actions {
    padding-top: .5rem;
}

/* ── Review form ─────────────────────────────────────────────────────────── */
.review-form {
    background: #f9fafb;
}

/* ── Restaurant: store status badges ────────────────────────────────────── */
.store-card-name-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.store-status-badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: .25rem;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.4;
}
.badge-closed { background: #fee2e2; color: #991b1b; }
.badge-busy   { background: #fef3c7; color: #92400e; }

.store-status-banner {
    padding: .6rem 1rem;
    border-radius: .4rem;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.store-status-banner.closed { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.store-status-banner.busy   { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* ── Busy mode toggle ────────────────────────────────────────────────────── */
.store-header-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.btn-busy {
    padding: .45rem 1rem;
    border: 2px solid #22c55e;
    background: #f0fdf4;
    color: #166534;
    border-radius: var(--radius, .5rem);
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
}
.btn-busy:hover { background: #dcfce7; }
.btn-busy.busy-active {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}
.btn-busy.busy-active:hover { background: #fde68a; }

/* ── Store settings card (prep time) ─────────────────────────────────────── */
.store-settings-card {
    background: var(--card, #fff);
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

/* ── Prep time input ─────────────────────────────────────────────────────── */
.prep-time-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    margin-top: 0;
}
.prep-time-row input[type=number] {
    width: 60px;
    padding: .25rem .4rem;
    border: 1px solid #d1d5db;
    border-radius: .25rem;
    font-size: .85rem;
}

/* ── Category drag-and-drop ──────────────────────────────────────────────── */
.category-sort-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: 1rem;
}
.category-sort-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .9rem;
    background: var(--card, #fff);
    border: 1px solid #e5e7eb;
    border-radius: .375rem;
    cursor: grab;
    user-select: none;
    transition: box-shadow .1s;
}
.category-sort-row:hover { box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.category-sort-row.dragging { opacity: .5; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.drag-handle { font-size: 1.1rem; color: #9ca3af; cursor: grab; }
.cat-name { font-size: .9rem; font-weight: 600; }

/* ── Kitchen ticket ──────────────────────────────────────────────────────── */
.print-ticket-wrapper { display: none; }

.kitchen-ticket {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    width: 300px;
    padding: 12px;
    background: #fff;
    color: #000;
}
.ticket-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ticket-title  { font-size: 16px; font-weight: bold; }
.ticket-order-id { font-size: 20px; font-weight: bold; }
.ticket-time   { font-size: 12px; color: #555; margin-bottom: 6px; }
.ticket-scheduled { font-weight: bold; margin-bottom: 4px; }
.ticket-divider { color: #555; margin: 6px 0; }
.ticket-item   { display: flex; gap: 8px; margin: 2px 0; }
.ticket-qty    { font-weight: bold; min-width: 28px; }
.ticket-item-note { color: #555; font-size: 12px; padding-left: 12px; }
.ticket-notes  { font-style: italic; margin: 4px 0; }
.ticket-store  { margin-top: 8px; font-size: 12px; color: #555; }

.print-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}
.auto-print-toggle {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    cursor: pointer;
}

/* ── @media print: show only the kitchen ticket ──────────────────────────── */
@media print {
    .page, nav, .top-row, .sidebar, header, footer,
    .app-header, .side-drawer, .drawer-backdrop { display: none !important; }
    .print-ticket-wrapper { display: block !important; }
    .kitchen-ticket { width: 100%; }
}

/* ── Driver: availability toggle ─────────────────────────────────────────── */
.driver-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.driver-header .dashboard-title { margin: 0; }

.btn-availability {
    padding: .55rem 1.25rem;
    border: 2px solid;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    letter-spacing: .02em;
}
.btn-availability.online  { background: #dcfce7; color: #166534; border-color: #22c55e; }
.btn-availability.online:hover { background: #bbf7d0; }
.btn-availability.offline { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }
.btn-availability.offline:hover { background: #e5e7eb; }

/* ── Driver: navigation deep-links ───────────────────────────────────────── */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #e5e7eb;
}
.nav-group {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.nav-label { font-size: .82rem; font-weight: 600; color: #374151; min-width: 100px; }
.nav-btn {
    padding: .3rem .75rem;
    border-radius: .375rem;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: filter .15s;
}
.nav-btn:hover { filter: brightness(.92); text-decoration: none; }
.nav-btn.gmaps { background: #4285f4; color: #fff; }
.nav-btn.waze  { background: #33ccff; color: #000; }

/* ── Driver: earnings breakdown ──────────────────────────────────────────── */
.earnings-period { display: flex; gap: .35rem; }
.earnings-subtitle { font-size: .95rem; font-weight: 700; margin: 1rem 0 .4rem; }

.earnings-day-list, .earnings-trips-list {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin-bottom: 1rem;
}

.earnings-day-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    background: var(--card, #fff);
    border: 1px solid #e5e7eb;
    border-radius: .375rem;
    font-size: .88rem;
}
.day-date  { flex: 1; font-weight: 600; }
.day-trips { color: #6b7280; font-size: .82rem; }
.day-total { font-weight: 700; color: #166534; margin-left: auto; }

.earnings-trip-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .4rem .75rem;
    background: var(--card, #fff);
    border: 1px solid #e5e7eb;
    border-radius: .375rem;
    font-size: .82rem;
    flex-wrap: wrap;
}
.trip-id    { font-weight: 700; color: #6b7280; }
.trip-store { flex: 1; }
.trip-date  { color: #9ca3af; font-size: .78rem; }
.trip-fee   { color: #374151; }
.trip-tip   { color: #059669; font-size: .78rem; }
.trip-total { font-weight: 700; color: #166534; margin-left: auto; }


/* ─── Tip section ─── */
.tip-section { margin: 1rem 0; }
.tip-label { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.9rem; color: #495057; }
.tip-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.tip-btn { padding: 0.35rem 0.9rem; border: 1.5px solid #dee2e6; border-radius: 20px; background: #fff; cursor: pointer; font-size: 0.85rem; transition: all .15s; }
.tip-btn:hover { border-color: #6c757d; }
.tip-btn.active { background: #212529; color: #fff; border-color: #212529; }
.tip-custom-input { max-width: 140px; font-size: 0.9rem; }
/* ─── Payment section ─── */
.payment-section { margin: 1rem 0; }
.section-title { font-weight: 600; margin-bottom: 0.75rem; font-size: 0.95rem; }
.saved-card { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 1rem; border: 1.5px solid #dee2e6; border-radius: 8px; margin-bottom: 0.5rem; cursor: pointer; transition: border-color .15s; }
.saved-card:hover { border-color: #6c757d; }
.saved-card.selected { border-color: #212529; background: #f8f9fa; }
.card-brand { font-weight: 600; font-size: 0.85rem; min-width: 50px; }
.card-number { color: #495057; font-size: 0.9rem; }
.card-expiry { color: #6c757d; font-size: 0.8rem; margin-left: auto; }
.card-default-badge { font-size: 0.7rem; background: #198754; color: #fff; padding: 2px 6px; border-radius: 10px; }
.btn-add-card { padding: 0; font-size: 0.9rem; color: #0d6efd; }
.stripe-element { padding: 0.75rem; border: 1.5px solid #dee2e6; border-radius: 8px; background: #fff; min-height: 44px; }
/* ─── Saved cards in Profile ─── */
.payment-tab { padding: 0.5rem 0; }
.saved-card-row { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border: 1px solid #dee2e6; border-radius: 8px; margin-bottom: 0.5rem; }
.card-info { display: flex; align-items: center; gap: 0.75rem; }
.card-actions { display: flex; gap: 0.5rem; }
/* ─── Notification Bell ─── */
.notification-bell { position: relative; display: inline-block; }
.btn-bell { background: none; border: none; font-size: 1.3rem; cursor: pointer; position: relative; padding: 0.25rem 0.5rem; line-height: 1; }
.bell-badge { position: absolute; top: -4px; right: -2px; background: #dc3545; color: #fff; font-size: 0.65rem; font-weight: 700; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; line-height: 1.4; }
.bell-backdrop { position: fixed; inset: 0; z-index: 999; }
.bell-dropdown { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; background: #fff; border: 1px solid #dee2e6; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 1000; overflow: hidden; }
.bell-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid #dee2e6; font-weight: 600; font-size: 0.95rem; }
.btn-mark-all { font-size: 0.8rem; background: none; border: none; color: #0d6efd; cursor: pointer; }
.bell-list { max-height: 380px; overflow-y: auto; }
.bell-empty { padding: 1.5rem; text-align: center; color: #6c757d; font-size: 0.9rem; }
.bell-item { padding: 0.75rem 1rem; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background .1s; }
.bell-item:hover { background: #f8f9fa; }
.bell-item.unread { background: #f0f7ff; }
.bell-item.unread:hover { background: #e8f4ff; }
.bell-item-title { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.bell-item-body { font-size: 0.82rem; color: #495057; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-item-time { font-size: 0.75rem; color: #adb5bd; margin-top: 3px; }
.bell-item.success .bell-item-title { color: #198754; }
.bell-item.warning .bell-item-title { color: #fd7e14; }
.bell-item.alert .bell-item-title { color: #dc3545; }

/* -- Admin Dashboard ------------------------------------------------------- */
.admin-page { max-width: 1200px; }
.admin-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 1rem; }

.admin-tabs { display: flex; gap: .5rem; flex-wrap: wrap; border-bottom: 2px solid #dee2e6; padding-bottom: .25rem; }
.admin-tab-btn { background: none; border: none; padding: .45rem .9rem; border-radius: 6px 6px 0 0; font-weight: 500; color: #555; cursor: pointer; transition: background .15s; }
.admin-tab-btn:hover { background: #f0f0f0; }
.admin-tab-btn.active { background: var(--primary-color, #ff6b35); color: #fff; }

.admin-section { padding: 1rem 0; }
.admin-loading { color: #888; padding: 1.5rem 0; }
.admin-toolbar { display: flex; align-items: center; gap: .75rem; }
.admin-search { max-width: 320px; }

.admin-table th { font-size: .8rem; text-transform: uppercase; color: #888; }
.admin-table td { vertical-align: middle; font-size: .9rem; }

.admin-pager { display: flex; gap: .75rem; align-items: center; margin-top: .75rem; color: #555; }

/* Approval badges */
.badge.approval-approved { background: #28a745; }
.badge.approval-pending  { background: #fd7e14; }
.badge.approval-rejected { background: #dc3545; }

/* Order status badges */
.badge.status-pending       { background: #6c757d; }
.badge.status-confirmed     { background: #17a2b8; }
.badge.status-preparing     { background: #fd7e14; }
.badge.status-readyforpickup{ background: #20c997; }
.badge.status-pickedup      { background: #007bff; }
.badge.status-ontheway      { background: #6610f2; }
.badge.status-delivered     { background: #28a745; }
.badge.status-cancelled     { background: #dc3545; }

/* Disputes */
.dispute-card { border: 1px solid #dee2e6; border-radius: 8px; padding: 1rem; margin-bottom: .75rem; }
.dispute-card.resolved { border-color: #28a745; }
.dispute-card.rejected { border-color: #dc3545; }
.dispute-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.dispute-id { font-weight: 600; }
.dispute-reason { color: #333; margin-bottom: .25rem; }
.dispute-resolution { color: #555; font-style: italic; font-size: .9rem; margin-bottom: .25rem; }
.badge.dispute-badge-open     { background: #fd7e14; }
.badge.dispute-badge-resolved { background: #28a745; }
.badge.dispute-badge-rejected { background: #dc3545; }

/* Analytics */
.analytics-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card { background: #f8f9fa; border-radius: 10px; padding: 1rem 1.25rem; text-align: center; }
.kpi-label { font-size: .8rem; text-transform: uppercase; color: #888; margin-bottom: .25rem; }
.kpi-value { font-size: 1.8rem; font-weight: 700; color: var(--primary-color, #ff6b35); }

.analytics-chart-wrap { overflow-x: auto; }
.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-bottom: 1.5rem; min-width: 600px; }
.bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 20px; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; background: var(--primary-color, #ff6b35); border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; }
.bar-label { font-size: .65rem; color: #888; margin-top: 4px; white-space: nowrap; }

/* Commission */
.commission-form-card { background: #f8f9fa; }
.role-select { min-width: 110px; }

/* -- Phone Verification ---------------------------------------------------- */
.security-tab { max-width: 480px; }
.phone-verified-row { display: flex; align-items: center; gap: .25rem; padding: .75rem 1rem; background: #f0fff4; border: 1px solid #b7ebc8; border-radius: 8px; }
.phone-verified-badge { color: #28a745; font-weight: 600; font-size: .95rem; }
.otp-input { letter-spacing: .25em; font-size: 1.1rem; text-align: center; }

/* -- Fraud Signals --------------------------------------------------------- */
.fraud-score { display: inline-block; padding: .2rem .55rem; border-radius: 99px; font-weight: 700; font-size: .85rem; color: #fff; }
.fraud-score-medium { background: #fd7e14; }
.fraud-score-high   { background: #dc3545; }

.fraud-signals-panel { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 1rem; }
.fraud-signal-row { display: flex; align-items: center; padding: .4rem 0; border-bottom: 1px solid #e9ecef; }
.fraud-signal-row:last-child { border-bottom: none; }

.fraud-type-badge { display: inline-block; padding: .15rem .5rem; border-radius: 4px; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.fraud-type-rapid_orders { background: #fff3cd; color: #856404; }
.fraud-type-refund_abuse  { background: #f8d7da; color: #721c24; }
.fraud-type-cancel_abuse  { background: #fde8d8; color: #7c3e09; }
