
:root {
    --ease-wood: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 0.16s;
    --dur-med: 0.28s;
    --dur-slow: 0.5s;
    --wood-tint-1: rgba(217, 207, 188, 0.06);
    --wood-tint-2: rgba(217, 207, 188, 0.12);
    --wood-line: rgba(43, 31, 23, 0.10);
    --ring: 0 0 0 3px rgba(122, 106, 76, 0.30);
    --content-max: 1480px;
}

/* Base rendering */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 88px;
}
body { text-rendering: optimizeLegibility; }
img, video, canvas, svg { max-width: 100%; }
img { height: auto; }
td, th { overflow-wrap: break-word; }
.info-row span, .ocard-row span, .inquiry-field span { overflow-wrap: anywhere; }

@supports (scrollbar-color: auto) {
    * { scrollbar-color: rgba(61, 44, 32, 0.35) transparent; scrollbar-width: thin; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(61, 44, 32, 0.32); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(61, 44, 32, 0.5); }
::-webkit-scrollbar-track { background: transparent; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: max(6px, inherit);
}
:where(a, button, [role=button]):focus:not(:focus-visible) { outline: none; }

:where(button, .btn, .btn-primary, .btn-cancel, .add-btn, .search-btn, .filter-btn, .sbtn,
       .btn-edit, .btn-delete, .btn-activate, .btn-view-proof, .btn-reject, .rcp-btn, .pay-pill,
       .tab-btn, .maint-tab, .status-pill, .stat-chip, .sidebar-nav a, .nav-link, .pager a) {
    transition:
        background-color var(--dur-med) var(--ease-wood),
        border-color var(--dur-med) var(--ease-wood),
        color var(--dur-fast) var(--ease-wood),
        box-shadow var(--dur-med) var(--ease-wood),
        transform var(--dur-fast) var(--ease-wood),
        opacity var(--dur-fast) var(--ease-wood);
}
:where(.btn-primary, .add-btn, .search-btn, .rcp-btn--primary, .checkout-btn, .submit-btn, .sz-add, .btn-gold):hover:not(:disabled) {
    transform: translateY(-1px);
}
:where(button, .btn, .add-btn, .rcp-btn, .pay-pill, .sz-add, .checkout-btn, .submit-btn):active:not(:disabled) {
    transform: translateY(0) scale(0.985);
}
/* Buttons centered with translateY(-50%) (password eye, search clear) keep their place when pressed */
.pw-toggle:hover, .search-wrap .search-clear:hover { transform: translateY(-50%); }
.pw-toggle:active:not(:disabled), .search-wrap .search-clear:active:not(:disabled) { transform: translateY(-50%) scale(0.9); }
:where(button, input, select, textarea):disabled { cursor: not-allowed; }

:where(a.card, a.stat-chip, a.status-pill, a.task-status-card, .product-card, .why-card, .ocard, .order-card) {
    transition: transform var(--dur-med) var(--ease-wood), box-shadow var(--dur-med) var(--ease-wood), border-color var(--dur-med) var(--ease-wood);
}
@media (hover: hover) {
    :where(a.stat-chip, a.status-pill, a.task-status-card):hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
}

.modal-overlay { transition: opacity var(--dur-med) var(--ease-wood), visibility var(--dur-med) var(--ease-wood); }
.modal-overlay .modal { transition: transform var(--dur-slow) var(--ease-out-soft), opacity var(--dur-med) var(--ease-wood); }

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border-radius: inherit;
}
.table-wrapper > table thead th { position: sticky; top: 0; z-index: 1; }
@media (hover: hover) {
    .table-wrapper > table tbody tr { transition: background-color var(--dur-fast) var(--ease-wood); }
    .table-wrapper > table tbody tr:hover { background-color: var(--wood-tint-1); }
}
table td.num, table th.num, .num { font-variant-numeric: tabular-nums; }

.tab-bar, .tabs, .maint-tabs, .status-summary, .filter-tabs, .stat-chips {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.tab-bar > *, .tabs > *, .maint-tabs > *, .status-summary > *, .filter-tabs > * { scroll-snap-align: start; }
@media (max-width: 768px) {
    .tab-bar, .filter-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
                mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent);
    }
    .tab-bar::-webkit-scrollbar, .filter-tabs::-webkit-scrollbar { display: none; }
    .tab-bar > *, .filter-tabs > * { flex-shrink: 0; white-space: nowrap; }
}

.order-notes {
    margin: 8px 0 4px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border-left: 3px solid var(--gold);
}
.order-notes > span {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.order-notes > p {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink);
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

@media (min-width: 1700px) {
    .main-content > * { max-width: var(--content-max); margin-left: auto; margin-right: auto; }
    .main-content > .topbar { max-width: var(--content-max); }
}

/* Tablets */
@media (max-width: 1024px) {
    .stats-grid, .stat-grid, .kpi-grid { gap: 12px; }
}

@media (max-width: 600px) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
    select, textarea { font-size: 16px; }
    h1 { font-size: clamp(22px, 6.4vw, 30px); line-height: 1.2; }
    .main-content { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
    .topbar { gap: 10px; }
    .modal, .modal-box { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 32px); overflow-y: auto; }
    .modal-actions { flex-wrap: wrap; }
    .modal-actions > * { flex: 1 1 140px; }
}
@media (pointer: coarse) {
    :where(.btn, .btn-primary, .btn-cancel, .add-btn, .search-btn, .filter-btn, .sbtn, .btn-edit, .btn-delete,
           .btn-activate, .btn-view-proof, .btn-reject, .rcp-btn, .pay-pill, .tab-btn, .maint-tab, .qty-btn,
           .pager a, .clear-link, .filter-clear, .sidebar-nav a, .nav-link, .sz-add) {
        min-height: 40px;
    }
    :where(.qty-btn) { min-width: 40px; }
    :where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select) { min-height: 42px; }
    :where(input[type=checkbox], input[type=radio]) { width: 20px; height: 20px; }
    .tab-bar a, .tabs a, .tabs button { min-height: 40px; display: inline-flex; align-items: center; }
}

@media (max-width: 480px) {
    .product-actions { flex-wrap: wrap; row-gap: 10px; }
    .product-actions .row-controls { flex: 1 1 100%; justify-content: flex-end; min-width: 0; }
    .product-actions .row-controls .add-btn { flex: 1 1 auto; justify-content: center; }
    .product-actions .row-qty-input { min-width: 0; width: 52px; }
}

.staff-topbar, .sidebar-close { display: none; }
@media (max-width: 768px) {
    .staff-topbar {
        display: flex; align-items: center; gap: 10px;
        position: fixed; top: 0; left: 0; right: 0; z-index: 2050;
        height: calc(58px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 14px 0;
        background: var(--surface);
        border-bottom: 1px solid rgba(43, 31, 23, .08);
        box-shadow: 0 4px 14px rgba(43, 31, 23, .06);
    }
    .staff-topbar .staff-nav-toggle {
        position: relative; top: auto; left: auto; flex: none;
        width: 40px; height: 40px; padding: 10px;
        border-radius: 12px;
        background: var(--brown-dark) !important;
        -webkit-backdrop-filter: none; backdrop-filter: none;
        border: 0 !important;
        box-shadow: 0 4px 10px rgba(42, 30, 20, .18) !important;
    }
    .staff-nav-dot {
        position: absolute; top: -5px; right: -6px;
        min-width: 18px; height: 18px; padding: 0 5px;
        border-radius: 999px; border: 2px solid var(--border);
        background: #DC2626; color: #fff;
        font-size: 10px; font-weight: 800; line-height: 14px; text-align: center;
    }
    .staff-topbar-brand { display: flex; flex: none; width: 34px; height: 34px; }
    .staff-topbar-brand img { width: 100%; height: 100%; object-fit: contain; }
    .staff-topbar-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
    .staff-topbar-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: 'Inter', Arial, sans-serif; font-size: 17px; color: var(--ink); }
    .staff-topbar-title small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
    .dashboard-wrapper .main-content { padding-top: calc(74px + env(safe-area-inset-top, 0px)); }
    .sidebar-logo { position: relative; }
    .sidebar-close {
        display: flex; align-items: center; justify-content: center;
        position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
        width: 36px; height: 36px; border: 0; border-radius: 10px;
        background: rgba(255, 255, 255, .1); color: #fff;
        font-size: 22px; line-height: 1; cursor: pointer;
    }
    .sidebar-close:hover { background: rgba(255, 255, 255, .18); }
}

@supports (padding: max(0px)) {
    .navbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    .cart-summary, .pos-bottom-bar, .mobile-cart-bar { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .sidebar, .navbar, .staff-nav-toggle, .staff-topbar, .nav-drawer, .nav-veil, .nav-toggle, .site-footer, .pager, .toolbar, .tab-bar { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; }
    a[href]::after { content: none !important; }
    .card, .order-card, .ocard { box-shadow: none !important; break-inside: avoid; }
}

.dg-skeleton {
    position: fixed;
    z-index: 3500;
    overflow: hidden;
    background: var(--cream);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
    contain: strict;
}
.dg-skeleton.is-on { opacity: 1; pointer-events: auto; cursor: progress; }
.dg-skeleton .sk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dg-skeleton > i { position: absolute; display: block; }
.dg-skeleton .sk-shadow { box-shadow: 0 1px 3px rgba(43, 31, 23, .06), 0 2px 10px rgba(43, 31, 23, .04); }
.dg-skeleton .sk-border { box-shadow: inset 0 0 0 1.5px rgba(43, 31, 23, .09); }
.dg-skeleton .sk-shadow.sk-border { box-shadow: inset 0 0 0 1.5px rgba(43, 31, 23, .09), 0 1px 3px rgba(43, 31, 23, .06); }
.dg-skeleton .sk-t, .dg-skeleton .sk-m {
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(122, 110, 86, .17) 25%, rgba(122, 110, 86, .07) 40%, rgba(122, 110, 86, .17) 60%);
    background-size: 300% 100%;
    animation: dg-shimmer 1.25s ease-in-out infinite;
}
.dg-skeleton .sk-t.sk-light {
    background: linear-gradient(90deg, rgba(255, 255, 255, .24) 25%, rgba(255, 255, 255, .1) 40%, rgba(255, 255, 255, .24) 60%);
    background-size: 300% 100%;
}
.dg-skeleton .sk-c { background: var(--surface); box-shadow: inset 0 0 0 1.5px rgba(43, 31, 23, .12); }
@keyframes dg-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.dg-busy {
    position: fixed; inset: 0; z-index: 5000;
    display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(43, 31, 23, .32);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-fast, .16s) ease;
}
.dg-busy.is-on { opacity: 1; pointer-events: auto; cursor: progress; }
.dg-busy-card {
    display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
    width: min(360px, 100%); padding: 26px 24px;
    background: var(--surface); border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.dg-busy-card strong { font-size: 16px; color: var(--ink); }
.dg-busy-card small { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.dg-spinner {
    width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid rgba(61, 44, 32, .18); border-top-color: var(--brown-mid);
    animation: dg-spin .8s linear infinite; display: inline-block;
}
.dg-spinner-sm { width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; margin-right: 6px; border-color: rgba(255, 255, 255, .45); border-top-color: #fff; }
.dg-btn-busy { cursor: progress !important; opacity: .85; }
@keyframes dg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .dg-skeleton i { animation: none !important; }
    .dg-spinner { animation-duration: 1.6s !important; }
}
@media print { .dg-skeleton, .dg-busy { display: none !important; } }

.pw-rule { display: block; font-size: 12px; line-height: 1.4; color: var(--text-muted); margin-top: 5px; }

.navbar-logo-icon, .sidebar-logo-mark, .footer-logo-mark, .login-logo-icon { background: transparent !important; overflow: visible !important; }
.navbar-logo-icon img, .sidebar-logo-mark img, .footer-logo-mark img, .login-logo-icon img, img.brand-logo {
    object-fit: contain !important; object-position: center !important;
}

.pay-scan { margin: 10px 0 14px; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; border: 1.5px solid var(--border); background: var(--surface); color: var(--ink); }
.pay-scan[hidden] { display: none; }
.pay-scan > strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.pay-scan > span { display: block; color: var(--text-muted); font-size: 12px; }
.pay-scan ul { list-style: none; margin: 0; padding: 0; }
.pay-scan li { display: flex; gap: 8px; align-items: flex-start; padding: 2px 0; }
.pay-scan li b { flex: 0 0 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; background: #B9AC92; margin-top: 1px; }
.pay-scan li.is-ok b { background: #2E7D32; }
.pay-scan li.is-fail b { background: #C62828; }
.pay-scan li.is-warn b, .pay-scan li.is-unknown b { background: #D97706; }
.pay-scan.is-busy { background: var(--surface); border-color: var(--border); }
.pay-scan.is-ok { background: var(--ok-bg); border-color: var(--ok-line); }
.pay-scan.is-ok > strong { color: var(--ok-ink); }
.pay-scan.is-warn { background: var(--warn-bg); border-color: #FCD34D; }
.pay-scan.is-warn > strong { color: var(--warn-ink); }
.pay-scan.is-fail { background: var(--danger-bg); border-color: var(--danger-line); }
.pay-scan.is-fail li.is-fail { color: var(--danger-ink); font-weight: 600; }
.pay-scan-busy { display: flex; align-items: center; gap: 12px; }
.pay-scan-busy .dg-spinner { flex: 0 0 26px; width: 26px; height: 26px; }
.pay-scan-busy strong { display: block; font-size: 13.5px; color: var(--ink); }
.pay-scan-step { display: block; color: var(--text-muted); font-size: 12px; }
.pay-scan-bar { margin-top: 10px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pay-scan-bar i { display: block; height: 100%; width: 4%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--brown-mid)); transition: width .35s ease; }
.proof-preview { position: relative; }
.pay-scan-frame {
    position: absolute; overflow: hidden; pointer-events: none; border-radius: 8px;
    background: rgba(43, 31, 23, .08); box-shadow: inset 0 0 0 2px rgba(185, 172, 146, .9), 0 0 0 3px rgba(185, 172, 146, .25);
}
.pay-scan-frame::before {
    content: ''; position: absolute; left: 0; right: 0; top: -30%; height: 30%;
    background: linear-gradient(180deg, rgba(185, 172, 146, 0), rgba(185, 172, 146, .32) 78%, rgba(217, 207, 188, .95) 98%, rgba(217, 207, 188, 0));
    animation: payScanSweep 1.8s ease-in-out infinite alternate;
}
@keyframes payScanSweep { from { top: -30%; } to { top: 100%; } }
.pay-scan-note { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--warn-ink); }
.pay-scan.is-fail .pay-scan-note { color: var(--danger-ink); }
@media (prefers-reduced-motion: reduce) {
    .pay-scan-frame::before { animation: none; top: 0; height: 100%; opacity: .35; }
    .pay-scan-bar i { transition: none; }
}

.ready-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }

.cancel-banner { margin: 0 20px 4px; padding: 10px 14px; border-radius: 10px; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); font-size: 13px; line-height: 1.5; }
.cancel-banner span { display: block; color: var(--danger-ink); }
.order-card > .cancel-banner { margin-top: 14px; }

.staff-alert-toast {
    position: fixed; right: 20px; bottom: 20px; z-index: 10050; display: flex; align-items: flex-start; gap: 12px;
    width: min(380px, calc(100vw - 32px)); padding: 14px 14px 14px 16px; border-radius: 14px;
    background: var(--surface); border: 1px solid var(--danger-line); border-left: 5px solid #DC2626; box-shadow: 0 14px 40px rgba(43, 31, 23, .22);
    color: var(--ink); font-size: 13px; line-height: 1.45; animation: satIn .25s ease-out;
}
.staff-alert-toast.is-hiding { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.staff-alert-toast .sat-icon { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #DC2626; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.staff-alert-toast .sat-body { flex: 1; min-width: 0; }
.staff-alert-toast .sat-body strong { display: block; font-size: 14px; color: var(--danger-ink); }
.staff-alert-toast .sat-body p { margin: 2px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.staff-alert-toast .sat-link { align-self: center; padding: 7px 12px; border-radius: 8px; background: var(--brown-mid); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.staff-alert-toast .sat-close { background: none; border: 0; font-size: 20px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 0 2px; }
@keyframes satIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .staff-alert-toast { right: 16px; bottom: 16px; } }

td.staff-actions { display: table-cell; vertical-align: middle; }
td.staff-actions > * { margin: 3px 6px 3px 0; vertical-align: middle; }
td.staff-actions > *:last-child { margin-right: 0; }

.pvs-toggle {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 7px; max-width: 100%;
    padding: 4px 11px 4px 9px; border-radius: 999px; border: 1px solid var(--cream-dark); background: var(--cream);
    color: var(--ink-2); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.35;
    white-space: nowrap; cursor: pointer;
    transition: background-color var(--dur-fast, .16s) ease, border-color var(--dur-fast, .16s) ease;
}
.pvs-toggle:hover { background: var(--surface-2); border-color: var(--border); }
.pvs-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pvs-caret {
    width: 0; height: 0; flex-shrink: 0;
    border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
    transition: transform var(--dur-fast, .16s) ease;
}
.pvs-toggle[aria-expanded="true"] .pvs-caret { transform: rotate(90deg); }
.pvs-sum { color: var(--text-muted); font-weight: 500; }
.pvs-sum::before { content: '·'; margin: 0 6px 0 1px; }
.pvs-none { margin-top: 5px; font-size: 11.5px; color: var(--warn-ink); }

table tr.pvs-open > td { border-bottom-color: transparent; background: var(--surface); }
table tr.pvs-row > td,
table tr.pvs-row:hover > td { padding: 0 16px 16px; background: var(--surface); }
.pvs-panel { border: 1px solid var(--cream-dark); border-radius: 12px; background: var(--surface); padding: 12px 14px; }
.pvs-scroll { overflow-x: auto; }
table.pvs-matrix { width: auto; min-width: 0; border-collapse: separate; border-spacing: 6px; margin: -6px; font-size: 12.5px; }
table.pvs-matrix th, table.pvs-matrix td {
    padding: 0; border: 0; background: none; position: static; text-transform: none; letter-spacing: normal;
    text-align: left; vertical-align: middle; white-space: nowrap;
}
table.pvs-matrix thead th { padding: 0 4px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
table.pvs-matrix thead th .pv-swatch { display: inline-block; margin-right: 6px; vertical-align: -1px; }
table.pvs-matrix tbody th { padding-right: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
table.pvs-matrix tr:hover td { background: none; }
.pvs-cell {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
    min-width: 108px; padding: 7px 26px 7px 10px; border-radius: 9px; border: 1px solid var(--cream-dark);
    background: var(--cream); color: inherit; font: inherit; text-align: left;
}
span.pvs-cell { padding-right: 12px; }
button.pvs-cell { cursor: pointer; transition: border-color var(--dur-fast, .16s) ease, background-color var(--dur-fast, .16s) ease; }
button.pvs-cell:hover { border-color: var(--brown-mid); background: var(--surface); }
button.pvs-cell:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pvs-plus {
    position: absolute; top: 50%; right: 9px; transform: translateY(-50%);
    font-size: 15px; font-weight: 800; color: var(--ink-2); opacity: .35;
    transition: opacity var(--dur-fast, .16s) ease;
}
button.pvs-cell:hover .pvs-plus, button.pvs-cell:focus-visible .pvs-plus { opacity: 1; }
.pvs-q { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pvs-q.is-ok { color: var(--ok-ink); }
.pvs-q.is-low { color: var(--warn-ink); }
.pvs-q.is-out { color: var(--text-muted); font-weight: 600; }
.pvs-price { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pvs-foot { margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.pvs-foot strong { color: var(--ink); }

.pc-mode.is-short small { color: var(--warn-ink); font-weight: 600; }
.pc-mode.is-short:disabled { opacity: .6; background: var(--surface-2); }
#qtyStockNote.is-alert {
    margin: 4px 0 10px; padding: 8px 12px; border-radius: 10px; text-align: left; line-height: 1.45;
    background: var(--warn-bg); border: 1px solid #D9CFBC; color: var(--warn-ink);
}

#restock_picker .vr-grid {
    display: grid; grid-template-columns: minmax(84px, max-content) repeat(var(--vr-cols, 1), minmax(70px, 1fr));
    gap: 6px; align-items: stretch; max-height: 300px; overflow: auto; padding: 2px;
}
#restock_picker .vr-corner, #restock_picker .vr-head {
    display: flex; align-items: center; gap: 5px; align-self: end; padding: 0 2px;
    font-size: 11px; font-weight: 700; line-height: 1.25; color: var(--text-muted);
}
#restock_picker .vr-size { align-self: center; font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
#restock_picker .vr-cell {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
    margin: 0; padding: 7px 4px; border: 1.5px solid var(--cream-dark); border-radius: 9px; background: var(--cream);
    text-transform: none; letter-spacing: normal; cursor: pointer;
    transition: border-color var(--dur-fast, .16s) ease, background-color var(--dur-fast, .16s) ease, box-shadow var(--dur-fast, .16s) ease;
}
#restock_picker .vr-cell input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
#restock_picker .vr-cell b { font-size: 15px; line-height: 1.2; color: var(--ok-ink); font-variant-numeric: tabular-nums; }
#restock_picker .vr-cell.is-out b { color: var(--text-muted); }
#restock_picker .vr-cell small { font-size: 10.5px; font-weight: 500; color: var(--text-muted); }
#restock_picker .vr-cell:hover { border-color: var(--gold); background: var(--surface); }
#restock_picker .vr-cell.is-picked { border-color: var(--brown-mid); background: var(--surface); box-shadow: 0 0 0 3px rgba(61, 44, 32, .14); }
#restock_picker .vr-cell:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.vr-preview { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.vr-preview.is-set { color: var(--ink); }
.vr-preview b { color: var(--ok-ink); }

.pv { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 14px; }
.pv-row { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.pv-k {
    flex: 0 0 62px;
    padding-top: 4px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.pv-list { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 0; padding: 0; min-width: 0; }
.pv-list li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    font-variant-numeric: tabular-nums;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.pv-swatch {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    background:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 3px),
        var(--sw, var(--brown-mid));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.product-card:hover .pv-list li { border-color: rgba(217, 207, 188, 0.35); }
.price-range { white-space: nowrap; }
.price-range .price-dash { color: var(--text-muted); font-weight: 500; margin: 0 1px; }
.product-card .product-price { font-size: 18px; }

.variant-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.variant-filters .vf { display: flex; align-items: center; gap: 6px; margin: 0; }
.variant-filters .vf-k { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.variant-filters select {
    min-width: 140px;
    padding: 9px 30px 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--cream);
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.variant-filters select:focus { border-color: var(--gold); background-color: var(--surface); box-shadow: var(--focus); outline: none; }
@media (max-width: 768px) {
    .variant-filters { width: 100%; }
    .variant-filters .vf { flex: 1 1 140px; flex-direction: column; align-items: stretch; gap: 4px; }
    .variant-filters select { width: 100%; min-width: 0; }
    .pv-k { flex-basis: 56px; }
}
.catalog-grid .product-card:not(.catalog-hidden), #catalog-grid .product-card:not(.catalog-hidden) { display: flex; flex-direction: column; }
#catalog-grid .product-card-body { flex: 1; display: flex; flex-direction: column; }
#catalog-grid .product-card-footer { margin-top: auto; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-row-2.form-row-street { grid-template-columns: 1.6fr 1fr; }
.form-row-2 > .form-group { min-width: 0; }
.req { color: var(--accent-ink); font-weight: 700; }
.addr-group { border: 0; padding: 0; margin: 6px 0 0; min-width: 0; }
.addr-group legend { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); padding: 0; margin: 4px 0 10px; }
.addr-group select, .addr-group input { width: 100%; }
.addr-group select:disabled { opacity: .6; cursor: not-allowed; }
.addr-offline { font-size: 12px; color: var(--warn-ink); margin: -4px 0 10px; }
.sms-optin { margin-bottom: 6px; }
@media (max-width: 420px) {
    .form-row-2, .form-row-2.form-row-street { grid-template-columns: 1fr; }
}

.notif { position: relative; display: flex; align-items: center; }
.notif-btn { position: relative; display: flex; align-items: center; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .8); cursor: pointer; transition: background .2s ease, color .2s ease; }
.notif-btn:hover, .notif-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .08); color: #fff; }
.notif-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.notif-badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #DC2626; color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--brown-dark, #221810); }
.notif-menu { position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 18px 40px rgba(43, 31, 23, .22); overflow: hidden; z-index: 1200; animation: notifIn .18s ease; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--cream-dark, var(--border)); }
.notif-head strong { font-family: 'Inter', Arial, sans-serif; font-size: 16px; }
.notif-readall { background: none; border: 0; color: var(--brown, var(--ink-2)); font-size: 12px; font-weight: 700; cursor: pointer; }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.notif-item { display: grid; gap: 2px; padding: 12px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--cream-dark, var(--border)); transition: background .15s ease; }
.notif-item:hover { background: var(--cream, var(--surface-2)); }
.notif-item.is-unread { background: var(--surface); box-shadow: inset 3px 0 0 var(--gold, #D9CFBC); }
.notif-title { font-weight: 700; font-size: 13px; }
.notif-text { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.notif-time { font-size: 11px; color: var(--text-muted); }
.notif-empty { padding: 22px 16px; margin: 0; font-size: 13px; color: var(--text-muted); }
.notif-all { display: block; padding: 11px 16px; text-align: center; font-size: 13px; font-weight: 700; color: var(--brown, var(--ink-2)); text-decoration: none; background: var(--cream, var(--surface-2)); }
.notif-all:hover { text-decoration: underline; }
@media (max-width: 768px) {
    .notif-menu { position: fixed; top: 64px; right: 16px; left: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .notif-menu { animation: none; } }

.cart-peek-wrap { position: relative; display: flex; align-items: center; }
.cart-peek { display: none; }
@media (hover: hover) and (pointer: fine) {
    .cart-peek { display: block; position: absolute; right: -8px; top: calc(100% + 10px); z-index: 1200; width: 340px; background: var(--surface); color: var(--ink); border-radius: 14px; box-shadow: 0 18px 40px rgba(43, 31, 23, .22); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s ease .12s, transform .15s ease .12s, visibility 0s linear .27s; }
    .cart-peek::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; }
    .cart-peek-wrap:hover .cart-peek,
    .cart-peek-wrap:focus-within .cart-peek { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}
.cart-peek-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--cream-dark, var(--border)); }
.cart-peek-head strong { font-family: 'Inter', Arial, sans-serif; font-size: 16px; }
.cart-peek-head span { font-size: 12px; color: var(--text-muted); }
.cart-peek-list { list-style: none; margin: 0; padding: 4px 0; max-height: 300px; overflow-y: auto; }
.cart-peek-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 16px; }
.cart-peek-list img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--cream, var(--surface-2)); }
.cart-peek-info { display: grid; gap: 2px; min-width: 0; }
.cart-peek-info b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-peek-info small { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-peek-amt { font-family: var(--font-num); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.cart-peek-more { margin: 0; padding: 2px 16px 8px; font-size: 12px; color: var(--text-muted); }
.cart-peek-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 16px; border-top: 1px solid var(--cream-dark, var(--border)); font-size: 13px; }
.cart-peek-total strong { font-family: var(--font-num); font-size: 16px; }
.cart-peek-btn { display: block; margin: 0 16px 14px; padding: 11px 14px; border-radius: 10px; background: var(--brown-dark); color: #fff; font-size: 13px; font-weight: 700; text-align: center; text-decoration: none; }
.cart-peek-btn:hover { background: var(--brown-mid); }
.cart-peek-btn.is-light { background: var(--cream, var(--surface-2)); color: var(--ink); }
.cart-peek-empty { margin: 0; padding: 18px 16px 12px; font-size: 13px; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .cart-peek { transition: none; } }

.balance-readonly { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: 12px; font-weight: 700; }

.collect-box { display: inline-block; position: relative; }
.collect-box > summary { list-style: none; cursor: pointer; }
.collect-box > summary::-webkit-details-marker { display: none; }
.collect-form { display: grid; gap: 10px; margin-top: 8px; padding: 14px; width: min(320px, calc(100vw - 48px)); background: var(--surface); border: 1.5px solid var(--cream-dark, var(--border)); border-radius: 12px; box-shadow: 0 10px 28px rgba(43, 31, 23, .14); }
.collect-form label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink); }
.collect-form input[type="number"], .collect-form input[type="text"] { padding: 9px 10px; border: 1.5px solid var(--cream-dark, var(--border)); border-radius: 8px; font-size: 14px; background: var(--cream, var(--surface-2)); }
.collect-form fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.collect-form legend { font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.collect-pill { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 6px; padding: 7px 12px; border: 1.5px solid var(--cream-dark, var(--border)); border-radius: 999px; cursor: pointer; font-weight: 700; }
.collect-pill:has(input:checked) { border-color: var(--brown, var(--brown-mid)); background: var(--surface-2); }
.collect-ref { display: none !important; }
.collect-form:has(input[value="gcash"]:checked) .collect-ref { display: grid !important; }
.collect-form small { font-size: 11.5px; color: var(--text-muted); }

/* Delivery queue */
.badge-out { background: var(--info-bg); color: var(--info-ink); }
.dl-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 6px; }
.dl-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--cream-dark, var(--border)); transition: background .2s ease, border-color .2s ease; }
.dl-tab b { min-width: 22px; padding: 1px 7px; border-radius: 99px; background: var(--cream, var(--surface-2)); font-size: 12px; text-align: center; }
.dl-tab:hover { border-color: var(--gold); }
.dl-tab.is-active { background: var(--brown-dark); color: #fff; border-color: var(--brown-dark); }
.dl-tab.is-active b { background: var(--gold); color: var(--on-gold); }
.dl-arrow { color: var(--text-muted); font-weight: 700; }
.dl-help { margin: 0 0 14px; font-size: 12.5px; color: var(--text-muted); }
.dl-tab--today { border-color: #86EFAC; background: var(--ok-bg); color: var(--ok-ink); }
.dl-tab--today b { background: var(--ok-bg); color: var(--ok-ink); }
.dl-tab--today.is-active { background: #15803D; border-color: #15803D; color: #fff; }
.dl-tab--today.is-active b { background: var(--surface); color: var(--ok-ink); }
.dl-sep { width: 1.5px; height: 22px; margin: 0 6px; background: var(--cream-dark); border-radius: 2px; }
.dl-today-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 13px; line-height: 1.5; }
.dl-today-note.has-work { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok-ink); }
.dl-day { display: flex; align-items: baseline; gap: 10px; padding: 8px 16px; font-size: 12.5px; line-height: 1.45; border-bottom: 1px solid rgba(43, 31, 23, .06); }
.dl-day b { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.dl-day--today, .dl-day--pickup { background: var(--ok-bg); color: var(--ok-ink); }
.dl-day--today b, .dl-day--pickup b { background: #15803D; color: #fff; }
.dl-day--overdue { background: var(--danger-bg); color: var(--danger-ink); }
.dl-day--overdue b { background: #DC2626; color: #fff; }
.dl-day--nodate { background: var(--warn-bg); color: var(--warn-ink); }
.dl-day--nodate b { background: #F59E0B; color: #fff; }
.dl-day--later { background: var(--surface-2); color: var(--text-muted); }
.dl-day--later b { background: var(--surface-2); color: var(--ink); }
.dl-day--out { background: var(--info-bg); color: var(--info-ink); }
.dl-day--out b { background: #2563EB; color: #fff; }
.ocard.dl-card--today, .ocard.dl-card--pickup, .order-card.dl-card--today, .order-card.dl-card--pickup { border-left-color: #15803D; box-shadow: 0 0 0 2px rgba(21, 128, 61, .14), var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, .06)); }
.ocard.dl-card--overdue, .order-card.dl-card--overdue { border-left-color: #DC2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, .14), var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, .06)); }
.ocard.dl-card--later, .order-card.dl-card--later { border-left-color: #B9AC92; }
.staff-attention-item.is-fyi { background: transparent; border-style: dashed; box-shadow: none; }
.staff-attention-item.is-fyi .staff-attention-count { opacity: .7; }
.staff-attention-copy .staff-attention-fyi { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.gcash-ref-count { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.gcash-ref-count.is-short { color: var(--warn-ink); }
.gcash-ref-count.is-done { color: var(--ok-ink); }
.dl-controls { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.dl-form { display: inline-flex; flex-direction: column; gap: 4px; margin: 0; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--brown, var(--brown-mid)); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; transition: background .2s ease, opacity .2s ease; }
.dl-btn::-webkit-details-marker { display: none; }
.dl-btn--go { background: var(--brown-dark); color: #fff; border-color: var(--brown-dark); }
.dl-btn--go:hover:not(:disabled) { background: var(--brown, var(--brown-mid)); }
.dl-btn--ghost { border-color: var(--cream-dark, var(--border)); }
.dl-btn:disabled { opacity: .45; cursor: not-allowed; }
.dl-why { font-size: 11.5px; font-weight: 700; color: var(--warn-ink); }
.dl-sched { position: relative; }
.dl-sched > .dl-form { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(290px, calc(100vw - 48px)); padding: 12px; background: var(--surface); border: 1.5px solid var(--cream-dark, var(--border)); border-radius: 12px; box-shadow: 0 10px 28px rgba(43, 31, 23, .16); gap: 8px; }
.dl-sched label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink); }
.dl-sched input, .dl-sched select { padding: 8px 10px; border: 1.5px solid var(--cream-dark, var(--border)); border-radius: 8px; font-size: 13px; background: var(--cream, var(--surface-2)); }
.dl-sched small { font-size: 11.5px; color: var(--text-muted); }
.dl-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; align-self: center; }
.dl-badge--early { background: var(--info-bg); color: var(--info-ink); }
.dl-badge--ontime { background: var(--ok-bg); color: var(--ok-ink); }
.dl-badge--overdue { background: var(--danger-bg); color: var(--danger-ink); }
.dl-badge--due { background: var(--warn-bg); color: var(--warn-ink); }
.dl-badge--date { background: var(--surface-2); color: var(--ink); font-weight: 700; letter-spacing: 0; }
.dl-readonly { align-self: center; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.role-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 13px; line-height: 1.5; }
.role-note .icon { flex: none; margin-top: 2px; color: var(--ink-2); }
.dl-pop { position: fixed; inset: 0; margin: auto; width: min(340px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 32px);
          overflow: auto; padding: 18px; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink);
          box-shadow: 0 24px 60px rgba(42, 30, 20, .3); }
.dl-pop::backdrop { background: rgba(34, 24, 16, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dl-pop:not(:popover-open) { display: none; }
.dl-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dl-pop-head strong { font-family: 'Inter', Arial, sans-serif; font-size: 18px; }
.dl-pop-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--cream, var(--surface-2)); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.dl-pop .dl-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.dl-pop label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink); }
.dl-pop input, .dl-pop select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--cream-dark, var(--border)); border-radius: 10px; font-size: 14px; background: var(--cream, var(--surface-2)); font-family: inherit; }
.dl-pop small { font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.dl-pop .dl-btn--go { justify-content: center; padding: 11px 14px; }
@supports not selector(:popover-open) {
    .dl-pop:not(:popover-open) { display: block; position: static; box-shadow: none; padding: 10px 0; width: 100%; }
}
@media (max-width: 600px) {
    .dl-sched > .dl-form { position: static; width: 100%; margin-top: 6px; }
    .dl-controls { width: 100%; }
}

.dg-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 6000;
    pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.dg-progress.is-on { opacity: 1; }
.dg-progress > i {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brown-mid), var(--gold));
    box-shadow: 0 0 8px rgba(61, 44, 32, .6);
    border-radius: 0 3px 3px 0;
    transition: width .2s ease;
}
.dg-progress.is-done { opacity: 0; transition: opacity .35s ease .15s; }
.dg-busy-card { gap: 12px; padding: 30px 26px 24px; animation: dg-pop .22s ease both; }
.dg-busy-ring { position: relative; width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; }
.dg-busy-ring .dg-spinner { position: absolute; inset: 0; width: 64px; height: 64px; border-width: 3px; }
.dg-busy-ring img { width: 34px; height: 34px; object-fit: contain; }
.dg-busy-dots { display: inline-flex; gap: 5px; margin-top: 2px; }
.dg-busy-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: dg-dot 1.2s ease-in-out infinite; }
.dg-busy-dots i:nth-child(2) { animation-delay: .15s; }
.dg-busy-dots i:nth-child(3) { animation-delay: .3s; }
.dg-busy.is-slow .dg-busy-note { color: var(--ink-2); }
@keyframes dg-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes dg-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .dg-busy-dots i, .dg-busy-card { animation: none !important; }
}
@media print { .dg-progress { display: none !important; } }

.option-fixed {
    margin: 0;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}
.option-fixed[hidden] { display: none; }

.ocard-actions { align-items: center; justify-content: flex-end; }
.ocard-actions > * { align-self: center; }
.ocard-actions .collect-box[open] { flex-basis: 100%; display: flex; flex-direction: column; align-items: flex-end; }
.ocard-actions .dl-form { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
@media (max-width: 640px) {
    .ocard-actions .collect-box[open] { align-items: stretch; }
    .ocard-actions .collect-form { width: auto; }
}

.flow-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(42, 30, 20, 0.48);
}
.flow-confirm-overlay.open { display: flex; }
.flow-confirm-box {
    background: linear-gradient(180deg, var(--surface) 0%, var(--cream, var(--surface-2)) 100%);
    border: 1px solid rgba(43, 31, 23, 0.1);
    border-radius: 16px;
    padding: 28px 24px 22px;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg, 0 20px 50px rgba(42, 30, 20,.25));
    text-align: left;
}
.flow-confirm-box h3 {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 22px;
    color: var(--ink);
    margin: 0 0 8px;
}
.flow-confirm-box p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 22px;
}
.flow-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.flow-confirm-actions button {
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: background 0.2s, transform 0.15s;
}
.flow-confirm-cancel {
    background: transparent;
    color: var(--ink-2);
    border: 1.5px solid var(--brown-mid) !important;
}
.flow-confirm-cancel:hover { background: rgba(61, 44, 32, 0.06); }
.flow-confirm-ok {
    background: var(--brown-mid);
    color: #fff;
}
.flow-confirm-ok.is-danger { background: var(--danger, #C62828); }
.flow-confirm-ok:hover { filter: brightness(0.95); }
.flow-confirm-ok:active,
.flow-confirm-cancel:active { transform: scale(0.98); }

/* Address search boxes (assets/js/ph-address.js) */
.addr-combo { position: relative; }
.addr-combo .addr-combo-select {
    color: transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: none !important;
    overflow: hidden;
}
.addr-combo .addr-combo-select::picker-icon { display: none; }
.addr-combo::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    z-index: 2;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid var(--brown-light);
    border-bottom: 2px solid var(--brown-light);
    transform: rotate(45deg);
    transition: transform .2s ease, margin-top .2s ease;
    pointer-events: none;
}
.addr-combo.is-open::after { transform: rotate(-135deg); margin-top: -2px; }
.addr-combo.is-disabled::after { opacity: .4; }
.addr-combo-input {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font: inherit;
    font-size: inherit;
    outline: none;
    text-overflow: ellipsis;
}
.addr-combo-input { caret-color: transparent; cursor: pointer; }
.addr-combo-input::selection { background: transparent; }
.addr-combo.is-typing .addr-combo-input { caret-color: auto; cursor: text; }
.addr-combo.is-typing .addr-combo-input::selection { background: var(--peach, var(--gold)); }
.addr-combo-input:disabled { cursor: not-allowed; }
.addr-combo-input::placeholder { color: var(--text-muted); opacity: 1; }
.addr-combo.is-focus .addr-combo-select { border-color: var(--brown-mid) !important; box-shadow: var(--focus) !important; background-color: var(--surface) !important; }
.addr-combo.is-invalid .addr-combo-select { border-color: var(--danger, #C62828) !important; }
.addr-combo-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 60;
    min-width: 100%;
    width: max-content;
    max-width: min(340px, calc(100vw - 32px));
    max-height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(43, 31, 23, .18), 0 2px 6px rgba(43, 31, 23, .06);
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #D9CFBC) transparent;
    animation: addrComboIn .14s ease-out;
}
@keyframes addrComboIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.addr-combo.is-right .addr-combo-list { left: auto; right: 0; }
.addr-combo.is-up .addr-combo-list { top: auto; bottom: calc(100% + 8px); }
.addr-combo-list[hidden] { display: none; }
.addr-combo-list li {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 9px 34px 9px 12px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.3;
    color: var(--ink);
    cursor: pointer;
}
.addr-combo-list li + li { margin-top: 1px; }
.addr-combo-list li small { font-size: 12px; color: var(--text-muted); }
.addr-combo-list li b { font-weight: 800; color: var(--ink-2); }
.addr-combo-list li:hover,
.addr-combo-list li.is-active { background: var(--cream); }
.addr-combo-list li[aria-selected="true"] .addr-combo-main { font-weight: 700; }
.addr-combo-list li[aria-selected="true"]::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 5px;
    height: 10px;
    margin-top: -7px;
    border-right: 2px solid var(--brown-mid);
    border-bottom: 2px solid var(--brown-mid);
    transform: rotate(45deg);
}
.addr-combo-list .addr-combo-head {
    padding: 6px 12px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: default;
}
.addr-combo-list .addr-combo-head:hover { background: none; }
.addr-combo-list .addr-combo-none { color: var(--text-muted); cursor: default; }
.addr-combo-list .addr-combo-none:hover { background: none; }
@media (max-width: 768px) {
    .addr-combo-input { font-size: 16px; }
    .addr-combo-list li { padding-top: 11px; padding-bottom: 11px; }
}

/* Delivery outside the delivery area (checkout and quote acceptance) */
.choice-card.is-unavailable, .quote-choice.is-unavailable { opacity: .55; cursor: not-allowed; }
.choice-card.is-unavailable *, .quote-choice.is-unavailable * { cursor: not-allowed; }
.delivery-area-note { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--warn-line); color: var(--warn-ink); font-size: 13px; line-height: 1.5; }

/* Theme switch */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; font: inherit; line-height: 1; }
.theme-toggle .icon { width: 18px; height: 18px; flex-shrink: 0; }
.theme-toggle--nav { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--on-dark); margin-right: 6px; transition: background var(--dur-fast) var(--ease-wood), color var(--dur-fast) var(--ease-wood); }
.theme-toggle--nav:hover { background: rgba(255, 255, 255, 0.16); color: var(--gold); }
.theme-toggle--side { width: 100%; justify-content: flex-start; padding: 10px 8px; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, 0.6); font-size: 14px; text-align: left; }
.theme-toggle--side:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.theme-toggle--float { position: fixed; left: 18px; bottom: 18px; z-index: 900; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); color: var(--ink); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.theme-toggle--float:hover { color: var(--accent-ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Dark mode details */
:root[data-theme="dark"] ::selection { background: rgba(217, 207, 188, 0.30); color: var(--ink); }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: var(--text-muted); }
:root[data-theme="dark"] option { background: var(--surface); color: var(--ink); }
:root[data-theme="dark"] hr { border-color: var(--border); }
:root[data-theme="dark"] .product-card-img img,
:root[data-theme="dark"] .product-thumb img { filter: brightness(0.94); }
:root[data-theme="dark"] .dg-skeleton .sk-t:not(.sk-light), :root[data-theme="dark"] .dg-skeleton .sk-m { background-image: linear-gradient(90deg, rgba(255, 255, 255, .07) 25%, rgba(255, 255, 255, .03) 40%, rgba(255, 255, 255, .07) 60%); }
:root[data-theme="dark"] .dg-skeleton :is(.sk-shadow, .sk-border, .sk-c) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }

/* Staff sidebar: light, grouped */
:root { --side-bg: var(--surface-2); --side-active: var(--surface); }
:root[data-theme="dark"] { --side-bg: var(--surface); --side-active: var(--brown-dark); }
aside.sidebar { background: var(--side-bg); color: var(--ink); border-right: 1px solid var(--border); padding-top: 18px; }
aside.sidebar .sidebar-logo { border-bottom-color: var(--border); padding-bottom: 16px; margin-bottom: 6px; }
aside.sidebar .sidebar-logo h2 { color: var(--ink); }
aside.sidebar .sidebar-logo p { color: var(--text-muted); }
aside.sidebar .sidebar-logo-mark { box-shadow: 0 0 0 1px var(--border); }
aside.sidebar .sidebar-search { position: relative; margin: 6px 14px 4px; }
aside.sidebar .sidebar-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-muted); pointer-events: none; }
aside.sidebar .sidebar-search input { width: 100%; height: 36px; padding: 0 44px 0 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
aside.sidebar .sidebar-search input::placeholder { color: var(--text-muted); }
aside.sidebar .sidebar-search input:focus { outline: none; border-color: var(--accent-ink); box-shadow: var(--focus); }
aside.sidebar .sidebar-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 600 10.5px/1 'Inter', sans-serif; color: var(--text-muted); border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; background: var(--surface-2); }
aside.sidebar .sidebar-nav .nav-glider { display: none; }
aside.sidebar .sidebar-nav .nav-group { margin: 14px 22px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
aside.sidebar .sidebar-nav .nav-group:first-child { margin-top: 8px; }
aside.sidebar .sidebar-nav a { margin: 2px 12px; padding: 9px 12px; gap: 11px; border: 1px solid transparent; border-radius: 10px; color: var(--ink-2); font-weight: 500; background: transparent; box-shadow: none; }
aside.sidebar .sidebar-nav a .icon { color: currentColor; opacity: .8; }
aside.sidebar .sidebar-nav a:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); border-color: transparent; }
aside.sidebar .sidebar-nav a.active { background: var(--side-active); color: var(--ink); font-weight: 650; border-color: var(--border); box-shadow: var(--shadow-sm); }
aside.sidebar .sidebar-nav a:hover .icon, aside.sidebar .sidebar-nav a.active .icon { opacity: 1; color: currentColor; }
aside.sidebar .sidebar-nav a[hidden], aside.sidebar .sidebar-nav .nav-group[hidden] { display: none; }
aside.sidebar .sidebar-nav .nav-empty { margin: 10px 24px; font-size: 12.5px; color: var(--text-muted); }
aside.sidebar .sidebar-foot { border-top-color: var(--border); }
aside.sidebar .sidebar-user-avatar { background: var(--gold); color: var(--on-gold); }
aside.sidebar .sidebar-user-name { color: var(--ink); }
aside.sidebar .sidebar-user-role { color: var(--accent-ink); }
aside.sidebar .sidebar-signout, aside.sidebar .theme-toggle--side { color: var(--text-muted); }
aside.sidebar .sidebar-signout:hover, aside.sidebar .theme-toggle--side:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
@media (max-width: 900px) {
    aside.sidebar { box-shadow: var(--shadow-lg); }
}
aside.sidebar { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
aside.sidebar::-webkit-scrollbar { width: 6px; }
aside.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

/* Inter headings: slightly tighter, a touch lighter than bold */
h1, h2, h3 { letter-spacing: -0.02em; }
h1 { font-weight: 600; }

/* The hidden attribute always wins over a class that sets display. */
[hidden] { display: none !important; }
