/* ============================================================================
 * المتجر — نظام التصميم الجديد (مستوحى من أسلوب المتاجر الرقمية العربية الحديثة)
 * الوضع الافتراضي: فاتح (Light) — ويمكن التبديل إلى الداكن ويُحفظ الاختيار.
 * يُحمَّل بعد app.css ويعيد تعريف المكونات الأمامية دون المساس بلوحة الإدارة.
 * ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
    --navy: #0F172A;
    --navy-2: #1E293B;
    --royal: #2563EB;
    --royal-hover: #1D4ED8;
    --gold: #EAB308;
    --gold-2: #F59E0B;
    --gold-soft: #FEF9C3;
    --page-bg: #F4F6F9;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    --surface-inset: #EEF2F7;
    --line: #E2E8F0;
    --line-strong: #CBD5E1;

    --text-strong: #0F172A;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-dim: #94A3B8;
    --on-navy: #F8FAFC;

    /* Re-define the legacy app.css aliases so every inherited component flips too */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-glow: rgba(37, 99, 235, 0.28);
    --primary-deep: #0F172A;
    --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    --primary-gradient-hover: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);

    --bg-main: #F4F6F9;
    --bg-surface: #FFFFFF;
    --bg-darker: #E9EDF3;

    --glass-bg: #FFFFFF;
    --glass-bg-hover: #F8FAFC;
    --glass-bg-active: #EEF2F7;
    --glass-bg-subtle: #F8FAFC;
    --glass-border: #E2E8F0;
    --glass-border-hover: #CBD5E1;
    --glass-blur: none;
    --glass-shadow: 0 6px 24px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.05);
    --glass-shadow-hover: 0 14px 40px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);

    --text-white: #0F172A;
    --text-light: #1E293B;
    --text-muted-legacy: #64748B;

    --status-success: #059669;
    --status-success-bg: #ECFDF5;
    --status-warning: #D97706;
    --status-warning-bg: #FFFBEB;
    --status-danger: #DC2626;
    --status-danger-bg: #FEF2F2;
    --status-info: #2563EB;
    --status-info-bg: #EFF6FF;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 22px;

    --shadow-card: 0 6px 24px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-pop: 0 24px 70px rgba(15, 23, 42, 0.22);
    --header-h: 62px;
}

html[data-theme="dark"] {
    --page-bg: #0B1120;
    --surface: #111A2E;
    --surface-2: #16203A;
    --surface-inset: #1B2742;
    --line: #22304E;
    --line-strong: #33415C;

    --text-strong: #F1F5F9;
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    --on-navy: #F8FAFC;

    --bg-main: #0B1120;
    --bg-surface: #111A2E;
    --bg-darker: #060B18;

    --glass-bg: #111A2E;
    --glass-bg-hover: #16203A;
    --glass-bg-active: #1B2742;
    --glass-bg-subtle: #16203A;
    --glass-border: #22304E;
    --glass-border-hover: #33415C;
    --glass-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
    --glass-shadow-hover: 0 16px 44px rgba(0, 0, 0, 0.55);

    --text-white: #F1F5F9;
    --text-light: #E2E8F0;

    --status-success-bg: rgba(16, 185, 129, 0.14);
    --status-warning-bg: rgba(245, 158, 11, 0.14);
    --status-danger-bg: rgba(239, 68, 68, 0.14);
    --status-info-bg: rgba(59, 130, 246, 0.14);

    --shadow-card: 0 10px 34px rgba(0, 0, 0, 0.45);
    --shadow-pop: 0 28px 80px rgba(0, 0, 0, 0.6);
}

/* ---------------------------------------------------------------- 2. Base */
body {
    background-color: var(--page-bg) !important;
    background-image: none !important;
    color: var(--text-main);
}

/* ELITE keeps dark mode on html[data-elite-mode], not data-theme — honour it. */
html[data-elite-mode="dark"] body {
    background-color: var(--elite-page-bg, #0B1120) !important;
}

::selection { background: rgba(37, 99, 235, 0.22); color: var(--navy); }

.animated-red-glass-glow, .admin-glow-orb { display: none !important; }

.container { width: min(1200px, 100% - 28px); margin-inline: auto; }
main.page-wrapper { flex: 1 0 auto; padding: 18px 0 40px; }

.glass-card {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
    color: var(--text-main);
}
.glass-card::before { display: none !important; }

.page-title, .account-heading h1, h1, h2, h3 { color: var(--text-strong); }
[style*="color: #fff"], [style*="color:#fff"], [style*="color: #ffffff"], [style*="color:#ffffff"],
[style*="color: #f7f7f8"], [style*="color: #e5e7eb"], [style*="color: #f3f4f6"], [style*="color:#f3f4f6"],
[style*="color: #cbd5e1"], [style*="color: #e2e8f0"] { color: var(--text-strong) !important; }
[style*="background: rgba(0,0,0"], [style*="background:rgba(0,0,0"], [style*="background: rgba(0, 0, 0"], [style*="background:rgba(0, 0, 0"] {
    background: var(--surface-inset) !important;
}

/* ---------------------------------------------------- 3. Buttons & chips */
.btn { border-radius: var(--radius-md); font-weight: 700; letter-spacing: 0; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--royal) !important; border: 1px solid var(--royal) !important; color: #fff !important; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35); }
.btn-primary:hover { background: var(--royal-hover) !important; border-color: var(--royal-hover) !important; box-shadow: 0 10px 26px rgba(37, 99, 235, 0.42); }
.btn-secondary { background: var(--surface-2) !important; border: 1px solid var(--line) !important; color: var(--text-strong) !important; box-shadow: none; }
.btn-secondary:hover { border-color: var(--line-strong) !important; background: var(--surface-inset) !important; }
.btn-navy { background: var(--navy) !important; border: 1px solid var(--navy) !important; color: #fff !important; box-shadow: 0 10px 26px rgba(15, 23, 42, 0.35); }
.btn-navy:hover { background: var(--navy-2) !important; border-color: var(--navy-2) !important; }
.btn-gold { background: linear-gradient(135deg, #FDE047, var(--gold) 55%, var(--gold-2)) !important; border: 1px solid #D69E06 !important; color: #422006 !important; box-shadow: 0 8px 22px rgba(234, 179, 8, 0.4); }
.btn-block { width: 100%; justify-content: center; }
.btn-shine::after { display: none; }

.alert { border-radius: var(--radius-md); border: 1px solid transparent; padding: 12px 16px; font-size: .9rem; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--status-success-bg) !important; border-color: rgba(5, 150, 105, .35) !important; color: var(--status-success) !important; }
.alert-danger { background: var(--status-danger-bg) !important; border-color: rgba(220, 38, 38, .35) !important; color: var(--status-danger) !important; }
.alert-warning { background: var(--status-warning-bg) !important; border-color: rgba(217, 119, 6, .4) !important; color: var(--status-warning) !important; }

/* ------------------------------------------------------------- 4. Forms */
.form-label { color: var(--text-strong); font-weight: 700; font-size: .85rem; margin-bottom: 6px; display: block; }
.form-input, .form-textarea, select.form-input, input.form-input {
    background: var(--surface-2) !important;
    border: 1px solid var(--line) !important;
    color: var(--text-strong) !important;
    border-radius: var(--radius-md) !important;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-input:focus, .form-textarea:focus, select.form-input:focus {
    outline: none !important;
    border-color: var(--royal) !important;
    background: var(--surface) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14) !important;
}
.form-hint { color: var(--text-muted); }
.field-error { color: var(--status-danger); font-size: .8rem; margin-top: 6px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-pair { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- 5. Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: linear-gradient(180deg, #111C34 0%, var(--navy) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 34px rgba(2, 6, 23, 0.35);
    direction: rtl;
}
.app-header-inner {
    width: min(1200px, 100% - 20px);
    margin-inline: auto;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ah-zone { display: flex; align-items: center; gap: 8px; min-width: 0; }

.ah-icon-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; flex: 0 0 auto;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #E2E8F0; cursor: pointer; text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
}
.ah-icon-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); }
.ah-icon-btn:active { transform: scale(.94); }
.ah-icon-btn svg { width: 21px; height: 21px; }

.ah-badge {
    position: absolute; top: -6px; inset-inline-end: -6px;
    min-width: 21px; height: 21px; padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #F43F5E, #E11D48);
    border: 2px solid var(--navy);
    color: #fff; font-size: .66rem; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1; font-family: var(--font-sans);
}

.ah-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 1 auto; min-width: 0; }
.ah-logo img { height: 38px; width: auto; max-width: 170px; object-fit: contain; }
.ah-logo-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .68rem; font-weight: 800; color: #0F172A;
    background: linear-gradient(135deg, #FDE047, var(--gold));
    border-radius: 999px; padding: 2px 9px; letter-spacing: .04em;
}

.ah-balance {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 10px 0 12px; flex: 0 0 auto;
    border-radius: 999px; text-decoration: none;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.16), rgba(245, 158, 11, 0.10));
    border: 1px solid rgba(234, 179, 8, 0.45);
    color: #FDE68A; transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.ah-balance:hover { border-color: var(--gold); background: linear-gradient(135deg, rgba(234, 179, 8, 0.24), rgba(245, 158, 11, 0.16)); }
.ah-balance:active { transform: scale(.97); }
.ah-balance-amount { font-weight: 900; font-size: .92rem; color: #FEF3C7; font-variant-numeric: tabular-nums; direction: ltr; }
.ah-balance-plus {
    width: 22px; height: 22px; border-radius: 50%;
    background: linear-gradient(135deg, #FDE047, var(--gold-2));
    color: #422006; font-weight: 900; font-size: .85rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.ah-coin { flex: 0 0 auto; filter: drop-shadow(0 2px 4px rgba(234, 179, 8, 0.45)); }

.ah-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px;
    border-radius: 13px; font-size: .84rem; font-weight: 800; text-decoration: none;
    white-space: nowrap; transition: transform .15s ease, background .15s ease;
}
.ah-btn:active { transform: scale(.96); }
.ah-btn-ghost { color: #E2E8F0; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); }
.ah-btn-ghost:hover { background: rgba(255,255,255,0.12); }
.ah-btn-gold { background: linear-gradient(135deg, #FDE047, var(--gold) 55%, var(--gold-2)); color: #422006; border: 1px solid #D69E06; box-shadow: 0 6px 16px rgba(234,179,8,.35); }

/* Hamburger */
.ah-burger { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.ah-burger .bar { width: 19px; height: 2px; border-radius: 2px; background: #E2E8F0; transition: transform .25s ease, opacity .2s ease; }
.ah-burger[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ah-burger[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.ah-burger[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme toggle */
.theme-toggle { overflow: hidden; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Currency switcher (kept, restyled to navy) */
.currency-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #E2E8F0 !important;
    height: 42px; border-radius: 13px !important; padding: 0 12px;
}
.currency-menu { background: var(--navy-2) !important; border: 1px solid rgba(255,255,255,0.12) !important; box-shadow: 0 18px 44px rgba(0,0,0,.5) !important; }
.currency-item:hover { background: rgba(255,255,255,0.08) !important; }

@media (max-width: 720px) {
    .app-header-inner { width: calc(100% - 14px); gap: 6px; }
    .ah-btn { display: none; }
    .ah-logo img { height: 32px; max-width: 132px; }
    .ah-balance { height: 38px; padding: 0 8px 0 9px; gap: 6px; }
    .ah-balance-amount { font-size: .8rem; }
    .ah-icon-btn { width: 38px; height: 38px; border-radius: 11px; }
    .currency-dropdown-wrap { display: none; }
}
/* Phones (≤480px): the signed-in cluster (theme toggle + bell +
   balance chip) cannot share one row with burger + logo at small widths,
   so wrap into two rows instead of letting the balance overflow off-screen. */
@media (max-width: 480px) {
    .app-header-inner { height: auto; padding-block: 7px; flex-wrap: wrap; row-gap: 7px; }
    .app-header-inner .ah-zone:last-child { width: 100%; justify-content: space-between; }
    .ah-balance { height: 36px; }
    .ah-balance-amount { font-size: .78rem; }
}

/* -------------------------------------------------------------- 6. Ticker */
.app-ticker {
    position: relative; z-index: 40;
    background: linear-gradient(90deg, #1E293B, #0F172A 40%, #1E293B);
    border-bottom: 1px solid rgba(234, 179, 8, 0.35);
    color: #FDE68A;
    overflow: hidden;
    height: 38px;
    display: flex; align-items: center;
}
.app-ticker-label {
    flex: 0 0 auto; height: 100%;
    display: inline-flex; align-items: center; gap: 7px;
    padding: 0 14px;
    background: linear-gradient(135deg, #FDE047, var(--gold) 60%, var(--gold-2));
    color: #422006;
    font-size: .72rem; font-weight: 900; letter-spacing: .02em;
    clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.app-ticker-viewport { overflow: hidden; flex: 1 1 auto; height: 100%; display: flex; align-items: center; }
.app-ticker-track {
    display: inline-flex; align-items: center; gap: 0;
    white-space: nowrap;
    will-change: transform;
    animation: ticker-scroll var(--ticker-speed, 30s) linear infinite;
    padding-inline-start: 12px;
}
.app-ticker:hover .app-ticker-track { animation-play-state: paused; }
.ticker-msg { display: inline-flex; align-items: center; gap: 8px; padding: 0 26px; font-size: .8rem; font-weight: 700; color: #FEF3C7; }
.ticker-sep { color: var(--gold); font-size: .75rem; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .app-ticker-track { animation: none; }
}

/* -------------------------------------------------------------- 7. Drawer */
.drawer-backdrop { background: rgba(2, 6, 23, 0.6) !important; backdrop-filter: blur(4px); }
.mobile-nav-drawer {
    background: var(--surface) !important;
    border-inline-start: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    width: min(360px, 92vw) !important;
    display: flex; flex-direction: column;
}
.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(180deg, #111C34, var(--navy));
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.drawer-header .brand-logo img { height: 30px; }
.drawer-close-btn {
    width: 38px; height: 38px; border-radius: 11px; border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.06); color: #E2E8F0; font-size: 1.05rem; cursor: pointer;
}
.drawer-close-btn:hover { background: rgba(255,255,255,.12); }
.drawer-scroll { overflow-y: auto; flex: 1 1 auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.drawer-user-card {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
    position: relative;
}
html[data-theme="dark"] .drawer-user-card { background: var(--surface-2); }
.drawer-user-top { display: flex; align-items: center; gap: 12px; }
.drawer-avatar {
    position: relative; flex: 0 0 auto;
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--navy); color: #FDE047;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 900; overflow: hidden;
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.25);
}
.drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vip-badge {
    position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #FDE047 0%, var(--gold) 45%, #B45309 100%);
    color: #3B2F04; font-size: .58rem; font-weight: 900; letter-spacing: .06em;
    border-radius: 999px; padding: 2px 8px 1px;
    border: 1px solid #A16207; white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.drawer-user-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drawer-user-name { font-weight: 800; font-size: .98rem; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-user-id { font-size: .72rem; color: var(--text-muted); font-family: ui-monospace, monospace; }
.drawer-user-role { font-size: .68rem; color: var(--text-dim); }

.drawer-balance {
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: linear-gradient(135deg, #1E293B 0%, var(--navy) 70%);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #FEF3C7;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.drawer-balance small { display: block; font-size: .68rem; color: #CBD5E1; }
.drawer-balance strong { font-size: 1.12rem; font-weight: 900; color: #FDE047; font-variant-numeric: tabular-nums; direction: ltr; display: inline-block; }
.drawer-balance .limit-note { font-size: .62rem; color: #94A3B8; margin-top: 2px; display: block; }
.drawer-deposit-btn {
    flex: 0 0 auto; text-decoration: none;
    background: linear-gradient(135deg, #FDE047, var(--gold) 55%, var(--gold-2));
    color: #422006; border: 1px solid #D69E06;
    font-size: .74rem; font-weight: 900; border-radius: 11px; padding: 8px 13px;
    box-shadow: 0 4px 12px rgba(234,179,8,.35);
}

.drawer-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.drawer-quick-btn {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    padding: 10px 6px 9px; border-radius: var(--radius-md);
    border: 1px solid var(--line); background: var(--surface);
    color: var(--text-main); font-size: .7rem; font-weight: 700;
    text-decoration: none; cursor: pointer; font-family: inherit;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.drawer-quick-btn:hover { border-color: var(--royal); background: var(--surface-2); transform: translateY(-2px); }
.drawer-quick-btn svg { width: 19px; height: 19px; stroke: var(--royal); }
.drawer-quick-count { font-size: .62rem; color: var(--text-muted); }

.drawer-currency { display: flex; flex-direction: column; gap: 6px; }
.drawer-currency-label { font-size: .7rem; font-weight: 800; color: var(--text-muted); }
.drawer-currency-select { position: relative; }
.drawer-currency-select select {
    width: 100%; appearance: none; height: 44px;
    border: 1px solid var(--line); background: var(--surface-2);
    border-radius: var(--radius-md); padding: 0 38px 0 14px;
    font-family: inherit; font-size: .85rem; font-weight: 700; color: var(--text-strong);
    cursor: pointer;
}
.drawer-currency-select select:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.drawer-currency-select::after {
    content: ""; position: absolute; top: 50%; transform: translateY(-30%);
    inset-inline-start: 13px; width: 9px; height: 9px;
    border-left: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
    rotate: -45deg; pointer-events: none;
}
.drawer-currency-hint { font-size: .66rem; color: var(--text-dim); }

.drawer-menu { display: flex; flex-direction: column; gap: 2px; }
.drawer-section-title { font-size: .68rem; font-weight: 800; color: var(--text-dim); padding: 4px 8px 6px; letter-spacing: .05em; }
.drawer-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: var(--radius-md);
    color: var(--text-main) !important; text-decoration: none;
    font-size: .88rem; font-weight: 600; border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    background: transparent; cursor: pointer; font-family: inherit; text-align: right; width: 100%;
}
.drawer-nav-item svg { width: 20px; height: 20px; stroke: var(--text-muted); flex: 0 0 auto; transition: stroke .15s ease; }
.drawer-nav-item:hover { background: var(--surface-2); border-color: var(--line); color: var(--text-strong) !important; }
.drawer-nav-item:hover svg { stroke: var(--royal); }
.drawer-nav-item.is-active { background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.35); color: var(--royal) !important; font-weight: 800; }
.drawer-nav-item.is-active svg { stroke: var(--royal); }
.drawer-nav-item.danger { color: #DC2626 !important; }
.drawer-nav-item.danger svg { stroke: #DC2626; }
.drawer-nav-item.danger:hover { background: var(--status-danger-bg); border-color: rgba(220,38,38,.3); }
.drawer-nav-item .drawer-item-badge { margin-inline-start: auto; font-size: .68rem; background: var(--surface-inset); border-radius: 999px; padding: 2px 8px; color: var(--text-muted); }
.drawer-divider { height: 1px; background: var(--line); margin: 6px 4px; }

/* Guest drawer */
.drawer-guest { text-align: center; padding: 26px 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.drawer-guest-icon { font-size: 2.4rem; }
.drawer-guest p { color: var(--text-muted); font-size: .85rem; }
.drawer-guest .drawer-quick { width: 100%; }

/* ------------------------------------------- 8. Mobile bottom nav & footer */
.mobile-bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 950;
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding: 0 10px env(safe-area-inset-bottom, 0px);
    background: linear-gradient(180deg, #16203A 0%, var(--navy) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 -10px 34px rgba(2, 6, 23, 0.4);
    direction: ltr;
    align-items: center; justify-content: space-around;
    box-sizing: border-box;
}
@media (max-width: 820px) {
    .mobile-bottom-nav { display: flex; }
    body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important; }
}
.bottom-nav-search-btn {
    width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, #38BDF8 0%, var(--royal) 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5), inset 0 0 0 1px rgba(255,255,255,.35);
    transition: transform .2s ease;
}
.bottom-nav-search-btn:active { transform: scale(.9); }
.bottom-nav-icon-btn, .bottom-nav-home-btn {
    color: #CBD5E1; background: transparent; border: none; border-radius: 13px;
    width: 52px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    text-decoration: none; cursor: pointer; transition: color .15s ease;
}
.bottom-nav-icon-btn svg, .bottom-nav-home-btn svg { width: 22px; height: 22px; fill: currentColor; }
.bottom-nav-icon-btn.active, .bottom-nav-home-btn.active { color: var(--gold); }

.main-footer {
    flex-shrink: 0;
    background: var(--navy);
    color: #94A3B8;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 26px 0 84px;
    text-align: center;
}
@media (min-width: 821px) { .main-footer { padding-bottom: 26px; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin: 12px 0; }
.footer-links a { color: #CBD5E1; text-decoration: none; font-size: .82rem; font-weight: 600; }
.footer-links a:hover { color: var(--gold); }
.footer-site-name { font-size: 1rem; font-weight: 800; color: #F1F5F9; margin: 0; }
.footer-copy { font-size: .72rem; color: #64748B; margin-top: 6px; }

.floating-whatsapp-widget { z-index: 960; }
@media (max-width: 820px) { .floating-whatsapp-widget { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; } }

/* Mobile quick-search & notifications sheets (light) */
.sgc-action-modal-overlay { z-index: 1050; }
.sgc-action-modal-card { background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-pop) !important; }
.sgc-modal-title { color: var(--text-strong) !important; }
.sgc-modal-close-btn { color: var(--text-muted) !important; }
.sgc-tag-chip { background: var(--surface-2) !important; border: 1px solid var(--line) !important; color: var(--text-main) !important; }
.sgc-tag-chip:hover { border-color: var(--royal) !important; color: var(--royal) !important; }
.sgc-notify-item { border: 1px solid var(--line) !important; background: var(--surface-2) !important; }
.sgc-notify-details h4 { color: var(--text-strong) !important; }
.sgc-notify-details p { color: var(--text-muted) !important; }
.sgc-notify-icon { background: var(--surface-inset) !important; }

/* ------------------------------------------------------------- 9. Home */
.home-hero {
    position: relative; overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: linear-gradient(135deg, #16233F 0%, var(--navy) 55%, #0B1329 100%);
    box-shadow: var(--shadow-card);
    margin-bottom: 22px;
}
.home-hero-slides { position: relative; height: 280px; }
@media (max-width: 720px) { .home-hero-slides { height: 330px; } }
.home-hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center left;
    opacity: 0; pointer-events: none;
    transition: opacity .6s ease;
    display: flex; align-items: center;
}
.home-hero-slide.active { opacity: 1; pointer-events: auto; }
.home-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(270deg, rgba(11, 19, 41, 0.92) 12%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.15) 100%);
}
.home-hero-content { position: relative; padding: 26px clamp(18px, 4vw, 44px); max-width: 620px; display: flex; flex-direction: column; gap: 12px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: 100%;
    background: rgba(234, 179, 8, 0.16); border: 1px solid rgba(234, 179, 8, 0.5);
    color: #FDE047; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 5px 14px;
}
.hero-badge .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #FDE047; animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(253,224,71,.5);} 50% { opacity: .65; box-shadow: 0 0 0 4px rgba(253,224,71,.18);} }
.hero-title { font-size: clamp(1.45rem, 4.6vw, 2.25rem); font-weight: 900; color: #F8FAFC !important; line-height: 1.35; margin: 0; }
.hero-title-highlight { color: var(--gold); }
.hero-desc { color: #CBD5E1; font-size: .88rem; line-height: 1.9; margin: 0; max-width: 52ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.home-hero-nav { position: absolute; bottom: 12px; inset-inline-start: clamp(18px, 4vw, 44px); display: flex; gap: 7px; z-index: 2; }
.home-hero-dot { width: 26px; height: 5px; border-radius: 999px; border: none; background: rgba(255,255,255,.35); cursor: pointer; transition: background .2s ease, width .2s ease; }
.home-hero-dot.active { background: var(--gold); width: 40px; }

/* Search */
.home-search-wrap { position: relative; max-width: 780px; margin: 0 auto 26px; }
.home-search-input {
    width: 100%; height: 56px; border-radius: 999px !important;
    border: 1px solid var(--line) !important;
    background: var(--surface) !important; color: var(--text-strong) !important;
    padding: 0 60px 0 54px !important; font-size: 1rem;
    box-shadow: var(--shadow-card);
}
.home-search-input:focus { border-color: var(--royal) !important; box-shadow: 0 0 0 4px rgba(37,99,235,.14), var(--shadow-card) !important; }
.home-search-icon { position: absolute; top: 50%; inset-inline-start: 22px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; display: flex; }
.home-search-spinner { position: absolute; top: 50%; inset-inline-end: 20px; transform: translateY(-50%); pointer-events: none; color: var(--text-muted); }

/* Category chips */
.category-nav-section { margin-bottom: 22px; }
.category-nav-container { display: flex; align-items: center; gap: 8px; }
.category-nav-track-wrapper { position: relative; flex: 1 1 auto; overflow: hidden; }
.category-nav-bar { display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth; padding: 6px 2px 12px; scrollbar-width: none; }
.category-nav-bar::-webkit-scrollbar { display: none; }
.category-chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--line); color: var(--text-main) !important;
    padding: 9px 16px; border-radius: 999px; text-decoration: none; font-size: .82rem; font-weight: 700;
    transition: all .18s ease; box-shadow: var(--shadow-card);
}
.category-chip:hover { border-color: var(--royal); color: var(--royal) !important; transform: translateY(-2px); }
.category-chip.active { background: var(--navy); border-color: var(--navy); color: #fff !important; }
.chip-icon { font-size: 1rem; }
.cat-nav-btn {
    width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%;
    border: 1px solid var(--line); background: var(--surface); color: var(--text-main);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-card); transition: all .15s ease;
}
.cat-nav-btn:hover { border-color: var(--royal); color: var(--royal); }
.cat-track-fade { display: none; }

/* Departments grid (الأقسام) */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.28rem; font-weight: 900; margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head p { color: var(--text-muted); font-size: .82rem; margin: 2px 0 0; }
.section-link { font-size: .8rem; font-weight: 800; color: var(--royal); text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.depts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
@media (min-width: 560px) { .depts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 900px) { .depts-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; } }
.dept-tile {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 14px 8px 12px; text-align: center; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: var(--shadow-card);
}
.dept-tile:hover { transform: translateY(-4px); border-color: rgba(37,99,235,.45); box-shadow: var(--glass-shadow-hover); }
.dept-tile-media {
    width: 76px; height: 76px; border-radius: 22px;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: linear-gradient(145deg, #DBEAFE 0%, #EFF6FF 100%);
    border: 1px solid #BFDBFE;
}
.dept-tile:nth-child(6n+2) .dept-tile-media { background: linear-gradient(145deg, #FEF3C7, #FFFBEB); border-color: #FDE68A; }
.dept-tile:nth-child(6n+3) .dept-tile-media { background: linear-gradient(145deg, #E0E7FF, #EEF2FF); border-color: #C7D2FE; }
.dept-tile:nth-child(6n+4) .dept-tile-media { background: linear-gradient(145deg, #D1FAE5, #ECFDF5); border-color: #A7F3D0; }
.dept-tile:nth-child(6n+5) .dept-tile-media { background: linear-gradient(145deg, #FCE7F3, #FDF2F8); border-color: #FBCFE8; }
.dept-tile:nth-child(6n+6) .dept-tile-media { background: linear-gradient(145deg, #E2E8F0, #F1F5F9); border-color: #CBD5E1; }
.dept-tile-media img { width: 58px; height: 58px; object-fit: contain; }
.dept-tile-icon { font-size: 2rem; }
.dept-tile-name { font-size: .76rem; font-weight: 800; color: var(--text-strong); line-height: 1.5; }
@media (min-width: 900px) { .dept-tile-name { font-size: .72rem; } }

/* ----------------------------------------- 10. Product cards (store cards) */
.store-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (min-width: 760px) { .store-product-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; } }
@media (min-width: 1060px) { .store-product-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

.store-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; display: flex; flex-direction: column; text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    box-shadow: var(--shadow-card); position: relative;
}
.store-card:hover { transform: translateY(-4px); border-color: rgba(37,99,235,.4); box-shadow: var(--glass-shadow-hover); }
.store-card-media { position: relative; aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; display:flex; align-items:center; justify-content:center; }
.store-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.store-card:hover .store-card-media img { transform: scale(1.05); }
.store-card-badge {
    position: absolute; top: 10px; inset-inline-start: 10px;
    font-size: .65rem; font-weight: 800; border-radius: 999px; padding: 3px 10px;
    background: var(--status-success-bg); color: var(--status-success); border: 1px solid rgba(5,150,105,.35);
}
.store-card-badge.out { background: var(--status-danger-bg); color: var(--status-danger); border-color: rgba(220,38,38,.35); }
.store-card-fav {
    position: absolute; top: 8px; inset-inline-end: 8px;
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
    background: rgba(255,255,255,.92); color: #E11D48; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s ease;
}
.store-card-fav:hover { transform: scale(1.15); }
html[data-theme="dark"] .store-card-fav { background: rgba(17,26,46,.9); }
.store-card-body { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.store-card-title { font-size: .86rem; font-weight: 800; color: var(--text-strong); line-height: 1.55; min-height: 2.7em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-card-type { font-size: .68rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.store-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
.store-price-box { display: flex; flex-direction: column; }
.store-price-usd { font-size: .98rem; font-weight: 900; color: var(--navy); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .store-price-usd { color: #FDE047; }
.store-price-local { font-size: .66rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.store-card-cta { font-size: .7rem; font-weight: 800; color: #fff; background: var(--royal); border-radius: 9px; padding: 7px 10px; white-space: nowrap; }
.store-card.is-unavailable { opacity: .65; }
.store-card.is-unavailable img { filter: grayscale(1); }

/* Catalog (category page) */
.catalog-page-container { max-width: 1200px; margin: 0 auto; }
.catalog-header-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.catalog-back-btn {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: var(--radius-md);
    background: var(--surface); border: 1px solid var(--line); color: var(--text-main);
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    box-shadow: var(--shadow-card); font-size: 1.05rem; transition: all .15s ease;
}
.catalog-back-btn:hover { border-color: var(--royal); color: var(--royal); }
.catalog-title { font-size: 1.32rem; font-weight: 900; margin: 0; }
.catalog-breadcrumbs-trail { display: flex; gap: 6px; align-items: center; font-size: .72rem; color: var(--text-muted); margin-top: 3px; flex-wrap: wrap; }
.catalog-breadcrumbs-trail a { color: var(--royal); text-decoration: none; }
.catalog-count-pill { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-muted); border-radius: 999px; padding: 4px 14px; font-size: .72rem; font-weight: 700; }
.catalog-search-wrapper { margin-bottom: 14px; }
.catalog-search-box { position: relative; }
.catalog-search-input {
    width: 100%; height: 48px; border-radius: 14px !important; border: 1px solid var(--line) !important;
    background: var(--surface) !important; padding: 0 44px 0 44px !important; color: var(--text-strong) !important;
    box-shadow: var(--shadow-card);
}
.catalog-search-input:focus { outline: none; border-color: var(--royal) !important; box-shadow: 0 0 0 4px rgba(37,99,235,.14) !important; }
.catalog-search-icon { position: absolute; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: var(--text-muted); }
.catalog-search-clear { position: absolute; top: 50%; inset-inline-end: 12px; transform: translateY(-50%); border: none; background: var(--surface-inset); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: var(--text-muted); }
.catalog-cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (min-width: 700px) { .catalog-cards-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; } }
@media (min-width: 1060px) { .catalog-cards-grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.catalog-node-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; box-shadow: var(--shadow-card); position: relative;
}
.catalog-node-card:hover { transform: translateY(-4px); border-color: rgba(37,99,235,.4); box-shadow: var(--glass-shadow-hover); }
.node-card-media { position: relative; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: var(--surface-2); overflow: hidden; }
.node-card-media img { width: 78%; height: 78%; object-fit: contain; }
.node-card-overlay { position: absolute; inset: auto 0 0 0; height: 42%; background: linear-gradient(transparent, rgba(15,23,42,.32)); }
.node-card-footer { padding: 10px 12px 12px; text-align: center; }
.node-card-title { font-size: .8rem; font-weight: 800; color: var(--text-strong); line-height: 1.5; margin: 0; }
.node-card-subtitle { font-size: .68rem; color: var(--text-muted); margin-top: 2px; display: block; }
.catalog-unavailable-badge, .game-unavailable-badge { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--status-danger-bg); color: var(--status-danger); border: 1px solid rgba(220,38,38,.35); font-size: .62rem; font-weight: 800; border-radius: 999px; padding: 2px 9px; z-index: 2; }
.catalog-empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.catalog-empty-state .empty-icon { font-size: 2.2rem; margin-bottom: 8px; }

/* ------------------------------------------- 11. Purchase modal (dialog) */
.purchase-modal {
    width: min(480px, calc(100vw - 24px));
    max-height: min(90vh, 780px);
    margin: auto; padding: 0; border: 1px solid var(--line);
    border-radius: var(--radius-xl); background: var(--surface);
    color: var(--text-main); box-shadow: var(--shadow-pop);
    overflow: hidden; direction: rtl;
}
.purchase-modal::backdrop { background: rgba(2, 6, 23, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.purchase-modal[open] { animation: purchase-in .22s cubic-bezier(.2,.9,.25,1.1); }
@keyframes purchase-in { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.purchase-modal-card { display: flex; flex-direction: column; gap: 14px; max-height: min(90vh, 780px); overflow-y: auto; padding: 18px; overscroll-behavior: contain; }
.purchase-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.purchase-title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.purchase-product-img {
    width: 62px; height: 62px; flex: 0 0 auto; border-radius: 16px; object-fit: cover;
    background: var(--surface-2); border: 1px solid var(--line);
}
.purchase-title-wrap h2 { margin: 0; font-size: 1.02rem; font-weight: 900; line-height: 1.45; overflow-wrap: anywhere; color: var(--text-strong); }
.purchase-title-wrap p { margin: 2px 0 0; color: var(--text-muted); font-size: .74rem; }
.purchase-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.purchase-price-badge {
    display: inline-flex; align-items: center; min-height: 32px; padding: 5px 14px;
    border-radius: 999px; background: var(--navy); color: #FDE047;
    font-weight: 900; font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.purchase-price-sub { font-size: .66rem; color: var(--text-muted); text-align: left; direction: ltr; font-variant-numeric: tabular-nums; }
.purchase-close, .purchase-favorite {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--surface-2); color: var(--text-muted); cursor: pointer;
    transition: all .15s ease;
}
.purchase-close:hover, .purchase-favorite:hover { background: var(--surface-inset); color: var(--text-strong); }
.purchase-favorite.is-saved { color: #E11D48; border-color: rgba(225,29,72,.4); background: #FFF1F2; }
.purchase-favorite.is-saved svg { fill: currentColor; }
.purchase-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px 10px; color: var(--text-muted); font-size: .9rem; }
.purchase-spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-strong); border-top-color: var(--royal); animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.purchase-form { display: flex; flex-direction: column; gap: 13px; }
.purchase-package-picker { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--text-main); }
.purchase-package-picker select { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-strong); padding: 0 12px; font-family: inherit; }
.purchase-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.purchase-summary-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; }
.purchase-box-label { font-size: .68rem; color: var(--text-muted); font-weight: 800; display: block; margin-bottom: 6px; }
.purchase-method-toggle { display: flex; gap: 6px; background: var(--surface-inset); border: 1px solid var(--line); padding: 5px; border-radius: 13px; margin-bottom: 10px; }
.purchase-method-toggle[hidden] { display: none; }
.purchase-method-toggle button { flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font-family: inherit; font-weight: 800; font-size: .82rem; cursor: pointer; transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.purchase-method-toggle button:hover { color: var(--text-strong); }
.purchase-method-toggle button.is-active { background: var(--surface); color: var(--royal); box-shadow: 0 2px 8px rgba(2, 6, 23, .18); }
.purchase-method-toggle button:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }
.purchase-amount-field { display: flex; align-items: center; gap: 8px; }
.purchase-amount-field[hidden] { display: none; }
.purchase-amount-field input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text-strong); font-size: 1.05rem; font-weight: 800; padding: 0 12px; font-variant-numeric: tabular-nums; }
.purchase-amount-field input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.purchase-amount-currency { min-width: 34px; text-align: center; font-weight: 900; color: var(--text-muted); border-inline-start: 1px solid var(--line); padding-inline-start: 8px; }
.purchase-amount-computed { color: var(--royal); font-weight: 800; font-variant-numeric: tabular-nums; }
.purchase-amount-computed.is-error { color: var(--status-danger); }
.purchase-quantity { display: flex; align-items: center; gap: 8px; }
.purchase-quantity button {
    width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--line-strong);
    background: var(--surface); color: var(--text-strong); font-size: 1.1rem; font-weight: 800; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.purchase-quantity button:hover { border-color: var(--royal); color: var(--royal); }
.purchase-quantity button:disabled { opacity: .4; cursor: not-allowed; }
.purchase-quantity input {
    width: 56px; height: 36px; text-align: center; font-weight: 900; font-size: 1rem;
    border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text-strong);
    -moz-appearance: textfield;
}
.purchase-quantity input::-webkit-outer-spin-button, .purchase-quantity input::-webkit-inner-spin-button { -webkit-appearance: none; }
.purchase-total { font-size: 1.15rem; font-weight: 900; color: var(--navy); display: block; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .purchase-total { color: #FDE047; }
.purchase-fields-hint { font-size: .74rem; color: var(--text-muted); margin: 0; }
.purchase-fields { display: flex; flex-direction: column; gap: 10px; }
.purchase-fields label { font-size: .78rem; font-weight: 700; color: var(--text-main); display: flex; flex-direction: column; gap: 5px; }
.purchase-fields input, .purchase-fields select, .purchase-fields textarea {
    height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
    padding: 0 12px; font-family: inherit; color: var(--text-strong); font-size: .92rem;
}
.purchase-fields input:focus { outline: none; border-color: var(--royal); box-shadow: 0 0 0 4px rgba(37,99,235,.14); background: var(--surface); }
.purchase-no-fields { font-size: .8rem; color: var(--text-muted); background: var(--surface-inset); border-radius: 12px; padding: 10px 14px; margin: 0; }
.purchase-coupon summary { cursor: pointer; font-size: .8rem; font-weight: 800; color: var(--royal); }
.purchase-coupon > div { display: flex; gap: 8px; margin-top: 8px; }
.purchase-coupon input { flex: 1; height: 44px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 0 12px; color: var(--text-strong); }
.purchase-coupon button { height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--royal); background: var(--royal); color: #fff; font-weight: 800; cursor: pointer; }
.purchase-balance-row { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; color: var(--text-muted); background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px; }
.purchase-login-link { display: inline-flex; justify-content: center; padding: 12px; border-radius: 12px; background: var(--navy); color: #fff !important; text-decoration: none; font-weight: 800; }
.purchase-error { background: var(--status-danger-bg); color: var(--status-danger); border: 1px solid rgba(220,38,38,.35); border-radius: 12px; padding: 10px 14px; font-size: .84rem; margin: 0; }
.purchase-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.purchase-buy {
    width: 100%; height: 52px; border: none; border-radius: 14px; cursor: pointer;
    background: linear-gradient(180deg, #1E293B, var(--navy));
    color: #fff; font-size: .98rem; font-weight: 900; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.4);
    transition: transform .15s ease, box-shadow .15s ease;
}
.purchase-buy:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(15, 23, 42, 0.48); }
.purchase-buy:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.purchase-cancel { width: 100%; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--text-muted); font-weight: 800; font-family: inherit; cursor: pointer; font-size: .9rem; }
.purchase-cancel:hover { background: var(--surface-2); color: var(--text-strong); }
.purchase-result { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 12px 8px; }
.purchase-result-icon { width: 66px; height: 66px; border-radius: 50%; background: var(--status-success-bg); color: var(--status-success); border: 2px solid rgba(5,150,105,.4); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.purchase-result h3 { margin: 0; color: var(--text-strong); }
.purchase-result p { color: var(--text-muted); margin: 0; font-size: .88rem; }

/* The [hidden] attribute must win over the display rules above; without this,
   the dialog renders loading, form, login link and success stacked together. */
.purchase-modal [hidden] { display: none !important; }

/* Favorites dialog */
.favorites-modal, [data-favorites-panel] { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); color: var(--text-main); }
.favorites-item { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }

/* ------------------------------ 12. Favorites, gateways, image widgets */
.favorites-modal { width: min(440px, calc(100vw - 28px)); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); color: var(--text-main); }
.favorites-modal::backdrop { background: rgba(2,6,23,.6); backdrop-filter: blur(6px); }
.favorites-modal-card { padding: 20px; }
.favorites-modal header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.favorites-modal h2 { margin: 0; font-size: 1.05rem; color: var(--text-strong); }
.favorites-modal header button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-main); cursor: pointer; }
.favorites-list { display: flex; flex-direction: column; gap: 10px; }
.favorites-list p { margin: 0; color: var(--text-muted); font-size: .85rem; }
.store-favorite-item { width: 100%; text-align: right; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-main); font: inherit; cursor: pointer; }
.store-favorite-item:hover { border-color: var(--royal); }
.drawer-favorites-btn { width: 100%; border: 0; }

.payment-gateway-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.payment-gateway-card {
    display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px 14px;
    border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface);
    color: var(--text-main); text-decoration: none; box-shadow: var(--shadow-card);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.payment-gateway-card:hover, .payment-gateway-card.is-active { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--glass-shadow-hover); }
.payment-gateway-media { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; background: var(--surface-inset); overflow: hidden; font-size: 1.5rem; }
.payment-gateway-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.payment-gateway-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.payment-gateway-body strong { font-size: .88rem; overflow-wrap: anywhere; color: var(--text-strong); }
.payment-gateway-body small { font-size: .7rem; color: var(--text-muted); }
.payment-gateway-chevron { flex: 0 0 auto; color: var(--text-dim); }
.payment-gateway-empty { text-align: center; color: var(--text-muted); }

/* Deposit page (light recharge) */
.deposit-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.deposit-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: 22px; }
.deposit-head h1 { font-size: 1.32rem; font-weight: 900; margin: 0 0 4px; color: var(--text-strong); }
.deposit-head p { color: var(--text-muted); font-size: .84rem; margin: 0 0 16px; }
.recharge-code-card {
    display: flex; align-items: center; gap: 14px; text-decoration: none;
    background: linear-gradient(135deg, #1E293B, var(--navy)); color: #FDE047;
    border: 1px solid rgba(234,179,8,.45); border-radius: var(--radius-lg);
    padding: 18px; margin: 6px 0 14px; transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 10px 26px rgba(15,23,42,.3);
}
.recharge-code-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15,23,42,.4); }
.recharge-code-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(234,179,8,.15); border: 1px solid rgba(234,179,8,.4); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.recharge-code-texts { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.recharge-code-title { font-weight: 900; font-size: 1rem; color: #FEF9C3; }
.recharge-code-sub { font-size: .76rem; color: #CBD5E1; }
.recharge-code-chevron { margin-inline-start: auto; color: #FDE047; flex: 0 0 auto; }
.redeem-back { display: inline-flex; align-items: center; gap: 6px; color: var(--royal); text-decoration: none; font-size: .82rem; font-weight: 800; margin-bottom: 12px; }

/* Payment image widget (admin-driven gateway artwork) */
.payment-image-widget { display: flex; gap: 14px; min-width: 0; padding: 14px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-2); }
.payment-image-preview-wrap { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 92px; height: 92px; border-radius: 14px; border: 1px dashed var(--line-strong); background: var(--surface); overflow: hidden; }
.payment-image-preview-wrap img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.payment-image-preview-wrap span { font-size: 1.8rem; opacity: .6; }
.payment-image-controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.payment-image-controls strong { color: var(--text-strong); font-size: .88rem; }
.payment-image-controls small { color: var(--text-muted); font-size: .72rem; }
.payment-image-controls p { margin: 0; color: var(--gold-2); font-size: .76rem; min-height: 1em; }
.payment-image-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------- 13. Wallet page (light) */
.wallet-page { direction: rtl; width: 100%; max-width: 980px; margin: 0 auto; padding: 20px 18px 30px; color: var(--text-main); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-sizing: border-box; box-shadow: var(--shadow-card); }
.wallet-page * { box-sizing: border-box; }
.wallet-page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.wallet-page-head h1 { margin: 0; font-size: 1.45rem; font-weight: 900; color: var(--text-strong); }
.wallet-page-head p { margin: 4px 0 0; color: var(--text-muted); font-size: .84rem; }
.wallet-head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wallet-primary-link { display: inline-flex; align-items: center; gap: 7px; padding: 11px 20px; border-radius: 999px; background: var(--navy); color: #fff !important; font-weight: 800; font-size: .85rem; text-decoration: none; }
.wallet-text-link { color: var(--royal); font-size: .82rem; font-weight: 700; text-decoration: none; }
.wallet-notice { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-size: .85rem; }
.wallet-notice--success { background: var(--status-success-bg); color: var(--status-success); border: 1px solid rgba(5,150,105,.3); }
.wallet-notice--error { background: var(--status-danger-bg); color: var(--status-danger); border: 1px solid rgba(220,38,38,.3); }
.wallet-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (min-width: 860px) { .wallet-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wallet-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-card); }
.wallet-stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; }
.wallet-stat-value { font-size: 1.08rem; font-weight: 900; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.wallet-stat-label { font-size: .76rem; color: var(--text-muted); font-weight: 800; }
.wallet-stat--green .wallet-stat-icon { background: var(--status-success-bg); color: var(--status-success); }
.wallet-stat--green .wallet-stat-value { color: var(--status-success); }
.wallet-stat--red .wallet-stat-icon { background: var(--status-danger-bg); color: var(--status-danger); }
.wallet-stat--red .wallet-stat-value { color: var(--status-danger); }
.wallet-stat--purple .wallet-stat-icon { background: #F3E8FF; color: #9333EA; }
.wallet-stat--purple .wallet-stat-value { color: #9333EA; }
html[data-theme="dark"] .wallet-stat--purple .wallet-stat-icon { background: rgba(147,51,234,.18); }
.wallet-stat--blue .wallet-stat-icon { background: var(--status-info-bg); color: var(--royal); }
.wallet-stat--blue .wallet-stat-value { color: var(--royal); }
.wallet-pending { margin-bottom: 16px; padding: 14px; border-radius: var(--radius-lg); border: 1px solid #FDE68A; background: var(--status-warning-bg); color: var(--status-warning); font-size: .82rem; }
.wallet-pending p { margin: 4px 0 10px; }
.wallet-pending > div { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px dashed #FDE68A; }
.wallet-date-filter { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.wallet-date-field { display: flex; flex-direction: column; gap: 5px; font-size: .78rem; color: var(--text-muted); font-weight: 700; }
.wallet-date-field input { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text-strong); padding: 9px 12px; font: inherit; min-width: 140px; }
.wallet-filter-submit { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-inline-start: auto; border: none; border-radius: 50%; background: var(--navy); color: #fff; cursor: pointer; }
.wallet-filter-error { flex-basis: 100%; margin: 0; color: var(--status-danger); font-size: .78rem; }
.wallet-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wallet-tab { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-muted); font-size: .82rem; font-weight: 800; text-decoration: none; }
.wallet-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.wallet-summary-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; color: var(--text-muted); font-size: .82rem; }
.wallet-total-chip { padding: 6px 14px; border-radius: 999px; background: var(--surface-inset); color: var(--text-strong); }
.wallet-operations { border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.wallet-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 42px 16px; color: var(--text-dim); }
.wallet-transaction { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wallet-transaction:last-child { border-bottom: none; }
.wallet-transaction-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; }
.wallet-transaction-icon.is-credit { background: var(--status-success-bg); color: var(--status-success); }
.wallet-transaction-icon.is-debit { background: var(--status-danger-bg); color: var(--status-danger); }
.wallet-transaction-main { flex: 1; min-width: 0; }
.wallet-transaction-main strong { font-size: .88rem; color: var(--text-strong); }
.wallet-transaction-main p { margin: 3px 0; color: var(--text-muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-transaction-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-dim); font-size: .7rem; }
.wallet-transaction-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 1 auto; min-width: 0; }
.wallet-transaction-side strong { font-size: .88rem; text-align: end; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.wallet-transaction-side .is-credit { color: var(--status-success); }
.wallet-transaction-side .is-debit { color: var(--status-danger); }
.wallet-status { padding: 3px 10px; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.wallet-status--posted { background: var(--status-success-bg); color: var(--status-success); }
.wallet-status--pending { background: var(--status-warning-bg); color: var(--status-warning); }
.wallet-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; font-size: .82rem; }
.wallet-pagination a { color: var(--royal); font-weight: 800; text-decoration: none; }

/* ----------------------------------------------- 14. دفعاتي (payments) */
.pay-page { direction: rtl; max-width: 880px; margin: 0 auto; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pay-head h1 { font-size: 1.4rem; font-weight: 900; margin: 0; color: var(--text-strong); }
.pay-add-link { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; background: var(--navy); color: #fff !important; text-decoration: none; font-size: .82rem; font-weight: 800; }
.pay-list { display: flex; flex-direction: column; gap: 12px; }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; border-inline-start-width: 4px; }
.pay-card--completed { border-inline-start-color: var(--status-success); }
.pay-card--pending { border-inline-start-color: var(--gold-2); }
.pay-card--rejected { border-inline-start-color: var(--status-danger); }
.pay-toggle { width: 100%; background: transparent; border: none; cursor: pointer; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: inherit; text-align: start; }
.pay-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pay-amount { font-size: 1.12rem; font-weight: 900; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.pay-method { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.pay-side { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.pay-status { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.pay-card--completed .pay-status { background: var(--status-success-bg); color: var(--status-success); }
.pay-card--pending .pay-status { background: var(--status-warning-bg); color: var(--status-warning); }
.pay-card--rejected .pay-status { background: var(--status-danger-bg); color: var(--status-danger); }
.pay-chevron { color: var(--text-muted); transition: transform .25s ease; display: flex; }
.pay-card.is-open .pay-chevron { transform: rotate(180deg); }
.pay-details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.pay-details > .pay-details-inner { overflow: hidden; }
.pay-card.is-open .pay-details { grid-template-rows: 1fr; }
.pay-details-inner { border-top: 1px dashed var(--line); }
.pay-rows { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .84rem; }
.pay-row dt { color: var(--text-muted); font-weight: 600; }
.pay-row dd { margin: 0; color: var(--text-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-copy { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 4px 10px; cursor: pointer; font-family: inherit; font-size: .8rem; }
.pay-copy span { color: var(--royal); font-weight: 800; font-size: .72rem; }
.pay-na { color: var(--text-dim); font-weight: 500 !important; }
.pay-reject-reason { margin: 0 16px 14px; background: var(--status-danger-bg); border: 1px solid rgba(220,38,38,.3); color: var(--status-danger); border-radius: 12px; padding: 10px 14px; font-size: .8rem; line-height: 1.7; }
.pay-empty { text-align: center; padding: 44px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-muted); }
.pay-empty h2 { margin: 0; color: var(--text-strong); font-size: 1.05rem; }

/* ----------------------------- 15. Account layout & customer sidebar */
.account-page-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 940px) { .account-page-layout { grid-template-columns: 1fr; } }
.account-surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: 24px; max-width: 880px; margin-inline: auto; width: 100%; }
.account-heading h1 { font-size: 1.35rem; font-weight: 900; margin: 0 0 4px; color: var(--text-strong); }
.account-heading p { color: var(--text-muted); font-size: .86rem; margin: 0 0 18px; }

.customer-sidebar { max-width: 290px; width: 100%; align-self: flex-start; }
@media (max-width: 940px) { .customer-sidebar { max-width: none; order: 2; } }
.customer-sidebar-link {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md);
    color: var(--text-main); text-decoration: none; font-size: .87rem; font-weight: 600;
    transition: all .16s ease; border: 1px solid transparent; background: transparent; width: 100%; cursor: pointer; font-family: inherit; text-align: right;
}
.customer-sidebar-link:hover { background: var(--surface-2); color: var(--royal) !important; }
.customer-sidebar-link.active { background: rgba(37,99,235,.09); border-color: rgba(37,99,235,.35); color: var(--royal) !important; font-weight: 800; }
.customer-sidebar-link.logout { color: var(--status-danger); }
.customer-sidebar-link.logout:hover { background: var(--status-danger-bg); }
.sidebar-balance-widget {
    background: linear-gradient(135deg, #1E293B, var(--navy)) !important;
    border: 1px solid rgba(234,179,8,.4) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.3) !important;
}
.sidebar-balance-widget * { color: #FEF3C7 !important; }
.sidebar-balance-widget .btn { color: #422006 !important; }

/* --------------------------------------------------- 16. Security (2FA) */
.security-qr-box { background: #fff; padding: 12px; border-radius: var(--radius-lg); border: 1px solid var(--line); display: inline-flex; }
.security-qr-box img { width: 176px; height: 176px; display: block; }
.security-secret {
    font-family: ui-monospace, monospace; letter-spacing: .18em; font-size: .95rem;
    background: var(--surface-inset); border: 1px dashed var(--line-strong); color: var(--text-strong) !important;
    border-radius: var(--radius-md); padding: 12px 14px; text-align: center; direction: ltr;
}
.security-steps { color: var(--text-main); font-size: .88rem; line-height: 2; padding-inline-start: 22px; margin: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 14px; font-size: .78rem; font-weight: 800; border: 1px solid transparent; }
.status-completed { background: var(--status-success-bg); color: var(--status-success); border-color: rgba(5,150,105,.35); }
.status-pending { background: var(--status-warning-bg); color: var(--status-warning); border-color: rgba(217,119,6,.4); }
.status-danger { background: var(--status-danger-bg); color: var(--status-danger); border-color: rgba(220,38,38,.35); }
.step-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-muted); padding: 8px 18px; font-size: .82rem; font-weight: 700; text-decoration: none; transition: all .15s ease; }
.step-pill:hover { border-color: var(--royal); color: var(--royal); }
.step-pill.active { background: var(--navy); border-color: var(--navy); color: #fff !important; }

/* ------------------------------------------------------ 17. KYC page */
.kyc-status-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 22px; border-radius: var(--radius-xl); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(37,99,235,.06), var(--surface)); }
.kyc-hero-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(37,99,235,.12); border: 1px solid rgba(37,99,235,.35); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; flex: 0 0 auto; }
.kyc-uploads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .kyc-uploads { grid-template-columns: 1fr; } }
.kyc-upload {
    position: relative; border: 1.6px dashed var(--line-strong); border-radius: var(--radius-lg);
    background: var(--surface-2); min-height: 168px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 12px; text-align: center; cursor: pointer; transition: all .18s ease; overflow: hidden;
}
.kyc-upload:hover { border-color: var(--royal); background: rgba(37,99,235,.05); }
.kyc-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.kyc-upload-icon { font-size: 1.7rem; }
.kyc-upload-title { font-size: .82rem; font-weight: 800; color: var(--text-strong); }
.kyc-upload-hint { font-size: .66rem; color: var(--text-muted); }
.kyc-upload-preview { position: absolute; inset: 0; background: var(--surface); display: none; }
.kyc-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.kyc-upload.has-file .kyc-upload-preview { display: block; }
.kyc-upload-remove {
    position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2;
    width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(2,6,23,.72); color: #fff; font-size: .8rem; display: none;
    align-items: center; justify-content: center;
}
.kyc-upload.has-file .kyc-upload-remove { display: flex; }
.kyc-upload-status { position: absolute; bottom: 8px; inset-inline-start: 8px; z-index: 2; font-size: .62rem; font-weight: 800; background: rgba(5,150,105,.9); color: #fff; padding: 3px 9px; border-radius: 999px; display: none; }
.kyc-upload.has-file .kyc-upload-status { display: inline-flex; }

/* --------------------------------------------- 18. VIP / loyalty page */
.vip-current {
    position: relative; overflow: hidden; border-radius: var(--radius-xl);
    background: linear-gradient(140deg, #241A02 0%, #3B2F04 40%, #1E293B 100%);
    border: 1px solid rgba(234,179,8,.5); padding: 26px; color: #FEF9C3;
    box-shadow: 0 18px 50px rgba(15,23,42,.4);
}
.vip-current::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(234,179,8,.28), transparent 70%); top: -120px; inset-inline-end: -120px; pointer-events: none; }
.vip-current-top { display: flex; align-items: center; gap: 18px; position: relative; }
.vip-medallion {
    flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FDE68A 0%, #EAB308 38%, #A16207 78%, #713F12 100%);
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    border: 2px solid #FDE047; box-shadow: 0 8px 24px rgba(234,179,8,.45), inset 0 -6px 12px rgba(113,63,18,.6), inset 0 4px 8px rgba(255,255,255,.6);
    color: #3B2F04;
}
.vip-medallion b { font-size: 1.05rem; font-weight: 900; line-height: 1; }
.vip-medallion small { font-size: .5rem; font-weight: 800; letter-spacing: .1em; }
.vip-current h2 { margin: 0; font-size: 1.25rem; color: #FDE047 !important; }
.vip-current p { margin: 3px 0 0; font-size: .8rem; color: #FEF3C7; }
.vip-progress-track { height: 14px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(253,224,71,.25); overflow: hidden; margin: 18px 0 8px; }
.vip-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FDE047, var(--gold), var(--gold-2)); box-shadow: 0 0 18px rgba(234,179,8,.55); transition: width .8s ease; }
.vip-progress-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .74rem; color: #FDE68A; flex-wrap: wrap; font-variant-numeric: tabular-nums; direction: ltr; }
.vip-progress-meta b { color: #fff; }

.vip-levels { display: flex; flex-direction: column; gap: 12px; }
.vip-level {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 16px 18px; position: relative; box-shadow: var(--shadow-card);
    transition: transform .15s ease;
}
.vip-level.is-current { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(234,179,8,.35), var(--shadow-card); }
.vip-level.is-locked { background: var(--surface-2); }
.vip-level-badge {
    flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FDE68A, #EAB308 45%, #A16207 85%);
    display: flex; align-items: center; justify-content: center; font-weight: 900; color: #3B2F04;
    border: 2px solid #FDE047; font-size: .78rem; text-align: center; line-height: 1.15; padding: 4px;
    box-shadow: inset 0 -4px 8px rgba(113,63,18,.55), inset 0 3px 6px rgba(255,255,255,.55);
}
.vip-level.is-locked .vip-level-badge { filter: grayscale(.55) brightness(.82); }
.vip-level-body { min-width: 0; flex: 1; }
.vip-level-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vip-level-name { font-weight: 900; font-size: .95rem; color: var(--text-strong); }
.vip-level-cond { font-size: .7rem; color: var(--text-muted); }
.vip-level-benefits { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.vip-benefit { font-size: .68rem; background: var(--surface-inset); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--text-main); }
.vip-level-state { flex: 0 0 auto; font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 4px 12px; }
.vip-level-state.open { background: var(--status-success-bg); color: var(--status-success); }
.vip-level-state.locked { background: var(--surface-inset); color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.vip-level-state.current { background: var(--gold-soft); color: #A16207; border: 1px solid rgba(234,179,8,.5); }

/* --------------------------------------------------- 19. Telegram page */
.telegram-status { margin-bottom: 16px; }
.telegram-linked-card, .telegram-link-card, .telegram-legacy {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 20px; margin-bottom: 14px;
}
.telegram-linked-card h2, .telegram-link-card h2 { font-size: 1.05rem; font-weight: 900; margin: 0 0 6px; color: var(--text-strong); }
.telegram-linked-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 14px 0; font-size: .85rem; }
.telegram-linked-card dt { color: var(--text-muted); }
.telegram-linked-card dd { margin: 0; font-weight: 700; color: var(--text-strong); }
.telegram-steps { padding-inline-start: 20px; line-height: 2.1; font-size: .87rem; color: var(--text-main); margin: 10px 0 16px; }
.telegram-bot-code-label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 800; color: var(--text-strong); }
.telegram-bot-code { text-align: center; font-size: 1.25rem !important; letter-spacing: .2em; font-family: ui-monospace, monospace; text-transform: uppercase; height: 54px !important; }
.telegram-code-hint { color: var(--text-muted); font-size: .72rem; display: block; margin-top: 6px; }
.telegram-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.telegram-legacy summary { cursor: pointer; font-weight: 800; color: var(--royal); font-size: .85rem; }
.telegram-legacy-body { padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }

/* ------------------------------------------------------- 20. Profile */
.profile-form { display: flex; flex-direction: column; gap: 16px; }
.avatar-editor { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 4px; }
.profile-avatar {
    width: 108px; height: 108px; border-radius: 50%; object-fit: cover;
    border: 3px solid var(--navy); box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow-card); background: var(--surface-2);
}
.avatar-upload {
    position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: .78rem; font-weight: 800; color: var(--royal);
    border: 1px solid rgba(37,99,235,.4); background: rgba(37,99,235,.08);
    border-radius: 999px; padding: 7px 16px; transition: all .15s ease;
}
.avatar-upload:hover { background: rgba(37,99,235,.14); }
.avatar-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.account-security-links { display: flex; gap: 16px; flex-wrap: wrap; }
.account-security-links a { color: var(--royal); font-size: .8rem; font-weight: 700; text-decoration: none; }
.account-security-links a:hover { text-decoration: underline; }

/* --------------------------------------------------- 21. Orders page */
.orders-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.orders-total-chip { background: var(--navy); color: #FDE047; border-radius: var(--radius-md); padding: 10px 18px; font-size: .82rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.orders-total-chip b { color: #fff; }
.orders-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.orders-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.orders-table { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 720px; }
.orders-table th { text-align: right; padding: 12px 14px; background: var(--surface-2); color: var(--text-muted); font-size: .72rem; letter-spacing: .03em; border-bottom: 1px solid var(--line); }
.orders-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text-main); vertical-align: middle; }
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: var(--surface-2); }
.order-number { font-family: ui-monospace, monospace; font-weight: 700; color: var(--text-strong); }
.order-status { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 4px 12px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.order-status--completed { background: var(--status-success-bg); color: var(--status-success); }
.order-status--pending { background: var(--status-warning-bg); color: var(--status-warning); }
.order-status--refunded { background: var(--status-info-bg); color: var(--royal); }
.order-status--failed { background: var(--status-danger-bg); color: var(--status-danger); }

/* ---------------------------------------------------- 22. Dashboard */
.dashboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (min-width: 900px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

/* ------------------------------------------- 23. Trust bar & testimonials */
.trust-marquee-wrapper { text-align: center; padding: 22px 10px 6px; }
.payment-chips-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.payment-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: .78rem; font-weight: 700; color: var(--text-main); box-shadow: var(--shadow-card); }
.testimonials-section { margin: 10px 0 20px; }
.testimonials-header { text-align: center; margin-bottom: 18px; }
.testimonials-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text-strong); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-size: .82rem; box-shadow: var(--shadow-card); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.testimonial-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 10px; }
.testimonial-stars { color: var(--gold); letter-spacing: .1em; }
.testimonial-comment { color: var(--text-main); font-size: .85rem; line-height: 1.9; margin: 0; }
.testimonial-footer { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-inset); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--royal); }
.testimonial-name { font-size: .82rem; font-weight: 800; color: var(--text-strong); }
.testimonial-meta { font-size: .68rem; color: var(--text-muted); }

/* ---------------------------------------------------- 24. Live search */
.live-search-dropdown {
    position: absolute; top: calc(100% + 10px); inset-inline-start: 0; inset-inline-end: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop); z-index: 950; overflow: hidden; max-height: 420px; overflow-y: auto;
}
.search-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-decoration: none; color: var(--text-main) !important; border-bottom: 1px solid var(--line); }
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.is-active { background: var(--surface-2); }
.search-item-name { font-size: .86rem; font-weight: 700; color: var(--text-strong); }
.search-item-meta { font-size: .68rem; color: var(--text-muted); }

/* ---------------------------------------------------- 25. ShamCash */
.sc-wrap { color: var(--text-main) !important; }
.sc-card { background: var(--surface) !important; border: 1px solid var(--line) !important; color: var(--text-main) !important; box-shadow: var(--shadow-card) !important; }
.sc-card h2, .sc-card p { color: inherit; }
.sc-details div { background: var(--surface-2) !important; }
.sc-back { color: var(--royal) !important; }

/* ----------------------------------------------------- 26. Footer misc */
.footer-note { color: #64748B; font-size: .72rem; text-align: center; margin-top: 14px; }

/* ------------------- Dark-theme lifts for hardcoded inline dark blocks */
html[data-theme="dark"] .wallet-stat--purple .wallet-stat-icon { color: #C084FC; }
html[data-theme="dark"] .store-card-cta { background: var(--royal); }
html[data-theme="dark"] .product-price, html[data-theme="dark"] .game-pricing-row .price-start-value { color: #FDE047; }

/* ----------------------------------------------------------- 27. Misc */
.account-heading { margin-bottom: 16px; }
.install-app-hero { text-align: center; padding: 34px 20px; }
.install-steps { display: flex; flex-direction: column; gap: 12px; counter-reset: install-step; }
.install-step { display: flex; gap: 14px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.install-step-num { counter-increment: install-step; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #FDE047; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.install-step h3 { margin: 0 0 4px; font-size: .92rem; color: var(--text-strong); }
.install-step p { margin: 0; font-size: .8rem; color: var(--text-muted); line-height: 1.8; }
.agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.agent-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card); }
.agent-name { font-size: 1rem; font-weight: 900; color: var(--text-strong); margin: 0; }
.agent-role { font-size: .78rem; color: var(--royal); font-weight: 700; }
.agent-region { font-size: .78rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.agent-phone { font-family: ui-monospace, monospace; font-weight: 800; color: var(--text-strong); direction: ltr; text-align: right; font-size: .9rem; }
.agent-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #25D366; color: #fff !important; text-decoration: none; font-weight: 800; border-radius: var(--radius-md); padding: 11px 14px; font-size: .85rem; transition: filter .15s ease; }
.agent-whatsapp:hover { filter: brightness(.92); }

@media (max-width: 700px) {
    .purchase-summary-grid { grid-template-columns: 1fr 1fr; }
    .wallet-transaction { padding: 12px 10px; }
    .account-surface { padding: 18px 16px; }
    .orders-table { min-width: 640px; }
}
@media (prefers-reduced-motion: reduce) {
    .app-ticker-track, .purchase-modal[open], .purchase-spinner { animation: none !important; }
    * { transition-duration: .01ms !important; }
}

/* ----------------- Floating WhatsApp widget (base, both themes) */
.floating-whatsapp-widget {
    position: fixed; bottom: 24px; left: 24px; z-index: 960;
    width: 58px; height: 58px; border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.42), inset 0 0 0 1px rgba(255,255,255,.25);
    transition: transform .25s ease, box-shadow .25s ease;
}
.floating-whatsapp-widget:hover { transform: scale(1.08) translateY(-3px); box-shadow: 0 14px 32px rgba(37,211,102,.55), inset 0 0 0 2px rgba(255,255,255,.35); color: #fff; }
.floating-whatsapp-widget .wa-tooltip {
    position: absolute; right: calc(100% + 14px); top: 50%; transform: translateY(-50%) translateX(-6px);
    background: var(--navy); color: #F8FAFC;
    border: 1px solid rgba(255,255,255,.14);
    padding: 7px 15px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: all .25s ease; box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.floating-whatsapp-widget:hover .wa-tooltip { opacity: 1; transform: translateY(-50%) translateX(0); }
.floating-whatsapp-widget .wa-pulse {
    position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #25D366;
    animation: wa-pulse 2.1s infinite cubic-bezier(.455,.03,.515,.955); pointer-events: none;
}
@keyframes wa-pulse { 0% { transform: scale(.9); opacity: .8; } 70% { transform: scale(1.35); opacity: 0; } 100% { transform: scale(1.4); opacity: 0; } }
@media (max-width: 820px) {
    .floating-whatsapp-widget { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); left: 16px; width: 52px; height: 52px; }
    .floating-whatsapp-widget .wa-tooltip { display: none; }
}

/* ------------- Mobile search / notifications sheets (base + theme) */
.sgc-action-modal-overlay {
    position: fixed; inset: 0; z-index: 1050;
    display: none; align-items: flex-end; justify-content: center;
    background: rgba(2, 6, 23, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .25s ease;
}
@media (min-width: 640px) { .sgc-action-modal-overlay { align-items: center; } }
.sgc-action-modal-overlay.active { display: flex; opacity: 1; }
.sgc-action-modal-card {
    width: min(560px, 100%); max-height: 88vh; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-pop); transform: translateY(24px); transition: transform .28s cubic-bezier(.2,.9,.3,1);
}
@media (min-width: 640px) { .sgc-action-modal-card { border-radius: var(--radius-xl); } }
.sgc-action-modal-overlay.active .sgc-action-modal-card { transform: translateY(0); }
.sgc-modal-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.sgc-modal-title { display: flex; align-items: center; gap: 9px; margin: 0; font-size: .98rem; font-weight: 800; }
.sgc-modal-close-btn {
    width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line);
    background: var(--surface-2); cursor: pointer; font-size: 1.15rem; line-height: 1; color: var(--text-main);
}
.sgc-modal-close-btn:hover { background: var(--surface-inset); }
.sgc-modal-body { padding: 16px 18px 20px; }
.sgc-quick-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sgc-tag-chip { border-radius: 999px; padding: 7px 14px; font-size: .8rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: all .15s ease; }
.sgc-notify-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 10px; }
.sgc-notify-item:last-child { margin-bottom: 0; }
.sgc-notify-item.accent { border-color: rgba(234,179,8,.45); background: rgba(234,179,8,.08); }
.sgc-notify-icon { font-size: 1.35rem; line-height: 1.2; flex: 0 0 auto; }
.sgc-notify-details h4 { margin: 0 0 4px; font-size: .88rem; font-weight: 800; }
.sgc-notify-details p { margin: 0; font-size: .78rem; line-height: 1.75; }

/* ----------------- 28. Home sections & pills (added for the rewrite) */
.home-section { margin-bottom: 40px; }
.subcat-pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 0 14px; scrollbar-width: none; }
.subcat-pills::-webkit-scrollbar { display: none; }
.subcat-pill {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
    border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
    color: var(--text-main) !important; text-decoration: none; padding: 8px 16px;
    font-size: .8rem; font-weight: 700; box-shadow: var(--shadow-card); transition: all .16s ease; white-space: nowrap;
}
.subcat-pill:hover { border-color: var(--royal); color: var(--royal) !important; transform: translateY(-2px); }
.subcat-pill.is-all { background: var(--navy); border-color: var(--navy); color: #fff !important; }
.subcat-pill small { opacity: .62; font-size: .68rem; }
.empty-inline { text-align: center; padding: 22px; }
.empty-inline p { color: var(--text-muted); margin: 0 0 12px; font-size: .86rem; }
.points-balance-card { display: flex; flex-direction: column; gap: 10px; }
.points-value { font-size: 2.6rem; font-weight: 900; color: var(--gold-2); line-height: 1; font-variant-numeric: tabular-nums; }
.points-note { font-size: .8rem; color: var(--text-muted); }
.redeem-preview { background: var(--status-success-bg); border: 1px solid rgba(5,150,105,.25); border-radius: var(--radius-md); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.redeem-preview strong { color: var(--status-success); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.history-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.history-table th { text-align: right; padding: 10px 12px; color: var(--text-muted); font-size: .74rem; border-bottom: 1px solid var(--line); }
.history-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--text-main); }
.history-table tr:last-child td { border-bottom: none; }
.history-plus { color: var(--status-success); font-weight: 800; }
.history-minus { color: var(--status-danger); font-weight: 800; }

/* ------------- Home hero buttons & small additions */
.btn-ghost-light {
    background: rgba(255,255,255,.12) !important; border: 1px solid rgba(255,255,255,.4) !important;
    color: #F1F5F9 !important; box-shadow: none; backdrop-filter: blur(4px);
}
.btn-ghost-light:hover { background: rgba(255,255,255,.2) !important; border-color: rgba(255,255,255,.6) !important; }
.btn-outline {
    background: transparent !important; border: 1px solid var(--line-strong) !important;
    color: var(--text-strong) !important; box-shadow: none;
}
.btn-outline:hover { border-color: var(--royal) !important; color: var(--royal) !important; }
.anchor-offset { display: block; height: 0; scroll-margin-top: 80px; }
.trust-bar-title { font-size: .78rem; font-weight: 800; color: var(--text-muted); letter-spacing: .03em; margin: 0 0 4px; }
.trust-bar-title span { font-weight: 600; opacity: .75; }

/* ------------- Customer sidebar (rewritten) */
.customer-sidebar {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-card);
    padding: 20px 16px; display: flex; flex-direction: column; gap: 14px;
}
.customer-sidebar-head { text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.customer-sidebar-avatar {
    position: relative; width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #DBEAFE, #EFF6FF); border: 2px solid var(--royal);
    display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.customer-sidebar-name { margin: 2px 0 0; font-size: .98rem; font-weight: 800; color: var(--text-strong); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-sidebar-email { font-size: .72rem; color: var(--text-muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-sidebar-pills { display: flex; gap: 6px; justify-content: center; }
.role-pill { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-main); font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 3px 12px; }
.sidebar-balance-widget { padding: 14px; border-radius: var(--radius-lg); text-align: center; background: linear-gradient(160deg, #1E293B 0%, var(--navy) 100%); border: 1px solid rgba(234,179,8,.4); box-shadow: var(--shadow-card); }
.sidebar-balance-label { font-size: .76rem; color: #CBD5E1; display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 4px; }
.sidebar-balance-value { font-size: 1.4rem; font-weight: 900; color: #FDE68A !important; font-variant-numeric: tabular-nums; line-height: 1.25; }
.sidebar-balance-cta { margin-top: 8px; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: .82rem; }
.customer-sidebar-nav { list-style: none; display: flex; flex-direction: column; gap: 4px; padding: 0; margin: 0; }
.customer-sidebar-logout { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }

/* --------- Shared account building blocks (tables, panels, pills) */
.account-main-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.surface-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: clamp(16px, 3vw, 28px); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-title { font-size: 1.25rem; font-weight: 900; color: var(--text-strong); margin: 0 0 4px; }
.panel-sub { color: var(--text-muted); font-size: .82rem; margin: 0; max-width: 62ch; line-height: 1.8; }
.table-scroll { overflow-x: auto; margin-inline: -6px; padding-inline: 6px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; text-align: right; min-width: 640px; }
.data-table thead th { color: var(--text-muted); font-size: .76rem; font-weight: 800; border-bottom: 2px solid var(--line); padding: 10px 12px; white-space: nowrap; }
.data-table tbody td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--text-main); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface-2); }
.cell-strong { font-weight: 800; color: var(--text-strong); }
.cell-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.cell-price { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .cell-price { color: var(--gold); }
.cell-muted { color: var(--text-muted); font-size: .78rem; white-space: nowrap; }
.table-note { font-size: .74rem; color: var(--text-muted); margin: 12px 2px 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 4px 12px; border: 1px solid transparent; white-space: nowrap; }
.status-pill.ok { background: var(--status-success-bg); color: var(--status-success); border-color: rgba(5,150,105,.35); }
.status-pill.pending { background: var(--status-warning-bg); color: var(--status-warning); border-color: rgba(217,119,6,.4); }
.status-pill.danger { background: var(--status-danger-bg); color: var(--status-danger); border-color: rgba(220,38,38,.35); }
.status-pill.info { background: rgba(37,99,235,.1); color: var(--royal); border-color: rgba(37,99,235,.35); }

/* ------------- Loyalty / VIP page */
.loyalty-page { max-width: 1060px; margin-inline: auto; width: 100%; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-title { font-size: clamp(1.25rem, 3.4vw, 1.7rem); font-weight: 900; color: var(--text-strong); margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.page-sub { color: var(--text-muted); font-size: .85rem; margin: 0; max-width: 68ch; line-height: 1.9; }
.loyalty-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.points-balance-card { background: linear-gradient(155deg, #FFFBEB 0%, var(--surface) 55%); border-color: #FDE68A; }
html[data-theme="dark"] .points-balance-card { background: linear-gradient(155deg, #2A2107 0%, var(--surface) 60%); border-color: rgba(234,179,8,.4); }
.points-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.points-card-label { font-size: .78rem; font-weight: 800; color: #A16207; text-transform: uppercase; letter-spacing: .04em; }
html[data-theme="dark"] .points-card-label { color: #FDE68A; }
.points-unit { font-size: .95rem; font-weight: 700; color: var(--text-muted); margin-inline-start: 8px; }
.points-rate-note { background: var(--surface-inset); border: 1px dashed var(--line-strong); border-radius: var(--radius-md); padding: 10px 14px; font-size: .78rem; color: var(--text-main); margin-top: 2px; }
.vip-levels-section { display: flex; flex-direction: column; gap: 12px; }

/* ---- KYC form extras */
.form-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.form-hint { font-size: .74rem; color: var(--text-muted); margin-top: 10px; display: block; line-height: 1.9; }
.req-mark { color: var(--status-danger); }
.kyc-upload-pdf { display: none; font-size: .78rem; font-weight: 800; color: var(--text-main); text-align: center; line-height: 1.7; }
.kyc-upload.is-pdf .kyc-upload-pdf { display: block; }
.kyc-upload.is-pdf .kyc-upload-icon, .kyc-upload.is-pdf .kyc-upload-title, .kyc-upload.is-pdf .kyc-upload-hint { display: none; }
.kyc-upload.has-file .kyc-upload-icon, .kyc-upload.has-file .kyc-upload-title, .kyc-upload.has-file .kyc-upload-hint { display: none; }
.kyc-saved-docs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); }
.kyc-saved-title { font-size: .76rem; font-weight: 800; color: var(--text-main); }
.kyc-saved-link { font-size: .74rem; font-weight: 800; color: var(--royal); text-decoration: none; background: rgba(37,99,235,.09); border: 1px solid rgba(37,99,235,.3); border-radius: 999px; padding: 4px 12px; }
.kyc-saved-link:hover { background: rgba(37,99,235,.16); }
.verified-panel { display: flex; align-items: center; gap: 16px; background: var(--status-success-bg); border: 1px solid rgba(5,150,105,.3); border-radius: var(--radius-lg); padding: 22px; }
.verified-title { font-weight: 900; color: var(--status-success); font-size: 1.05rem; }
.verified-meta { font-size: .82rem; color: var(--text-main); margin-top: 4px; }
.kyc-upload.is-pdf .kyc-upload-preview { display: none; }

/* ---- Security page extras */
.btn-danger { background: var(--status-danger) !important; border: 1px solid var(--status-danger) !important; color: #fff !important; box-shadow: 0 6px 18px rgba(220,38,38,.32); }
.btn-danger:hover { background: #B91C1C !important; border-color: #B91C1C !important; }
.security-inner { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-top: 4px; }
.security-inner--ok { background: var(--status-success-bg); border-color: rgba(5,150,105,.3); }
.security-inner-title { font-size: .98rem; font-weight: 800; color: var(--text-strong); margin: 0 0 10px; }
.security-setup-row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: 16px 0 18px; }
.security-secret-col { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.security-secret-row { display: flex; gap: 10px; align-items: center; }
.security-secret-row .security-secret { flex: 1; }
.totp-input { font-family: ui-monospace, monospace !important; font-size: 1.3rem !important; letter-spacing: .35em; text-align: center; direction: ltr; }
.security-confirm { max-width: 380px; }
.recovery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.recovery-code { background: var(--surface); border: 1px solid rgba(5,150,105,.35); border-radius: var(--radius-md); padding: 9px 6px; text-align: center; font-family: ui-monospace, monospace; font-weight: 800; color: var(--status-success) !important; font-size: .9rem; letter-spacing: .06em; }
.security-danger-zone { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.security-danger-title { color: var(--status-danger); font-size: .95rem; font-weight: 800; margin: 0 0 6px; }

/* ---- Dashboard */
.dashboard-kpi {
    position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: 20px;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.dashboard-kpi-label { font-size: .8rem; color: var(--text-muted); font-weight: 700; }
.dashboard-kpi-value { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; color: var(--text-strong); line-height: 1.15; font-variant-numeric: tabular-nums; }
.dashboard-kpi-value--navy { color: var(--navy); }
html[data-theme="dark"] .dashboard-kpi-value--navy { color: #93C5FD; }
.dashboard-kpi-cta { margin-top: 4px; }
.dashboard-kpi-glyph { position: absolute; bottom: 12px; inset-inline-end: 16px; font-size: 2.6rem; opacity: .12; pointer-events: none; }
.security-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface);
    box-shadow: var(--shadow-card); padding: 16px 20px;
}
.security-banner.is-secure { border-color: rgba(5,150,105,.4); }
.security-banner.is-warning { border-color: rgba(217,119,6,.4); }
.security-banner-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.security-banner-icon { font-size: 1.6rem; }
.security-banner-title { font-size: .98rem; font-weight: 800; color: var(--text-strong); margin: 0 0 2px; }
.security-banner-sub { font-size: .78rem; color: var(--text-muted); margin: 0; }
.text-ok { color: var(--status-success); }
.text-pending { color: var(--status-warning); }

/* ---- Affiliate page */
.referral-hero { background: linear-gradient(135deg, #16233F 0%, var(--navy) 70%); border: 1px solid rgba(234,179,8,.35); border-radius: var(--radius-xl); padding: 22px; box-shadow: var(--shadow-pop); }
.referral-hero-label { font-size: .74rem; font-weight: 800; color: #FDE68A; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.referral-hero-text { color: #CBD5E1; font-size: .84rem; line-height: 1.9; margin: 0 0 14px; max-width: 62ch; }
.referral-hero-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.referral-link { flex: 1 1 240px; background: rgba(2,6,23,.55); border: 1px solid rgba(255,255,255,.22); color: #7DD3FC; border-radius: var(--radius-md); padding: 11px 16px; font-family: ui-monospace, monospace; font-size: .82rem; overflow-x: auto; white-space: nowrap; direction: ltr; user-select: all; }
.kpi-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpi-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.dashboard-kpi-foot { font-size: .68rem; color: var(--text-muted); }
.text-royal { color: var(--royal); }

/* ---- Tickets */
.back-link { color: var(--text-muted); text-decoration: none; font-size: .8rem; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.back-link:hover { color: var(--royal); }
.ticket-subject-link { color: var(--text-strong); text-decoration: none; font-weight: 800; }
.ticket-subject-link:hover { color: var(--royal); }
.status-pill.closed { background: var(--surface-inset); color: var(--text-muted); border-color: var(--line); }
.ticket-thread { display: flex; flex-direction: column; gap: 14px; }
.ticket-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-card); }
.ticket-bubble.is-admin { background: linear-gradient(135deg, #16233F 0%, var(--navy) 75%); border-color: rgba(234,179,8,.35); margin-inline-end: 26px; }
.ticket-bubble.is-user { margin-inline-start: 26px; }
.ticket-bubble-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ticket-bubble-author { display: flex; align-items: center; gap: 10px; }
.ticket-bubble-avatar { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-inset); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.ticket-bubble.is-admin .ticket-bubble-avatar { background: rgba(234,179,8,.2); }
.ticket-bubble-author strong { font-size: .85rem; color: var(--text-strong); }
.ticket-bubble.is-admin .ticket-bubble-author strong { color: #FDE68A; }
.ticket-bubble-author small { font-size: .68rem; color: var(--text-muted); }
.ticket-bubble.is-admin .ticket-bubble-author small { color: #CBD5E1; }
.ticket-bubble-body { font-size: .88rem; line-height: 1.9; color: var(--text-main); white-space: pre-wrap; }
.ticket-bubble.is-admin .ticket-bubble-body { color: #E2E8F0; }
.ticket-closed-note { text-align: center; padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); color: var(--text-muted); font-size: .85rem; }
.ticket-closed-note a { color: var(--royal); font-weight: 700; }

/* ---- Developer API page */
.api-locked { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 24px; }
.api-locked .panel-sub { max-width: 62ch; }
.api-locked-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.secret-notice { background: var(--status-warning-bg); border: 1px solid rgba(217,119,6,.45); border-radius: var(--radius-lg); padding: 20px; }
.secret-notice-title { font-weight: 900; color: var(--status-warning); margin-bottom: 6px; }
.secret-notice-text { font-size: .85rem; color: var(--text-main); margin: 0 0 12px; }
.secret-box { background: var(--navy); border-radius: var(--radius-md); padding: 12px 14px; }
.secret-box-label { font-size: .68rem; color: #94A3B8; margin-bottom: 3px; font-weight: 700; }
.secret-box-value { color: #7DD3FC !important; user-select: all; word-break: break-all; font-size: .85rem; }
.secret-box-value.text-ok { color: #86EFAC !important; }
.create-key-form { display: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 18px; }
.create-key-form.is-open { display: block; }
.create-key-title { font-size: .95rem; font-weight: 800; color: var(--text-strong); margin: 0 0 12px; }
.key-delete-btn { background: none; border: none; color: var(--status-danger); font-size: .8rem; font-weight: 800; cursor: pointer; font-family: inherit; padding: 4px 8px; border-radius: 6px; }
.key-delete-btn:hover { background: var(--status-danger-bg); }
.inline-code { background: var(--surface-inset); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: .78rem; color: var(--royal); direction: ltr; display: inline-block; }
.api-endpoints { display: flex; flex-direction: column; gap: 12px; }
.api-endpoint { display: flex; align-items: flex-start; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.api-method { flex: 0 0 auto; color: #fff; font-size: .68rem; font-weight: 900; padding: 4px 10px; border-radius: 6px; letter-spacing: .04em; }
.api-method--get { background: #059669; }
.api-method--post { background: #2563EB; }
.api-path { font-family: ui-monospace, monospace; color: var(--text-strong); font-size: .9rem; }
.api-desc { color: var(--text-muted); font-size: .8rem; }
.code-block { background: var(--surface-inset); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; font-size: .78rem; color: var(--text-strong); overflow-x: auto; direction: ltr; text-align: left; margin-top: 8px; }
.code-block--dark { background: var(--navy); color: #E2E8F0; border-color: transparent; font-family: ui-monospace, monospace; line-height: 1.75; }

.ledger-balance { font-size: .84rem; color: var(--text-muted); }
.ledger-balance strong { color: var(--status-success); font-variant-numeric: tabular-nums; font-size: 1rem; }
.ledger-notes { color: var(--text-main); max-width: 250px; line-height: 1.6; font-size: .82rem; }

/* ---- Static prose pages (about/faq/legal) */
.prose-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: clamp(20px, 4vw, 40px); max-width: 920px; margin-inline: auto; width: 100%; }
.prose-page h1 { font-size: clamp(1.35rem, 3.6vw, 1.75rem); font-weight: 900; color: var(--text-strong); margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.prose-body { color: var(--text-main); line-height: 1.95; font-size: .93rem; display: flex; flex-direction: column; gap: 14px; }
.prose-body h3 { color: var(--text-strong); font-size: 1.02rem; margin: 6px 0 0; }
.prose-body p { margin: 0; }
.prose-body ul { padding-inline-start: 20px; display: flex; flex-direction: column; gap: 9px; margin: 0; }
.prose-body strong { color: var(--text-strong); }
.prose-callout { margin-top: 18px; padding: 18px; border-radius: var(--radius-lg); background: var(--status-info-soft, rgba(37,99,235,.07)); border: 1px solid rgba(37,99,235,.25); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.prose-callout-title { font-weight: 800; color: var(--text-strong); margin-bottom: 3px; }
.prose-callout-sub { font-size: .8rem; color: var(--text-muted); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 18px 0 6px; }
.contact-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 14px; text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .16s ease, border-color .16s ease; }
.contact-tile:hover { transform: translateY(-3px); border-color: var(--royal); }
.contact-tile-glyph { font-size: 2rem; }
.contact-tile-title { font-weight: 800; color: var(--text-strong); font-size: .9rem; }
.contact-tile-sub { font-size: .74rem; color: var(--text-muted); }
.contact-tile-cta { font-size: .74rem; font-weight: 800; color: var(--royal); }
.faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.faq-item { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px 18px; }
.faq-item summary { cursor: pointer; font-weight: 800; color: var(--text-strong); font-size: .95rem; padding: 12px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--royal); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 14px; color: var(--text-main); font-size: .88rem; line-height: 1.9; }

/* ---- Order success / receipt */
.receipt-wrap { max-width: 760px; margin: 24px auto; width: 100%; }
.receipt-hero { text-align: center; padding: clamp(26px, 5vw, 40px) clamp(18px, 4vw, 30px); }
.receipt-glyph { font-size: 3rem; line-height: 1; margin-bottom: 10px; }
.receipt-title { font-size: clamp(1.25rem, 4.5vw, 1.7rem); font-weight: 900; color: var(--text-strong); margin: 0 0 8px; }
.receipt-meta { color: var(--text-muted); font-size: .88rem; }
.receipt-meta strong { color: var(--text-strong); font-family: ui-monospace, monospace; }
.delivered-card { background: var(--status-ok-soft, rgba(16,185,129,.08)); border: 1px solid rgba(16,185,129,.4); border-radius: var(--radius-xl); padding: clamp(18px, 3vw, 24px); margin-bottom: 20px; }
.delivered-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.delivered-title { font-weight: 800; color: var(--text-strong); font-size: .98rem; }
.delivered-code { background: #0f1a2e; color: #6ee7b7; border: 1px dashed rgba(110,231,183,.45); border-radius: var(--radius-lg); padding: 16px 18px; font-family: ui-monospace, monospace; font-size: 1.2rem; font-weight: 700; letter-spacing: 1.5px; text-align: center; word-break: break-all; }
.delivered-note { margin-top: 10px; font-size: .75rem; color: var(--text-muted); text-align: center; }
.receipt-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft, var(--line)); }
.receipt-line:last-child { border-bottom: none; }
.receipt-row-label { color: var(--text-muted); font-size: .84rem; }
.receipt-row-value { color: var(--text-strong); font-weight: 700; font-size: .9rem; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--line); font-size: 1.15rem; }
.receipt-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.customer-inputs { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; font-size: .86rem; margin-bottom: 18px; }

@media print {
  .no-print, header, footer, .receipt-actions { display: none !important; }
  .receipt-wrap { margin: 0; max-width: 100%; }
  .receipt-hero, .delivered-card, .surface-panel { box-shadow: none; border-color: #ddd; }
}

/* ---- Public agents page (store/agents.php) */
.agents-page { max-width: 880px; margin-inline: auto; padding: 8px 0 24px; }
.agents-head { margin-bottom: 18px; text-align: center; }
.agents-head h1 { font-size: clamp(1.5rem, 4.5vw, 2rem); font-weight: 900; color: var(--text-strong); margin: 0; position: relative; display: inline-block; padding-bottom: 10px; }
.agents-head h1::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 20%; inset-inline-end: 20%; height: 4px; border-radius: 4px; background: var(--navy); }
.agents-list { display: flex; flex-direction: column; gap: 14px; }
.agents-list .agent-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.agent-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.agent-line { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text-main); margin: 0; flex-wrap: wrap; }
.agent-label { color: var(--text-muted); font-size: .76rem; font-weight: 700; }
.agent-wa { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: #25D366; color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 6px 16px rgba(37, 211, 102, .4); transition: transform .18s ease, filter .18s ease; }
.agent-wa:hover { transform: translateY(-2px) scale(1.05); filter: brightness(.95); }
.agent-wa:focus-visible { outline: 3px solid var(--royal); outline-offset: 2px; }

/* ---- Wallet redeem (recharge code) page */
.redeem-page { max-width: 560px; margin-inline: auto; padding: 20px 16px 36px; }
.redeem-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: clamp(26px, 5vw, 40px) clamp(20px, 4vw, 34px); text-align: center; }
.redeem-hero { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 20px; background: linear-gradient(160deg, #1E293B, var(--navy)); color: #FDE047; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(15,23,42,.25); }
.redeem-title { font-size: clamp(1.3rem, 4.5vw, 1.6rem); font-weight: 900; color: var(--text-strong); margin: 0 0 8px; }
.redeem-sub { color: var(--text-muted); font-size: .88rem; margin: 0 0 18px; line-height: 1.9; }
.redeem-note { padding: 12px 16px; border-radius: var(--radius-md); font-size: .85rem; font-weight: 700; margin-bottom: 14px; text-align: right; }
.redeem-note--ok { background: var(--status-success-bg); border: 1px solid rgba(5,150,105,.35); color: var(--status-success); }
.redeem-note--err { background: var(--status-danger-bg); border: 1px solid rgba(220,38,38,.35); color: var(--status-danger); }
.redeem-form { display: flex; flex-direction: column; gap: 12px; text-align: right; }
.redeem-label { font-weight: 800; color: var(--text-strong); font-size: .85rem; }
.redeem-input { padding: 14px 16px; font-size: 1.15rem; font-weight: 800; letter-spacing: .12em; text-align: center; border-radius: var(--radius-md); border: 2px dashed var(--line-strong); background: var(--surface-2); color: var(--text-strong); font-family: ui-monospace, monospace; transition: border-color .15s ease, box-shadow .15s ease; }
.redeem-input:focus { outline: none; border-color: var(--royal); border-style: solid; background: var(--surface); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.redeem-input::placeholder { letter-spacing: normal; font-family: inherit; font-weight: 400; font-size: .9rem; color: var(--text-dim); }
.redeem-submit { background: var(--navy); color: #fff; border: 1px solid var(--navy); padding: 15px 20px; border-radius: var(--radius-md); font-size: 1.02rem; font-weight: 800; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.redeem-submit:hover:not(:disabled) { background: var(--navy-2); transform: translateY(-1px); }
.redeem-submit:disabled { opacity: .65; cursor: wait; }
.redeem-submit.is-loading .redeem-submit-text { opacity: .85; }
.redeem-hint { margin: 14px 0 0; font-size: .74rem; color: var(--text-muted); line-height: 1.9; text-align: right; }

/* Testimonial avatar initials sit on a vivid gradient: keep them white (overrides the inline-color lift) */
.testimonial-avatar { color: #fff !important; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }

/* ============================================================================
 * تفاصيل الطلب (od-) — RTL، mobile-first، معتمدة على رموز التصميم (tokens)
 * البنية: بطاقة الحالة → بطاقة «الرد» → 3-4) بلاطات بعمودين → مستطيل التاريخ
 *         → بطاقة «البيانات المطلوبة للطلب» → الفاتورة.
 * لا تُعرض أي أيقونة كنص/إيموجي — كلها SVG خطية مضمّنة من القالب.
 * ========================================================================== */
.od-wrap { max-width: 780px; margin: clamp(12px, 3vw, 26px) auto; width: 100%; display: flex; flex-direction: column; gap: clamp(10px, 1.8vw, 14px); }
.od-ltr { direction: ltr; unicode-bidi: embed; }

/* أيقونة صغيرة داخل عنوان بطاقة */
.od-title-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--status-info-bg, rgba(37, 99, 235, .12)); color: var(--royal, #2563EB); }
.od-card-title { font-weight: 800; color: var(--text-strong); font-size: .95rem; display: inline-flex; align-items: center; gap: 9px; min-width: 0; }

/* 1) بطاقة الحالة — أعلى يمين الصفحة في RTL (align-self: flex-start) */
.od-status { align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 11px 14px; border-radius: var(--radius-md, 16px); border: 1px solid transparent; box-shadow: var(--shadow-card); }
.od-status-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); }
.od-status-texts { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.od-status-label { font-size: .82rem; }
.od-status-label strong { font-size: .95rem; font-weight: 900; }
.od-status-hint { font-size: .72rem; opacity: .85; overflow-wrap: anywhere; }
.od-status-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: currentColor; margin-inline-start: 4px; box-shadow: 0 0 0 4px rgba(0, 0, 0, .05); animation: od-pulse 1.7s ease-in-out infinite; }
@keyframes od-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.72); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .od-status-dot { animation: none; } }
.od-status--completed  { background: linear-gradient(160deg, #ECFDF5 0%, #D1FAE5 100%); border-color: rgba(5, 150, 105, .42); color: #065F46; }
.od-status--processing { background: linear-gradient(160deg, #EFF6FF 0%, #DBEAFE 100%); border-color: rgba(37, 99, 235, .42); color: #1E3A8A; }
.od-status--pending    { background: linear-gradient(160deg, #FFFBEB 0%, #FEF3C7 100%); border-color: rgba(217, 119, 6, .48); color: #92400E; }
.od-status--partial    { background: linear-gradient(160deg, #F5F3FF 0%, #EDE9FE 100%); border-color: rgba(124, 58, 237, .42); color: #5B21B6; }
.od-status--cancelled  { background: linear-gradient(160deg, #F8FAFC 0%, #E2E8F0 100%); border-color: rgba(71, 85, 105, .38); color: #334155; }
.od-status--failed     { background: linear-gradient(160deg, #FEF2F2 0%, #FECACA 100%); border-color: rgba(220, 38, 38, .42); color: #991B1B; }
.od-status--refunded   { background: linear-gradient(160deg, #F0FDFA 0%, #CCFBF1 100%); border-color: rgba(13, 148, 136, .42); color: #115E59; }
html[data-theme="dark"] .od-status--completed,  html[data-elite-mode="dark"] .od-status--completed,
html[data-theme="dark"] .od-status--processing, html[data-elite-mode="dark"] .od-status--processing,
html[data-theme="dark"] .od-status--pending,    html[data-elite-mode="dark"] .od-status--pending,
html[data-theme="dark"] .od-status--partial,    html[data-elite-mode="dark"] .od-status--partial,
html[data-theme="dark"] .od-status--cancelled,  html[data-elite-mode="dark"] .od-status--cancelled,
html[data-theme="dark"] .od-status--failed,     html[data-elite-mode="dark"] .od-status--failed,
html[data-theme="dark"] .od-status--refunded,   html[data-elite-mode="dark"] .od-status--refunded { background: var(--surface-2); }
html[data-theme="dark"] .od-status--completed,  html[data-elite-mode="dark"] .od-status--completed  { color: #6EE7B7; border-color: rgba(110, 231, 183, .35); }
html[data-theme="dark"] .od-status--processing, html[data-elite-mode="dark"] .od-status--processing { color: #93C5FD; border-color: rgba(147, 197, 253, .35); }
html[data-theme="dark"] .od-status--pending,    html[data-elite-mode="dark"] .od-status--pending    { color: #FCD34D; border-color: rgba(252, 211, 77, .35); }
html[data-theme="dark"] .od-status--partial,    html[data-elite-mode="dark"] .od-status--partial    { color: #C4B5FD; border-color: rgba(196, 181, 253, .35); }
html[data-theme="dark"] .od-status--cancelled,  html[data-elite-mode="dark"] .od-status--cancelled  { color: #CBD5E1; border-color: rgba(203, 213, 225, .3); }
html[data-theme="dark"] .od-status--failed,     html[data-elite-mode="dark"] .od-status--failed     { color: #FCA5A5; border-color: rgba(252, 165, 165, .35); }
html[data-theme="dark"] .od-status--refunded,   html[data-elite-mode="dark"] .od-status--refunded   { color: #5EEAD4; border-color: rgba(94, 234, 212, .35); }
html[data-theme="dark"] .od-status-icon,        html[data-elite-mode="dark"] .od-status-icon        { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.od-reject { margin: 0; }

/* 2) بطاقة «الرد» — عنوان البطاقة الوحيد الظاهر هو «الرد» */
.od-reply { background: var(--surface, #fff); border: 1px solid var(--line); border-inline-start: 4px solid var(--royal, #2563EB); border-radius: var(--radius-lg, 18px); padding: 14px 16px; box-shadow: var(--shadow-card); }
.od-reply-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.od-reply-body { background: var(--surface-2, #F8FAFC); border: 1px dashed var(--line-strong, var(--line)); border-radius: var(--radius-md, 14px); padding: 12px 14px; font-size: .9rem; line-height: 1.9; color: var(--text-strong); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; user-select: text; max-height: 260px; overflow-y: auto; unicode-bidi: plaintext; text-align: start; }
.od-reply-body.is-empty { color: var(--text-muted); }
.od-reply-body:focus-visible { outline: 2px solid var(--royal, #2563EB); outline-offset: 2px; }
.od-copy-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--navy, #0F172A); background: var(--navy, #0F172A); color: #F8FAFC; font-size: .76rem; font-weight: 800; font-family: inherit; border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: transform .15s ease, filter .15s ease; }
.od-copy-btn:hover { filter: brightness(1.18); transform: translateY(-1px); }
.od-copy-btn:focus-visible { outline: 2px solid var(--royal, #2563EB); outline-offset: 2px; }

/* 3-4) بلاطات ملونة — صفان، كل صف صندوقان متجاوران */
.od-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.od-tile { position: relative; display: flex; align-items: center; gap: 12px; border-radius: var(--radius-md, 16px); padding: 14px 16px; border: 1px solid transparent; box-shadow: var(--shadow-card); min-width: 0; }
.od-tile-icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06); color: inherit; }
.od-tile-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.od-tile-label { font-size: .68rem; font-weight: 700; opacity: .78; letter-spacing: .015em; }
.od-tile-value { font-size: 1.04rem; font-weight: 900; line-height: 1.45; color: inherit; overflow-wrap: anywhere; }
.od-tile-value--wrap { font-size: .88rem; line-height: 1.65; }
.od-tile-value--mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; letter-spacing: .02em; }
.od-tile-sub { font-size: .66rem; opacity: .85; overflow-wrap: anywhere; }
.od-tile--indigo  { background: linear-gradient(150deg, #EEF2FF 0%, #E0E7FF 100%); border-color: rgba(99, 102, 241, .34); color: #3730A3; }
.od-tile--royal   { background: linear-gradient(150deg, #EFF6FF 0%, #DBEAFE 100%); border-color: rgba(37, 99, 235, .34); color: #1E3A8A; }
.od-tile--emerald { background: linear-gradient(150deg, #ECFDF5 0%, #D1FAE5 100%); border-color: rgba(5, 150, 105, .34); color: #065F46; }
.od-tile--amber   { background: linear-gradient(150deg, #FFFBEB 0%, #FEF3C7 100%); border-color: rgba(217, 119, 6, .4); color: #92400E; }
html[data-theme="dark"] .od-tile--indigo,  html[data-elite-mode="dark"] .od-tile--indigo  { background: rgba(99, 102, 241, .16); border-color: rgba(165, 180, 252, .32); color: #C7D2FE; }
html[data-theme="dark"] .od-tile--royal,   html[data-elite-mode="dark"] .od-tile--royal   { background: rgba(59, 130, 246, .16); border-color: rgba(147, 197, 253, .32); color: #BFDBFE; }
html[data-theme="dark"] .od-tile--emerald, html[data-elite-mode="dark"] .od-tile--emerald { background: rgba(16, 185, 129, .15); border-color: rgba(110, 231, 183, .3); color: #A7F3D0; }
html[data-theme="dark"] .od-tile--amber,   html[data-elite-mode="dark"] .od-tile--amber   { background: rgba(245, 158, 11, .15); border-color: rgba(252, 211, 77, .3); color: #FDE68A; }
html[data-theme="dark"] .od-tile-icon,     html[data-elite-mode="dark"] .od-tile-icon     { background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.od-tile-copy { position: absolute; top: 10px; inset-inline-end: 10px; width: 31px; height: 31px; border-radius: 9px; border: 1px solid rgba(15, 23, 42, .16); background: rgba(255, 255, 255, .78); color: #1E293B; cursor: pointer; line-height: 1; display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease; }
.od-tile-copy:hover { background: #fff; }
.od-tile-copy:focus-visible { outline: 2px solid var(--royal, #2563EB); outline-offset: 2px; }
html[data-theme="dark"] .od-tile-copy, html[data-elite-mode="dark"] .od-tile-copy { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); color: #E2E8F0; }
/* مسافة داخلية إضافية بزر النسخ حتى لا يغطي القيمة */
.od-tile--indigo { padding-inline-end: 46px; }

/* 5) مستطيل التاريخ بعرض كامل */
.od-datebar { display: flex; align-items: center; gap: 14px; border-radius: var(--radius-lg, 18px); padding: 13px 18px; background: linear-gradient(120deg, #0B1730 0%, #16233F 55%, #101C36 100%); color: #E2E8F0; border: 1px solid rgba(148, 163, 184, .28); box-shadow: var(--shadow-card); }
.od-datebar-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(253, 230, 138, .12); color: #FDE68A; }
.od-datebar-label { font-size: .8rem; font-weight: 700; opacity: .82; }
.od-datebar-value { font-size: 1.02rem; font-weight: 800; letter-spacing: .04em; color: #FDE68A; margin-inline-start: auto; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* 6) بطاقة «البيانات المطلوبة للطلب» — حقول بنسخ مستقل */
.od-inputs { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--radius-lg, 18px); padding: 14px 16px; box-shadow: var(--shadow-card); }
.od-inputs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.od-inputs-note { font-size: .68rem; color: var(--text-muted); }
.od-inputs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.od-field { background: var(--surface-2, #F8FAFC); border: 1px solid var(--line); border-radius: var(--radius-md, 14px); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.od-field-label { font-size: .7rem; font-weight: 800; color: var(--text-muted); }
.od-field-row { display: flex; align-items: center; gap: 8px; }
.od-field-value { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; color: var(--text-strong); background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; overflow-wrap: anywhere; word-break: break-word; user-select: text; }
.od-field-copy { position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface, #fff); color: var(--royal, #2563EB); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: border-color .15s ease, transform .15s ease; }
.od-field-copy:hover { border-color: var(--royal, #2563EB); transform: translateY(-1px); }
.od-field-copy:focus-visible { outline: 2px solid var(--royal, #2563EB); outline-offset: 2px; }

/* تلميح «تم النسخ» العائم للأزرار الأيقونية */
.od-tile-copy, .od-field-copy { overflow: visible; }
.od-copy-tip { position: absolute; bottom: calc(100% + 7px); inset-inline-end: 0; background: var(--navy, #0F172A); color: #F8FAFC; font-size: .66rem; font-weight: 800; line-height: 1; padding: 6px 11px; border-radius: 999px; white-space: nowrap; opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; z-index: 6; box-shadow: var(--shadow-card); }
.is-copied .od-copy-tip { opacity: 1; transform: translateY(0); background: #059669; }
.is-failed .od-copy-tip { opacity: 1; transform: translateY(0); background: #DC2626; }

/* أيقونة عنوان الفاتورة وبطاقة الكود الرقمي */
.od-invoice-title { display: inline-flex; align-items: center; gap: 9px; }
.delivered-title-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--status-info-bg, rgba(37, 99, 235, .12)); color: var(--royal, #2563EB); flex: 0 0 auto; }
.delivered-title { display: flex !important; align-items: center; gap: 9px; flex-wrap: wrap; }

/* زر إجراء بأيقونة */
.od-action-btn { display: inline-flex; align-items: center; gap: 9px; }

/* الفاتورة */
.od-invoice-foot { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.od-discount { color: var(--status-success, #059669); font-weight: 800; }

/* استجابة: الشاشات الصغيرة */
@media (max-width: 640px) {
  .od-grid { grid-template-columns: 1fr; }
  .od-status { align-self: stretch; }
  .od-datebar { flex-wrap: wrap; padding: 12px 14px; }
  .od-datebar-value { margin-inline-start: 0; width: 100%; }
  .od-inputs-grid { grid-template-columns: 1fr; }
  .od-wrap { margin: 12px auto; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .od-copy-btn, .od-field-copy, .od-tile-copy, .od-copy-tip { transition: none; }
}

/* طباعة: إخفاء أدوات النسخ والأزرار، بلا ظلال */
@media print {
  .od-copy-btn, .od-tile-copy, .od-field-copy, .od-copy-tip, .receipt-actions { display: none !important; }
  .od-tile, .od-reply, .od-inputs, .od-datebar, .od-status { box-shadow: none !important; border-color: var(--line) !important; break-inside: avoid; }
  .od-wrap { max-width: 100%; }
}

/* =========================================================================
   Media fallback — reusable decorative placeholder for products/categories
   WITHOUT artwork (empty / missing / broken image URL). Rendered by
   media_fallback_html() (app/Core/Helpers.php). Fills its parent box exactly,
   so card layouts and tile sizes never change. Palette is selected
   deterministically from the name hash (v0..v3), giving every product a
   stable visual identity with an elegant, muted look that matches both the
   light (classic) and night (elite) surfaces.
   ========================================================================= */
.media-fallback {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10% 9%;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
    isolation: isolate;
    font-family: inherit;
    color: #fff;
    user-select: none;
}
.media-fallback[hidden] { display: none !important; }

.media-fallback--v0 { background: linear-gradient(155deg, #182742 0%, #1E3A8A 58%, #2F5FD8 125%); }
.media-fallback--v1 { background: linear-gradient(155deg, #0F2E33 0%, #134E4A 58%, #0F766E 125%); }
.media-fallback--v2 { background: linear-gradient(155deg, #241A35 0%, #3B2B52 58%, #6D28D9 135%); }
.media-fallback--v3 { background: linear-gradient(155deg, #2B211B 0%, #46301F 58%, #B45309 140%); }

/* soft radial light from the top + a cold glow at the bottom — zero images */
.media-fallback::before {
    content: "";
    position: absolute;
    top: -42%; left: 50%;
    width: 150%; aspect-ratio: 2/1;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,255,255,.17), rgba(255,255,255,0) 72%);
    z-index: 0;
    pointer-events: none;
}
.media-fallback::after {
    content: "";
    position: absolute;
    bottom: -46%; left: -22%;
    width: 95%; aspect-ratio: 1/1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,255,255,.09), rgba(255,255,255,0) 70%);
    z-index: 0;
    pointer-events: none;
}

.media-fallback__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.media-fallback__name {
    position: relative;
    z-index: 1;
    font-size: clamp(.72rem, .6rem + 1.35vw, 1.02rem);
    font-weight: 800;
    line-height: 1.55;
    letter-spacing: .01em;
    color: rgba(255,255,255,.97);
    text-shadow: 0 1px 2px rgba(2,6,23,.45), 0 6px 22px rgba(2,6,23,.4);
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Large showcase variant (product page header, wide hero tiles) */
.media-fallback--lg .media-fallback__name {
    font-size: clamp(.8rem, .65rem + 1.1vw, 1.15rem);
    -webkit-line-clamp: 2;
}
/* Compact variant (search dropdown rows, purchase modal thumbnail) */
.media-fallback--sm { padding: 6px; border-radius: inherit; }
.media-fallback--sm .media-fallback__name {
    font-size: .42rem;
    -webkit-line-clamp: 3;
    line-height: 1.35;
    text-shadow: none;
}
.media-fallback--sm .media-fallback__art { opacity: .55; }

/* Search-dropdown thumbnail wrap: pairs an <img> with the unified fallback
   (the fallback reveals itself only if the image fails to load). */
.sgc-thumb-wrap { position: relative; display: inline-flex; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; }
.sgc-thumb-wrap--sm { width: 34px; height: 34px; border-radius: 8px; }
.sgc-thumb-wrap > img, .sgc-thumb-wrap > span.media-fallback { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; }

.purchase-product-media { position: relative; width: 62px; height: 62px; flex: 0 0 auto; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.purchase-product-media .purchase-product-img { width: 100%; height: 100%; }
