/* ============================================================
   Laser Liban — Unified Design System
   Responsive: mobile · tablet · laptop · desktop
   ============================================================ */

:root {
    --primary: #0f4c81;
    --primary-dark: #0a3558;
    --primary-light: #1a6cb5;
    --accent: #e8b923;
    --accent-dark: #c99a12;
    --bg: #eef3f9;
    --bg-alt: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-soft: #334155;
    --muted: #64748b;
    --border: #d7e2ef;
    --border-light: #e8eef5;
    --success: #15803d;
    --success-bg: #dcfce7;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --info: #1d4ed8;
    --info-bg: #dbeafe;
    --warning-bg: #fef3c7;
    --warning: #92400e;
    --shadow-sm: 0 2px 8px rgba(15, 76, 129, 0.06);
    --shadow-md: 0 8px 28px rgba(15, 76, 129, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 76, 129, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --header-h: 64px;
    --container: 1200px;
    --font: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Layout ─────────────────────────────────────────────── */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

.main-content {
    flex: 1;
    padding: 20px 0 40px;
}

/* ── Site Header ──────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--header-h);
    padding: 10px 0;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.site-header__brand img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.site-header__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header__user {
    font-size: 0.85rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.site-header__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.lang-switch:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.lang-switch__sep {
    opacity: 0.45;
    font-weight: 500;
}

.lang-switch .is-active {
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-inline-start: auto;
}
.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    font: inherit;
    font-size: 1.1rem;
}

.site-nav a,
.site-nav button,
.site-nav .nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition);
    white-space: nowrap;
}

.site-nav a:hover,
.site-nav button:hover,
.site-nav .nav-btn:hover {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.site-nav a.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text);
    font-weight: 700;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-right: 6px;
    background: var(--danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 999px;
    vertical-align: middle;
}

.site-nav a.is-active .nav-badge {
    background: var(--danger);
    color: #fff;
    border: 1px solid #fff;
}

/* Order filters */
.order-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.order-filters__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-filters__store-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.order-filters__select {
    min-width: min(280px, 100%);
    padding: 9px 36px 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat left 12px center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    appearance: none;
}

.order-filters__select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.order-filters__reset {
    white-space: nowrap;
}

.order-filters__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.order-filters__label {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-soft);
    min-width: 48px;
    flex-shrink: 0;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.filter-tabs--wrap {
    row-gap: 8px;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.filter-tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.filter-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.filter-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.75rem;
    line-height: 1;
}

.filter-tab.is-active .filter-tab__count {
    background: rgba(255, 255, 255, 0.25);
}

.table--orders .table-col-actions {
    width: 1%;
    white-space: nowrap;
    text-align: left;
    padding-left: 8px;
}

.btn-order-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 8px 16px;
}

/* Admin notifications bell */
.admin-notify {
    position: relative;
}

.admin-notify__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.admin-notify__btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-notify__btn--pulse {
    animation: notify-pulse 0.6s ease 2;
}

@keyframes notify-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(232, 168, 20, 0.35); }
}

.admin-notify__icon {
    font-size: 1.1rem;
    line-height: 1;
}

.admin-notify__badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
}

.admin-notify__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(320px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
}

.admin-notify__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.admin-notify__head strong {
    font-size: 0.92rem;
}

.admin-notify__list {
    max-height: 280px;
    overflow-y: auto;
}

.admin-notify__item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: var(--text);
    transition: background var(--transition);
}

.admin-notify__item:hover {
    background: var(--bg-alt);
}

.admin-notify__item-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-notify__item-meta {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

.admin-notify__empty {
    padding: 24px 14px;
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-notify__footer {
    display: block;
    padding: 10px 14px;
    text-align: center;
    background: var(--bg-alt);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    border-top: 1px solid var(--border-light);
}

.admin-notify__footer:hover {
    background: #eef4fb;
}

/* ── Page structure (unified: admin · store · merchant) ── */

.page,
.checkout-page {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
}

.page--narrow,
.checkout-page {
    max-width: 960px;
}

.page__head,
.checkout-page__head {
    margin-bottom: 20px;
}

.page__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 0.88rem;
}

.page__title,
.checkout-page__title,
.page-head h2 {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

.page__lead,
.page-head p,
.checkout-page__meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.925rem;
}

.page-stack,
.page__stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-grid,
.checkout-page__grid {
    display: grid;
    gap: 20px;
}

@media (min-width: 768px) {
    .page-grid--2,
    .checkout-page__grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.page-head {
    margin-bottom: 20px;
}

.page-head h2 {
    color: var(--text);
}

/* Legacy alias — prefer page__title in new markup */

/* ── Cards ────────────────────────────────────────────── */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 20px; }

.card__title,
.admin-panel__title {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-light);
}

.admin-panel__head .admin-panel__title,
.admin-panel__head .card__title {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.card.admin-panel {
    padding: 20px;
}

.card.admin-panel > .page-head {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.card.admin-panel > .page-head h2 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: var(--primary);
}

.card-sub {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
}

/* ── Grid ─────────────────────────────────────────────── */

.grid { display: grid; gap: 20px; }

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .grid-sidebar {
        grid-template-columns: 340px 1fr;
        align-items: start;
    }
}

/* ── Forms ────────────────────────────────────────────── */

.field { margin-bottom: 16px; }

.field:last-child { margin-bottom: 0; }

label,
.field-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-soft);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="file"],
input:not([type]),
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

textarea { min-height: 100px; resize: vertical; }

input[type="file"] { padding: 9px 12px; }

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.input-sm {
    max-width: 90px;
    padding: 8px 10px;
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

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

.btn-accent { background: var(--accent); color: var(--text); }
.btn-accent:hover { background: var(--accent-dark); color: var(--text); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #166534; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #991b1b; color: #fff; }

.btn-secondary { background: #475569; color: #fff; }
.btn-secondary:hover { background: #334155; color: #fff; }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-soft);
}
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }

.btn-sm { padding: 7px 12px; font-size: 0.82rem; }

.btn-block { width: 100%; }

/* ── Alerts ───────────────────────────────────────────── */

.alerts { margin-bottom: 16px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert:last-child { margin-bottom: 0; }

.alert-success { background: var(--success-bg); color: var(--success); border-color: #bbf7d0; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: #fecaca; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }

/* ── Tables ───────────────────────────────────────────── */

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table th {
    background: #eef4fb;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.82rem;
    text-transform: none;
    white-space: nowrap;
}

.table tbody tr:hover { background: #f8fbff; }
.table tbody tr:last-child td { border-bottom: none; }

.table tbody tr.order-items-category {
    background: #eef4fb;
}

.table tbody tr.order-items-category:hover {
    background: #eef4fb;
}

.table tbody tr.order-items-category td {
    padding-top: 10px;
    padding-bottom: 10px;
    color: var(--primary-dark);
    font-size: 0.92rem;
    border-bottom: 1px solid var(--border);
}

.table .table-input {
    padding: 8px 10px;
    font-size: 0.875rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Mobile card table */
.data-cards { display: none; }

@media (max-width: 767px) {
    .table-desktop { display: none; }
    .data-cards { display: flex; flex-direction: column; gap: 12px; }

    .data-card {
        background: var(--bg-alt);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 14px;
    }

    .data-card__row {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 6px 0;
        border-bottom: 1px dashed var(--border-light);
        font-size: 0.875rem;
    }

    .data-card__row:last-child { border-bottom: none; }

    .data-card__label {
        color: var(--muted);
        font-weight: 600;
        flex-shrink: 0;
    }

    .data-card__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-light);
    }
}

/* ── Badges ───────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-completed { background: var(--success-bg); color: var(--success); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-banned { background: var(--danger-bg); color: var(--danger); }

.badge-payment-cash { background: var(--success-bg); color: var(--success); }
.badge-payment-consignment { background: var(--warning-bg); color: var(--warning); }
.badge-payment-partial { background: var(--info-bg); color: var(--info); }

.text-success { color: var(--success); font-weight: 600; }

/* Payment panel */
.payment-panel {
    margin-top: 20px;
}

.payment-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.payment-summary__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--muted);
}

.payment-summary__item strong {
    font-size: 1rem;
    color: var(--text);
}

.payment-summary--sub {
    margin-bottom: 12px;
    background: var(--surface);
    border-style: dashed;
}

.payment-summary--sub .payment-summary__item strong {
    font-size: 0.92rem;
}

.payment-options {
    border: none;
    padding: 0;
    margin: 0 0 14px;
}

.payment-options legend {
    margin-bottom: 10px;
}

.payment-option {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-option__box {
    display: block;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color var(--transition), background var(--transition);
}

.payment-option input:checked + .payment-option__box {
    border-color: var(--primary);
    background: #f0f6fc;
}

.payment-option input:focus-visible + .payment-option__box {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.payment-partial-field.hidden {
    display: none;
}

.payment-installments {
    margin-bottom: 18px;
}

.payment-installments__title,
.payment-add-form__title {
    font-size: 0.95rem;
    margin: 0 0 10px;
    color: var(--text);
}

.payment-installments__table-wrap {
    overflow-x: auto;
}

.payment-add-form {
    padding-top: 4px;
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
}

.payment-add-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.payment-add-form__actions {
    margin-top: 12px;
}

.payment-quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border-light);
}

.payment-quick-actions__label {
    font-size: 0.85rem;
    color: var(--muted);
}

.payment-type-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-type-options .checkbox-label {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
}

.payment-at-check {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
}

.payment-at-check.hidden {
    display: none;
}

.check-payment-partial.hidden {
    display: none;
}

.inline-form {
    display: inline;
}

.text-danger {
    color: var(--danger);
}

/* Product edit page */
.admin-product-edit {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-product-edit__head {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-product-edit__preview {
    position: relative;
    flex-shrink: 0;
}

.admin-product-edit__img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    background: #fff;
    padding: 8px;
}

.admin-product-edit__photos {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 999px;
}

.admin-product-edit__meta {
    flex: 1;
    min-width: 200px;
}

.admin-product-edit__danger {
    border-color: #f5c6c6;
    background: #fffafa;
}

.admin-product-edit .product-images-gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.admin-product-edit .admin-form__footer {
    margin-top: 20px;
    padding-top: 16px;
}

/* ── Stats ────────────────────────────────────────────── */

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

@media (min-width: 640px) {
    .stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat__label {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.stat__value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

/* ── Auth pages ───────────────────────────────────────── */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-h) - 80px);
    padding: 20px 0;
}

.auth-shell {
    display: flex;
    justify-content: center;
    padding: 12px 0 28px;
}

.auth-panel {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 28px 24px 24px;
    position: relative;
    overflow: hidden;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.auth-panel__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.auth-panel__logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f3f7fc;
    border: 1px solid var(--border-light);
    padding: 6px;
}

.auth-panel__eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-panel__title {
    margin: 2px 0 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}

.auth-panel__lead {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.auth-card {
    width: 100%;
    max-width: 480px;
}

.auth-card .card__title { text-align: center; border: none; padding: 0; margin-bottom: 8px; font-size: 1.4rem; }

.auth-card .page-head { text-align: center; margin-bottom: 24px; }

.auth-card .page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.auth-form__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.auth-form .field {
    margin-bottom: 0;
}

.auth-form .field label {
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 0.84rem;
}

.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.auth-form textarea,
.auth-form select {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 14px;
    box-sizing: border-box;
    line-height: 1.4;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    text-align: right;
    direction: rtl;
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.auth-form input:focus,
.auth-form textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.12);
}

.auth-form textarea {
    min-height: 96px;
    height: auto;
    resize: vertical;
    padding: 12px 14px;
    line-height: 1.55;
}

.auth-form .pin-input {
    font-size: 1.45rem;
    letter-spacing: 0.5em;
    text-align: center;
    font-weight: 700;
    direction: ltr;
}

.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 9999s ease-out 0s;
}

.auth-form__actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.auth-form__actions > .btn-accent,
.auth-form__submit {
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    font-size: 1.02rem;
    font-weight: 700;
    border-radius: 12px;
    justify-content: center;
}

.auth-form__switch {
    display: block;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
    padding: 4px 0;
}

.auth-form__switch strong {
    color: var(--primary);
}

.auth-form__switch:hover {
    color: var(--primary-dark);
}

.auth-form__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.auth-form__links .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

.auth-form__links:has(:only-child) {
    grid-template-columns: 1fr;
}

@media (max-width: 420px) {
    .auth-panel {
        padding: 24px 16px 20px;
        border-radius: 16px;
    }

    .auth-form__links {
        grid-template-columns: 1fr;
    }
}

/* Credentials box */
.credentials-box {
    background: linear-gradient(160deg, #f3f8fd 0%, #fff 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin: 0 0 16px;
    display: grid;
    gap: 12px;
}

.credential-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.credential-item .muted {
    font-size: 0.82rem;
}

.credential-item strong {
    font-size: 1.15rem;
    color: var(--primary-dark);
    letter-spacing: 0.04em;
    direction: ltr;
}

.credential-item:last-child { border-bottom: none; }

.credentials-box--copy .credential-item {
    flex-wrap: wrap;
}

.copy-btn.is-copied {
    color: var(--success);
    border-color: var(--success);
}

.admin-merchant-edit__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

/* ── Store Catalog (بضائع) ────────────────────────────── */

.store-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.wholesale-delivery-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid #bbf7d0;
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
    color: #166534;
    text-align: center;
    font-weight: 700;
}

.wholesale-delivery-banner__icon {
    font-size: 1.15rem;
    line-height: 1;
}

.wholesale-delivery-banner__text {
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.wholesale-delivery-banner__ar {
    font-size: 0.88rem;
    font-weight: 600;
    color: #15803d;
    width: 100%;
}

.store-hero .wholesale-delivery-banner {
    margin: 14px 0 0;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.store-hero .wholesale-delivery-banner__ar {
    color: rgba(255, 255, 255, 0.9);
}

.region-request {
    margin-top: 4px;
}

.region-request__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.region-request__row .admin-field__input {
    flex: 1;
    min-width: 180px;
}

.region-request__row .btn {
    flex-shrink: 0;
}

.store-hero__badge {
    display: inline-block;
    background: var(--accent);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.store-hero__title {
    margin: 0 0 10px;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.store-hero__text {
    margin: 0 0 18px;
    opacity: 0.92;
    max-width: 560px;
    font-size: 0.95rem;
}

/* Category quick nav — 5 per row */
.category-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

@media (min-width: 640px) {
    .category-nav { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
    .category-nav { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1100px) {
    .category-nav { grid-template-columns: repeat(5, 1fr); }
}

.category-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 10px;
    text-decoration: none;
    color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.category-nav__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-light);
    color: var(--primary);
}

.category-nav__img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--border-light);
    margin-bottom: 10px;
    background: #fff;
}

.category-nav__name {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.3;
}

.category-nav__count {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 4px;
}

/* Catalog sections */
.catalog-form { padding-bottom: 80px; }

.catalog-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.catalog-section__header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.catalog-section__image {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    flex-shrink: 0;
    background: #fff;
}

.catalog-section__title {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.catalog-section__desc {
    margin: 0 0 8px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.catalog-section__badge {
    display: inline-block;
    background: var(--info-bg);
    color: var(--info);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 640px) {
    .catalog-grid { gap: 16px; }
}

@media (min-width: 900px) {
    .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
    .catalog-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
    .catalog-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Product card — بضائع */
.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 100%;
    transition: box-shadow var(--transition), transform var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card__media {
    position: relative;
    background: #e8eaed;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
}

.product-card__media--zoomable .js-product-zoom {
    cursor: zoom-in;
}

.product-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px 90px;
    pointer-events: none;
}

.product-lightbox[hidden] {
    display: none !important;
}

.product-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    pointer-events: auto;
    cursor: zoom-out;
}

.product-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(88vw, 340px);
    max-height: min(70vh, 420px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
    pointer-events: auto;
}

.product-lightbox__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #e8eaed;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.product-lightbox__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-lightbox__caption {
    margin: 0;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.35;
}

.product-lightbox__close {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    box-shadow: var(--shadow-sm);
}

.product-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.product-lightbox__nav--prev { right: 8px; }
.product-lightbox__nav--next { left: 8px; }

.product-lightbox__nav[hidden] {
    display: none;
}

.product-gallery {
    position: absolute;
    inset: 0;
}

.product-gallery__track {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-gallery__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.product-gallery__img.is-active {
    opacity: 1;
}

.product-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 76, 129, 0.85);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    transition: opacity var(--transition);
}

.product-gallery:hover .product-gallery__nav { opacity: 1; }
.product-gallery__nav--prev { right: 8px; }
.product-gallery__nav--next { left: 8px; }

.product-gallery__dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 2;
}

.product-gallery__dot {
    width: 7px;
    height: 7px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: 0;
}

.product-gallery__dot.is-active {
    background: var(--accent);
}

.product-gallery__count {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    z-index: 2;
}

.product-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-card__tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
}

.product-card__tag--with-new {
    right: auto;
    left: 10px;
}

.product-card__tag--out {
    background: var(--danger);
    color: #fff;
}

.product-card__badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: #e11d48;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
    pointer-events: none;
}

.product-card__stock {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 76, 129, 0.88);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
}

.product-card--out-of-stock {
    opacity: 0.82;
}

.product-card--out-of-stock:hover {
    transform: none;
    box-shadow: none;
}

.product-card--out-of-stock .product-card__media {
    filter: grayscale(0.35);
}

.product-card__stock-error {
    margin: 0;
    font-size: 0.78rem;
    color: var(--danger);
    font-weight: 600;
}

.product-card__unavailable {
    padding: 10px 12px;
    background: var(--danger-bg);
    color: var(--danger);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
}

.product-card__body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.product-card__name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.product-card__desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-card__price-label {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.product-card__price strong {
    font-size: 1.15rem;
    color: var(--primary);
}

.product-card__qty label {
    font-size: 0.78rem;
    margin-bottom: 6px;
}

.product-card__labels {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card__labels-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.product-card__year {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-card__year-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.product-card__year-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

.product-card__year-field--exclude {
    margin-top: 2px;
}

.product-card__year-field--exclude .product-card__year-input {
    font-size: 0.82rem;
}

.product-card__year-input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.9rem;
    background: #fff;
}

.product-card__year-hint {
    font-size: 0.72rem;
    margin: 0;
}

.product-card__year-hint--error {
    color: #b42318;
    font-weight: 600;
}

.product-label-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-label-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.product-label-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-label-option:hover {
    border-color: var(--primary);
    background: var(--bg-alt);
}

.product-label-option.is-selected,
.product-label-option:has(input:checked) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.admin-label-options {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-label-options__fields {
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt, #f8fafc);
}

/* Quantity stepper */
.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}

.qty-stepper__btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-alt);
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
}

.qty-stepper__btn:hover { background: var(--border-light); }

.qty-stepper__btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.qty-stepper.is-locked {
    background: #f8fafc;
}

.product-card__label-lock-hint {
    color: #c05621;
    font-weight: 600;
}

.qty-stepper__input {
    width: 100%;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-radius: 0;
    padding: 8px 4px;
    font-weight: 700;
    -moz-appearance: textfield;
}

.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Sticky order bar */
.order-bar {
    position: sticky;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 8px;
    box-shadow: var(--shadow-lg);
}

.order-bar__summary {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.order-bar__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-bar__info strong { color: var(--primary); }

.order-bar__total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f0f6fc 0%, #e8f2fa 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    min-width: 140px;
}

.order-bar__total-label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.order-bar__total-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.order-bar__total-meta {
    font-size: 0.78rem;
    color: var(--text-soft);
}

.order-bar__delivery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #bbf7d0;
    background: linear-gradient(90deg, #ecfdf5 0%, #dcfce7 100%);
    color: #166534;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.order-bar__delivery-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.order-bar__delivery.is-unlocked {
    border-color: #86efac;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
    transform: translateY(-1px);
}

.order-bar__delivery.is-unlocked .order-bar__delivery-text::before {
    content: none;
}

#order-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cart-incomplete {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff4e5;
    border: 1px solid #f5c16c;
    color: #7a4a00;
}

.cart-incomplete strong {
    display: block;
    margin-bottom: 6px;
}

.cart-incomplete__item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.product-card.is-missing-choice {
    outline: 3px solid #e11d48;
    outline-offset: 2px;
}

.cart-incomplete--hidden-picks {
    margin-bottom: 16px;
}

.checkout-payment {
    width: 100%;
    border-top: 1px dashed var(--border-light);
    padding-top: 14px;
    margin-top: 4px;
}

.checkout-payment__title {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--primary);
}

.checkout-payment__hint {
    margin: 0 0 12px;
    font-size: 0.85rem;
}

.checkout-payment__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.checkout-payment__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    cursor: pointer;
}

.checkout-payment__option:has(input:checked) {
    border-color: var(--primary);
    background: #f0f6fc;
}

.checkout-payment__option-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkout-payment__whish:not([hidden]) {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: #f8fbff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.checkout-payment__split[hidden],
.checkout-payment__whish[hidden] {
    display: none !important;
}

.checkout-payment__transfer-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.checkout-payment__transfer-label {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.checkout-payment--login {
    padding-top: 0;
    border-top: none;
}

.checkout-payment-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.checkout-review__screenshot {
    margin-top: 12px;
}

.checkout-review__screenshot-img {
    display: block;
    max-width: 280px;
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-top: 8px;
}

.checkout-reject-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.order-bar--compact {
    flex-direction: row;
    align-items: center;
}

.order-bar--compact > .btn-lg {
    align-self: center;
    flex-shrink: 0;
}

.order-bar__total-lbp {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

.money-dual {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.money-dual__lbp {
    font-size: 1rem;
    color: var(--text);
    font-weight: 700;
}

.money-dual__usd {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.checkout-payment__split {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-light);
}

.checkout-payment__split-title {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

.checkout-payment__split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.checkout-payment__paid-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
}

.checkout-payment__rate {
    font-size: 0.82rem;
    margin-bottom: 10px;
}

.checkout-page__meta {
    margin: 12px 0 0;
    font-size: 0.85rem;
}

.checkout-page__hint {
    margin: 0 0 16px;
    font-size: 0.88rem;
}

.checkout-page__payment .checkout-payment__options {
    margin-bottom: 0;
}

.checkout-form__actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.actions--center {
    justify-content: center;
}

.auth-card--wide {
    max-width: 560px;
}

.inventory-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.inventory-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inventory-toolbar__filters .admin-field__input {
    min-width: 180px;
}

.inventory-toolbar__hint {
    margin: 0;
    font-size: 0.85rem;
}

.inventory-form__footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-light);
    display: grid;
    gap: 12px;
    max-width: 520px;
}

.inventory-product {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.table--inventory .inventory-product__img {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    min-width: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: #f4f7fb;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.inventory-product__edit {
    display: block;
    font-size: 0.75rem;
    color: var(--primary);
}

.inventory-add-input {
    width: 88px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 6px;
}

.inventory-row--empty {
    background: #fff8f8;
}

.table--inventory th,
.table--inventory td {
    vertical-align: middle;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

/* ── Admin panels (أقسام / منتجات) ───────────────────── */

.admin-layout {
    display: grid;
    gap: 20px;
    align-items: start;
}

@media (min-width: 1024px) {
    .admin-layout {
        grid-template-columns: 320px 1fr;
    }

    .admin-layout--stack {
        grid-template-columns: 1fr;
    }
}

.admin-layout__aside { min-width: 0; }
.admin-layout__main { min-width: 0; }

.admin-panel--sticky {
    position: sticky;
    top: calc(var(--header-h) + 16px);
}

.admin-panel__title {
    margin: 0 0 18px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.admin-panel__head .admin-panel__title {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.admin-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.admin-panel__count {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--bg-alt);
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    white-space: nowrap;
}

/* Admin form system */
.admin-form { width: 100%; }

.admin-form__grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.admin-form__grid--2 {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .admin-form__grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.admin-field__label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-soft);
}

.admin-field__input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.92rem;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-field__input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

textarea.admin-field__input {
    min-height: 90px;
    resize: vertical;
}

.admin-field__file {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    padding: 16px;
    text-align: center;
    transition: border-color var(--transition), background var(--transition);
}

.admin-field__file:hover {
    border-color: var(--primary-light);
    background: #f0f6fc;
}

.admin-field__file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.admin-field__file-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    pointer-events: none;
}

.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.admin-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.admin-form__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
}

/* Admin grid — 5 per row */
.admin-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
    .admin-grid--5 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .admin-grid--5 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1100px) {
    .admin-grid--5 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
    .admin-grid--5 { grid-template-columns: repeat(5, 1fr); }
}

/* Admin tile cards */
.admin-tile {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.admin-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.admin-tile__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(145deg, #f0f6fc 0%, #fff 100%);
    overflow: hidden;
}

.admin-tile--category .admin-tile__media {
    aspect-ratio: 4 / 3;
}

.admin-tile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-tile__img--contain {
    object-fit: contain;
    padding: 12px;
}

.admin-tile__badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.admin-tile__price {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.25);
}

.admin-tile__photos {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
}

.product-images-gallery {
    margin-bottom: 14px;
}

.product-images-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
}

.product-images-gallery__item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: #fff;
}

.product-images-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-images-gallery__remove {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.product-images-gallery__delete-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.product-images-gallery__item:has(.product-images-gallery__delete-check:checked) {
    outline: 2px solid var(--danger);
    outline-offset: 1px;
    opacity: 0.55;
}

.product-images-gallery__item:has(.product-images-gallery__delete-check:checked) .product-images-gallery__remove {
    background: #7f1d1d;
}

.admin-tile__body {
    padding: 12px 14px;
    flex: 1;
}

.admin-tile__title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
}

.admin-tile__meta {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.admin-tile__desc {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.admin-tile__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-alt);
}

.admin-tile__actions form {
    flex-shrink: 0;
}

.admin-tile__edit {
    flex: 1;
    min-width: 0;
}

.admin-tile__edit[open] {
    flex-basis: 100%;
}

.admin-tile__edit summary {
    list-style: none;
    cursor: pointer;
}

.admin-tile__edit summary::-webkit-details-marker {
    display: none;
}

.admin-tile__form {
    margin-top: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.admin-tile__actions .btn-danger:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Product sections by category */
.admin-section {
    margin-bottom: 0;
}

.admin-section__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-light);
}

.admin-section__icon {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-light);
    background: #fff;
    flex-shrink: 0;
}

.admin-section__title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

/* Legacy entity list (kept minimal) */
.admin-entity {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
}

.admin-entity:last-child { margin-bottom: 0; }

.admin-entity__top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.admin-entity__img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-light);
    background: #fff;
    flex-shrink: 0;
}

.admin-entity__name {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.admin-entity__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-entity__delete {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
}

/* Product list */
.admin-product-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-product-item {
    display: flex;
    gap: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    align-items: flex-start;
}

.admin-product-item__img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: #fff;
    flex-shrink: 0;
}

.admin-product-item__body {
    flex: 1;
    min-width: 0;
}

.admin-product-item__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.admin-product-item__name {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 700;
}

.admin-product-item__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.admin-product-item__desc {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
}

.admin-product-item__tags { margin-bottom: 10px; }

.admin-product-item__edit summary {
    list-style: none;
    cursor: pointer;
}

.admin-product-item__edit summary::-webkit-details-marker { display: none; }

.admin-product-item__form {
    margin-top: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

@media (max-width: 639px) {
    .admin-product-item {
        flex-direction: column;
    }

    .admin-product-item__img {
        width: 100%;
        height: 140px;
    }

    .admin-entity__top {
        flex-direction: column;
        text-align: center;
    }

    .admin-panel--sticky {
        position: static;
    }
}

/* ── Stock check (الجرد) ──────────────────────────────── */

.stock-check-table-wrap {
    overflow-x: auto;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.table--stock-check {
    margin: 0;
    min-width: 640px;
}

.table--stock-check th {
    background: var(--bg-alt);
    font-size: 0.82rem;
    white-space: nowrap;
}

.table--stock-check td {
    vertical-align: middle;
}

.stock-check-product {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.stock-check-product__img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: #fff;
    flex-shrink: 0;
}

.stock-check-input {
    width: 80px;
    text-align: center;
    margin: 0 auto;
    padding: 8px 10px;
}

.stock-check-row--missing {
    background: #fff8f0;
}

.stock-check-row--missing .stock-check-missing {
    color: var(--danger);
    font-weight: 700;
}

.stock-check-total-row td {
    background: var(--bg-alt);
    border-top: 2px solid var(--border);
    font-size: 1rem;
}

.stock-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stock-summary__item {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    text-align: center;
}

.stock-summary__label {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.stock-summary__value {
    font-size: 1.15rem;
    font-weight: 700;
}

.badge-muted {
    background: var(--bg-alt);
    color: var(--text-soft);
    border: 1px solid var(--border);
}

/* ── Store reports (التقارير) ─────────────────────────── */

.report-grand {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.report-grand--store {
    margin-bottom: 24px;
}

.report-grand__card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

a.report-grand__card--link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.report-grand__card--link:hover {
    border-color: #e09b6a;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

a.report-grand__card--link.is-active {
    border-color: #c05621;
    box-shadow: 0 0 0 2px rgba(192, 86, 33, 0.18);
}

.report-grand__card--trust {
    border-color: #b8d4ef;
    background: linear-gradient(135deg, #f0f6fc 0%, #fff 100%);
}

.report-grand__card--due {
    border-color: #f0c9a6;
    background: linear-gradient(135deg, #fff8f0 0%, #fff 100%);
}

.report-grand__card--due .report-grand__value {
    color: #c05621;
}

.text-due {
    color: #c05621;
    font-weight: 700;
}

.report-store-card__stats--account strong {
    display: block;
    font-size: 1rem;
}

.report-store-card__stats--account .muted {
    font-size: 0.75rem;
}

.report-grand__card--profit {
    border-color: #b8dfc4;
    background: linear-gradient(135deg, #f0faf3 0%, #fff 100%);
}

.report-grand__card--profit .report-grand__value {
    color: var(--success);
}

.report-grand__label {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.report-grand__value {
    display: block;
    font-size: 1.35rem;
    color: var(--primary);
}

.report-grand__card--profit .report-grand__value {
    color: var(--success);
}

.report-grand__sub {
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
}

.report-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.report-store-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.report-store-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.report-store-card__name {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.report-store-card__meta {
    margin: 0 0 12px;
    font-size: 0.85rem;
}

.report-store-card__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.report-stat__label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 2px;
}

.text-profit {
    color: var(--success);
    font-weight: 600;
}

.table--report {
    margin: 0;
    min-width: 960px;
    font-size: 0.88rem;
}

.table--report th {
    background: var(--bg-alt);
    white-space: nowrap;
    font-size: 0.8rem;
}

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

@media (max-width: 639px) {
    .report-grand {
        grid-template-columns: 1fr;
    }

    .report-store-card__stats {
        grid-template-columns: 1fr;
    }
}

.text-primary { color: var(--primary); font-weight: 600; }
.text-end { text-align: left; }

@media (max-width: 639px) {
    .stock-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .container { padding: 0 10px; }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .store-hero { padding: 22px 18px; }
    .store-hero__title { font-size: 1.3rem; }
    .category-nav { grid-template-columns: repeat(2, 1fr); }
    .catalog-section__header { flex-direction: column; text-align: center; }
    .catalog-section__image { width: 100%; height: 140px; object-fit: cover; }

    .product-card__body { padding: 10px; gap: 6px; }
    .product-card__name { font-size: 0.82rem; line-height: 1.3; }
    .product-card__desc { font-size: 0.72rem; -webkit-line-clamp: 1; }
    .product-card__footer { gap: 8px; padding-top: 8px; }
    .product-card__price-label { font-size: 0.65rem; }
    .product-card__price .money-dual__lbp { font-size: 0.88rem; }
    .product-card__price .money-dual__usd { font-size: 0.68rem; }
    .product-card__tag,
    .product-card__stock { font-size: 0.62rem; padding: 2px 6px; }
    .product-card__qty label { font-size: 0.7rem; margin-bottom: 4px; }
    .product-card__labels-title { font-size: 0.7rem; }
    .product-label-option { min-width: 30px; height: 30px; padding: 0 8px; font-size: 0.82rem; }
    .qty-stepper__btn { width: 30px; height: 30px; font-size: 1rem; }
    .qty-stepper__input { font-size: 0.85rem; padding: 4px 2px; }
    .product-card__unavailable { font-size: 0.72rem; padding: 8px 6px; }

    .order-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 12px 12px 0 0;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -6px 24px rgba(15, 76, 129, 0.12);
    }

    .order-bar__summary {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .order-bar__total {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: center;
        gap: 2px 8px;
        padding: 4px 8px;
        min-width: 0;
        text-align: center;
    }

    .order-bar__total-label {
        display: none;
    }

    .order-bar__total-value {
        font-size: 1rem;
        line-height: 1.15;
    }

    .order-bar__total-lbp {
        font-size: 0.72rem;
    }

    .order-bar__total-meta {
        font-size: 0.68rem;
        width: 100%;
        line-height: 1.2;
    }

    .order-bar__delivery {
        width: 100%;
        justify-content: center;
        margin-top: 0;
        padding: 3px 8px;
        font-size: 0.66rem;
        gap: 4px;
    }

    .order-bar__delivery-icon {
        font-size: 0.78rem;
    }

    .order-bar--compact > .btn-lg,
    .order-bar > .btn-lg,
    #order-submit-btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.86rem;
        min-height: 38px;
    }

    #order-clear-btn {
        width: 100%;
        padding: 4px 10px;
        font-size: 0.76rem;
        min-height: 30px;
    }

    .catalog-form { padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px)); }
}

@media (min-width: 768px) {
    .store-hero {
        padding: 36px 32px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .store-hero__title { font-size: 1.85rem; }
}

/* ── Actions row ──────────────────────────────────────── */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.actions--end { justify-content: flex-end; }

/* ── Expand panel (product edit) ──────────────────────── */

.expand-panel {
    margin-top: 10px;
    padding: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

details > summary {
    list-style: none;
    cursor: pointer;
}

details > summary::-webkit-details-marker { display: none; }

/* ── Pagination ───────────────────────────────────────── */

.pagination-wrap {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.pagination-wrap nav { width: 100%; }

.pagination-wrap ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-soft);
    font-size: 0.875rem;
    text-decoration: none;
}

.pagination-wrap a:hover { background: var(--bg-alt); border-color: var(--primary-light); }

.pagination-wrap .active span,
.pagination-wrap span[aria-current="page"] {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ── Utilities ────────────────────────────────────────── */

.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 12px; }
.mt-2 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: #fff;
}

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--muted);
}

/* ── Category list items ──────────────────────────────── */

.category-list { display: flex; flex-direction: column; gap: 12px; }

.category-item {
    padding: 14px;
}

.category-item__form {
    display: grid;
    gap: 12px;
    align-items: end;
}

@media (min-width: 768px) {
    .category-item__form {
        grid-template-columns: 1fr 70px 80px 70px auto;
        align-items: center;
    }
}

.category-item__count {
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    font-size: 0.9rem;
}

/* ── Mobile header ────────────────────────────────────── */

@media (max-width: 767px) {
    .nav-toggle { display: inline-flex; }

    .site-header__tools { margin-inline-start: auto; }
    .site-nav { margin-inline-start: 0; }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--primary-dark);
        padding: 12px 16px 16px;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: var(--shadow-lg);
    }

    .site-nav.is-open { display: flex; }

    .site-nav a,
    .site-nav button,
    .site-nav .nav-btn {
        width: 100%;
        justify-content: center;
        padding: 11px 14px;
    }

    .site-header { position: relative; }
    .site-header__inner { position: relative; flex-wrap: wrap; }

    .site-header__title { font-size: 0.9rem; max-width: 160px; }

    .main-content { padding: 16px 0 32px; }

    .card { padding: 16px; }

    .btn { padding: 10px 16px; }
}

@media (min-width: 768px) {
    .container { padding: 0 24px; }
    .main-content { padding: 24px 0 48px; }
    .card { padding: 24px; }
    .site-header__title { font-size: 1.1rem; }
}

/* Interactive admin catalog tree */
.catalog-tree__head {
    align-items: flex-start;
    gap: 16px;
}

.catalog-tree__hint {
    margin: 5px 0 0;
    font-size: 0.86rem;
}

.category-tree {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.catalog-tree__list {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 8px;
}

.catalog-tree__list.is-drop-inside,
.catalog-tree__products.is-drop-inside {
    outline: 2px dashed var(--primary);
    outline-offset: 2px;
    border-radius: 10px;
    background: rgba(19, 84, 122, 0.05);
}

.catalog-tree__category {
    position: relative;
    margin: 8px 0;
}

.catalog-tree__category-row {
    position: relative;
    display: grid;
    grid-template-columns: 32px 26px 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 66px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.catalog-tree__category-row:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.catalog-tree__toggle,
.catalog-tree__summary,
.catalog-tree__uncategorized-head {
    font: inherit;
    color: inherit;
    border: 0;
    background: transparent;
}

.catalog-tree__toggle {
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.1rem;
}

.catalog-tree__toggle:hover:not(:disabled) {
    background: #eef5fa;
}

.catalog-tree__toggle:disabled {
    opacity: 0.4;
    cursor: default;
}

.catalog-tree__drag-handle {
    display: grid;
    place-items: center;
    width: 26px;
    height: 34px;
    color: #7b8b99;
    cursor: grab;
    touch-action: none;
    user-select: none;
    font-size: 1.35rem;
}

.catalog-tree__drag-handle:active {
    cursor: grabbing;
}

.catalog-tree__thumb {
    width: 46px;
    height: 46px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #f2f6f9;
}

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

.catalog-tree__summary {
    min-width: 0;
    padding: 4px 0;
    text-align: start;
    cursor: pointer;
}

.catalog-tree__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.catalog-tree__name {
    font-size: 1.02rem;
}

.catalog-tree__meta {
    display: block;
    margin-top: 4px;
    font-size: 0.84rem;
}

.catalog-tree__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.catalog-tree__edit {
    position: relative;
}

.catalog-tree__edit > summary {
    list-style: none;
}

.catalog-tree__edit > summary::-webkit-details-marker {
    display: none;
}

.catalog-tree__edit-popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    width: min(340px, 80vw);
    max-height: 70vh;
    overflow-y: auto;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.catalog-tree__branch {
    margin-inline-start: 34px;
    padding-inline-start: 16px;
    border-inline-start: 2px solid #dce8f0;
}

.catalog-tree__children {
    padding-top: 1px;
}

.catalog-tree__products {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 12px;
    margin: 8px 0 10px;
    padding: 8px;
    border-radius: 10px;
    background: #f7fafc;
}

.catalog-tree__products-label {
    padding: 2px 6px 6px;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.catalog-tree__product {
    display: grid;
    grid-template-columns: 26px 40px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.catalog-tree__product-image {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 7px;
    background: #f1f5f8;
}

.catalog-tree__product-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.catalog-tree__product-info strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-tree__product-info .muted {
    font-size: 0.8rem;
}

.catalog-tree__empty-drop {
    padding: 14px;
    text-align: center;
    border: 1px dashed #b9cbd7;
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.84rem;
}

.catalog-tree__uncategorized {
    border: 1px dashed var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.catalog-tree__uncategorized-head {
    width: 100%;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
}

.catalog-tree__uncategorized-head:hover {
    background: #f7fafc;
}

.catalog-tree__uncategorized .catalog-tree__products {
    margin: 0 10px 10px;
}

.is-dragging {
    opacity: 0.4;
}

.is-drop-before::before,
.is-drop-after::after {
    content: '';
    position: absolute;
    z-index: 20;
    inset-inline: 4px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.catalog-tree__category-row.is-drop-before::before,
.catalog-tree__product.is-drop-before::before {
    top: -5px;
}

.catalog-tree__category-row.is-drop-after::after,
.catalog-tree__product.is-drop-after::after {
    bottom: -5px;
}

.catalog-tree__category-row.is-drop-inside {
    outline: 2px solid var(--accent);
    background: #fff9e6;
}

.catalog-tree__product {
    position: relative;
}

.catalog-tree__product-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.catalog-tree__product {
    cursor: pointer;
}

.catalog-tree__product.is-move-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.25);
    background: #fff9f4;
}

.category-tree.is-move-mode .catalog-tree__product:not(.is-move-selected):hover {
    border-color: var(--accent);
    background: #fffdf8;
}

.category-tree.is-move-mode .catalog-tree__empty-drop {
    border-color: var(--accent);
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}

.catalog-move-bar {
    position: sticky;
    top: 10px;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 9px;
    color: #7c2d12;
    background: #ffedd5;
    border: 1px solid #fdba74;
}

.catalog-move-bar[hidden] {
    display: none;
}

.catalog-move-bar__text {
    font-size: 0.9rem;
}

.products-order-bar {
    position: sticky;
    top: 10px;
    z-index: 45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 14px;
    border: 1px solid #fdba74;
    border-radius: 10px;
    color: #7c2d12;
    background: #ffedd5;
    box-shadow: 0 8px 22px rgba(124, 45, 18, 0.12);
}

.products-order-bar[hidden] {
    display: none;
}

.products-bulk-toolbar {
    position: fixed;
    z-index: 60;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border: 1px solid #bfdbfe;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: #eff6ff;
    box-shadow: 0 -8px 24px rgba(30, 64, 175, 0.16);
}

.products-bulk-toolbar.is-active {
    border-color: #2563eb;
    background: #dbeafe;
}

.admin-layout--stack:has(.products-bulk-toolbar) {
    padding-bottom: 96px;
}

.products-bulk-toolbar__selection,
.products-bulk-toolbar__destination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.products-bulk-toolbar__destination .admin-field__input {
    width: auto;
    min-width: 180px;
}

.admin-tile--product {
    position: relative;
}

.product-bulk-check {
    position: absolute;
    z-index: 9;
    top: 8px;
    left: 8px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 2px solid #94a3b8;
    border-radius: 8px;
    color: transparent;
    background: rgba(255, 255, 255, 0.94);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.product-bulk-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-bulk-check span {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.product-bulk-check:hover {
    border-color: #2563eb;
}

.product-bulk-check:has(input:checked) {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.product-bulk-check:has(input:focus-visible) {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

[data-product-order-card].is-bulk-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

[data-product-order-card] {
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

[data-product-order-card].is-order-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.25);
    transform: translateY(-2px);
}

.is-product-order-mode [data-product-order-card]:not(.is-order-selected):hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.15);
}

@media (max-width: 720px) {
    .products-bulk-toolbar {
        gap: 8px;
        padding: 9px 11px;
    }

    .products-bulk-toolbar,
    .products-bulk-toolbar__destination {
        align-items: stretch;
    }

    .products-bulk-toolbar__selection {
        justify-content: space-between;
        width: 100%;
        font-size: 0.86rem;
    }

    .products-bulk-toolbar__destination {
        width: 100%;
    }

    .products-bulk-toolbar__destination .admin-field__input {
        flex: 1 1 130px;
        min-width: 0;
    }

    .products-bulk-toolbar__destination .btn {
        width: 100%;
    }

    .admin-layout--stack:has(.products-bulk-toolbar) {
        padding-bottom: 168px;
    }
}

.catalog-order-status {
    display: none;
    position: sticky;
    top: 10px;
    z-index: 40;
    margin: 10px 0;
    padding: 9px 12px;
    border-radius: 9px;
    font-weight: 600;
}

.catalog-order-status.is-visible {
    display: block;
}

.catalog-order-status.is-success {
    color: #14532d;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.catalog-order-status.is-error {
    color: #7f1d1d;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

@media (max-width: 720px) {
    .catalog-tree__category-row {
        grid-template-columns: 28px 24px 40px minmax(0, 1fr);
    }

    .catalog-tree__actions {
        grid-column: 3 / -1;
        justify-content: flex-end;
    }

    .catalog-tree__thumb {
        width: 40px;
        height: 40px;
    }

    .catalog-tree__branch {
        margin-inline-start: 16px;
        padding-inline-start: 9px;
    }

    .catalog-tree__product {
        grid-template-columns: 24px 34px minmax(0, 1fr);
    }

    .catalog-tree__product > .badge {
        display: none;
    }

    .catalog-tree__product-actions {
        grid-column: 2 / -1;
        justify-content: flex-end;
    }

    .catalog-tree__product-actions .btn {
        padding: 4px 9px;
        font-size: 0.78rem;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.category-request-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.category-request-actions__note {
    width: 100%;
    font-size: 0.85rem;
}

.category-request-actions__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.region-request__history-title {
    margin: 0 0 8px;
    font-size: 0.92rem;
}

.region-request__history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.region-request__history-item {
    padding: 8px 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--bg-alt, #f8fafc);
}

.admin-panel__head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pos {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}

.pos__catalog {
    min-width: 0;
}

.pos__cart {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    overflow: auto;
}

.pos__section {
    margin-top: 16px;
}

.pos__section-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.pos__tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.pos__tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: #fff;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.12s ease;
}

.pos__tile:hover:not(:disabled):not(.is-out) {
    border-color: var(--primary, #0f4c81);
    transform: translateY(-1px);
}

.pos__tile.is-out,
.pos__tile:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pos__tile-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #e8eaed;
    border-radius: 8px;
}

.pos__tile-name {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos__tile-meta {
    font-size: 0.7rem;
    color: var(--text-muted, #64748b);
}

.pos__tile-year,
.pos__tile-out {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    background: #e11d48;
    color: #fff;
}

.pos__tile-out {
    background: #64748b;
}

.pos__cart-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 80px;
}

.pos__cart-empty {
    padding: 16px 8px;
    text-align: center;
    font-size: 0.85rem;
}

.pos__cart-line {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: #fff;
}

.pos__cart-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #e8eaed;
    border-radius: 6px;
}

.pos__cart-line-body strong {
    display: block;
    font-size: 0.82rem;
    line-height: 1.25;
}

.pos__cart-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pos__cart-qty .qty-stepper__btn {
    width: 28px;
    height: 28px;
}

.pos__cart-qty-input {
    width: 52px;
    height: 32px;
    border: 1px solid var(--border, #d0d5dd);
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0 4px;
    background: #fff;
}

.pos__cart-qty-input:focus {
    outline: 2px solid rgba(15, 76, 129, 0.25);
    border-color: var(--primary, #0f4c81);
}

.pos__cart-remove {
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 8px;
}

.pos__cart-summary {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border, #e5e7eb);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.pos__cart-total {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary, #0f4c81);
}

.pos__customer-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pos__customer-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    background: #fff;
    user-select: none;
}

.pos__customer-mode:has(input:checked) {
    border-color: var(--accent, #c45c26);
    background: color-mix(in srgb, var(--accent, #c45c26) 12%, white);
    font-weight: 600;
}

.pos__new-customer {
    display: grid;
    gap: 0;
    padding: 0.65rem;
    border: 1px dashed rgba(0, 0, 0, 0.14);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

.pos__cart-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pos-modal[hidden] {
    display: none !important;
}

.pos-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.pos-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(360px, 100%);
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.pos-modal__title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.pos-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

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

    .pos__cart {
        position: static;
        max-height: none;
        order: -1;
    }
}

/* legacy manual list styles kept harmlessly */
.manual-order-tools {
    max-width: 420px;
}

/* English (LTR) storefront */
html[dir="ltr"] body {
    text-align: left;
}

html[dir="ltr"] .text-end {
    text-align: right;
}

html[dir="ltr"] .product-lightbox__nav--prev,
html[dir="ltr"] .product-gallery__nav--prev {
    left: 8px;
    right: auto;
}

html[dir="ltr"] .product-lightbox__nav--next,
html[dir="ltr"] .product-gallery__nav--next {
    right: 8px;
    left: auto;
}

html[dir="ltr"] .product-card__badge-new {
    left: 10px;
    right: auto;
}

html[dir="ltr"] .product-card__tag {
    left: auto;
    right: 10px;
}

html[dir="ltr"] .product-card__stock {
    left: auto;
    right: 10px;
}

