:root {
    --cust-red: #e63946;
    --cust-red-dark: #b00020;
    --cust-bg: #e9edf2;
    --cust-surface: #ffffff;
    --cust-text: #0f172a;
    --cust-muted: #64748b;
    --cust-border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--cust-text);
    background: var(--cust-bg);
}

a {
    text-decoration: none;
}

.customer-auth-body *,
.customer-panel-body * {
    box-shadow: none !important;
}

.customer-auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.customer-auth-shell {
    width: min(100%, 510px);
}

.customer-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #334155;
    font-weight: 600;
    font-size: 0.88rem;
}

.customer-auth-card {
    background: var(--cust-surface);
    border: 1px solid var(--cust-border);
    border-radius: 20px;
    padding: 1.15rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.customer-auth-card-pro {
    display: grid;
    gap: 0.8rem;
}

.customer-auth-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.customer-auth-chip {
    border: 1px solid color-mix(in srgb, var(--cust-red) 24%, #ffffff);
    background: color-mix(in srgb, var(--cust-red) 8%, #ffffff);
    color: var(--cust-red-dark);
    border-radius: 999px;
    padding: 0.28rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 700;
}

.customer-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.42rem;
}

.customer-auth-brand span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cust-red), var(--cust-red-dark));
    color: #fff;
    display: inline-grid;
    place-items: center;
}

.customer-auth-card h1 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 800;
}

.customer-auth-card p {
    margin: 0;
    color: var(--cust-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.customer-auth-form .input-group-text {
    border-color: #cbd5e1;
    background: #fff;
    color: #64748b;
}

.customer-auth-card .form-control {
    border-color: #cbd5e1;
}

.customer-auth-card .form-control:focus {
    border-color: color-mix(in srgb, var(--cust-red) 64%, #ffffff);
    box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--cust-red) 20%, transparent);
}

.customer-auth-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
}

.customer-auth-benefits li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 500;
}

.customer-auth-benefits i {
    color: var(--cust-red);
}

.customer-error-card {
    text-align: center;
    display: grid;
    gap: 0.6rem;
}

.customer-error-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    margin: 0 auto;
    background: color-mix(in srgb, var(--cust-red) 8%, #ffffff);
    color: var(--cust-red);
    border: 1px solid color-mix(in srgb, var(--cust-red) 24%, #ffffff);
    display: inline-grid;
    place-items: center;
    font-size: 1.45rem;
}

.customer-error-actions {
    display: grid;
    gap: 0.45rem;
}

.customer-panel-top {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--cust-border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.customer-panel-top-inner {
    width: min(1160px, calc(100% - 1rem));
    margin: 0 auto;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.customer-link-back,
.customer-link-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #334155;
    font-weight: 600;
}

.customer-panel-shell {
    width: min(1160px, calc(100% - 1rem));
    margin: 0 auto;
    padding: 0.95rem 0 1.2rem;
}

.customer-hero {
    border: 1px solid color-mix(in srgb, var(--cust-red) 24%, #ffffff);
    border-radius: 16px;
    background: #fff;
    padding: 0.92rem;
    display: grid;
    gap: 0.55rem;
}

.customer-hero-title h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.customer-hero-title p {
    margin: 0.35rem 0 0;
    font-size: 0.92rem;
    color: var(--cust-muted);
}

.customer-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.customer-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    border: 1px solid color-mix(in srgb, var(--cust-red) 36%, #ffffff);
    background: #fff;
    color: var(--cust-red-dark);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.customer-quick-grid {
    margin-top: 0.72rem;
    display: grid;
    gap: 0.62rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.customer-quick-card {
    position: relative;
    width: 100%;
    border: 1px solid var(--cust-border);
    border-radius: 14px;
    background: #fff;
    padding: 0.8rem 0.72rem;
    display: grid;
    gap: 0.22rem;
    color: #1e293b;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

button.customer-quick-card {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    line-height: inherit;
}

.customer-quick-card:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--cust-red) 24%, #ffffff);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.customer-quick-card.active {
    border-color: color-mix(in srgb, var(--cust-red) 64%, #ffffff);
    background: linear-gradient(180deg, color-mix(in srgb, var(--cust-red) 7%, #ffffff), #fff);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--cust-red) 12%, transparent);
}

.customer-quick-card.active i {
    color: var(--cust-red-dark);
}

.customer-tab-alert {
    position: absolute;
    top: 0.42rem;
    right: 0.42rem;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--cust-red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 8px 14px color-mix(in srgb, var(--cust-red) 22%, transparent);
}

.customer-quick-card i {
    font-size: 1.2rem;
    color: var(--cust-red);
}

.customer-quick-card strong {
    font-size: 0.92rem;
}

.customer-quick-card small {
    color: var(--cust-muted);
    font-size: 0.76rem;
}

.customer-section {
    margin-top: 0.74rem;
    border: 1px solid var(--cust-border);
    border-radius: 16px;
    background: #fff;
    padding: 0.9rem;
}

.customer-tab-pane {
    animation: customerTabFade 0.22s ease;
}

.customer-tab-pane[hidden] {
    display: none !important;
}

@keyframes customerTabFade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.customer-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.62rem;
}

.customer-section-head h2 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.customer-section-head h2 i {
    color: var(--cust-red);
}

.customer-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 0.8rem;
    color: var(--cust-muted);
    font-size: 0.88rem;
    background: #f8fafc;
}

.customer-order-grid {
    display: grid;
    gap: 0.62rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-order-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 0.72rem;
}

.customer-order-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.42rem;
}

.customer-order-card p {
    margin: 0.45rem 0;
    color: var(--cust-muted);
    font-size: 0.8rem;
}

.customer-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.58rem;
    font-size: 0.9rem;
}

.customer-order-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-bottom: 0.58rem;
    font-size: 0.76rem;
    color: var(--cust-muted);
}

.customer-order-meta-line > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-order-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.customer-order-actions .btn {
    flex: 1 1 0;
}

.customer-auth-body .btn-danger,
.customer-panel-body .btn-danger {
    --bs-btn-bg: var(--cust-red);
    --bs-btn-border-color: var(--cust-red);
    --bs-btn-hover-bg: var(--cust-red-dark);
    --bs-btn-hover-border-color: var(--cust-red-dark);
    --bs-btn-active-bg: var(--cust-red-dark);
    --bs-btn-active-border-color: var(--cust-red-dark);
    --bs-btn-disabled-bg: var(--cust-red);
    --bs-btn-disabled-border-color: var(--cust-red);
}

.customer-auth-body .btn-outline-danger,
.customer-panel-body .btn-outline-danger {
    --bs-btn-color: var(--cust-red);
    --bs-btn-border-color: color-mix(in srgb, var(--cust-red) 64%, #ffffff);
    --bs-btn-hover-bg: var(--cust-red);
    --bs-btn-hover-border-color: var(--cust-red);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: var(--cust-red-dark);
    --bs-btn-active-border-color: var(--cust-red-dark);
    --bs-btn-active-color: #ffffff;
    --bs-btn-disabled-color: var(--cust-red);
    --bs-btn-disabled-border-color: color-mix(in srgb, var(--cust-red) 32%, #ffffff);
}

.customer-cashback-box {
    border: 1px solid color-mix(in srgb, var(--cust-red) 24%, #ffffff);
    border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--cust-red) 8%, #ffffff), #ffffff);
    padding: 0.9rem;
}

.customer-cashback-label {
    display: block;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cust-muted);
    font-weight: 700;
}

.customer-cashback-box strong {
    font-size: 2rem;
    line-height: 1;
    color: var(--cust-red-dark);
    display: block;
    margin-top: 0.28rem;
}

.customer-cashback-box p {
    margin: 0.42rem 0 0;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.5;
}

.customer-cashback-grid {
    margin-top: 0.62rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.customer-cashback-kpi {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 0.7rem 0.75rem;
    display: grid;
    gap: 0.22rem;
}

.customer-cashback-kpi span {
    font-size: 0.76rem;
    color: var(--cust-muted);
}

.customer-cashback-kpi strong {
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.2;
}

.customer-cashback-disabled {
    border: 1px dashed color-mix(in srgb, var(--cust-red) 26%, #ffffff);
    border-radius: 14px;
    background: color-mix(in srgb, var(--cust-red) 6%, #ffffff);
    padding: 1rem;
    display: grid;
    gap: 0.32rem;
    justify-items: start;
}

.customer-cashback-disabled i {
    font-size: 1.4rem;
    color: var(--cust-red);
}

.customer-cashback-disabled strong {
    font-size: 1rem;
    color: #0f172a;
}

.customer-cashback-disabled p {
    margin: 0;
    color: var(--cust-muted);
    font-size: 0.85rem;
}

.customer-quick-card.is-disabled {
    border-style: dashed;
    background: #f8fafc;
}

.customer-quick-card.is-disabled i,
.customer-quick-card.is-disabled strong {
    color: #64748b;
}

.customer-track-head {
    display: grid;
    gap: 0.26rem;
}

.payment-state-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    width: fit-content;
    max-width: 100%;
    padding: 0.14rem 0.62rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.payment-state-chip--paid {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}

.payment-state-chip--pending {
    color: #9a3412;
    background: #ffedd5;
    border-color: #fdba74;
}

.payment-state-chip--analysis {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #93c5fd;
}

.payment-state-chip--denied,
.payment-state-chip--canceled {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}

.payment-state-chip--refunded {
    color: #6b21a8;
    background: #f3e8ff;
    border-color: #d8b4fe;
}

.payment-state-chip--local {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.customer-deliveryman-head {
    display: grid;
    gap: 0.28rem;
    margin-bottom: 0.62rem;
}

.customer-deliveryman-head small {
    font-size: 0.72rem;
    color: var(--cust-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.customer-deliveryman-card {
    border: 1px solid color-mix(in srgb, var(--cust-red) 24%, #ffffff);
    border-radius: 12px;
    background: color-mix(in srgb, var(--cust-red) 8%, #ffffff);
    padding: 0.5rem 0.58rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    max-width: 100%;
}

.customer-deliveryman-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cust-red), var(--cust-red-dark));
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.customer-deliveryman-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.customer-deliveryman-card strong {
    font-size: 0.88rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-track-head strong {
    font-size: 1.12rem;
}

.customer-track-head small {
    color: var(--cust-muted);
}

.customer-timeline {
    margin-top: 0.62rem;
    display: grid;
    gap: 0.55rem;
}

.customer-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 0.52rem;
    padding: 0.56rem 0.62rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.customer-timeline-item .dot {
    width: 10px;
    height: 10px;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.customer-timeline-item strong {
    display: block;
    font-size: 0.9rem;
}

.customer-timeline-item small {
    color: var(--cust-muted);
    font-size: 0.78rem;
}

.customer-timeline-item.done {
    border-color: color-mix(in srgb, var(--cust-red) 24%, #ffffff);
    background: color-mix(in srgb, var(--cust-red) 7%, #ffffff);
}

.customer-timeline-item.done .dot {
    background: var(--cust-red);
}

.customer-timeline-item.current {
    border-color: color-mix(in srgb, var(--cust-red) 64%, #ffffff);
}

.customer-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1200;
}

.customer-modal-dialog {
    width: min(760px, 100%);
    max-height: calc(100dvh - 2rem);
    margin: 0 auto;
}

.customer-modal-card {
    border: 1px solid var(--cust-border);
    border-radius: 20px;
    background: var(--cust-surface);
    overflow: hidden;
}

.customer-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1rem 1rem 0.8rem;
    border-bottom: 1px solid var(--cust-border);
}

.customer-modal-kicker {
    display: inline-block;
    color: var(--cust-red-dark);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.18rem;
}

.customer-modal-head h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.customer-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--cust-border);
    background: #fff;
    color: #334155;
    display: inline-grid;
    place-items: center;
}

.customer-modal-body {
    padding: 1rem;
    overflow: auto;
    max-height: calc(100dvh - 10rem);
    display: grid;
    gap: 0.9rem;
}

.customer-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.customer-detail-kpi {
    border: 1px solid var(--cust-border);
    border-radius: 14px;
    background: #fff;
    padding: 0.75rem 0.8rem;
}

.customer-detail-kpi small {
    display: block;
    color: var(--cust-muted);
    font-size: 0.75rem;
    margin-bottom: 0.16rem;
}

.customer-detail-kpi strong {
    font-size: 0.96rem;
    color: var(--cust-text);
}

.customer-detail-kpi .payment-state-chip {
    margin-top: 0.42rem;
}

.customer-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 0.8rem;
}

.customer-detail-box {
    border: 1px solid var(--cust-border);
    border-radius: 16px;
    background: #fff;
    padding: 0.9rem;
    display: grid;
    gap: 0.7rem;
}

.customer-detail-box h4 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 800;
}

.customer-detail-items {
    display: grid;
    gap: 0.72rem;
}

.customer-detail-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fbfcfe;
    padding: 0.72rem;
    display: grid;
    gap: 0.45rem;
}

.customer-detail-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
}

.customer-detail-item-head > div {
    min-width: 0;
}

.customer-detail-item-head strong {
    display: block;
    font-size: 0.94rem;
}

.customer-detail-item-head small {
    display: block;
    color: var(--cust-muted);
    font-size: 0.75rem;
}

.customer-detail-complements {
    display: grid;
    gap: 0.32rem;
    padding-left: 0.15rem;
}

.customer-detail-complements span {
    color: #475569;
    font-size: 0.78rem;
}

.customer-detail-meta {
    display: grid;
    gap: 0.62rem;
}

.customer-detail-meta-row {
    display: grid;
    gap: 0.18rem;
}

.customer-detail-meta-row small {
    color: var(--cust-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.customer-detail-meta-row strong,
.customer-detail-meta-row span {
    color: var(--cust-text);
    font-size: 0.9rem;
    line-height: 1.45;
}

.customer-detail-totals {
    display: grid;
    gap: 0.42rem;
    border-top: 1px dashed #d9e2ec;
    padding-top: 0.72rem;
}

.customer-detail-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.86rem;
}

.customer-detail-total-row strong {
    font-size: 1rem;
}

.customer-detail-total-row.is-grand-total {
    color: var(--cust-red-dark);
    font-weight: 700;
}

body.customer-modal-open {
    overflow: hidden;
}

.customer-footer-info {
    margin: 0.75rem 0 0.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.customer-footer-info span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.28rem 0.62rem;
    font-size: 0.78rem;
    color: #475569;
}

body.customer-panel-body[data-customer-theme='dark'] {
    --cust-bg: #07111f;
    --cust-surface: #0c1728;
    --cust-surface-alt: #101d31;
    --cust-surface-soft: #13233a;
    --cust-text: #f8fafc;
    --cust-muted: #93a4bb;
    --cust-border: #233247;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--cust-red) 12%, transparent), transparent 28%),
        linear-gradient(180deg, #06101d 0%, #091321 100%);
    color: var(--cust-text);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-panel-top {
    border-bottom-color: var(--cust-border);
    background: rgba(6, 16, 29, 0.92);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-link-back,
body.customer-panel-body[data-customer-theme='dark'] .customer-link-logout {
    color: #d9e4f2;
}

body.customer-panel-body[data-customer-theme='dark'] .customer-hero,
body.customer-panel-body[data-customer-theme='dark'] .customer-section,
body.customer-panel-body[data-customer-theme='dark'] .customer-order-card,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-box,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-kpi,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-disabled,
body.customer-panel-body[data-customer-theme='dark'] .customer-timeline-item,
body.customer-panel-body[data-customer-theme='dark'] .customer-modal-card,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-kpi,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-box,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-item,
body.customer-panel-body[data-customer-theme='dark'] .customer-footer-info span,
body.customer-panel-body[data-customer-theme='dark'] .customer-empty,
body.customer-panel-body[data-customer-theme='dark'] .customer-quick-card,
body.customer-panel-body[data-customer-theme='dark'] .customer-deliveryman-card,
body.customer-panel-body[data-customer-theme='dark'] .customer-modal-close {
    background: var(--cust-surface);
    border-color: var(--cust-border);
    color: var(--cust-text);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-empty,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-item {
    background: var(--cust-surface-alt);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-quick-card.active,
body.customer-panel-body[data-customer-theme='dark'] .customer-timeline-item.done,
body.customer-panel-body[data-customer-theme='dark'] .customer-deliveryman-card {
    background: color-mix(in srgb, var(--cust-red) 12%, var(--cust-surface));
}

body.customer-panel-body[data-customer-theme='dark'] .customer-hero-meta span {
    background: var(--cust-surface-alt);
    border-color: color-mix(in srgb, var(--cust-red) 38%, var(--cust-border));
    color: #f8fafc;
}

body.customer-panel-body[data-customer-theme='dark'] .customer-quick-card strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-section-head h2,
body.customer-panel-body[data-customer-theme='dark'] .customer-track-head strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-kpi strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-box h4,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-item-head strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-total-row strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-order-row strong {
    color: #f8fafc;
}

body.customer-panel-body[data-customer-theme='dark'] .customer-hero-title p,
body.customer-panel-body[data-customer-theme='dark'] .customer-quick-card small,
body.customer-panel-body[data-customer-theme='dark'] .customer-order-card p,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-label,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-box p,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-kpi span,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-disabled p,
body.customer-panel-body[data-customer-theme='dark'] .customer-track-head small,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-kpi small,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-item-head small,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-meta-row small,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-complements span,
body.customer-panel-body[data-customer-theme='dark'] .customer-footer-info span,
body.customer-panel-body[data-customer-theme='dark'] .customer-empty,
body.customer-panel-body[data-customer-theme='dark'] .customer-deliveryman-head small {
    color: var(--cust-muted);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-detail-meta-row strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-meta-row span,
body.customer-panel-body[data-customer-theme='dark'] .customer-order-row,
body.customer-panel-body[data-customer-theme='dark'] .customer-order-meta-line,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-kpi strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-cashback-disabled strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-deliveryman-card strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-timeline-item strong,
body.customer-panel-body[data-customer-theme='dark'] .customer-modal-head h3 {
    color: var(--cust-text);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-modal-head,
body.customer-panel-body[data-customer-theme='dark'] .customer-tabs-nav,
body.customer-panel-body[data-customer-theme='dark'] .customer-detail-totals {
    border-color: var(--cust-border);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-modal-kicker,
body.customer-panel-body[data-customer-theme='dark'] .customer-section-head h2 i,
body.customer-panel-body[data-customer-theme='dark'] .customer-quick-card i {
    color: var(--cust-red);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-tab-alert {
    border-color: var(--cust-surface);
}

body.customer-panel-body[data-customer-theme='dark'] .customer-modal-close {
    color: #d9e4f2;
}

body.customer-panel-body[data-customer-theme='dark'] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--cust-text);
    --bs-table-border-color: var(--cust-border);
    margin-bottom: 0;
}

body.customer-panel-body[data-customer-theme='dark'] .table > :not(caption) > * > * {
    background: transparent;
    color: inherit;
    border-bottom-color: var(--cust-border);
}

body.customer-panel-body[data-customer-theme='dark'] .table thead th {
    color: #d9e4f2;
}

body.customer-panel-body[data-customer-theme='dark'] .form-control,
body.customer-panel-body[data-customer-theme='dark'] .form-select,
body.customer-panel-body[data-customer-theme='dark'] .input-group-text {
    background: var(--cust-surface-alt);
    border-color: var(--cust-border);
    color: var(--cust-text);
}

body.customer-panel-body[data-customer-theme='dark'] .form-control::placeholder {
    color: #7f90a8;
}

body.customer-panel-body[data-customer-theme='dark'] .form-control:focus,
body.customer-panel-body[data-customer-theme='dark'] .form-select:focus {
    background: var(--cust-surface-soft);
    border-color: color-mix(in srgb, var(--cust-red) 56%, var(--cust-border));
    color: var(--cust-text);
    box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--cust-red) 18%, transparent);
}

body.customer-panel-body[data-customer-theme='dark'] .btn-outline-secondary {
    --bs-btn-color: #d9e4f2;
    --bs-btn-border-color: var(--cust-border);
    --bs-btn-hover-bg: var(--cust-surface-soft);
    --bs-btn-hover-border-color: #4f627d;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: var(--cust-surface-soft);
    --bs-btn-active-border-color: #4f627d;
    --bs-btn-active-color: #ffffff;
}

body.customer-panel-body[data-customer-theme='dark'] .badge.text-bg-light {
    background: #1f2b3b !important;
    color: #e2e8f0 !important;
}

@media (max-width: 1080px) {
    .customer-quick-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .customer-detail-summary,
    .customer-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .customer-auth-shell {
        width: 100%;
    }

    .customer-auth-card {
        padding: 1rem;
    }

    .customer-auth-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .customer-order-grid {
        grid-template-columns: 1fr;
    }

    .customer-cashback-grid {
        grid-template-columns: 1fr;
    }

    .customer-order-actions .btn {
        width: 100%;
        flex-basis: 100%;
    }

    .customer-modal-head {
        padding: 0.9rem 0.9rem 0.72rem;
        align-items: center;
    }

    .customer-modal-head h3 {
        font-size: 1rem;
    }

    .customer-modal-backdrop {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .customer-modal-dialog {
        width: 100%;
        max-height: calc(100dvh - 1.5rem);
    }

    .customer-modal-card {
        border-radius: 18px 18px 0 0;
    }

    .customer-modal-body {
        max-height: calc(100dvh - 8.5rem);
        padding: 0.9rem;
    }

    .customer-detail-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .customer-detail-kpi,
    .customer-detail-box,
    .customer-detail-item {
        padding: 0.75rem;
    }

    .customer-detail-item-head {
        flex-direction: column;
        gap: 0.3rem;
    }

    .customer-detail-total-row {
        font-size: 0.82rem;
    }

    .customer-track-head {
        gap: 0.32rem;
    }

    .customer-panel-shell {
        padding-top: 0.7rem;
    }
}
