/* V2 dark glass mode. Loaded after white-glass.css and activated store-wide by the saved admin setting. */
body[data-color-mode="dark"] {
    color-scheme: dark;
    --text-primary: #edf2fb;
    --text-secondary: #b4bfd0;
    --text-muted: #8793a7;
    --shadow: 0 16px 48px rgba(0,0,0,.38);
    --border: rgba(210,222,242,.14);
    --border-hover: rgba(var(--accent-rgb),.48);
    --danger: #ff6b81;
    --danger-hover: #ff8798;
    --success: #56d991;
    --warning: #f4bb55;
    --glass-surface: linear-gradient(145deg,rgba(22,27,38,.94),rgba(10,14,23,.84));
}

body[data-color-mode="dark"] .store-backdrop { background: radial-gradient(ellipse at 50% 35%,#182033 0,transparent 68%),var(--bg-primary); }
body[data-color-mode="dark"] .store-backdrop-blur { opacity:.3; filter:blur(30px) saturate(.75) brightness(.55); }
body[data-color-mode="dark"] .store-backdrop-focus { opacity:.72; filter:saturate(.82) contrast(1.02) brightness(.58); }
body[data-color-mode="dark"] .store-backdrop-side { opacity:.72; filter:saturate(.82) contrast(1.02) brightness(.58); }
body[data-color-mode="dark"] .store-backdrop.background-mode-center::before { background:linear-gradient(90deg,#05070d 0%,rgba(5,7,13,.94) 25%,rgba(5,7,13,.72) 45%,rgba(5,7,13,.30) 72%,rgba(5,7,13,.08) 86%,transparent 100%); }
body[data-color-mode="dark"] .store-backdrop.background-mode-center::after { background:linear-gradient(270deg,#05070d 0%,rgba(5,7,13,.94) 25%,rgba(5,7,13,.72) 45%,rgba(5,7,13,.30) 72%,rgba(5,7,13,.08) 86%,transparent 100%); }

body[data-color-mode="dark"] .navbar { border-color:rgba(220,230,247,.14); box-shadow:0 9px 34px rgba(0,0,0,.32); }
body[data-color-mode="dark"] .navbar::before { background:rgba(12,16,25,.78); }
body[data-color-mode="dark"] .nav-logo i,
body[data-color-mode="dark"] .nav-toggle { background:rgba(26,32,44,.9); }
body[data-color-mode="dark"] .nav-auth,
body[data-color-mode="dark"] .nav-auth.active,
body[data-color-mode="dark"] .nav-auth:hover { color:#fff !important; background:linear-gradient(135deg,var(--accent),var(--accent2)) !important; }
body[data-color-mode="dark"] .nav-profile-dropdown { background:rgba(14,18,28,.98); }
body[data-color-mode="dark"] .profile-dropdown-item:hover,
body[data-color-mode="dark"] .admin-side-link:hover { background:rgba(var(--accent-rgb),.12); }
body[data-color-mode="dark"] .nav-backdrop { background:rgba(0,0,0,.58); }
body[data-color-mode="dark"] .site-footer { color:var(--text-muted); background:rgba(7,10,16,.58); border-color:rgba(220,230,247,.12); }

body[data-color-mode="dark"] :is(.stats-banner-bg,.home-section-header,.store-section-header) { background:linear-gradient(135deg,rgba(25,31,43,.72),rgba(9,13,21,.54)); border-color:rgba(220,230,247,.16); box-shadow:0 16px 44px rgba(0,0,0,.30),inset 0 1px rgba(255,255,255,.05); }
body[data-color-mode="dark"] .stats-banner-bg::before { background:linear-gradient(112deg,rgba(255,255,255,.06),transparent 38%,rgba(var(--accent-rgb),.06) 68%,rgba(255,255,255,.04)); }
body[data-color-mode="dark"] .stats-banner .stat-item:hover { background:rgba(255,255,255,.05); }
body[data-color-mode="dark"] .stat-stock .stat-item-icon { color:#79bce9; background:rgba(50,135,194,.17); }
body[data-color-mode="dark"] .stat-sold .stat-item-icon { color:#72d4a6; background:rgba(41,153,101,.16); }
body[data-color-mode="dark"] .stat-topup .stat-item-icon { color:#ef91af; background:rgba(190,72,111,.17); }
body[data-color-mode="dark"] :is(.section-header,.admin-header) { background:rgba(15,20,30,.84); border-color:rgba(220,230,247,.14); }

body[data-color-mode="dark"] :is(.settings-card,.admin-card,.stat-card,.dashboard-section,.table-wrapper,.topup-card,.contact-card,.gacha-info-bar,.gacha-game-card,.gacha-item-card,.empty-state,.product-detail-info,.product-card,.category-card,.bank-info-card,.auth-card) { border-color:rgba(220,230,247,.14); box-shadow:var(--shadow),0 0 0 1px rgba(255,255,255,.025); }
body[data-color-mode="dark"] .form-control { color:var(--text-primary); background-color:rgba(8,12,20,.84); border-color:rgba(210,222,242,.15); }
body[data-color-mode="dark"] .form-control:focus { background-color:rgba(10,15,24,.96); }
body[data-color-mode="dark"] .form-control::placeholder { color:#6f7b8e; }
body[data-color-mode="dark"] :is(select.form-control,option) { color:var(--text-primary); background:#111722; }
body[data-color-mode="dark"] .swal-dark-popup { color:var(--text-primary) !important; background:#121824 !important; border-color:rgba(220,230,247,.15); }
body[data-color-mode="dark"] :is(.revenue-card,.offset-card,.slip-mode-toggle,.slip-upload-zone,.slip-preview img,.gacha-spin-container,.gacha-spin-item,.gacha-item-code,.card-reward-code) { background:#111722; }
body[data-color-mode="dark"] .offset-input { color:var(--text-primary) !important; background:#0b1019 !important; }
body[data-color-mode="dark"] .csgo-spin-item-name { color:var(--text-primary); background:rgba(14,19,29,.9); }
body[data-color-mode="dark"] .gacha-card-back { background:linear-gradient(140deg,#1d2635,#0c111b); border-color:rgba(220,230,247,.16); }
body[data-color-mode="dark"] .gacha-card-front:is(.rarity-common,.rarity-uncommon,.rarity-rare,.rarity-epic,.rarity-legendary) { background:linear-gradient(140deg,#1a2230,#0d121d); }
body[data-color-mode="dark"] .gacha-card-front-rarity { background:rgba(9,13,21,.88); }

body[data-color-mode="dark"] .store-intro { border-color:rgba(220,230,247,.15); background:linear-gradient(120deg,rgba(22,28,39,.92),rgba(9,13,21,.72)); }
body[data-color-mode="dark"] :is(.intro-art,.intro-brand > span) { color:var(--accent); border-color:rgba(220,230,247,.16); background:linear-gradient(135deg,rgba(28,36,50,.9),rgba(12,17,27,.76)); box-shadow:20px 24px 60px rgba(0,0,0,.24),inset 1px 1px rgba(255,255,255,.06); }
body[data-color-mode="dark"] .site-logo-preview { background:rgba(15,20,30,.82); }
body[data-color-mode="dark"] .site-background-preview { border-color:rgba(220,230,247,.14); background:linear-gradient(135deg,#111a29,#1d1520); box-shadow:inset 0 0 48px #05070d,0 12px 34px rgba(0,0,0,.30); }
body[data-color-mode="dark"] .site-background-preview::after { background:linear-gradient(90deg,rgba(7,10,17,.34),transparent 24%,transparent 76%,rgba(7,10,17,.34)); }
body[data-color-mode="dark"] .site-background-preview > img { filter:brightness(.62) saturate(.82); }
body[data-color-mode="dark"] .site-background-preview span { color:var(--text-primary); border-color:rgba(220,230,247,.16); background:rgba(13,18,28,.82); }

body[data-color-mode="dark"] .popup-image-row { background:rgba(12,17,26,.62); }
body[data-color-mode="dark"] .site-popup-overlay { background:rgba(0,0,0,.55); }
body[data-color-mode="dark"] .site-popup-dialog { border-color:rgba(220,230,247,.16); background:rgba(11,15,24,.88); box-shadow:0 28px 90px rgba(0,0,0,.56),inset 0 1px rgba(255,255,255,.05); }
body[data-color-mode="dark"] .site-popup-stage { background:rgba(8,12,19,.76); }
body[data-color-mode="dark"] :is(.site-popup-close,.site-popup-arrow,.site-popup-snooze) { color:var(--text-primary); border-color:rgba(220,230,247,.18); background:rgba(15,21,32,.78); }
body[data-color-mode="dark"] .site-popup-dots { background:rgba(11,16,25,.76); }

body[data-color-mode="dark"] .auth-shell { border-color:rgba(220,230,247,.15); background:rgba(13,18,28,.88); box-shadow:0 24px 80px rgba(0,0,0,.36); }
body[data-color-mode="dark"] .auth-story { border-color:rgba(220,230,247,.12); background:radial-gradient(ellipse at 10% 90%,rgba(var(--accent-rgb),.15) 0,transparent 65%),radial-gradient(ellipse at 100% 15%,rgba(130,105,180,.12) 0,transparent 60%),#111722; }
body[data-color-mode="dark"] .auth-brand-fallback { border-color:rgba(220,230,247,.16); background:rgba(22,29,42,.76); box-shadow:0 16px 38px rgba(0,0,0,.25),inset 0 1px rgba(255,255,255,.05); }
body[data-color-mode="dark"] .auth-tabs { background:#0c111b; border-color:rgba(220,230,247,.12); }
body[data-color-mode="dark"] .auth-tabs a[aria-selected=true] { color:var(--accent); background:#1a2230; box-shadow:0 2px 10px rgba(0,0,0,.24); }
body[data-color-mode="dark"] .password-field button:hover { background:rgba(var(--accent-rgb),.12); }
body[data-color-mode="dark"] .auth-message.is-error { color:#ff9aae; background:rgba(180,45,74,.16); border-color:rgba(255,107,129,.25); }
body[data-color-mode="dark"] .auth-message.is-success { color:#75dda4; background:rgba(35,116,78,.17); border-color:rgba(86,217,145,.24); }

body[data-color-mode="dark"] .admin-sidebar-v2 { border-color:rgba(220,230,247,.14); background:rgba(13,18,28,.88); }
body[data-color-mode="dark"] .admin-nav-label,
body[data-color-mode="dark"] .admin-side-link i { color:#7f8ca0; }
body[data-color-mode="dark"] .theme-mode-icon.is-light { color:#e0b85a; background:rgba(181,131,32,.16); }
body[data-color-mode="dark"] .theme-mode-icon.is-dark { color:#b9ceff; background:rgba(68,105,177,.22); }

@media (max-width:900px) {
    body[data-color-mode="dark"] .nav-menu { background:rgba(10,14,22,.96); border-color:rgba(220,230,247,.14); box-shadow:-16px 0 60px rgba(0,0,0,.46); }
}
@media (max-width:700px) {
    body[data-color-mode="dark"] .store-backdrop.background-mode-center::before { background:linear-gradient(90deg,rgba(5,7,13,.86),transparent); }
    body[data-color-mode="dark"] .store-backdrop.background-mode-center::after { background:linear-gradient(270deg,rgba(5,7,13,.86),transparent); }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
    body[data-color-mode="dark"] .navbar::before,
    body[data-color-mode="dark"] .nav-menu,
    body[data-color-mode="dark"] .auth-shell { background:#101620; }
}
