/* ==========================================================================
   PVA Market — Design System
   --------------------------------------------------------------------------
   This single stylesheet replaces the ~1,530 lines of inline CSS that used to
   live in base.html. It is a pure presentation layer: every class name here is
   one the templates and their JavaScript already use, so the markup, the Jinja
   blocks and every event handler keep working untouched.

   STATE CLASSES (toggled by base.html's JS — do not rename):
     .active     sidebar / notification-sidebar / notif-overlay / language-selector
     .open       active-orders-dropdown / dispute-bell-dropdown
     .show       sps-bd / sps-sheet
     .visible    dispute-alert-toast
     .expanded   notification-item
     .has-unread dispute-bell-btn
     .unread     notification-item

   CONTENTS
     1. Tokens            6. Sidebars
     2. Base & type       7. Notifications & toasts
     3. Bootstrap skin    8. Footer
     4. Header & nav      9. Utilities
     5. Widgets          10. Responsive
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
    /* Brand */
    --pva-primary:        #2563eb;
    --pva-primary-strong: #1d4ed8;
    --pva-primary-soft:   #dbeafe;
    --pva-accent:         #06b6d4;
    --pva-accent-strong:  #0891b2;

    /* Status */
    --pva-success: #10b981;
    --pva-warning: #f59e0b;
    --pva-danger:  #ef4444;
    --pva-info:    #0ea5e9;

    /* Neutrals (slate) */
    --pva-50:  #f8fafc;
    --pva-100: #f1f5f9;
    --pva-200: #e2e8f0;
    --pva-300: #cbd5e1;
    --pva-400: #94a3b8;
    --pva-500: #64748b;
    --pva-600: #475569;
    --pva-700: #334155;
    --pva-800: #1e293b;
    --pva-900: #0f172a;
    --pva-950: #020617;

    /* Semantic surfaces */
    --bg-primary:    var(--pva-50);
    --bg-light:      var(--pva-50);
    --surface:       #ffffff;
    --surface-2:     var(--pva-100);
    --surface-3:     var(--pva-200);
    --border:        var(--pva-200);
    --border-strong: var(--pva-300);

    /* Text */
    --text-primary:   var(--pva-900);
    --text-secondary: var(--pva-500);
    --text-muted:     var(--pva-400);
    --text-light:     #ffffff;
    --text-on-brand:  #ffffff;

    /* Legacy aliases — older inline styles still reference these */
    --primary-color:   var(--pva-primary);
    --secondary-color: var(--pva-accent);
    --primary-red:     var(--pva-danger);
    --gradient-bg:         linear-gradient(135deg, var(--pva-primary), var(--pva-accent));
    --gradient-bg-reverse: linear-gradient(135deg, var(--pva-accent), var(--pva-primary));
    --hero-bg:             linear-gradient(140deg, #1e3a8a 0%, #2563eb 45%, #0891b2 100%);
    --sidebar-bg:          linear-gradient(165deg, var(--pva-900), var(--pva-800));
    --seller-sidebar-bg:   linear-gradient(165deg, var(--pva-950), var(--pva-800));

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, .10), 0 4px 10px rgba(15, 23, 42, .05);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, .14);
    --card-shadow: var(--shadow-sm);
    --ring: 0 0 0 3px rgba(37, 99, 235, .18);

    /* Geometry */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-full: 999px;

    /* Motion */
    --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
    --t-base: 200ms cubic-bezier(.4, 0, .2, 1);
    --t-slow: 320ms cubic-bezier(.4, 0, .2, 1);
    --transition: all var(--t-base);

    /* Type */
    --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Header height, used for sticky offsets */
    --header-h: 62px;
}

/* ── Dark theme ─────────────────────────────────────────────────────────── */
body[data-theme="dark"] {
    --bg-primary:    var(--pva-950);
    --bg-light:      var(--pva-950);
    --surface:       #0b1220;
    --surface-2:     var(--pva-900);
    --surface-3:     var(--pva-800);
    --border:        #1e293b;
    --border-strong: #334155;

    --text-primary:   #e8eef8;
    --text-secondary: var(--pva-400);
    --text-muted:     var(--pva-500);

    --pva-primary:        #3b82f6;
    --pva-primary-strong: #2563eb;
    --pva-primary-soft:   #1e3a8a;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .55);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, .6);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, .7);
    --ring: 0 0 0 3px rgba(59, 130, 246, .3);

    --hero-bg: linear-gradient(140deg, #0b1220 0%, #14306b 55%, #0e4f5e 100%);
}

/* ==========================================================================
   2. BASE & TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
    background-color: var(--bg-primary);
    font-family: var(--font-sans);
    color: var(--text-primary);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-size: .95rem;
    line-height: 1.6;
    letter-spacing: -.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--t-base), color var(--t-base);
}

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text-primary);
    line-height: 1.25;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.02rem; }
h6 { font-size: .92rem; }

a { color: var(--pva-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--pva-primary-strong); }

hr { border-color: var(--border); opacity: 1; }

code, pre, .font-mono { font-family: var(--font-mono); font-size: .86em; }

::selection { background: var(--pva-primary); color: #fff; }

:focus-visible {
    outline: 2px solid var(--pva-primary);
    outline-offset: 2px;
    border-radius: var(--r-xs);
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--pva-300) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
    background: var(--pva-300);
    border-radius: var(--r-full);
    border: 2px solid transparent;
    background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--pva-400); background-clip: content-box; }
body[data-theme="dark"] *::-webkit-scrollbar-thumb { background: var(--pva-700); background-clip: content-box; }

/* ==========================================================================
   3. BOOTSTRAP SKIN
   The templates lean almost entirely on Bootstrap 5 utilities and components,
   so re-skinning these classes re-skins the whole site at once.
   ========================================================================== */
:root {
    --bs-primary:   #2563eb;
    --bs-body-bg:   var(--bg-primary);
    --bs-body-color: var(--text-primary);
    --bs-border-color: var(--border);
    --bs-border-radius:    var(--r-md);
    --bs-border-radius-sm: var(--r-sm);
    --bs-border-radius-lg: var(--r-lg);
    --bs-link-color: var(--pva-primary);
    --bs-link-hover-color: var(--pva-primary-strong);
    --bs-font-sans-serif: var(--font-sans);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    --bs-btn-border-radius: var(--r-sm);
    font-weight: 600;
    font-size: .875rem;
    letter-spacing: -.01em;
    border-radius: var(--r-sm);
    padding: .55rem 1.05rem;
    border-width: 1px;
    transition: transform var(--t-fast), box-shadow var(--t-fast),
                background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); }

.btn-sm { padding: .38rem .75rem; font-size: .8rem; border-radius: var(--r-xs); }
.btn-lg { padding: .8rem 1.6rem; font-size: 1rem; border-radius: var(--r-md); }

.btn-primary {
    background: var(--pva-primary);
    border-color: var(--pva-primary);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--pva-primary-strong);
    border-color: var(--pva-primary-strong);
    color: #fff;
    box-shadow: var(--shadow-md);
}
.btn-success { background: var(--pva-success); border-color: var(--pva-success); color: #fff; }
.btn-success:hover { background: #059669; border-color: #059669; color: #fff; }
.btn-danger  { background: var(--pva-danger); border-color: var(--pva-danger); color: #fff; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-warning { background: var(--pva-warning); border-color: var(--pva-warning); color: #1f1300; }
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-info    { background: var(--pva-info); border-color: var(--pva-info); color: #fff; }
.btn-secondary { background: var(--pva-600); border-color: var(--pva-600); color: #fff; }
.btn-secondary:hover { background: var(--pva-700); border-color: var(--pva-700); color: #fff; }
.btn-light { background: var(--surface); border-color: var(--border); color: var(--text-primary); }
.btn-light:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-primary); }
.btn-dark  { background: var(--pva-900); border-color: var(--pva-900); color: #fff; }

.btn-outline-primary {
    color: var(--pva-primary); border-color: var(--pva-primary); background: transparent;
}
.btn-outline-primary:hover { background: var(--pva-primary); border-color: var(--pva-primary); color: #fff; }
.btn-outline-secondary {
    color: var(--text-secondary); border-color: var(--border-strong); background: transparent;
}
.btn-outline-secondary:hover {
    background: var(--surface-2); border-color: var(--pva-400); color: var(--text-primary);
}
.btn-outline-danger  { color: var(--pva-danger); border-color: var(--pva-danger); background: transparent; }
.btn-outline-danger:hover { background: var(--pva-danger); color: #fff; }
.btn-outline-success { color: var(--pva-success); border-color: var(--pva-success); background: transparent; }
.btn-outline-success:hover { background: var(--pva-success); color: #fff; }
.btn-outline-light   { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); color: #fff; }

/* A gradient call-to-action, used on hero/primary actions */
.btn-gradient {
    background: var(--gradient-bg);
    border: 0; color: #fff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, .3);
}
.btn-gradient:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 10px 26px rgba(37, 99, 235, .38); }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
    overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    padding: .85rem 1.1rem;
    color: var(--text-primary);
}
.card-body   { padding: 1.1rem; }
.card-footer { background: var(--surface-2); border-top: 1px solid var(--border); padding: .8rem 1.1rem; }
.card-title  { font-weight: 700; margin-bottom: .4rem; }

/* Product-style cards lift on hover */
.product-card, .category-card, .store-card {
    cursor: pointer;
}
.product-card:hover, .category-card:hover, .store-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--pva-primary);
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-control, .form-select {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    color: var(--text-primary);
    padding: .58rem .8rem;
    font-size: .9rem;
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus, .form-select:focus {
    background: var(--surface);
    border-color: var(--pva-primary);
    box-shadow: var(--ring);
    color: var(--text-primary);
}
.form-control:disabled, .form-select:disabled,
.form-control[readonly] { background: var(--surface-2); color: var(--text-secondary); }
.form-control-sm, .form-select-sm { padding: .35rem .6rem; font-size: .82rem; border-radius: var(--r-xs); }
.form-control-lg { padding: .75rem 1rem; font-size: 1rem; border-radius: var(--r-md); }

.form-label { font-weight: 600; font-size: .82rem; color: var(--text-secondary); margin-bottom: .35rem; }
.form-text  { color: var(--text-muted); font-size: .8rem; }
.input-group-text {
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    border-radius: var(--r-sm);
    font-size: .85rem;
}
.form-check-input { border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--pva-primary); border-color: var(--pva-primary); }
.form-check-input:focus { box-shadow: var(--ring); border-color: var(--pva-primary); }
.form-switch .form-check-input { width: 2.4em; }
textarea.form-control { min-height: 90px; line-height: 1.55; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
    font-weight: 600;
    font-size: .72rem;
    letter-spacing: .01em;
    padding: .34em .68em;
    border-radius: var(--r-full);
}
.badge.bg-primary { background: var(--pva-primary) !important; }
.badge.bg-success { background: var(--pva-success) !important; }
.badge.bg-danger  { background: var(--pva-danger)  !important; }
.badge.bg-warning { background: var(--pva-warning) !important; color: #1f1300 !important; }
.badge.bg-info    { background: var(--pva-info)    !important; }
.badge.bg-secondary { background: var(--pva-500)   !important; }
.badge.bg-light   { background: var(--surface-2) !important; color: var(--text-primary) !important; }
.badge.bg-dark    { background: var(--pva-800) !important; }

/* Soft badge variants read better in dense admin tables */
.badge-soft-primary { background: var(--pva-primary-soft); color: var(--pva-primary-strong); }
.badge-soft-success { background: rgba(16,185,129,.14); color: #047857; }
.badge-soft-danger  { background: rgba(239,68,68,.14);  color: #b91c1c; }
.badge-soft-warning { background: rgba(245,158,11,.16); color: #b45309; }

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--r-md);
    padding: .8rem 1rem;
    font-size: .88rem;
    box-shadow: var(--shadow-xs);
}
.alert-success { background: rgba(16,185,129,.1);  border-color: var(--pva-success); color: #065f46; }
.alert-danger  { background: rgba(239,68,68,.1);   border-color: var(--pva-danger);  color: #991b1b; }
.alert-warning { background: rgba(245,158,11,.12); border-color: var(--pva-warning); color: #92400e; }
.alert-info    { background: rgba(14,165,233,.1);  border-color: var(--pva-info);    color: #075985; }
.alert-primary { background: var(--pva-primary-soft); border-color: var(--pva-primary); color: var(--pva-primary-strong); }
.alert-secondary { background: var(--surface-2); border-color: var(--pva-400); color: var(--text-secondary); }
body[data-theme="dark"] .alert-success { color: #6ee7b7; }
body[data-theme="dark"] .alert-danger  { color: #fca5a5; }
body[data-theme="dark"] .alert-warning { color: #fcd34d; }
body[data-theme="dark"] .alert-info    { color: #7dd3fc; }
body[data-theme="dark"] .alert-primary { color: #93c5fd; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    color: var(--text-primary);
    border-color: var(--border);
    font-size: .875rem;
    margin-bottom: 0;
}
.table > thead > tr > th {
    background: var(--surface-2);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border);
    padding: .7rem .8rem;
    white-space: nowrap;
}
.table > tbody > tr > td {
    padding: .7rem .8rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { background: var(--surface-2); color: var(--text-primary); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(148,163,184,.05); color: var(--text-primary); }
.table-responsive {
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    overflow-x: auto;
}
.table-responsive > .table { border-radius: 0; }

/* ── Modals & offcanvas ─────────────────────────────────────────────────── */
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.modal-header { border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; }
.modal-title  { font-weight: 700; font-size: 1.02rem; }
.modal-body   { padding: 1.25rem; }
.modal-footer { border-top: 1px solid var(--border); padding: .9rem 1.25rem; }
.modal-backdrop.show { opacity: .55; }
body[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination { gap: 4px; }
.page-link {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: var(--r-sm) !important;
    font-weight: 600;
    font-size: .84rem;
    padding: .42rem .75rem;
    transition: var(--transition);
}
.page-link:hover { background: var(--surface-2); color: var(--pva-primary); border-color: var(--border-strong); }
.page-item.active .page-link {
    background: var(--pva-primary);
    border-color: var(--pva-primary);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.page-item.disabled .page-link { background: var(--surface-2); color: var(--text-muted); opacity: .6; }

/* ── Tabs, dropdowns, misc ──────────────────────────────────────────────── */
.nav-tabs { border-bottom: 1px solid var(--border); gap: 2px; }
.nav-tabs .nav-link {
    border: 0; border-bottom: 2px solid transparent;
    color: var(--text-secondary); font-weight: 600; font-size: .875rem;
    border-radius: var(--r-sm) var(--r-sm) 0 0; padding: .6rem .95rem;
}
.nav-tabs .nav-link:hover { color: var(--pva-primary); background: var(--surface-2); }
.nav-tabs .nav-link.active {
    color: var(--pva-primary); background: transparent; border-bottom-color: var(--pva-primary);
}
.nav-pills .nav-link { border-radius: var(--r-full); font-weight: 600; font-size: .85rem; color: var(--text-secondary); }
.nav-pills .nav-link.active { background: var(--pva-primary); color: #fff; }

.dropdown-menu {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: .35rem;
    font-size: .875rem;
}
.dropdown-item { border-radius: var(--r-xs); color: var(--text-primary); padding: .5rem .7rem; font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--pva-primary); }
.dropdown-divider { border-color: var(--border); }

.progress { background: var(--surface-3); border-radius: var(--r-full); height: .55rem; }
.progress-bar { background: var(--gradient-bg); }

.list-group-item {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text-primary);
    padding: .7rem .9rem;
}
.list-group-item:first-child { border-top-left-radius: var(--r-md); border-top-right-radius: var(--r-md); }
.list-group-item:last-child  { border-bottom-left-radius: var(--r-md); border-bottom-right-radius: var(--r-md); }

.tooltip-inner { background: var(--pva-900); border-radius: var(--r-sm); font-size: .78rem; padding: .4rem .6rem; }
.accordion-item { background: var(--surface); border-color: var(--border); }
.accordion-button { background: var(--surface); color: var(--text-primary); font-weight: 600; }
.accordion-button:not(.collapsed) { background: var(--pva-primary-soft); color: var(--pva-primary-strong); box-shadow: none; }
.accordion-button:focus { box-shadow: var(--ring); border-color: var(--pva-primary); }

/* Bootstrap text/background helpers retuned to the palette */
.text-muted   { color: var(--text-secondary) !important; }
.text-primary { color: var(--pva-primary) !important; }
.text-success { color: var(--pva-success) !important; }
.text-danger  { color: var(--pva-danger)  !important; }
.text-warning { color: var(--pva-warning) !important; }
.text-info    { color: var(--pva-info)    !important; }
.text-dark    { color: var(--text-primary) !important; }
.bg-light     { background-color: var(--surface-2) !important; }
.bg-white     { background-color: var(--surface) !important; }
.bg-dark      { background-color: var(--pva-900) !important; }
.border       { border-color: var(--border) !important; }
.border-top, .border-bottom, .border-start, .border-end { border-color: var(--border) !important; }
.shadow-sm    { box-shadow: var(--shadow-sm) !important; }
.shadow       { box-shadow: var(--shadow-md) !important; }
.shadow-lg    { box-shadow: var(--shadow-lg) !important; }
.rounded      { border-radius: var(--r-md) !important; }
.rounded-3    { border-radius: var(--r-lg) !important; }
.rounded-pill { border-radius: var(--r-full) !important; }

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */

/* ── Thin utility bar ───────────────────────────────────────────────────── */
.top-nav {
    background: var(--pva-900);
    padding: 0;
    font-size: 12.5px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.top-nav .container { min-height: 34px; }
.top-nav a {
    color: rgba(255, 255, 255, .72);
    font-weight: 500;
    padding: 6px 0;
    transition: color var(--t-fast);
}
.top-nav a:hover { color: #fff; }

.top-nav-links  { display: flex; align-items: center; gap: 18px; }
.top-nav-buttons {
    display: flex; gap: 8px; align-items: center;
    margin-left: 4px; padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}
.top-nav-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px;
    border-radius: var(--r-full);
    font-size: 12px; font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}
.top-nav-btn i { font-size: 11px; }
.top-nav-btn-signin {
    color: rgba(255, 255, 255, .9) !important;
    border: 1px solid rgba(255, 255, 255, .25);
}
.top-nav-btn-signin:hover { background: rgba(255, 255, 255, .12); color: #fff !important; }
.top-nav-btn-signup {
    background: var(--gradient-bg);
    color: #fff !important;
    border: 1px solid transparent;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .35);
}
.top-nav-btn-signup:hover { filter: brightness(1.1); color: #fff !important; }

/* ── Main header ────────────────────────────────────────────────────────── */
.main-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
    backdrop-filter: saturate(180%) blur(8px);
}
body[data-theme="dark"] .main-navbar { background: rgba(11, 18, 32, .92); }

.logo-text {
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -.035em;
    color: var(--text-primary);
    line-height: 1;
}
.logo-vip {
    background: var(--gradient-bg);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.catalog-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--pva-primary);
    color: #fff;
    border: 0;
    padding: .5rem .95rem;
    border-radius: var(--r-sm);
    font-weight: 600; font-size: .85rem;
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}
.catalog-btn:hover { background: var(--pva-primary-strong); color: #fff; box-shadow: var(--shadow-md); }

/* ── Search ─────────────────────────────────────────────────────────────── */
.search-container form {
    position: relative;
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
    overflow: hidden;
}
.search-container form:focus-within {
    border-color: var(--pva-primary);
    box-shadow: var(--ring);
    background: var(--surface);
}
.search-input,
.search-container .form-control.search-input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: .55rem .5rem .55rem 1.05rem;
    font-size: .88rem;
    color: var(--text-primary);
    flex: 1 1 auto;
    min-width: 0;
}
.search-input:focus { box-shadow: none !important; outline: 0; }
.search-btn {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 0 1rem 0 .6rem;
    display: flex; align-items: center;
    transition: color var(--t-fast);
}
.search-btn:hover { color: var(--pva-primary); }

/* ── Header action buttons (Active orders / bell / top-up) ──────────────── */
.active-orders-btn,
.dispute-bell-btn,
.navbar-topup-btn,
.user-dropdown-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 38px;
    padding: 0 .8rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600; font-size: .82rem;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: var(--transition);
}
.active-orders-btn:hover,
.dispute-bell-btn:hover,
.user-dropdown-btn:hover {
    background: var(--surface-2);
    border-color: var(--pva-primary);
    color: var(--pva-primary);
}

/* ── Floating action toggles ────────────────────────────────────────────────
   These four are FIXED circular buttons pinned to the viewport corners, not
   inline header buttons. The JS opens the sidebars/panels they control, so
   their positions must stay stable.
   ------------------------------------------------------------------------ */
.menu-toggle,
.seller-menu-toggle,
.notification-toggle,
.translate-toggle {
    position: fixed;
    z-index: 2500;
    top: 15px;
    width: 40px; height: 40px;
    padding: 0; margin: 0;
    border-radius: var(--r-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; line-height: 1;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    box-sizing: border-box;
    overflow: visible;
    -webkit-appearance: none; appearance: none;
    transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
}
.menu-toggle:hover,
.seller-menu-toggle:hover,
.notification-toggle:hover,
.translate-toggle:hover {
    transform: scale(1.08);
    box-shadow: var(--shadow-xl);
    filter: brightness(1.08);
    color: #fff;
}
.menu-toggle          { right: 15px; background: var(--gradient-bg); }
.seller-menu-toggle   { right: 15px; top: 65px; background: linear-gradient(135deg, #f59e0b, #ea580c); }
.translate-toggle     { left: 15px;  top: 65px; background: linear-gradient(135deg, var(--pva-600), var(--pva-800)); }
.notification-toggle  { left: 15px;  top: 115px; background: linear-gradient(135deg, var(--pva-primary), var(--pva-accent)); }

/* Bootstrap's .btn utilities are also applied to .menu-toggle in the markup —
   neutralise the parts that would fight the circular fixed layout. */
.menu-toggle.btn, .seller-menu-toggle.btn,
.notification-toggle.btn, .translate-toggle.btn {
    padding: 0;
    width: 40px; height: 40px;
    border-radius: var(--r-full);
}

@media (max-width: 767.98px) {
    .menu-toggle, .seller-menu-toggle,
    .notification-toggle, .translate-toggle {
        width: 36px; height: 36px; font-size: .9rem;
    }
    .menu-toggle.btn, .seller-menu-toggle.btn,
    .notification-toggle.btn, .translate-toggle.btn { width: 36px; height: 36px; }
    .menu-toggle         { right: 10px; top: 10px; }
    .seller-menu-toggle  { right: 10px; top: 56px; }
    .translate-toggle    { left: auto; right: 10px; top: 102px; }
    .notification-toggle { left: auto; right: 10px; top: 148px; }
}
.navbar-topup-btn {
    background: var(--gradient-bg);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, .3);
}
.navbar-topup-btn:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 4px 16px rgba(37, 99, 235, .4); }

/* Bell attention state (JS toggles .has-unread) */
.dispute-bell-btn.has-unread {
    border-color: var(--pva-danger);
    color: var(--pva-danger);
    animation: pva-bell-pulse 2s ease-in-out infinite;
}
@keyframes pva-bell-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .4); }
    50%      { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* Counters */
.active-orders-badge,
.dispute-bell-badge,
.notification-badge,
.sidebar-notification-badge,
.dispute-toast-badge {
    position: absolute;
    top: -6px; right: -6px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: var(--r-full);
    background: var(--pva-danger);
    color: #fff;
    font-size: 10.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
    line-height: 1;
    z-index: 2;
}
.active-orders-badge { background: var(--pva-warning); color: #1f1300; }
.sidebar-notification-badge { position: static; border: 0; margin-left: auto; }

/* ==========================================================================
   5. WIDGETS — dropdown panels
   ========================================================================== */
#active-orders-wrap, #dispute-bell-wrap { position: relative; }

.active-orders-dropdown,
.dispute-bell-dropdown {
    display: none;                 /* JS adds .open */
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(370px, calc(100vw - 24px));
    max-height: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1200;
    overflow: hidden;
    animation: pva-pop var(--t-base);
}
.active-orders-dropdown.open,
.dispute-bell-dropdown.open { display: block; }

@keyframes pva-pop {
    from { opacity: 0; transform: translateY(-6px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.aod-header, .dbd-header {
    padding: .8rem 1rem;
    font-weight: 700; font-size: .85rem;
    color: #fff;
    background: var(--gradient-bg);
    display: flex; align-items: center;
}
.aod-loading, .dbd-loading,
.aod-empty,   .dbd-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: .85rem;
}
.aod-empty i, .dbd-empty i { font-size: 1.8rem; opacity: .3; display: block; margin-bottom: .5rem; }

#active-orders-list, #dispute-bell-list { max-height: 320px; overflow-y: auto; }

.aod-section-title {
    padding: .5rem 1rem .3rem;
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
    background: var(--surface-2);
}
.aod-item, .dbd-item {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color var(--t-fast);
    color: var(--text-primary);
    position: relative;
}
.aod-item:hover, .dbd-item:hover { background: var(--surface-2); }
.aod-item:last-child, .dbd-item:last-child { border-bottom: 0; }

.aod-item-icon, .dbd-item-icon {
    flex: 0 0 32px; width: 32px; height: 32px;
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: .82rem; color: #fff;
    background: var(--pva-500);
}
.aod-icon-dispute  { background: var(--pva-danger); }
.aod-icon-manual   { background: var(--pva-info); }
.aod-icon-overdue  { background: var(--pva-warning); color: #1f1300; }

.aod-item-body  { flex: 1 1 auto; min-width: 0; }
.aod-item-title, .dbd-item-title {
    font-weight: 600; font-size: .84rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aod-item-meta, .dbd-item-meta, .dbd-item-time {
    font-size: .74rem; color: var(--text-secondary); margin-top: 2px;
}
.aod-item-arrow { color: var(--text-muted); font-size: .75rem; align-self: center; }
.dbd-unread-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--pva-primary); flex: 0 0 8px; align-self: center;
}

.aod-footer, .dbd-footer {
    display: flex; border-top: 1px solid var(--border); background: var(--surface-2);
}
.aod-footer a, .dbd-footer a {
    flex: 1; text-align: center; padding: .65rem .5rem;
    font-size: .78rem; font-weight: 600; color: var(--text-secondary);
    transition: var(--transition);
}
.aod-footer a:hover, .dbd-footer a:hover { background: var(--surface-3); color: var(--pva-primary); }
.aod-footer-disputes:hover { color: var(--pva-danger); }
.aod-footer-manual:hover   { color: var(--pva-info); }
.aod-footer a + a, .dbd-footer a + a { border-left: 1px solid var(--border); }

/* ==========================================================================
   6. SIDEBARS
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 260px; height: 100vh;
    background: var(--sidebar-bg);
    color: #fff;
    z-index: 1250;
    transform: translateX(-100%);
    transition: transform var(--t-slow);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.sidebar.active { transform: translateX(0); }        /* JS toggles .active */
.seller-sidebar { background: var(--seller-sidebar-bg); }

.sidebar-content { flex: 1; overflow-y: auto; padding: 1rem .75rem 1.5rem; }
.sidebar-close-btn {
    position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px;
    border: 0; border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .1);
    color: #fff; cursor: pointer; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.sidebar-close-btn:hover { background: rgba(255, 255, 255, .2); }

.user-profile {
    display: flex; flex-direction: column; align-items: center;
    gap: .55rem; padding: 1.4rem .75rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: .8rem; text-align: center;
}
.user-avatar {
    width: 60px; height: 60px; border-radius: var(--r-full);
    background: var(--gradient-bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
    overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar-small {
    width: 34px; height: 34px; border-radius: var(--r-full);
    object-fit: cover; border: 2px solid var(--border);
    background: var(--gradient-bg);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: .8rem;
}
.user-info { color: #fff; font-size: .85rem; line-height: 1.35; }
.user-info strong, .user-info .fw-bold { color: #fff; }
.user-info small, .user-info .text-muted { color: rgba(255, 255, 255, .6) !important; }

.sidebar .nav-item { list-style: none; margin-bottom: 2px; }
.sidebar .nav-link {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .8rem;
    border-radius: var(--r-sm);
    color: rgba(255, 255, 255, .78);
    font-size: .855rem; font-weight: 500;
    transition: var(--transition);
}
.sidebar .nav-link i { width: 18px; text-align: center; font-size: .9rem; opacity: .9; }
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    transform: translateX(2px);
}
.sidebar .nav-link.active {
    background: var(--pva-primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .4);
}

.sidebar-action-buttons { display: flex; flex-direction: column; gap: .5rem; padding: .8rem .25rem 0; }
.sidebar-action-btn {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .6rem .8rem;
    border-radius: var(--r-sm);
    font-size: .82rem; font-weight: 600;
    border: 1px solid transparent; cursor: pointer;
    transition: var(--transition);
}
.sidebar-action-btn-primary { background: var(--gradient-bg); color: #fff; }
.sidebar-action-btn-primary:hover { filter: brightness(1.1); color: #fff; }
.sidebar-action-btn-secondary {
    background: rgba(255, 255, 255, .1);
    color: #fff; border-color: rgba(255, 255, 255, .18);
}
.sidebar-action-btn-secondary:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* ── Notification sidebar ───────────────────────────────────────────────── */
.notification-sidebar {
    position: fixed; top: 0; right: 0;
    width: min(380px, 100vw); height: 100vh;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    z-index: 1300;
    transform: translateX(100%);
    transition: transform var(--t-slow);
    display: flex; flex-direction: column;
}
.notification-sidebar.active { transform: translateX(0); }

.notif-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(2px);
    z-index: 1290;
    opacity: 0; visibility: hidden;
    transition: opacity var(--t-base), visibility var(--t-base);
}
.notif-overlay.active { opacity: 1; visibility: visible; }

.notif-header {
    padding: 1rem 1.1rem;
    background: var(--gradient-bg);
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: .95rem;
    flex: 0 0 auto;
}
.notif-header button { background: transparent; border: 0; color: #fff; cursor: pointer; font-size: 1rem; }

.notification-item {
    padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color var(--t-fast);
    position: relative;
}
.notification-item:hover { background: var(--surface-2); }
.notification-item.unread { background: var(--pva-primary-soft); }
.notification-item.unread::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--pva-primary);
}
body[data-theme="dark"] .notification-item.unread { background: rgba(59, 130, 246, .1); }

.notif-title   { font-weight: 600; font-size: .85rem; margin-bottom: 2px; }
.notif-message {
    font-size: .8rem; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-clamp: 2; overflow: hidden;
}
.notification-item.expanded .notif-message {
    -webkit-line-clamp: unset; line-clamp: unset; overflow: visible;
}
.notif-time { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }
.notif-actions { display: none; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }
.notification-item.expanded .notif-actions { display: flex; }
.notif-action-btn {
    padding: .3rem .65rem; border-radius: var(--r-xs);
    font-size: .74rem; font-weight: 600;
    border: 1px solid var(--border-strong); background: var(--surface);
    color: var(--text-primary); cursor: pointer; transition: var(--transition);
}
.notif-action-btn:hover { background: var(--pva-primary); border-color: var(--pva-primary); color: #fff; }
.notif-empty { padding: 3rem 1rem; text-align: center; color: var(--text-secondary); font-size: .85rem; }
.notif-empty i { font-size: 2.2rem; opacity: .25; display: block; margin-bottom: .6rem; }

/* ── Language selector ──────────────────────────────────────────────────────
   MUST be position:fixed. The panel is a direct child of <body>, NOT of
   .translate-toggle, so `position:absolute` resolves against the page box and
   `top:calc(100% + 8px)` drops it below the entire document — the button then
   appears to do nothing. It is pinned next to the fixed .translate-toggle
   (left:15px, top:65px) instead, clear of .notification-toggle below it.
   -------------------------------------------------------------------------- */
.language-selector {
    display: none;
    position: fixed; top: 62px; left: 64px; right: auto;
    width: 240px; max-height: min(360px, calc(100vh - 90px));
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xl);
    z-index: 2600;          /* above the .translate-toggle (2500) that opens it */
    padding: .35rem;
}
.language-selector.active { display: block; animation: pva-pop var(--t-base); }
.language-option {
    display: flex; align-items: center; gap: .55rem;
    padding: .5rem .65rem; border-radius: var(--r-xs);
    font-size: .84rem; color: var(--text-primary);
    cursor: pointer; transition: var(--transition);
}
.language-option:hover { background: var(--surface-2); color: var(--pva-primary); }
.language-option.active { background: var(--pva-primary); color: #fff; }
.language-option i { width: 20px; text-align: center; color: var(--pva-primary); }

@media (max-width: 767.98px) {
    /* toggles move to the right edge on phones — drop the panel below them
       and let it span the width so the language names stay readable */
    .language-selector {
        top: 146px; left: 12px; right: 12px; width: auto;
        max-height: calc(100vh - 170px);
    }
}

/* ── Google Translate's injected chrome ─────────────────────────────────────
   The widget is initialised with layout SIMPLE and driven entirely by this
   site's own .language-selector, so its gadget is hidden. Keep
   #google_translate_element hidden: without it the gadget renders a stray
   full-width strip at the bottom of every page.
   -------------------------------------------------------------------------- */
#google_translate_element { display: none !important; }
iframe.goog-te-banner-frame { display: none !important; }
.goog-te-gadget, .goog-te-gadget-simple { display: none !important; }
.goog-te-menu-value { display: none !important; }
.goog-te-menu-frame {
    box-shadow: var(--shadow-xl) !important;
    border: 0 !important;
    border-radius: var(--r-md) !important;
}
body { top: 0 !important; }
.skiptranslate { display: none !important; }

/* ==========================================================================
   7. TOASTS
   ========================================================================== */
.dispute-alert-toast {
    position: fixed; bottom: 20px; right: 20px;
    width: min(330px, calc(100vw - 32px));
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--pva-danger);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xl);
    z-index: 1400;
    padding: .85rem 1rem;
    opacity: 0; visibility: hidden;
    transform: translateY(14px);
    transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
    pointer-events: none;
}
.dispute-alert-toast.visible {
    opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.dispute-toast-header {
    display: flex; align-items: center; gap: .45rem;
    font-weight: 700; font-size: .84rem; color: var(--pva-danger);
    margin-bottom: .35rem;
}
.dispute-toast-close {
    margin-left: auto; background: transparent; border: 0;
    color: var(--text-muted); cursor: pointer; font-size: .95rem; line-height: 1;
}
.dispute-toast-close:hover { color: var(--text-primary); }
.dispute-toast-product { font-weight: 600; font-size: .82rem; margin-bottom: 2px; }
.dispute-toast-preview {
    font-size: .78rem; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-clamp: 2; overflow: hidden;
}
.dispute-toast-time { font-size: .72rem; color: var(--text-muted); margin-top: .3rem; }
.dispute-toast-btn {
    display: inline-block; margin-top: .55rem;
    padding: .32rem .7rem; border-radius: var(--r-xs);
    background: var(--pva-danger); color: #fff;
    font-size: .76rem; font-weight: 600; border: 0; cursor: pointer;
}
.dispute-toast-btn:hover { background: #dc2626; color: #fff; }

/* ==========================================================================
   8. SELLER PROMO SHEET (sps-*) — bottom sheet on mobile, dialog on desktop
   NOTE: the backdrop and sheet MUST keep pointer-events:none while hidden or
   they silently swallow clicks over the middle of the page.
   ========================================================================== */
.sps-bd {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    z-index: 1450;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--t-base), visibility var(--t-base);
}
.sps-bd.show { opacity: 1; visibility: visible; pointer-events: auto; }

.sps-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    max-height: 88vh; overflow-y: auto;
    background: var(--surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: var(--shadow-xl);
    z-index: 1460;
    transform: translateY(100%);
    transition: transform var(--t-slow), opacity var(--t-base);
    pointer-events: none;
    padding: 0 1.1rem 1.4rem;
}
.sps-sheet.show { transform: translateY(0); pointer-events: auto; }

.sps-grip {
    width: 40px; height: 4px; border-radius: var(--r-full);
    background: var(--border-strong);
    margin: .7rem auto .9rem;
}
.sps-head { font-weight: 800; font-size: 1.02rem; margin-bottom: .2rem; }
.sps-sub  { font-size: .82rem; color: var(--text-secondary); margin-bottom: .9rem; }
.sps-x {
    position: absolute; top: .8rem; right: 1rem;
    background: transparent; border: 0; color: var(--text-muted);
    font-size: 1.1rem; cursor: pointer;
}
.sps-pkgs { display: grid; gap: .6rem; margin-bottom: .9rem; }
.sps-pkg {
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: .8rem .9rem;
    cursor: pointer; position: relative;
    transition: var(--transition);
    background: var(--surface);
}
.sps-pkg:hover { border-color: var(--pva-primary); background: var(--surface-2); }
.sps-pkg.active { border-color: var(--pva-primary); background: var(--pva-primary-soft); box-shadow: var(--ring); }
.sps-pkg.best  { border-color: var(--pva-warning); }
.sps-tag {
    position: absolute; top: -9px; right: 10px;
    background: var(--pva-warning); color: #1f1300;
    font-size: .66rem; font-weight: 800;
    padding: .12rem .5rem; border-radius: var(--r-full);
    text-transform: uppercase; letter-spacing: .04em;
}
.sps-summary {
    background: var(--surface-2);
    border-radius: var(--r-md);
    padding: .7rem .85rem; font-size: .82rem;
    margin-bottom: .8rem;
}
.sps-bal  { font-weight: 700; }
.sps-note { font-size: .76rem; color: var(--text-secondary); margin-top: .5rem; }
.sps-warn { color: var(--pva-warning); font-size: .8rem; font-weight: 600; }
.sps-go {
    width: 100%; padding: .75rem 1rem;
    border: 0; border-radius: var(--r-sm);
    background: var(--gradient-bg); color: #fff;
    font-weight: 700; font-size: .9rem; cursor: pointer;
    transition: var(--transition);
}
.sps-go:hover { filter: brightness(1.08); }
.sps-go:disabled { opacity: .55; cursor: not-allowed; }
.sps-result { margin-top: .7rem; font-size: .84rem; }
.sps-result.ok  { color: var(--pva-success); }
.sps-result.err { color: var(--pva-danger); }

@media (min-width: 768px) {
    .sps-sheet {
        left: 50%; right: auto; bottom: auto; top: 50%;
        width: min(460px, 92vw);
        border-radius: var(--r-xl);
        transform: translate(-50%, -50%) scale(.94);
        opacity: 0;
    }
    .sps-sheet.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .sps-grip { display: none; }
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
footer {
    background: var(--pva-950);
    color: rgba(255, 255, 255, .72);
    padding: 2.4rem 0 1.4rem;
    margin-top: 3rem;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.footer-main {
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: .7rem 1.2rem;
    padding-bottom: 1.2rem;
}
.footer-logo-text {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: 1.16rem; font-weight: 800;
    color: #fff; letter-spacing: -.03em;
    margin-right: auto;
}
.footer-logo-text:hover { color: #fff; opacity: .9; }
.footer-logo-text i { color: var(--pva-accent); }

.footer-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; align-items: center; }
.footer-link {
    color: rgba(255, 255, 255, .68);
    font-size: .84rem; font-weight: 500;
    transition: color var(--t-fast);
}
.footer-link:hover { color: #fff; }

.contact-support-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .45rem .9rem;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: .8rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: var(--transition);
}
.contact-support-btn:hover { background: rgba(255, 255, 255, .18); color: #fff; transform: translateY(-1px); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding-top: 1rem; margin-top: .6rem;
    text-align: center;
}
.footer-copyright { font-size: .78rem; color: rgba(255, 255, 255, .5); margin: 0; }

.bd-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: .6rem; padding: .6rem .8rem;
    border: 1px solid var(--border); border-radius: var(--r-sm);
    margin-bottom: .45rem; background: var(--surface);
}
.bd-url { font-family: var(--font-mono); font-size: .82rem; word-break: break-all; color: var(--pva-primary); }

.store-badge {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .18rem .5rem; border-radius: var(--r-full);
    font-size: .7rem; font-weight: 700;
    background: var(--pva-primary-soft); color: var(--pva-primary-strong);
}

/* ==========================================================================
   10. UTILITIES & PAGE FURNITURE
   ========================================================================== */
.pva-hero {
    background: var(--hero-bg);
    color: #fff;
    border-radius: var(--r-xl);
    padding: clamp(1.6rem, 1rem + 3vw, 3.2rem);
    position: relative;
    overflow: hidden;
}
.pva-hero::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 82% 18%, rgba(255,255,255,.16), transparent 55%);
    pointer-events: none;
}
.pva-hero h1, .pva-hero h2, .pva-hero p { color: #fff; position: relative; z-index: 1; }

.pva-section-title {
    display: flex; align-items: center; gap: .6rem;
    font-size: 1.1rem; font-weight: 800; margin-bottom: 1rem;
}
.pva-section-title::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.pva-empty {
    text-align: center; padding: 3rem 1rem; color: var(--text-secondary);
}
.pva-empty i { font-size: 2.6rem; opacity: .25; display: block; margin-bottom: .8rem; }

.pva-skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
    background-size: 400% 100%;
    animation: pva-shimmer 1.4s ease infinite;
    border-radius: var(--r-sm);
}
@keyframes pva-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.dark-mode { color-scheme: dark; }

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

/* Keep wide content from breaking the page on phones */
pre, code { white-space: pre-wrap; word-break: break-word; }

/* ==========================================================================
   11. RESPONSIVE
   ========================================================================== */
@media (max-width: 991.98px) {
    .search-container { order: 3; flex: 1 0 100%; margin: .55rem 0 0 !important; max-width: 100% !important; }
    .main-navbar .container { flex-wrap: wrap; }
}

@media (max-width: 767.98px) {
    body { font-size: .9rem; }
    .top-nav { font-size: 11.5px; }
    .top-nav-links { gap: 10px; }
    .top-nav-buttons { margin-left: 2px; padding-left: 8px; }
    .logo-text { font-size: 1.12rem; }
    .catalog-btn span { display: none; }
    .catalog-btn { padding: .5rem .7rem; }

    .active-orders-dropdown, .dispute-bell-dropdown {
        position: fixed;
        top: auto; bottom: 0; left: 0; right: 0;
        width: 100%; max-height: 76vh;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
    }

    footer { padding: 1.8rem 0 1.2rem; margin-top: 2rem; }
    .footer-main { flex-direction: column; text-align: center; }
    .footer-logo-text { margin-right: 0; }
    .footer-nav { justify-content: center; }

    /* Dense admin tables become stacked cards where the template provides labels */
    .table-stack thead { display: none; }
    .table-stack tbody tr {
        display: block; margin-bottom: .7rem;
        border: 1px solid var(--border); border-radius: var(--r-md);
        background: var(--surface); padding: .3rem .6rem;
    }
    .table-stack tbody td {
        display: flex; justify-content: space-between; gap: 1rem;
        border: 0; border-bottom: 1px solid var(--border); padding: .5rem .2rem;
    }
    .table-stack tbody tr td:last-child { border-bottom: 0; }
    .table-stack tbody td::before {
        content: attr(data-label);
        font-weight: 700; font-size: .74rem;
        color: var(--text-secondary); text-transform: uppercase;
        letter-spacing: .04em;
    }
}

@media (max-width: 575.98px) {
    .modal-content { border-radius: var(--r-lg); }
    .btn { padding: .5rem .9rem; }
    .card-body { padding: .9rem; }
}

@media print {
    .top-nav, .main-navbar, footer, .sidebar, .notification-sidebar,
    .dispute-alert-toast, .sps-bd, .sps-sheet { display: none !important; }
    body { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
