/* ═══════════════════════════════════════════════
   Boutique Sweats West Up — Styles
   ═══════════════════════════════════════════════ */

:root {
    --primary: #6750A4;
    --primary-light: #E8DEF8;
    --primary-dark: #4a3880;
    --success: #2e7d32;
    --error: #c62828;
    --bg: #f8f6fc;
    --surface: #ffffff;
    --text: #1c1b1f;
    --text-muted: #666;
    --border: #ddd;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────── */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.shop-header {
    text-align: center;
    padding: 2rem 1rem 1.5rem;
    background: var(--primary);
    color: white;
}

.shop-header .logo {
    height: 48px;
    margin-bottom: .5rem;
}

.shop-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.shop-header .subtitle {
    font-size: .95rem;
    opacity: .85;
    margin-top: .25rem;
}

.product-section {
    flex: 1;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 700px) {
    .product-section {
        padding: 1rem .75rem;
    }
}

/* ── Product grid ─────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 700px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Image ────────────────────────────────────── */
.product-image {
    position: sticky;
    top: 2rem;
}

@media (max-width: 700px) {
    .product-image {
        position: static;
    }
}

/* ── Carrousel ───────────────────────────────── */
.carousel {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.carousel-viewport {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    aspect-ratio: 1;
    overflow: hidden;
    outline: none;
}

@media (max-width: 700px) {
    .carousel-viewport {
        /* aspect-ratio: 3 / 4; */
        max-height: 60vh;
    }
    .carousel-slide img {
        object-fit: contain;
    }
}

/* Slides (fade) */
.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .4s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Flèches */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity .25s, background .2s, transform .2s;
}

.carousel-viewport:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 3px 14px rgba(0,0,0,.16);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(.95);
}

.carousel-prev { left: .75rem; }
.carousel-next { right: .75rem; }

/* Miniatures */
.carousel-thumbs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 2px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-thumbs::-webkit-scrollbar {
    display: none;
}

.carousel-thumb {
    flex: 0 0 60px;
    height: 60px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    padding: 0;
    opacity: .5;
    transition: opacity .2s, border-color .2s, transform .2s;
}

.carousel-thumb:hover {
    opacity: .85;
    transform: scale(1.05);
}

.carousel-thumb.active {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 0 2px var(--primary-light);
}

.carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile : flèches toujours visibles */
@media (max-width: 700px) {
    .carousel-arrow {
        opacity: 1;
        width: 38px;
        height: 38px;
    }
    .carousel-prev { left: .4rem; }
    .carousel-next { right: .4rem; }

    .carousel-thumb {
        flex: 0 0 52px;
        height: 52px;
    }
}

/* ── Product info ─────────────────────────────── */
.product-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.product-desc {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.price-block {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.price-member {
    font-size: .9rem;
    color: var(--success);
    font-weight: 500;
}

/* tooltip "?" à côté du prix adhérent */
.price-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    margin-left: .35rem;
    border-radius: 50%;
    background: var(--text-muted);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    cursor: help;
    position: relative;
    vertical-align: middle;
}
.price-tip-text {
    display: none;
    position: absolute;
    bottom: calc(100% + .5rem);
    left: 50%;
    transform: translateX(-50%);
    width: 16rem;
    padding: .55rem .7rem;
    border-radius: .4rem;
    background: var(--surface);
    color: var(--text);
    font-size: .78rem;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    border: 1px solid var(--border);
    z-index: 10;
    text-align: left;
}
.price-tip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: .35rem solid transparent;
    border-top-color: var(--surface);
}
.price-tip:hover .price-tip-text,
.price-tip:focus .price-tip-text {
    display: block;
}

/* ── Form ─────────────────────────────────────── */
.order-form fieldset {
    border: none;
    margin-bottom: 1.25rem;
}

.order-form legend {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .5rem;
    color: var(--text);
}

.order-form legend small {
    font-weight: 400;
    color: var(--text-muted);
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: .5rem 0 1rem;
}

/* ── Colors ───────────────────────────────────── */
.color-options {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.color-option {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
}

.color-option input { display: none; }

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color .2s, transform .2s;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}

.color-option input:checked + .color-swatch {
    border-color: var(--primary);
    transform: scale(1.1);
}

.color-label {
    font-size: .75rem;
    color: var(--text-muted);
}

/* ── Sizes ────────────────────────────────────── */
.size-options {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.size-option {
    cursor: pointer;
}

.size-option input { display: none; }

.size-label {
    display: inline-block;
    padding: .4rem .8rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    transition: all .2s;
    user-select: none;
}

.size-option input:checked + .size-label {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.size-option:hover .size-label {
    border-color: var(--primary);
}

/* ── Quantity ──────────────────────────────────── */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text);
    transition: background .15s;
}

.qty-btn:hover { background: var(--primary-light); }

.qty-control input {
    width: 48px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-control input::-webkit-inner-spin-button,
.qty-control input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* ── Promo ────────────────────────────────────── */
.promo-input-row {
    display: flex;
    gap: .5rem;
}

.promo-input-row input {
    flex: 1;
    padding: .5rem .75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-family: var(--font);
    text-transform: uppercase;
}

.promo-input-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.promo-status {
    font-size: .8rem;
    margin-top: .25rem;
    min-height: 1.2em;
}

.promo-status.valid { color: var(--success); }
.promo-status.invalid { color: var(--error); }

/* ── Fields ───────────────────────────────────── */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 500px) {
    .field-row { grid-template-columns: 1fr; }
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: .25rem;
}

.field label small {
    font-weight: 400;
    color: var(--text-muted);
}

.field input {
    width: 100%;
    padding: .6rem .75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: var(--font);
    transition: border-color .2s;
}

.field input:focus {
    outline: none;
    border-color: var(--primary);
}

.field input.error {
    border-color: var(--error);
}

/* ── Total ────────────────────────────────────── */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: .75rem;
    padding: .6rem 1rem;
    background: #f3f0ff;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.order-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}

.total-amount {
    color: var(--primary);
    font-size: 1.4rem;
}

/* ── Donation ─────────────────────────────────── */
.donation-group {
    border: none;
    margin-bottom: 1rem;
}

.donation-hint {
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: .6rem;
}

.donation-row {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

.donation-presets {
    display: flex;
    gap: .4rem;
}

.donation-preset {
    padding: .35rem .7rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    color: var(--text);
}

.donation-preset:hover {
    border-color: var(--primary);
}

.donation-preset.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.donation-custom {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.donation-custom input {
    width: 80px;
    padding: .35rem .5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-family: var(--font);
    text-align: right;
    -moz-appearance: textfield;
    appearance: textfield;
}

.donation-custom input::-webkit-inner-spin-button,
.donation-custom input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.donation-custom input:focus {
    outline: none;
    border-color: var(--primary);
}

.donation-currency {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ── Errors ───────────────────────────────────── */
.form-errors {
    background: #fce4ec;
    color: var(--error);
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    margin-bottom: 1rem;
}

.form-errors ul {
    list-style: none;
    padding: 0;
}

.form-errors li::before {
    content: '⚠ ';
}

/* ── Buttons ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .6rem 1.25rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--primary);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.btn:hover {
    background: var(--primary-light);
}

.btn-sm {
    padding: .4rem .8rem;
    font-size: .8rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    padding: .9rem;
    font-size: 1rem;
}

.legal-note {
    text-align: center;
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: .75rem;
}

.legal-note a {
    color: var(--primary);
}

/* ── Footer ───────────────────────────────────── */
.shop-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: .8rem;
    color: var(--text-muted);
}

.shop-footer a {
    color: var(--text-muted);
    text-decoration: underline;
}

/* ── CGV checkbox ─────────────────────────────── */
.cgv-checkbox {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 1rem 0;
    font-size: .85rem;
    cursor: pointer;
    line-height: 1.4;
}

.cgv-checkbox input[type="checkbox"] {
    margin-top: .2rem;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.cgv-checkbox a {
    color: var(--primary);
    text-decoration: underline;
}

/* ── CGV page ─────────────────────────────────── */
.cgv-section {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.cgv-content h2 {
    font-size: 1.1rem;
    margin: 2rem 0 .5rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: .3rem;
}

.cgv-content p,
.cgv-content li {
    font-size: .9rem;
    line-height: 1.6;
    color: var(--text);
}

.cgv-content ul {
    padding-left: 1.5rem;
    margin: .5rem 0;
}

.cgv-content a {
    color: var(--primary);
}
.cgv-content a.btn-primary {
    color: white;
}

.cgv-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}

.cgv-updated {
    font-size: .8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Info banner ──────────────────────────────── */
.info-banner {
    background: #e8f4fd;
    border: 1px solid #b3d9f2;
    border-radius: var(--radius);
    padding: .6rem 1.2rem;
    margin: 1rem 0 1.5rem;
    font-size: .85rem;
    line-height: 1.5;
}

.info-banner summary {
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.info-banner summary::-webkit-details-marker { display: none; }
.info-banner summary::after {
    content: '▸';
    transition: transform .2s;
    font-size: .8rem;
}
.info-banner[open] summary::after {
    transform: rotate(90deg);
}
.info-banner[open] summary {
    margin-bottom: .6rem;
}
.info-banner[open] {
    padding: .6rem 1.2rem 1rem;
}

.info-banner ul {
    margin: 0;
    padding-left: 1.2rem;
}

.info-banner li {
    margin-bottom: .4rem;
}

.info-banner a {
    color: var(--primary);
}

/* ── Guide des tailles ── */
.size-guide {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: .5rem;
}
.size-guide-schema { flex-shrink: 0; }
.size-guide-table-wrap { overflow-x: auto; flex: 1; min-width: 0; }
.size-guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    text-align: center;
    border: 2px solid var(--primary);
}
.size-guide-table th,
.size-guide-table td {
    padding: .4rem .55rem;
    border: 1px solid #cbc4d9;
}
.size-guide-table th {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
.size-guide-table td:first-child {
    background: #f8f6fc;
    font-weight: 600;
    color: var(--primary);
}
.size-guide-table tr:nth-child(even) { background: #faf8ff; }
@media (max-width: 500px) {
    .size-guide { flex-direction: column; align-items: center; }
    .size-guide-table { font-size: .75rem; }
}

.info-banner--warning {
    background: #fff8e1;
    border-color: #f9c74f;
}

.info-banner--closed {
    background: #fce4ec;
    border-color: #e57373;
}

.info-banner--closed h3 {
    color: var(--error);
}

.sale-closed-msg {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Countdown ────────────────────────────────── */
.countdown {
    display: flex;
    gap: .4rem;
    margin-top: .4rem;
}

.cd-block {
    display: flex;
    align-items: baseline;
    gap: .1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .2rem .45rem;
}

.cd-num {
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}

.cd-label {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.countdown-ended {
    font-weight: 600;
    color: var(--error);
}

/* ── Loading spinner ──────────────────────────── */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    margin-right: .5rem;
}

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

/* ── Item selector ────────────────────────────── */
.item-selector {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.item-selector .field-group {
    border: none;
    margin-bottom: 1rem;
}
.item-selector .field-group:last-of-type {
    margin-bottom: 1.25rem;
}

.item-selector legend {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .5rem;
    color: var(--text);
}

/* ── Cart ─────────────────────────────────────── */
.cart-section {
    margin-bottom: 1.5rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .6rem .75rem;
}

.cart-item-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}

.cart-item-detail {
    flex: 1;
    font-size: .9rem;
    font-weight: 500;
}

.cart-item-price {
    font-size: .85rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--error);
    font-size: 1rem;
    cursor: pointer;
    padding: .25rem;
    line-height: 1;
    opacity: .6;
    transition: opacity .15s;
}

.cart-item-remove:hover {
    opacity: 1;
}

/* ═══════════════════════════════════════════════
   Admin
   ═══════════════════════════════════════════════ */

.admin-wrapper {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    overflow: hidden;
    box-sizing: border-box;
}

.admin-page .page-wrapper {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.pin-form {
    max-width: 320px;
    margin: 4rem auto;
    text-align: center;
}

.pin-form h2 {
    margin-bottom: 1rem;
}

.pin-form input {
    width: 100%;
    padding: .75rem;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: .5em;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    margin-bottom: 1rem;
}

.pin-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.pin-error {
    color: var(--error);
    font-size: .85rem;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 700px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

/* Orders table */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: .85rem;
}

.orders-table th,
.orders-table td {
    padding: .6rem .75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.orders-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.orders-table tbody tr:hover {
    background: #f3f0ff;
}

.badge {
    display: inline-block;
    padding: .15em .5em;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 600;
}

/* ── Selects stylisés (vente-physique, saisie) ── */
.item-row select,
.field select,
.vp-card select,
.saisie-card select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236750A4' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.badge-pending   { background: #fff3e0; color: #e65100; }
.badge-paid      { background: #e8f5e9; color: #2e7d32; }
.badge-refund    { background: #fce4ec; color: #c62828; }
.badge-delivered { background: #dcfce7; color: #15803d; font-weight: 700; }

/* Breakdown */
.breakdown-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 700px) {
    .breakdown-row {
        grid-template-columns: 1fr;
    }
}

.breakdown-section {
    margin-bottom: 2rem;
}

.breakdown-row .breakdown-section {
    margin-bottom: 0;
}

.cell-items {
    font-size: .8rem;
    line-height: 1.5;
}

.breakdown-section h3 {
    font-size: 1rem;
    margin-bottom: .75rem;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
    font-size: .85rem;
}

.breakdown-table th,
.breakdown-table td {
    padding: .5rem .75rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.breakdown-table th {
    background: var(--primary-light);
    font-weight: 600;
    font-size: .8rem;
}

/* ── Modify order (super admin) ──────────────── */
.mod-select {
    width: 100%;
    padding: .4rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
    background: var(--surface);
}
.mod-item-row {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    gap: .5rem;
    align-items: center;
    margin-bottom: .5rem;
    font-size: .85rem;
}
.mod-item-row label {
    font-weight: 600;
    white-space: nowrap;
}
.mod-qty {
    font-weight: 600;
    color: var(--text-muted);
}
@media (max-width: 600px) {
    .mod-item-row {
        grid-template-columns: 1fr 1fr;
    }
    .mod-item-row label { display: none; }
}
