/* =========================================================
   HONEY MINI APP
   Chestnut / Amber / Golden Honey Theme
   ========================================================= */

@font-face {
    font-family: "Vazir";
    src: url("../assets/fonts/Vazir-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazir";
    src: url("../assets/fonts/Vazir-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazir";
    src: url("../assets/fonts/Vazir-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   VARIABLES  —  Honey (light)
   ========================================================= */

:root {
    /* "purple" scale → warm golden honey (names kept so no
       other rule needs editing) */
    --purple-950: #3a2506;
    --purple-900: #5c3c0c;
    --purple-800: #7a5216;
    --purple-700: #996a20;
    --purple-600: #b6822a;
    --purple-500: #d09e3a;
    --purple-400: #e6b95e;

    /* "pink" scale → pale honey cream + light gold */
    --pink-50:  #fffcf2;
    --pink-100: #fff7dc;
    --pink-200: #ffedb5;
    --pink-300: #ffe08a;
    --pink-400: #ffd15c;

    /* Shiny golden honey */
    --gold-300: #ffe999;
    --gold-400: #ffdb66;
    --gold-500: #ffc233;
    --gold-600: #f0a800;
    --gold-700: #c98800;
    --gold-custom: #ffcc33;

    --white: #ffffff;

    /* Warm parchment neutrals (lighter) */
    --gray-50:  #fffdf7;
    --gray-100: #fff8e6;
    --gray-200: #fdefc9;
    --gray-300: #f0dfa8;
    --gray-500: #8a7a58;
    --gray-600: #6a5c3c;
    --gray-700: #504526;
    --gray-900: #2e2410;

    --success: #2f8a55;
    --success-bg: #e8f6ee;
    --warning: #b07a10;
    --warning-bg: #fff3d0;
    --danger: #b83a34;
    --danger-bg: #fdeeea;

    --app-width: 480px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-sm: 0 2px 8px rgba(45, 25, 5, 0.10);
    --shadow-md: 0 6px 20px rgba(45, 25, 5, 0.14);
    --shadow-lg: 0 12px 35px rgba(45, 25, 5, 0.18);

    /* Opaque fallbacks for native chrome / autofill / select popup */
    --field-solid: #7a5216;
    --field-popup: #3a2506;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Vazir", sans-serif;
}

html {
    direction: rtl;
    background: #faf3da;
    color-scheme: light;
    /* ★ stop OS dark mode from tinting native chrome */
}

body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    min-height: 100vh;

    background:
        linear-gradient(180deg,
            #fffbe8 0%,
            #fff4d0 50%,
            #ffedb8 100%);

    color: var(--gray-900);
    font-family: "Vazir", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    direction: rtl;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


/* =========================================================
   APP CONTAINER
   ========================================================= */

#app {
    height: 100vh;
    overflow-y: auto;
    width: 100%;
    max-width: var(--app-width);
    margin: 0 auto;

    box-shadow: 0 0 35px rgba(45, 25, 5, 0.16);

    background:
        radial-gradient(120% 55% at 50% 0%, rgba(255, 225, 100, 0.24), transparent 65%),
        linear-gradient(180deg, #7a5214 0%, #a87624 50%, #d09830 100%);
}


/* =========================================================
   PAGE CONTAINER
   ========================================================= */

#page-container {
    padding: 8px 18px 30px;
}


/* =========================================================
   COMMON
   ========================================================= */

.section-title {
    position: relative;
    text-align: center;
    margin-bottom: 16px;
    color: var(--gold-400);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.5;
}

.section-title::before {
    content: "";
    position: absolute;
    right: 0;
    top: 4px;
    width: 4px;
    height: 24px;
    border-radius: 5px;
}

.name-title {
    position: relative;
    text-align: right;
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
}


/* =========================================================
   CARDS
   ========================================================= */

.card {
    margin-bottom: 14px;
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.card:active {
    transform: scale(0.99);
    box-shadow: none;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    margin: 5px 0;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: "Vazir", sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition:
        transform 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease,
        border-color 0.12s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, #b87c20, #8a5a14);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 5px 14px rgba(60, 30, 0, 0.28);
}

.btn-gold {
    color: #3a2408;
    background: linear-gradient(135deg, #ffe27a, #ffc233);
    border-color: var(--gold-500);
    box-shadow: 0 5px 14px rgba(255, 194, 51, 0.32);
}

.btn-danger {
    color: var(--white);
    background: var(--danger);
    border-color: var(--danger);
}

.btn-success {
    color: var(--white);
    background: var(--success);
    border-color: var(--success);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.10) !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--white);
}

.btn-outline:hover {
    border-color: var(--gold-400);
}


/* =========================================================
   FORMS — BASE
   ========================================================= */

label {
    display: block;
    margin: 12px 0 6px;
    color: var(--purple-900);
    font-size: 14px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    margin: 0 0 12px;
    padding: 11px 13px;
    color: var(--gray-900);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: "Vazir", sans-serif;
    font-size: 15px;
    direction: rtl;

    /* ★ Force light mode on all fields. Prevents OS dark mode from
       painting the picker/spinner/popup chrome in slate-blue. */
    color-scheme: light;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

input::placeholder,
textarea::placeholder {
    color: #aaa1ad;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: var(--pink-50);
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(255, 200, 51, 0.28);
}

textarea {
    min-height: 100px;
    resize: vertical;
}


/* =========================================================
   GRID
   ========================================================= */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}


/* =========================================================
   SPLASH
   ========================================================= */

.splash {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 30px;
    overflow: hidden;
    text-align: center;
    background: radial-gradient(circle at 50% 40%, rgba(255, 220, 90, 0.20), transparent 50%);
}

.splash::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 220, 90, 0.14), transparent 70%);
    pointer-events: none;
}

.splash h1 {
    position: relative;
    margin-bottom: 8px;
    color: var(--gold-custom);
    font-size: 32px;
    font-weight: 700;
}

.splash p {
    position: relative;
    color: var(--white);
    font-size: 26px;
}

.splash .loader {
    position: relative;
    width: 34px;
    height: 34px;
    margin-top: 28px;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--gold-custom);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   MAIN DASHBOARD
   ========================================================= */

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.main-grid .btn {
    min-height: 58px;
    margin: 0;
    padding: 10px 13px;
    justify-content: flex-start;
    text-align: right;
    background: linear-gradient(145deg, #fffcec, #fff2cc);
}


/* =========================================================
   SUMMARY
   ========================================================= */

.summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.summary-item {
    position: relative;
    min-height: 102px;
    padding: 15px 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-item .num {
    position: relative;
    color: var(--gold-custom);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    direction: rtl;
}

.summary-item .label {
    position: relative;
    margin-top: 5px;
    color: var(--white);
    font-size: 12px;
}


/* =========================================================
   NUMBERS / MONEY
   ========================================================= */

.num,
.amount,
.price,
.money {
    color: var(--gold-500);
    font-weight: 700;
}

.amount,
.price,
.money {
    direction: rtl;
}


/* =========================================================
   LIST ITEMS
   ========================================================= */

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--gray-100);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item .primary {
    color: var(--gray-900);
    font-weight: 500;
}

.list-item .secondary {
    margin-top: 2px;
    color: var(--gray-500);
    font-size: 13px;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 3px 10px;
    border-radius: 30px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-success {
    color: #17654d;
    background: var(--success-bg);
}

.badge-warning {
    color: #805d0d;
    background: var(--warning-bg);
}

.badge-danger {
    color: #8f293e;
    background: var(--danger-bg);
}


/* =========================================================
   ORDER STEPS
   ========================================================= */

.step-indicator {
    display: flex;
    gap: 6px;
    margin-bottom: 22px;
}

.step-dot {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.step-dot.active {
    background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
}


/* =========================================================
   DIVIDERS
   ========================================================= */

.divider {
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(90deg, transparent, var(--pink-200), transparent);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    padding: 40px 20px;
    color: var(--gray-500);
    text-align: center;
}

.empty-state .icon {
    margin-bottom: 10px;
    color: var(--purple-400);
    font-size: 32px;
}


/* =========================================================
   HEADER / TOP BAR
   ========================================================= */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.page-header .title {
    color: var(--purple-900);
    font-size: 20px;
    font-weight: 700;
}

.page-header .subtitle {
    margin-top: 2px;
    color: var(--gray-500);
    font-size: 12px;
}


/* =========================================================
   TABLE-LIKE DATA
   ========================================================= */

.data-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
}

.data-row:last-child {
    border-bottom: none;
}


/* =========================================================
   FILTER / SEARCH
   ========================================================= */

.search-box {
    position: relative;
    margin-bottom: 14px;
}

.search-box input {
    margin-bottom: 0;
    padding-right: 14px;
}


/* =========================================================
   ACTION GROUP
   ========================================================= */

.action-group {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.action-group .btn {
    margin: 0;
}


/* =========================================================
   FOOTER / BOTTOM SPACE
   ========================================================= */

.bottom-space {
    height: 30px;
}


/* =========================================================
   HELPERS
   ========================================================= */

.mt-4 {
    margin-top: 4px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-4 {
    margin-bottom: 4px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-12 {
    padding: 12px;
}

.p-16 {
    padding: 16px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--gray-200);
    font-size: 13px;
}

.text-info {
    color: var(--gray-200);
    font-size: 16px;
}

.payment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    text-align: center;
    color: var(--gold-custom);
    font-size: 26px;
}

.text-purple {
    color: var(--purple-700);
}

.text-gold {
    color: var(--gold-500);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.hidden {
    display: none !important;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 360px) {
    #page-container {
        padding: 16px 14px 80px;
    }

    .summary-row {
        gap: 8px;
    }

    .summary-item {
        min-height: 94px;
        padding: 12px 8px;
    }

    .summary-item .num {
        font-size: 23px;
    }

    .main-grid {
        gap: 8px;
    }

    .main-grid .btn {
        min-height: 54px;
        font-size: 13px;
    }
}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   TODAY'S STATISTICS
   ========================================================= */

.today-statistics {
    margin-top: 8px;
    margin-bottom: 24px;
}

.statistics-title {
    text-align: center;
    color: var(--white);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
}

.today-statistics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.today-statistic {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 13px 6px;
    text-align: center;
}

.today-statistic .num {
    color: var(--gold-custom);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 4px;
}

.today-statistic .label {
    color: var(--white);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}


/* =========================================================
   SELLER SEARCH (specific)
   ========================================================= */

#sellerSearch {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 11px 13px;
    margin-bottom: 12px;
    color: var(--white);
    color-scheme: light;
    /* ★ */
}

#sellerSearch::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#sellerSearch:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}


/* =========================================================
   GLASS FORM FIELDS  (single source of truth)
   ========================================================= */

.input-glass {
    width: 100%;
    padding: 11px 13px;
    margin-bottom: 12px;

    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);

    color: var(--white);
    font-family: "Vazir", sans-serif;
    font-size: 15px;
    direction: rtl;

    color-scheme: light;
    /* ★ force light native chrome */
    -webkit-appearance: none;
    appearance: none;

    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.input-glass::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.input-glass:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}


/* =========================================================
   SELECT — glass field surface (matches inputs)
   ========================================================= */

select.input-glass {
    background-color: rgba(255, 255, 255, 0.10);
    background-image: none;
    padding-left: 13px;
}

select.input-glass:focus {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}


/* =========================================================
   SELECT — field + native popup
   ========================================================= */

/* Options must be OPAQUE — rgba() composites against the OS
   popup surface and produces the muddy blue you saw. */
.input-glass option,
select option {
    background: var(--field-popup);
    color: var(--white);
    padding: 8px;
}

.input-glass option:checked,
.input-glass option:hover,
select option:checked,
select option:hover {
    background: var(--purple-700);
    color: var(--gold-custom);
}


/* =========================================================
   ★ AUTOFILL OVERRIDE  (the real "matte blue" killer)
   Chrome/Safari autofill paints #E8F0FE on every field and
   ignores `background`. An inset box-shadow is the only way
   to override it without `!important` hacks.
   ========================================================= */

.input-glass:-webkit-autofill,
.input-glass:-webkit-autofill:hover,
.input-glass:-webkit-autofill:focus,
.input-glass:-webkit-autofill:active,
#sellerSearch:-webkit-autofill,
#sellerSearch:-webkit-autofill:hover,
#sellerSearch:-webkit-autofill:focus,
#sellerSearch:-webkit-autofill:active {
    -webkit-text-fill-color: var(--white);
    -webkit-box-shadow: 0 0 0 1000px var(--field-solid) inset;
    box-shadow: 0 0 0 1000px var(--field-solid) inset;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: var(--white);
}


/* =========================================================
   ERROR MESSAGE
   ========================================================= */

.error-message {
    color: var(--gold-custom);
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
    min-height: 1.2em;
}


/* =========================================================
   PAYMENT
   ========================================================= */

.payment-title {
    width: 100%;
    color: var(--gold-custom);
    display: flex;
    justify-content: center;
    text-align: center;
    margin-bottom: 24px;
}

.payment-title h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.payment-action {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.payment-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-custom);
    min-width: 220px;
    min-height: 64px;
    padding: 0 36px;
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    border-radius: 14px;
}


/* =========================================================
   CUSTOM DROPDOWN PANEL
   ========================================================= */

.dropdown-menu {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    color: var(--white);
    position: absolute;
    z-index: 50;
}

.dropdown-menu input,
.dropdown-menu select,
.dropdown-menu textarea {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color-scheme: light;
}


/* =========================================================
   HORIZONTAL FILTER BAR (RTL scroll)
   ========================================================= */

.filter-scroll {
    display: flex;
    gap: 8px;
    direction: rtl;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 4px 2px 8px;
    margin-bottom: 12px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.filter-scroll::-webkit-scrollbar {
    height: 4px;
}

.filter-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary, #fff);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    background: var(--gold-custom);
    color: #2c1a05;
    border-color: var(--gold-custom);
    font-weight: 500;
}

.admin-delivery-option {
    display: flex;
    flex-direction: row-reverse;
    /* checkbox first → lands on the LEFT in RTL */
    justify-content: space-between;
    /* checkbox far left · text far right */
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 6px 0;
    cursor: pointer;
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
    user-select: none;
}

/* ---- Hide native box, draw a themed one ---- */
.admin-delivery-option input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;

    background: rgba(255, 255, 255, 0.10);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;

    color-scheme: light;
    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.admin-delivery-option input[type="checkbox"]:hover {
    border-color: var(--gold-400);
}

.admin-delivery-option input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--purple-400), var(--purple-600));
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

/* Checkmark */
.admin-delivery-option input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.admin-delivery-option input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25);
}

.admin-delivery-option span {
    color: var(--white);
    font-size: 15px;
}

#adminDiscountPanel {
    border: none !important;
    box-shadow: none !important;
    padding-left: 0;
    padding-right: 0;
}

#adminDiscountSlider {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    accent-color: var(--gold-custom);
    box-sizing: border-box;
    display: block;
}


/* =========================================================
   DARK THEME  —  Warm Espresso (Honey)
   ---------------------------------------------------------
   Activate:  <html data-theme="dark">
   Toggle:    document.documentElement.setAttribute('data-theme', 'dark')
   ========================================================= */

html[data-theme="dark"] {
    --gray-50: #15100a;
    --gray-100: #211a11;
    --gray-200: #2e251a;
    --gray-300: #43372a;
    --gray-500: #d0c3ac;
    --gray-600: #e0d6c3;
    --gray-700: #ece5d6;
    --gray-900: #f7f3ea;

    --purple-950: #100b06;
    --purple-900: #e6dcc8;
    --purple-800: #261c11;
    --purple-700: #33261a;
    --purple-600: #43321f;
    --purple-500: #5a432a;
    --purple-400: #b59a74;

    --pink-50: #211a11;
    --pink-100: #292016;
    --pink-200: #35291b;
    --pink-300: #5a432a;
    --pink-400: #7a5c38;

    /* Amber honey: warmer and more orange than brass */
    --gold-300: #ffe999;
    --gold-400: #ffdb66;
    --gold-500: #ffc233;
    --gold-600: #e0a800;
    --gold-700: #b38000;
    --gold-custom: #ffcc33;

    --success: #3fa98a;
    --success-bg: rgba(63, 169, 138, 0.14);
    --warning: #c9993a;
    --warning-bg: rgba(201, 153, 58, 0.14);
    --danger: #c9606f;
    --danger-bg: rgba(201, 96, 111, 0.14);

    --field-solid: #211a11;
    --field-popup: #15100a;

    --surface: #1a140d;
    --surface-2: #211a11;
    --line: #33291c;
    --line-soft: #281f15;
    --accent-ring: rgba(255, 194, 51, 0.24);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.55);
}


/* ---- Page canvas ---- */
html[data-theme="dark"] {
    background: #0d0a07;
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background: #0d0a07;
}

/* ---- App shell: espresso with honeycomb ---- */
html[data-theme="dark"] #app {
    box-shadow: 0 0 0 1px #1f1810, 0 0 40px rgba(0, 0, 0, 0.60);
    background:
        linear-gradient(180deg, #1a140d 0%, #130e08 50%, #0e0a06 100%);
}


/* ---- Titles ---- */
html[data-theme="dark"] .section-title {
    color: var(--gold-500);
    font-weight: 600;
    letter-spacing: 0.2px;
}

html[data-theme="dark"] .name-title {
    color: var(--gray-900);
    font-weight: 600;
}


/* ---- Surfaces ---- */
html[data-theme="dark"] .card,
html[data-theme="dark"] .summary-item,
html[data-theme="dark"] .today-statistic {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .summary-item .label,
html[data-theme="dark"] .today-statistic .label {
    color: var(--gray-600);
}

html[data-theme="dark"] .statistics-title {
    color: var(--gray-700);
    font-weight: 600;
}

html[data-theme="dark"] .today-statistic .num {
    font-weight: 700;
}


/* ---- Splash ---- */
html[data-theme="dark"] .splash {
    background: radial-gradient(circle at 50% 40%, rgba(255, 194, 51, 0.07), transparent 50%);
}

html[data-theme="dark"] .splash::before {
    background: radial-gradient(circle, rgba(180, 130, 60, 0.12), transparent 70%);
}

html[data-theme="dark"] .splash p {
    color: var(--gray-700);
}

html[data-theme="dark"] .splash .loader {
    border-color: var(--gray-200);
    border-top-color: var(--gold-500);
    border-left-color: var(--gray-300);
}


/* ---- Buttons ---- */
html[data-theme="dark"] .btn-primary {
    color: var(--gold-300);
    background: linear-gradient(180deg, #2a2015, #21190f);
    border: 1px solid var(--gold-600);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .btn-primary:hover {
    border-color: var(--gold-500);
    background: linear-gradient(180deg, #33281a, #281f14);
}

html[data-theme="dark"] .btn-gold {
    color: #1a1407;
    background: linear-gradient(180deg, #ffdb66, #e0a800);
    border-color: #b38128;
    box-shadow: var(--shadow-sm);
}

html[data-theme="dark"] .btn-outline {
    background: transparent !important;
    border: 1px solid var(--gray-300);
    color: var(--gray-900);
}

html[data-theme="dark"] .btn-outline:hover {
    border-color: var(--gold-500);
    background: var(--surface-2) !important;
}

html[data-theme="dark"] .main-grid .btn {
    background: var(--surface);
    border-color: var(--line);
    color: var(--gray-900);
}

html[data-theme="dark"] .main-grid .btn:hover {
    border-color: var(--gold-600);
    background: var(--surface-2);
}


/* ---- Plain form fields ---- */
html[data-theme="dark"] input:not(.input-glass),
html[data-theme="dark"] select:not(.input-glass),
html[data-theme="dark"] textarea:not(.input-glass) {
    background: var(--surface-2);
    color: var(--gray-900);
    border-color: var(--line);
    color-scheme: dark;
}

html[data-theme="dark"] input:not(.input-glass)::placeholder,
html[data-theme="dark"] textarea:not(.input-glass)::placeholder,
html[data-theme="dark"] .input-glass::placeholder,
html[data-theme="dark"] #sellerSearch::placeholder {
    color: #b3a58c;
}

html[data-theme="dark"] input:not(.input-glass):focus,
html[data-theme="dark"] select:not(.input-glass):focus,
html[data-theme="dark"] textarea:not(.input-glass):focus {
    background: #271e13;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px var(--accent-ring);
}


/* ---- Glass fields → solid dark fields ---- */
html[data-theme="dark"] .input-glass,
html[data-theme="dark"] #sellerSearch {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--gray-900);
    box-shadow: none;
    color-scheme: dark;
}

html[data-theme="dark"] .input-glass:focus,
html[data-theme="dark"] #sellerSearch:focus {
    background: #271e13;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

html[data-theme="dark"] select.input-glass:focus {
    background-color: #271e13;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

html[data-theme="dark"] .input-glass option,
html[data-theme="dark"] select option {
    background: var(--field-popup);
    color: var(--gray-900);
}

html[data-theme="dark"] .input-glass option:checked,
html[data-theme="dark"] .input-glass option:hover,
html[data-theme="dark"] select option:checked,
html[data-theme="dark"] select option:hover {
    background: var(--purple-600);
    color: var(--gold-300);
}

html[data-theme="dark"] .error-message {
    color: var(--danger);
}


/* ---- Checkbox ---- */
html[data-theme="dark"] .admin-delivery-option,
html[data-theme="dark"] .admin-delivery-option span {
    color: var(--gray-900);
}

html[data-theme="dark"] .admin-delivery-option input[type="checkbox"] {
    background: var(--surface-2);
    border-color: var(--gray-300);
}

html[data-theme="dark"] .admin-delivery-option input[type="checkbox"]:hover {
    border-color: var(--gold-500);
}

html[data-theme="dark"] .admin-delivery-option input[type="checkbox"]:checked {
    background: var(--gold-500);
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

html[data-theme="dark"] .admin-delivery-option input[type="checkbox"]:checked::after {
    border-color: #1a1307;
}

html[data-theme="dark"] .admin-delivery-option input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-ring);
}


/* ---- Filter bar ---- */
html[data-theme="dark"] .filter-btn {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--gray-700);
}

html[data-theme="dark"] .filter-btn:hover {
    background: var(--surface-2);
}

html[data-theme="dark"] .filter-btn.active {
    background: var(--surface-2);
    color: var(--gold-400);
    border-color: var(--gold-500);
}

html[data-theme="dark"] .filter-scroll::-webkit-scrollbar-thumb {
    background: var(--gray-300);
}


/* ---- Dropdown panel ---- */
html[data-theme="dark"] .dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}


/* ---- Lists / data rows ---- */
html[data-theme="dark"] .list-item,
html[data-theme="dark"] .data-row {
    border-bottom-color: var(--line-soft);
}

html[data-theme="dark"] .page-header .title {
    color: var(--gray-900);
}


/* ---- Badges ---- */
html[data-theme="dark"] .badge {
    background: var(--surface-2);
    color: var(--gray-600);
    border: 1px solid var(--line);
}

html[data-theme="dark"] .badge-success {
    color: #6fd0b2;
    background: var(--success-bg);
    border-color: rgba(63, 169, 138, 0.30);
}

html[data-theme="dark"] .badge-warning {
    color: #e0b25c;
    background: var(--warning-bg);
    border-color: rgba(201, 153, 58, 0.30);
}

html[data-theme="dark"] .badge-danger {
    color: #e48b97;
    background: var(--danger-bg);
    border-color: rgba(201, 96, 111, 0.30);
}


/* ---- Step indicator ---- */
html[data-theme="dark"] .step-dot {
    background: var(--gray-200);
}

html[data-theme="dark"] .step-dot.active {
    background: var(--gold-500);
}


/* ---- Dividers ---- */
html[data-theme="dark"] .divider {
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}


/* ---- Empty state ---- */
html[data-theme="dark"] .empty-state .icon {
    color: var(--gray-500);
}


/* ---- Text helpers ---- */
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .text-info {
    color: var(--gray-500);
}

html[data-theme="dark"] .text-purple {
    color: var(--purple-400);
}


/* ---- Payment ---- */
html[data-theme="dark"] .payment,
html[data-theme="dark"] .payment-title,
html[data-theme="dark"] .payment-link {
    color: var(--gold-custom);
}


/* ---- Discount slider ---- */
html[data-theme="dark"] #adminDiscountSlider {
    accent-color: var(--gold-500);
}


/* ---- Autofill (dark variant) ---- */
html[data-theme="dark"] .input-glass:-webkit-autofill,
html[data-theme="dark"] .input-glass:-webkit-autofill:hover,
html[data-theme="dark"] .input-glass:-webkit-autofill:focus,
html[data-theme="dark"] .input-glass:-webkit-autofill:active,
html[data-theme="dark"] #sellerSearch:-webkit-autofill,
html[data-theme="dark"] #sellerSearch:-webkit-autofill:hover,
html[data-theme="dark"] #sellerSearch:-webkit-autofill:focus,
html[data-theme="dark"] #sellerSearch:-webkit-autofill:active {
    -webkit-text-fill-color: #f7f3ea;
    -webkit-box-shadow: 0 0 0 1000px var(--field-solid) inset;
    box-shadow: 0 0 0 1000px var(--field-solid) inset;
    caret-color: #f7f3ea;
}