@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;800&display=swap');

:root {
  --bg-color: #050b14; --panel-bg: #0d131f; --inner-bg: #06090f; 
  --border: rgba(255, 255, 255, 0.06); --border-subtle: rgba(255, 255, 255, 0.03);
  --text-main: #f8f9fa; --text-muted: #94a3b8;
  --primary: #6e8dff; --primary-glow: #8e63ff;
  --green: #2de38b; --red: #ff4757; --purple: #a855f7;
  --shadow-glow: 0 8px 32px rgba(110, 141, 255, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background-color: var(--bg-color); color: var(--text-main); min-height: 100vh; overflow-x: hidden; position: relative; padding-bottom: 120px; }
img { max-width: 100%; height: auto; display: block; }
.topbar, .shell { animation: pageFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes pageFadeIn { 0% { opacity: 0; transform: translateY(15px); } 100% { opacity: 1; transform: translateY(0); } }

.bg-orb { position: fixed; border-radius: 50%; filter: blur(90px); opacity: 0.15; z-index: -1; animation: float 20s infinite ease-in-out alternate; pointer-events: none; }
.orb-1 { width: 500px; height: 500px; background: var(--primary); top: -10%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: var(--purple); bottom: -10%; right: -5%; animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 50px) scale(1.1); } 100% { transform: translate(-20px, -30px) scale(0.9); } }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
.text-green { color: var(--green) !important; } .text-purple { color: var(--purple) !important; } .text-gray { color: var(--text-muted) !important; } .text-main { color: var(--text-main) !important; } .text-primary { color: var(--primary) !important; }
.text-center { text-align: center; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; } .w-100 { width: 100%; } .flex-1 { flex: 1; } .flex-row { display: flex; align-items: center; } .flex-center { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gradient-text { background: linear-gradient(135deg, #4facfe, #00f2fe); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hidden { display: none !important; }

.shell { max-width: 1240px; margin: 0 auto; padding: 20px; width: 100%; }
.glass-panel, .dark-panel { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.4); }
.panel { padding: 24px; }
.inner-box { background: var(--inner-bg); border: 1px solid var(--border-subtle); border-radius: 12px; }

.topbar { max-width: 1240px; margin: 20px auto; padding: 15px 24px; display: flex; justify-content: space-between; align-items: center; border-radius: 99px; width: calc(100% - 40px); }
.brand-logo { font-size: 22px; font-weight: 800; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px;}
.brand-zone { text-decoration: none;}
.subtitle { font-size: 13px; color: var(--text-muted); margin-left: 30px;}
.topbar-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.btn { border: none; font-family: inherit; font-size: 15px; font-weight: 600; border-radius: 12px; padding: 12px 20px; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { transform: scale(0.96); }
.btn-glow { background: linear-gradient(135deg, var(--primary), var(--primary-glow)); color: #fff; box-shadow: 0 4px 15px rgba(110, 141, 255, 0.4); }
.btn-glow:hover { box-shadow: 0 6px 20px rgba(110, 141, 255, 0.6); filter: brightness(1.1); }
.btn-outline { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid var(--border); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.btn-green { background: var(--green); color: #000; font-weight: 700; box-shadow: 0 4px 15px rgba(45, 227, 139, 0.3); }
.btn-disabled { background: rgba(255,255,255,0.05) !important; color: #666 !important; cursor: not-allowed; width: 100%; box-shadow: none !important; }

.form-stack { display: flex; flex-direction: column; gap: 16px; }
.input { width: 100%; background: #06090f; border: 1px solid var(--border); color: #fff; padding: 14px 16px; border-radius: 12px; transition: all 0.3s; font-family: inherit;}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(110, 141, 255, 0.15); outline: none; }
.input-large { font-size: 16px; padding: 16px 20px; border-radius: 16px; }
select.input { appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 1em; }

.pill { padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pill-muted { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }
.pill-admin { background: rgba(168, 85, 247, 0.2); color: #e9d5ff; border: 1px solid rgba(168, 85, 247, 0.4); text-transform: uppercase; letter-spacing: 1px; }
.pill-pending { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.4); }
.pill-success { background: rgba(45, 227, 139, 0.2); color: #2de38b; border: 1px solid rgba(45, 227, 139, 0.4); }
.pill-danger { background: rgba(255, 71, 87, 0.2); color: #ff4757; border: 1px solid rgba(255, 71, 87, 0.4); }

.floating-contact { position: fixed; bottom: 100px; right: 20px; display: flex; flex-direction: column; gap: 15px; z-index: 9998; }
.contact-btn { width: 45px; height: 45px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 22px; color: #fff; text-decoration: none; box-shadow: 0 4px 15px rgba(0,0,0,0.4); transition: 0.3s; border: 2px solid rgba(255,255,255,0.1); }
.contact-btn:hover { transform: scale(1.1); }
.btn-zalo { background: #0068ff; } .btn-mess { background: linear-gradient(45deg, #00c6ff, #0072ff); }

.marquee-container { background: rgba(110, 141, 255, 0.1); border-left: 4px solid var(--primary); padding: 12px 20px; display: flex; align-items: center; gap: 15px; overflow: hidden; border-radius: 12px; margin-bottom: 20px; }
.marquee-icon { font-size: 24px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.marquee-content { white-space: nowrap; animation: marquee 20s linear infinite; font-size: 14px; font-weight: 500; color: #fff; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }


.auth-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px; align-items: center; min-height: 50vh; }
.hero-panel { position: relative; padding: 40px; }
.hero-panel h1 { font-size: clamp(32px, 5vw, 50px); margin-bottom: 20px; line-height: 1.1; }
.auth-tabs { display: flex; gap: 10px; background: rgba(0,0,0,0.2); padding: 6px; border-radius: 16px; border: 1px solid var(--border); }
.tab { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 12px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: 0.3s; }
.tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-glow)); color: #fff; box-shadow: 0 4px 15px rgba(110, 141, 255, 0.3); }

.app-grid { display: grid; gap: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card { display: flex; align-items: center; gap: 15px; padding: 20px; transition: transform 0.3s; }
.stat-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); }
.stat-icon { width: 50px; height: 50px; border-radius: 14px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.stat-value { font-size: clamp(20px, 4vw, 24px); font-weight: 800; margin-top: 4px; word-break: break-all; }

.quick-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 15px; margin-top: 15px;}
.quick-link-card { background: var(--inner-bg); border: 1px solid var(--border-subtle); padding: 15px 10px; border-radius: 16px; text-align: center; text-decoration: none; color: #fff; font-weight: 600; font-size: 13px; transition: 0.3s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;}
.quick-link-card:hover { background: rgba(110,141,255,0.1); border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow-glow); }
.quick-link-card ion-icon { font-size: 32px; color: var(--primary); }

.about-list { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.about-item { display: flex; align-items: flex-start; gap: 15px; padding: 20px 24px; }
.about-item h3 { font-size: 16px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px;}
.about-item p { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin: 0; }

.leaderboard-container { background: var(--inner-bg); border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); max-height: 450px; overflow-y: auto; padding: 15px; scrollbar-width: none; }
.leaderboard-container::-webkit-scrollbar { display: none; }
.leaderboard-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; background: rgba(255,255,255,0.02); border-radius: 12px; margin-bottom: 8px; transition: 0.3s; border: 1px solid transparent; }
.leaderboard-item:hover { background: rgba(255,255,255,0.05); transform: translateX(5px); }
.lb-left { display: flex; align-items: center; gap: 15px; }
.rank-number { font-size: 18px; font-weight: 800; color: var(--text-muted); width: 30px; text-align: center; }
.rank-medal { font-size: 28px; width: 30px; text-align: center; display: inline-block; }
.lb-avatar { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--border); object-fit: cover; flex-shrink: 0;}
.lb-info { display: flex; flex-direction: column; }
.lb-name { font-size: 15px; color: #fff; font-weight: 700; display: flex; align-items: center; gap: 5px; word-break: break-word;}
.lb-role { font-size: 11px; color: var(--primary); text-transform: uppercase; font-weight: 600; margin-top: 2px; }
.lb-right { font-size: 15px; letter-spacing: 0.5px; white-space: nowrap; display:flex; flex-direction:column; align-items:flex-end; gap:4px;}

.profile-card { max-width: 550px; margin: 0 auto; padding: 30px 24px; }
.profile-avatar-wrap { display: inline-block; padding: 4px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--purple)); margin-bottom: 10px; }
.profile-avatar { border-radius: 50%; width: 90px; height: 90px; border: 3px solid var(--panel-bg); }
.vip-progress-bg { background: rgba(255,255,255,0.05); height: 10px; border-radius: 10px; overflow: hidden; margin-top: 15px; width: 100%; border: 1px solid var(--border); }
.vip-progress-bar { height: 100%; background: linear-gradient(90deg, #00f2fe, #4facfe, #8e63ff); transition: width 1s ease-in-out; border-radius: 10px;}
.vip-text-small { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; justify-content: space-between; font-weight: 500;}

.btn-admin-zone { background: linear-gradient(90deg, #ff4757, #ff6b81); color: white; border: none; font-weight: 700; box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4); padding: 16px; border-radius: 12px; text-transform: uppercase; font-size: 14px; letter-spacing: 0.5px;}
.profile-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px;}
.btn-profile-action { background: var(--inner-bg); border: 1px solid var(--border-subtle); color: #fff; padding: 14px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: none; transition: 0.2s;}
.btn-profile-action:hover { background: rgba(255,255,255,0.05); }

.spin-panel { padding: 40px 24px; max-width: 500px; margin: 0 auto; }
.spin-wrapper { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1 / 1; margin: 0 auto 30px; display: flex; justify-content: center; align-items: center; }
.wheel-box { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; box-shadow: 0 0 40px rgba(0,0,0,0.8); transform-origin: center center; will-change: transform; transition: transform 4s cubic-bezier(0.15, 0.83, 0.25, 1); }
.wheel-img { width: 100%; height: 100%; object-fit: cover; display: block; transform: rotate(45deg); }
.spin-btn-img { position: absolute; top: 48%; left: 50%; transform: translate(-50%, -50%); width: 35%; max-width: 110px; height: auto; cursor: pointer; z-index: 10; transition: transform 0.2s; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6)); }
.spin-btn-img:active { transform: translate(-50%, -50%) scale(0.92); }

.bank-card { background: #1e293b; padding: 0; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.bank-info { display: flex; align-items: center; gap: 15px; padding: 25px; background: #253b6e; border-bottom: 1px solid rgba(255,255,255,0.05); }
.bank-logo { width: 80px; height: auto; background: #fff; padding: 8px; border-radius: 12px; flex-shrink: 0;}
.bank-name { font-size: 13px; color: #cbd5e1; margin-bottom: 4px;}
.bank-number { font-size: clamp(20px, 5vw, 28px); font-weight: 800; letter-spacing: 2px; margin: 0 0 4px 0; word-break: break-all; color: #fff;}
.bank-owner { font-size: 14px; font-weight: 700; text-transform: uppercase; color: #e2e8f0; }
.transfer-box { background: transparent; padding: 25px; display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
.transfer-box-inner { background: rgba(0,0,0,0.2); border: 2px dashed rgba(255,255,255,0.2); border-radius: 16px; padding: 20px; display: flex; flex-direction: row; gap: 20px; align-items: center; justify-content: space-between; }
.transfer-left { flex: 1; display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.transfer-right { width: 140px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; background: #fff; padding: 10px; border-radius: 12px; }
.transfer-right img { width: 100%; height: auto; border-radius: 8px; }
.qr-text { font-size: 11px; font-weight: 700; color: #000; text-align: center; }
.warning-text { font-size: 12px; line-height: 1.6; color: #cbd5e1; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;}
.transfer-code { background: #000; padding: 16px; text-align: center; font-family: monospace; font-size: clamp(16px, 4vw, 22px); font-weight: bold; border-radius: 8px; color: var(--green); letter-spacing: 1px; word-break: break-all; box-shadow: inset 0 0 10px rgba(45, 227, 139, 0.1); border: 1px solid rgba(45, 227, 139, 0.2);}
.btn-dark-copy { background: #334155; color: #fff; border: 1px solid #475569; padding: 14px; font-size: 14px; cursor: pointer; border-radius: 12px;}
.btn-dark-copy:hover { background: #475569; border-color: #64748b; }

.shop-categories { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; scrollbar-width: none; justify-content: flex-start; } 
.shop-categories::-webkit-scrollbar { display: none; }
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; min-width: 75px; transition: 0.3s; opacity: 0.6; }
.cat-item:hover, .cat-item.active { opacity: 1; transform: translateY(-3px); }
.cat-icon { width: 65px; height: 65px; border-radius: 20px; background: rgba(255,255,255,0.03); border: 1px solid transparent; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: 0.3s; flex-shrink: 0;}
.cat-item.active .cat-icon { border-color: rgba(110, 141, 255, 0.5); box-shadow: 0 4px 20px rgba(110, 141, 255, 0.2); }
.cat-icon.all-games { background: #1e293b; position: relative;}
.cat-icon.all-games::after { content: "⭐"; font-size: 34px; color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);}
.game-icon { padding: 0; }
.game-icon img { width: 100%; height: 100%; object-fit: cover; display: block; padding: 0; }
.cat-text { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--text-main); white-space: nowrap; letter-spacing: 0.5px;}

.game-section { margin-bottom: 40px; }
.game-section-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 20px; }
.game-section-header h3 { font-size: 18px; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; gap: 8px;}

.products-grid { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 20px; padding-bottom: 20px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.products-grid::-webkit-scrollbar { display: none; }
.product-card { flex: 0 0 260px; scroll-snap-align: start; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; display: flex; flex-direction: column; cursor: pointer; }
.product-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--shadow-glow); }
.card-img-wrap { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0; pointer-events: none;}
.product-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover .product-img { transform: scale(1.05); }
.status-badge { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,0.5); backdrop-filter: blur(5px); text-transform: uppercase; letter-spacing: 0.5px;}
.status-badge.ok { background: rgba(45,227,139,0.9); color: #000; }
.status-badge.sold { background: rgba(255,71,87,0.9); color: #fff; }
.card-body { padding: 15px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; pointer-events: none;}
.product-title { font-size: 15px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4;}
.product-id-text { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.price-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; padding-top: 15px; border-top: 1px dashed var(--border); flex-wrap: wrap; gap: 5px;}
.price { font-size: 20px; font-weight: 800; color: #fff; }
.old-price { font-size: 13px; text-decoration: line-through; color: var(--text-muted); margin-right: 8px; font-weight: 500; }
.discount-badge { position: absolute; top: 12px; left: 12px; background: linear-gradient(135deg, #ff4757, #ff6b81); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 800; z-index: 2; box-shadow: 0 4px 10px rgba(255, 71, 87, 0.4); letter-spacing: 0.5px; }
.price-wrap { display: flex; align-items: baseline; flex-wrap: wrap;}

.admin-product-form { background: var(--inner-bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; row-gap: 20px; }
.form-grid-2 .full-width { grid-column: 1 / -1; }
.input-row { display: flex; align-items: center; }
.input-row label { width: 140px; font-size: 13px; font-weight: 500; color: #f8f9fa; flex-shrink: 0; margin-bottom: 0; }
.input-row .input { flex: 1; background: var(--bg-color); border: 1px solid var(--border); border-radius: 8px; padding: 12px 15px; font-size: 14px; color: #fff; }
.btn-submit-form { background: linear-gradient(90deg, #7b61ff, #8e63ff); color: #fff; font-size: 15px; font-weight: 700; padding: 14px; border-radius: 8px; border: none; cursor: pointer; transition: 0.3s; width: 100%;}
.btn-submit-form:hover { filter: brightness(1.1); box-shadow: 0 4px 20px rgba(138, 99, 255, 0.4); }
.table-scroll { overflow-x: auto; margin-top: 15px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.2); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 600px; }
.table th, .table td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; text-align: left;}
.uid-text { font-size: 11px; color: var(--primary); cursor: pointer; background: rgba(110,141,255,0.1); padding: 2px 6px; border-radius: 4px; display: inline-block; margin-top: 4px; transition: 0.2s;}
.uid-text:hover { background: var(--primary); color: #fff; }
.terminal-box { background: #000; border: 1px solid #333; border-radius: 12px; overflow: hidden; font-family: monospace; box-shadow: inset 0 0 20px rgba(0,0,0,0.8); }
.terminal-header { background: #1a1a1a; padding: 10px 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #333; }
.dot { width: 12px; height: 12px; border-radius: 50%; } .dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.terminal-title { margin-left: auto; margin-right: auto; font-size: 12px; color: #888; font-weight: bold; }
.terminal-body { padding: 15px; }
.terminal-log { color: #2de38b; font-size: 13px; min-height: 40px; margin-bottom: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; overflow-x: auto;}
.terminal-input-wrap { display: flex; align-items: center; gap: 10px; }
.prompt { color: var(--primary); font-weight: bold; font-size: 16px; }
.terminal-input-wrap input { background: #fff !important; color: #000 !important; border: none; flex: 1; outline: none; font-family: monospace; font-size: 14px; padding: 8px 12px; border-radius: 6px; }
#execCmdBtn { background: #1f2937 !important; color: #fff !important; border: 1px solid #374151 !important; border-radius: 6px; padding: 8px 16px;}

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 15px; }
.modal-content { width: 100%; max-width: 450px; animation: slideUp 0.3s ease; position: relative;}
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.detail-modal-content { max-width: 800px !important; padding: 0 !important; overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: row; max-height: 90vh;}
.detail-left { width: 50%; background: #000; display: flex; flex-direction: column; }
.detail-main-img { width: 100%; height: 100%; max-height: 350px; object-fit: contain; background: #000; flex-shrink: 0;}
.detail-thumbs-wrap { display: flex; gap: 10px; padding: 10px; overflow-x: auto; background: rgba(255,255,255,0.05); scrollbar-width: none; border-top: 1px solid #333;}
.detail-thumbs-wrap::-webkit-scrollbar { display: none; }
.detail-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: 0.5; transition: 0.3s; border: 2px solid transparent; flex-shrink: 0;}
.detail-thumb.active, .detail-thumb:hover { opacity: 1; border-color: var(--primary); }
.detail-right { width: 50%; padding: 30px; display: flex; flex-direction: column; background: var(--panel-bg); overflow-y: auto;}
.detail-desc-box { flex: 1; overflow-y: auto; margin-bottom: 20px; color: var(--text-muted); font-size: 14px; line-height: 1.6; padding-right: 5px;}
.close-modal-btn { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.6); color: #fff; border: 1px solid rgba(255,255,255,0.2); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: 0.3s; backdrop-filter: blur(5px);}
.close-modal-btn:hover { background: var(--red); border-color: var(--red);}

.cart-item { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: var(--inner-bg); border-radius: 12px; margin-bottom: 10px; border: 1px solid var(--border-subtle); }
.cart-item-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }
.cart-item-info { flex: 1; margin: 0 15px; overflow: hidden;}
.cart-item-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px;}
.cart-item-price { font-size: 13px; color: var(--green); font-weight: bold; }
.btn-del-cart { background: rgba(255,71,87,0.1); color: var(--red); border: 1px solid rgba(255,71,87,0.3); width: 35px; height: 35px; border-radius: 8px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.2s;}
.receipt-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 10px; align-items: center;}
.receipt-item span { color: var(--text-muted); font-size: 14px; flex-shrink: 0;}
.receipt-item strong { font-size: 15px; text-align: right; word-break: break-all;}
.voucher-wrap { display: flex; gap: 8px; margin-bottom: 15px; }

.success-animation { margin: 10px auto 20px; display: flex; justify-content: center; }
.checkmark { width: 80px; height: 80px; border-radius: 50%; display: block; stroke-width: 4; stroke: var(--green); stroke-miterlimit: 10; box-shadow: inset 0px 0px 0px var(--green); animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both; }
.checkmark__circle { stroke-dasharray: 166; stroke-dashoffset: 166; stroke-width: 4; stroke-miterlimit: 10; stroke: var(--green); fill: none; animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards; }
.checkmark__check { transform-origin: 50% 50%; stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards; }
@keyframes stroke { 100% { stroke-dashoffset: 0; } } @keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } } @keyframes fill { 100% { box-shadow: inset 0px 0px 0px 50px rgba(45, 227, 139, 0.1); } }
#successModal .modal-content { box-shadow: 0 0 30px rgba(45, 227, 139, 0.15); }

.toast { position: fixed; bottom: 110px; left: 50%; transform: translateX(-50%); background: rgba(10, 15, 30, 0.95); border: 1px solid var(--border); padding: 14px 24px; border-radius: 100px; z-index: 10000; box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; animation: fadeUp 0.3s; width: max-content; max-width: 90vw;}
.toast.success { border-color: rgba(45,227,139,0.3); color: #fff; } .toast.success::before { content: '✅'; }
.toast.error { border-color: rgba(255,71,87,0.3); color: #fff; } .toast.error::before { content: '⚠️'; }
@keyframes fadeUp { from { bottom: 0; opacity: 0; } to { bottom: 110px; opacity: 1; } }

.footer-panel { margin-top: 60px; background: rgba(10, 15, 30, 0.8); border-top: 1px solid var(--border); padding: 50px 0 30px; color: var(--text-muted); font-size: 14px; position: relative; z-index: 10; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; margin-bottom: 30px; }
.footer-col h3 { color: var(--text-main); font-size: 17px; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col p { line-height: 1.7; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: var(--text-muted); text-decoration: none; transition: 0.3s; display: inline-block;}
.footer-col ul li a:hover { color: var(--primary); transform: translateX(5px); }
.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid var(--border); font-size: 13px; letter-spacing: 0.5px;}
.policy-content h3 { color: var(--primary); margin-top: 20px; margin-bottom: 10px; font-size: 18px; }
.policy-content p, .policy-content ul { color: var(--text-muted); line-height: 1.7; margin-bottom: 15px; }
.policy-content ul { padding-left: 20px; }

.navigation { position: fixed; bottom: 15px; left: 50%; transform: translateX(-50%); width: 95%; max-width: 420px; height: 65px; background: #fff; display: flex; justify-content: center; align-items: center; border-radius: 16px; z-index: 9999; box-shadow: 0 4px 24px rgba(0,0,0,0.5); }
.navigation ul { display: flex; width: 100%; height: 100%; padding: 0; margin: 0; position: relative;}
.navigation ul li { position: relative; list-style: none; width: 16.666%; height: 100%; z-index: 1; }
.navigation ul li a { position: relative; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; text-decoration: none; }
.navigation ul li a .icon { position: relative; display: flex; justify-content: center; align-items: center; font-size: 24px; transition: transform 0.5s, color 0.5s; color: var(--bg-color); z-index: 10; width: 100%; height: 100%; }
.navigation ul li.active a .icon { transform: translateY(-28px); color: #fff; }
.navigation ul li a .text { position: absolute; color: var(--bg-color); font-weight: 700; font-size: 10px; letter-spacing: 0; transition: 0.5s; opacity: 0; transform: translateY(20px); z-index: 10; text-align: center; width: 100%;}
.navigation ul li.active a .text { opacity: 1; transform: translateY(14px); }
.indicator { position: absolute; top: -50%; width: 16.666%; height: 65px; left: 0; transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 0; display: flex; justify-content: center; align-items: flex-start; }
.indicator-circle { position: relative; width: 54px; height: 54px; background: var(--green); border-radius: 50%; border: 6px solid var(--bg-color); margin-top: 5px; }
.indicator-circle::before { content: ''; position: absolute; top: 50%; left: -22px; width: 20px; height: 20px; background: transparent; border-top-right-radius: 20px; box-shadow: 1px -10px 0 0 var(--bg-color); }
.indicator-circle::after { content: ''; position: absolute; top: 50%; right: -22px; width: 20px; height: 20px; background: transparent; border-top-left-radius: 20px; box-shadow: -1px -10px 0 0 var(--bg-color); }
.navigation ul li:nth-child(1).active ~ .indicator { transform: translateX(0%); }
.navigation ul li:nth-child(2).active ~ .indicator { transform: translateX(100%); }
.navigation ul li:nth-child(3).active ~ .indicator { transform: translateX(200%); }
.navigation ul li:nth-child(4).active ~ .indicator { transform: translateX(300%); }
.navigation ul li:nth-child(5).active ~ .indicator { transform: translateX(400%); }
.navigation ul li:nth-child(6).active ~ .indicator { transform: translateX(500%); }

@media (max-width: 900px) { .auth-grid { grid-template-columns: 1fr; gap: 20px; min-height: auto;} .stats-grid { grid-template-columns: 1fr 1fr; } .footer-grid { grid-template-columns: 1fr; gap: 20px;} }
@media (max-width: 768px) { 
  .shell { padding: 15px; } .panel { padding: 20px; }
  .detail-modal-content { flex-direction: column; overflow-y: auto; }
  .detail-left { width: 100%; max-height: auto; } .detail-right { width: 100%; padding: 20px; overflow-y: visible;}
  .detail-main-img { height: 220px; } .close-modal-btn { background: rgba(0,0,0,0.8); border: none; }
  .transfer-box-inner { flex-direction: column; text-align: center; } .transfer-right { margin-top: 10px; width: 160px; } 
  .form-grid-2 { grid-template-columns: 1fr; gap: 15px;} .input-row { flex-direction: column; align-items: flex-start; } .input-row label { width: 100%; margin-bottom: 6px; font-size: 12px;} 
}
@media (max-width: 576px) { 
  .shell { padding: 12px; } .glass-panel, .dark-panel { border-radius: 16px; }
  .topbar { padding: 10px 15px; flex-direction: column; border-radius: 16px; gap: 12px; width: 100%;}
  .brand-logo { font-size: 20px; } .topbar-actions { width: 100%; justify-content: space-between; } .subtitle { display: none; }
  .products-grid { gap: 15px; padding-bottom: 10px; } .product-card { flex: 0 0 220px; border-radius: 16px; } 
  .card-img-wrap { aspect-ratio: 4/3; } .card-body { padding: 12px; } .product-title { font-size: 14px; } .price { font-size: 18px; } .old-price { font-size: 12px; }
  .btn { padding: 8px 12px; font-size: 13px; border-radius: 8px;}
  .cat-icon { width: 55px; height: 55px; border-radius: 16px; } .cat-text { font-size: 10px; }
  .spin-panel { padding: 20px 15px; } .spin-wrapper { max-width: 260px; margin-bottom: 20px;}
  .stats-grid { grid-template-columns: 1fr; gap: 12px;} .bank-info { flex-direction: column; text-align: center; padding: 15px;} .bank-logo { width: 60px; margin-bottom: 8px; } .bank-number { font-size: 22px; } .transfer-box { padding: 15px; }
  #topupForm { flex-direction: column; } #topupAmount { width: 100% !important; } 
  .modal-content { width: 95%; max-width: 360px; } }
/* =========================================================
   SHOP UI 3.0 — DEVELOPER GLASS SYSTEM
   UI-only overrides. Product/order/payment logic remains unchanged.
========================================================= */
:root {
  --dev-bg: #060a12;
  --dev-surface: rgba(13, 19, 31, 0.68);
  --dev-surface-2: rgba(7, 12, 21, 0.74);
  --dev-line: rgba(255, 255, 255, 0.085);
  --dev-line-strong: rgba(110, 141, 255, 0.24);
  --dev-text-dim: #8290a7;
  --dev-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

html { background: var(--dev-bg); }
body {
  background:
    radial-gradient(circle at 15% 0%, rgba(110,141,255,0.10), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(168,85,247,0.08), transparent 28%),
    linear-gradient(180deg, #070c16 0%, #050912 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.topbar,
.glass-panel,
.dark-panel {
  background: var(--dev-surface);
  border-color: var(--dev-line);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.topbar {
  box-shadow:
    0 18px 50px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.035);
}

.panel {
  box-shadow:
    0 20px 55px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.025);
}

/* User-selectable glass density */
body.glass-soft .topbar,
body.glass-soft .dark-panel,
body.glass-soft .glass-panel,
body.glass-soft .product-card,
body.glass-soft .navigation {
  background-color: rgba(13, 19, 31, 0.88);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}
body.glass-medium .topbar,
body.glass-medium .dark-panel,
body.glass-medium .glass-panel,
body.glass-medium .product-card,
body.glass-medium .navigation {
  background-color: rgba(13, 19, 31, 0.68);
}
body.glass-clear .topbar,
body.glass-clear .dark-panel,
body.glass-clear .glass-panel,
body.glass-clear .product-card,
body.glass-clear .navigation {
  background-color: rgba(13, 19, 31, 0.52);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
}

.app-grid > *,
.shell > *,
.shop-tools-panel,
#shopContainer { min-width: 0; }

.shop-tools-panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
}
.shop-tools-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(110,141,255,0.06), transparent 34%, rgba(255,255,255,0.02));
}

.shop-tools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-family: var(--dev-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  color: var(--primary);
  margin-bottom: 6px;
}
.shop-tools-title {
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.025em;
}
.shop-tools-subtitle {
  color: var(--dev-text-dim);
  font-size: 12px;
  line-height: 1.55;
  max-width: 660px;
  margin-top: 6px;
}
.glass-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 5px 5px 5px 10px;
  border: 1px solid var(--dev-line);
  background: rgba(255,255,255,0.025);
  border-radius: 12px;
}
.glass-control label {
  font-family: var(--dev-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dev-text-dim);
  white-space: nowrap;
}
.compact-input {
  width: 128px !important;
  min-height: 38px;
  padding: 8px 30px 8px 10px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
}

.shop-categories-viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 18px;
  background: rgba(2,5,11,0.24);
}
.shop-categories {
  width: max-content;
  min-width: 100%;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.16) transparent;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.shop-categories::-webkit-scrollbar { height: 5px; }
.shop-categories::-webkit-scrollbar-track { background: transparent; }
.shop-categories::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }

.cat-item {
  min-width: 94px;
  height: 100px;
  padding: 9px 9px 8px;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255,255,255,0.018);
  opacity: 0.68;
  position: relative;
  flex: 0 0 94px;
  scroll-snap-align: start;
  transform: none !important;
}
.cat-item:hover {
  opacity: 1;
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.08);
}
.cat-item.active {
  opacity: 1;
  background: linear-gradient(180deg, rgba(110,141,255,0.12), rgba(110,141,255,0.045));
  border-color: var(--dev-line-strong);
  box-shadow: inset 0 0 0 1px rgba(110,141,255,0.04), 0 8px 30px rgba(0,0,0,0.18);
}
.cat-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
}
.cat-item.active .cat-icon {
  border-color: rgba(110,141,255,0.5);
  box-shadow: 0 8px 22px rgba(110,141,255,0.13);
}
.cat-text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.cat-count {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
  color: #b8c4d7;
  font: 700 9px/1 var(--dev-mono);
}
.cat-count.is-empty { opacity: 0.38; }
.file-icon {
  font: 800 11px/1 var(--dev-mono);
  letter-spacing: -0.02em;
  color: #dce6ff;
  background:
    linear-gradient(145deg, rgba(110,141,255,0.16), rgba(168,85,247,0.08)),
    rgba(255,255,255,0.03);
}
.file-all-icon {
  color: #fff;
  background: linear-gradient(145deg, rgba(45,227,139,0.2), rgba(110,141,255,0.14));
}

.shop-search-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1fr) 180px;
  gap: 10px;
  margin-top: 12px;
}
.search-wrap {
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 14px;
  padding: 0 11px;
  background: rgba(0,0,0,0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}
.search-wrap:focus-within { border-color: rgba(110,141,255,0.45); box-shadow: 0 0 0 3px rgba(110,141,255,0.08); }
.search-wrap .input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-inline: 0 !important;
  min-width: 0;
}
.search-prefix {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(110,141,255,0.13);
  color: var(--primary);
  font: 800 12px/1 var(--dev-mono);
}
.search-hint {
  flex: 0 0 auto;
  color: #59667b;
  font: 700 9px/1 var(--dev-mono);
  letter-spacing: 0.08em;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 6px 7px;
  border-radius: 7px;
}
.sort-control {
  width: 100% !important;
  min-width: 0 !important;
  height: 48px;
  font-size: 12px !important;
  border-radius: 14px !important;
}

.game-section { margin-bottom: 32px; min-width: 0; }
.game-section-header {
  border-bottom: 1px solid rgba(255,255,255,0.075);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.game-section-header h3 {
  font-size: 14px;
  letter-spacing: 0.025em;
}
.section-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: var(--green);
  box-shadow: 0 0 14px rgba(45,227,139,0.5);
  flex: 0 0 auto;
}
.products-grid {
  gap: 14px;
  padding: 2px 3px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.products-grid::-webkit-scrollbar { height: 5px; }
.products-grid::-webkit-scrollbar-track { background: transparent; }
.products-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 99px; }
.product-card {
  flex-basis: 278px;
  border-radius: 16px;
  border-color: rgba(255,255,255,0.07);
  background: rgba(13,19,31,0.56);
  box-shadow: 0 14px 36px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.025);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110,141,255,0.32);
  box-shadow: 0 18px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(110,141,255,0.05);
}
.card-img-wrap { aspect-ratio: 16/9; }
.card-body { padding: 14px; }

.navigation {
  background: rgba(244,247,252,0.9);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 14px 38px rgba(0,0,0,0.28);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

@media (min-width: 769px) {
  .navigation { width: min(760px, 92%); max-width: 760px; }
  .navigation ul li { width: 16.666%; }
}

@media (max-width: 768px) {
  .shop-tools-panel { padding: 14px; border-radius: 19px; }
  .shop-tools-head { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 13px; }
  .glass-control { justify-content: space-between; }
  .compact-input { flex: 1; width: auto !important; }
  .shop-categories { padding: 8px; gap: 7px; }
  .cat-item { flex-basis: 86px; min-width: 86px; height: 94px; padding: 8px; }
  .cat-icon { width: 50px; height: 50px; }
  .shop-search-row { grid-template-columns: 1fr; gap: 8px; }
  .sort-control { height: 44px; }
  .search-wrap { height: 44px; }
  .products-grid { padding-bottom: 10px; }
  .product-card { flex-basis: 238px; }
}

@media (max-width: 576px) {
  .shop-tools-subtitle { font-size: 11px; }
  .cat-text { font-size: 9px; }
  .shop-categories-viewport { border-radius: 15px; }
  .products-grid { gap: 11px; }
  .product-card { flex-basis: 82vw; max-width: 278px; }
  .search-hint { display: none; }
  .floating-contact { right: 12px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar, .shell { animation: none !important; }
  .bg-orb, .marquee-content { animation: none !important; }
  .products-grid, .shop-categories { scroll-behavior: auto; }
}

/* ======================================================
   SHOP CATEGORY RAIL — PC WHEEL + MOBILE SWIPE
====================================================== */
.shop-categories-viewport {
  position: relative;
  isolation: isolate;
}
.shop-categories-viewport::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(2,5,11,.72), transparent);
  opacity: .75;
}
.shop-categories-viewport::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 52px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(270deg, rgba(2,5,11,.82), transparent);
  opacity: .86;
}
.shop-scroll-hint {
  position: absolute;
  right: 14px;
  top: 8px;
  z-index: 5;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  background: rgba(4,8,16,.55);
  color: rgba(214,224,241,.62);
  font: 700 8px/1 var(--dev-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.shop-categories-viewport.is-scrolling .shop-scroll-hint {
  opacity: .18;
  transform: translateY(-2px);
}
.hint-mobile { display: none; }

.shop-categories {
  cursor: ew-resize;
  scrollbar-width: thin;
  scrollbar-color: rgba(143,163,201,.24) transparent;
  user-select: none;
}
.shop-categories:active { cursor: grabbing; }
.shop-categories:focus-visible {
  outline: 2px solid rgba(110,141,255,.55);
  outline-offset: -2px;
}
.shop-categories::-webkit-scrollbar { height: 5px; }
.shop-categories::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(110,141,255,.34), rgba(168,85,247,.28));
  border-radius: 99px;
}
.shop-categories::-webkit-scrollbar-track { background: rgba(255,255,255,.015); }

.cat-item { will-change: transform, opacity; }
.cat-item.file-cat .cat-icon {
  background: rgba(255,255,255,.025);
}
.cat-item.file-cat:hover .cat-icon,
.cat-item.file-cat.active .cat-icon {
  box-shadow: 0 8px 28px rgba(110,141,255,.14), inset 0 1px 0 rgba(255,255,255,.05);
}
.cat-item.file-cat .cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  border-radius: inherit;
}
.cat-item.file-cat .cat-text { letter-spacing: .045em; }

@media (hover: hover) and (pointer: fine) {
  .shop-categories-viewport:hover .shop-scroll-hint { opacity: .92; }
  .shop-categories-viewport:hover .shop-categories::-webkit-scrollbar-thumb { background: linear-gradient(90deg, rgba(110,141,255,.52), rgba(168,85,247,.42)); }
}

@media (max-width: 768px) {
  .shop-scroll-hint { top: auto; bottom: 7px; right: 8px; }
  .hint-desktop { display: none; }
  .hint-mobile { display: inline; }
  .shop-categories { cursor: grab; }
  .shop-categories-viewport::before { width: 24px; }
  .shop-categories-viewport::after { width: 28px; }
}


/* =========================================================
   PREMIUM UI 4.0 — GLOBAL ADAPTIVE THEME + REAL RANGE GLASS
   UI-only layer. Does not modify product/payment/Firebase logic.
========================================================= */
:root {
  --ui-alpha: .55;
  --ui-blur: 22px;
  --ui-saturation: 135%;
  --ui-page: #060a12;
  --ui-panel: rgba(13,19,31,var(--ui-alpha));
  --ui-panel-strong: rgba(8,12,21,calc(var(--ui-alpha) + .10));
  --ui-inner: rgba(4,8,15,.78);
  --ui-text: #f8fafc;
  --ui-muted: #8a99b2;
  --ui-line: rgba(255,255,255,.09);
  --ui-control: rgba(255,255,255,.055);
  --ui-shadow: 0 22px 60px rgba(0,0,0,.24);
}

html,
body {
  min-width: 0;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(110,141,255,.12), transparent 30%),
    radial-gradient(circle at 90% 16%, rgba(168,85,247,.10), transparent 26%),
    linear-gradient(180deg, #070c16 0%, var(--ui-page) 100%);
  color: var(--ui-text);
  transition: background .35s ease, color .25s ease;
}

.topbar,
.dark-panel,
.glass-panel,
.product-card,
.modal-content,
.policy-content,
.footer-panel,
.navigation {
  background: var(--ui-panel);
  border-color: var(--ui-line);
  backdrop-filter: blur(var(--ui-blur)) saturate(var(--ui-saturation));
  -webkit-backdrop-filter: blur(var(--ui-blur)) saturate(var(--ui-saturation));
  transition:
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease,
    color .25s ease;
}

.panel,
.inner-box {
  transition:
    background .25s ease,
    border-color .25s ease,
    color .25s ease;
}

.input,
select.input,
.search-wrap,
.glass-control,
.theme-toggle-btn {
  transition:
    background .25s ease,
    color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

/* ---------- Global UI controls ---------- */
.ui-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-toggle-btn {
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 12px;
  white-space: nowrap;
}

.theme-toggle-btn ion-icon {
  font-size: 17px;
}

.glass-range-control {
  min-height: 42px;
  min-width: 245px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  display: grid;
  grid-template-columns: auto minmax(88px,1fr) auto;
  align-items: center;
  gap: 9px;
}

.glass-range-control label {
  font: 800 9px/1 var(--dev-mono, ui-monospace);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ui-muted);
  white-space: nowrap;
}

.glass-range {
  width: 100%;
  min-width: 84px;
  height: 5px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.glass-range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(110,141,255,.82), rgba(168,85,247,.52));
}

.glass-range::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(110,141,255,.82), rgba(168,85,247,.52));
}

.glass-range::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5.5px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.92);
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(110,141,255,.12);
}

.glass-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.92);
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(110,141,255,.12);
}

.glass-range:focus-visible {
  outline: none;
}

.glass-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 7px rgba(110,141,255,.15);
}

.glass-range-control output {
  min-width: 40px;
  text-align: right;
  font: 800 10px/1 var(--dev-mono, ui-monospace);
  color: var(--primary);
}

/* ---------- Global light / white theme ---------- */
body.theme-light {
  --ui-page: #eef3fb;
  --ui-panel: rgba(255,255,255,var(--ui-alpha));
  --ui-panel-strong: rgba(255,255,255,calc(var(--ui-alpha) + .12));
  --ui-inner: rgba(247,250,255,.86);
  --ui-text: #172033;
  --ui-muted: #647089;
  --ui-line: rgba(28,39,63,.12);
  --ui-control: rgba(255,255,255,.68);
  --dev-text-dim: #647089;
  --text-main: #172033;
  --text-muted: #647089;
  --bg-color: #eef3fb;
  --panel-bg: rgba(255,255,255,var(--ui-alpha));
  --inner-bg: rgba(247,250,255,.86);
  --border: rgba(28,39,63,.12);
  --border-subtle: rgba(28,39,63,.08);
}

body.theme-light {
  background:
    radial-gradient(circle at 10% 0%, rgba(110,141,255,.16), transparent 30%),
    radial-gradient(circle at 90% 14%, rgba(168,85,247,.10), transparent 25%),
    linear-gradient(180deg, #f8fbff 0%, #edf2f9 100%);
  color: var(--ui-text);
}

body.theme-light::before {
  opacity: .12;
  background-image:
    linear-gradient(rgba(34,48,77,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,48,77,.05) 1px, transparent 1px);
}

body.theme-light .topbar,
body.theme-light .dark-panel,
body.theme-light .glass-panel,
body.theme-light .product-card,
body.theme-light .modal-content,
body.theme-light .policy-content,
body.theme-light .footer-panel {
  background: var(--ui-panel);
  box-shadow: 0 18px 55px rgba(55,75,112,.12), inset 0 1px 0 rgba(255,255,255,.78);
}

body.theme-light .input,
body.theme-light select.input,
body.theme-light .search-wrap {
  background: rgba(255,255,255,.78);
  color: #172033;
  border-color: rgba(28,39,63,.12);
}

body.theme-light .input::placeholder {
  color: #8792a8;
}

body.theme-light .btn-outline {
  color: #26324a;
  background: rgba(255,255,255,.60);
  border-color: rgba(28,39,63,.12);
}

body.theme-light .btn-outline:hover {
  background: rgba(255,255,255,.90);
  border-color: rgba(110,141,255,.35);
}

body.theme-light .text-main,
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light .brand-logo,
body.theme-light .footer-panel,
body.theme-light .shop-tools-title {
  color: #172033 !important;
}

body.theme-light .text-gray,
body.theme-light .shop-tools-subtitle,
body.theme-light .footer-col p,
body.theme-light .footer-col a,
body.theme-light .stat-label {
  color: #647089 !important;
}

body.theme-light .shop-categories-viewport {
  background: rgba(236,241,249,.48);
  border-color: rgba(28,39,63,.10);
}

body.theme-light .shop-scroll-hint {
  color: #59657b;
  background: rgba(255,255,255,.82);
  border-color: rgba(28,39,63,.10);
}

body.theme-light .shop-categories-viewport::before {
  background: linear-gradient(90deg, rgba(237,242,250,.97), transparent);
}

body.theme-light .shop-categories-viewport::after {
  background: linear-gradient(270deg, rgba(237,242,250,.97), transparent);
}

body.theme-light .cat-item {
  background: rgba(255,255,255,.42);
  border-color: rgba(28,39,63,.06);
  color: #26324a;
}

body.theme-light .cat-item:hover {
  background: rgba(255,255,255,.82);
  border-color: rgba(110,141,255,.20);
}

body.theme-light .cat-item.active {
  background: linear-gradient(180deg, rgba(110,141,255,.17), rgba(110,141,255,.055));
  border-color: rgba(110,141,255,.30);
}

body.theme-light .cat-count {
  background: rgba(20,32,55,.08);
  color: #65728b;
}

body.theme-light .glass-range-control {
  background: rgba(255,255,255,.60);
  border-color: rgba(28,39,63,.10);
}

body.theme-light .theme-toggle-btn {
  color: #26324a;
}

body.theme-light .navigation {
  background: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.75);
}

body.theme-light .navigation ul li a .icon,
body.theme-light .navigation ul li a .text {
  color: #26324a;
}

/* ---------- Real horizontal warehouse rail ---------- */
.shop-categories-viewport {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
}

.shop-categories-scroll {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 150px;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(110,141,255,.36) transparent;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.shop-categories-scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.shop-categories-scroll::-webkit-scrollbar {
  height: 6px;
}

.shop-categories-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.shop-categories-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(110,141,255,.40), rgba(168,85,247,.34));
  border-radius: 999px;
}

.shop-categories {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 8px;
  width: max-content !important;
  min-width: max-content !important;
  padding: 28px 64px 12px 12px !important;
  margin: 0 !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}

.shop-categories::-webkit-scrollbar {
  display: none !important;
}

.shop-categories .cat-item {
  flex: 0 0 94px !important;
  width: 94px !important;
  min-width: 94px !important;
}

.shop-scroll-hint {
  position: sticky;
  left: 12px;
  top: 7px;
  z-index: 10;
  width: max-content;
  pointer-events: none;
}

.warehouse-scroll-btn {
  position: absolute;
  top: 50%;
  z-index: 30;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  background: rgba(5,9,17,.78);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.warehouse-scroll-btn:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgba(21,30,52,.92);
}

.warehouse-scroll-btn:active {
  transform: translateY(-50%) scale(.94);
}

.warehouse-scroll-btn ion-icon {
  font-size: 18px;
}

.warehouse-scroll-left { left: 8px; }
.warehouse-scroll-right { right: 8px; }

.shop-categories-scroll:focus-visible {
  outline: 2px solid rgba(110,141,255,.50);
  outline-offset: -2px;
}

@media (max-width: 768px) {
  .ui-controls {
    width: 100%;
    justify-content: stretch;
  }

  .theme-toggle-btn {
    flex: 0 0 auto;
  }

  .glass-range-control {
    flex: 1 1 220px;
    min-width: 0;
  }

  .shop-categories-scroll {
    height: 142px;
    scrollbar-width: none;
  }

  .shop-categories-scroll::-webkit-scrollbar {
    display: none;
  }

  .shop-categories {
    gap: 7px;
    padding: 28px 22px 12px 10px !important;
  }

  .shop-categories .cat-item {
    flex-basis: 86px !important;
    width: 86px !important;
    min-width: 86px !important;
    height: 94px;
  }

  .warehouse-scroll-btn {
    display: none;
  }

  .shop-scroll-hint {
    top: 6px;
    left: 10px;
    right: auto;
  }
}

@media (max-width: 480px) {
  .theme-toggle-btn {
    min-height: 40px;
    padding-inline: 11px;
  }

  .theme-toggle-btn span {
    display: none;
  }

  .glass-range-control {
    grid-template-columns: auto minmax(70px,1fr) auto;
  }

  .shop-categories-scroll {
    height: 138px;
  }

  .shop-categories .cat-item {
    flex-basis: 84px !important;
    width: 84px !important;
    min-width: 84px !important;
  }

  .hint-mobile {
    display: inline !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-categories-scroll {
    scroll-behavior: auto;
  }
}


/* Compact global appearance controls injected by app.js */
.global-theme-btn {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 11px;
  white-space: nowrap;
}
.global-theme-btn ion-icon { font-size: 16px; }
.global-glass-control {
  display: inline-grid;
  grid-template-columns: auto minmax(78px, 110px) auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid var(--ui-line, var(--border));
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  color: var(--ui-muted, var(--text-muted));
  font: 800 9px/1 var(--dev-mono, ui-monospace);
}
.global-glass-title { text-transform: uppercase; letter-spacing: .06em; }
.global-glass-control output { min-width: 34px; text-align: right; color: var(--primary); }
.global-glass-range { width: 100%; }
@media (max-width: 768px) {
  .topbar-actions { gap: 7px; }
  .global-theme-btn span { display: none; }
  .global-glass-control { grid-template-columns: auto minmax(70px, 1fr) auto; max-width: 190px; }
}
@media (max-width: 440px) {
  .global-glass-control { max-width: 150px; }
  .global-glass-title { display: none; }
}


/* =========================================================
   PREMIUM PATCH 5.0 — CLICK-SAFE WAREHOUSE RAIL
   Input/UI only. Business logic remains untouched.
========================================================= */
.shop-categories-viewport {
  contain: layout paint;
}

.shop-categories-scroll {
  position: relative;
  z-index: 2;
  overflow-x: scroll !important;
  overflow-y: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  touch-action: pan-x pinch-zoom;
  cursor: grab;
  user-select: none;
}

.shop-categories-scroll.drag-ready {
  cursor: grab;
}

.shop-categories-scroll.is-dragging {
  cursor: grabbing;
}

.shop-categories {
  position: relative;
  z-index: 4;
  width: max-content !important;
  min-width: max-content !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

.shop-categories .cat-item {
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.shop-categories .cat-item::before,
.shop-categories .cat-item::after {
  pointer-events: none !important;
}

.shop-categories-viewport::before,
.shop-categories-viewport::after {
  pointer-events: none !important;
}

.shop-scroll-hint {
  pointer-events: none !important;
}

.warehouse-scroll-btn {
  pointer-events: auto;
}

.warehouse-scroll-btn.is-disabled {
  visibility: hidden;
}

/* Premium glass control — better tactile feedback */
.glass-range-control,
.global-glass-control {
  position: relative;
  overflow: hidden;
}

.glass-range-control::before,
.global-glass-control::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,.08),
    transparent 38%,
    rgba(255,255,255,.025)
  );
  opacity: .75;
}

@media (max-width: 768px) {
  .shop-categories-scroll {
    touch-action: pan-x;
    overscroll-behavior-x: contain;
  }
}

@media (pointer: coarse) {
  .shop-categories-scroll::-webkit-scrollbar {
    display: none;
  }
}


/* =========================================================
   SHOP LUAVANG PREMIUN — iOS GLASS / ADAPTIVE UI 5.0
   Presentation-only layer.
   Keeps existing navigation controls, Firebase and business logic.
========================================================= */

:root {
  --lv-accent-a: #6e8dff;
  --lv-accent-b: #a855f7;
  --lv-accent-c: #2de38b;
  --lv-glass-a: rgba(255,255,255,.16);
  --lv-glass-b: rgba(255,255,255,.06);
  --lv-nav-border: rgba(255,255,255,.34);
  --lv-nav-shadow: 0 24px 70px rgba(0,0,0,.26);
}

/* Smooth theme/color transition across every page */
html {
  background: var(--ui-page, #060a12);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  transition:
    background .55s cubic-bezier(.2,.7,.2,1),
    color .35s ease;
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(110,141,255,.10), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(168,85,247,.08), transparent 23%),
    radial-gradient(circle at 52% 92%, rgba(45,227,139,.045), transparent 24%);
  animation: lvAurora 14s ease-in-out infinite alternate;
}

@keyframes lvAurora {
  0%   { transform: translate3d(-1%,0,0) scale(1); opacity:.76; }
  50%  { transform: translate3d(1%,1%,0) scale(1.025); opacity:1; }
  100% { transform: translate3d(0,-1%,0) scale(1.04); opacity:.82; }
}

/* ---------- Premium top bar ---------- */

.topbar {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 9000;
  width: min(1540px, calc(100% - 28px));
  margin: 10px auto 0;
  border-radius: 30px !important;
  min-height: 78px;
  padding: 12px 18px;
  gap: 16px;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.12),
      rgba(255,255,255,.045)
    ) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow:
    0 18px 58px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.17),
    inset 0 -1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(calc(var(--ui-blur, 22px) + 4px)) saturate(155%);
  -webkit-backdrop-filter: blur(calc(var(--ui-blur, 22px) + 4px)) saturate(155%);
}

.brand-zone {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  position: relative;
  font-size: clamp(18px, 2.2vw, 26px) !important;
  letter-spacing: -.045em;
  white-space: nowrap;
  font-weight: 800 !important;
  background:
    linear-gradient(
      110deg,
      #ffffff 0%,
      #cad6ff 28%,
      #ffffff 51%,
      #d9c8ff 74%,
      #ffffff 100%
    );
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: lvBrandShimmer 7s ease-in-out infinite;
}

.brand-logo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  transform: scaleX(.34);
  transform-origin: left;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(110,141,255,.85),
    rgba(168,85,247,.8),
    transparent
  );
  opacity: .8;
}

@keyframes lvBrandShimmer {
  0%,100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.topbar-actions .btn,
.topbar-actions .pill,
.global-glass-control {
  min-height: 44px;
  border-radius: 16px !important;
}

.topbar-actions .btn {
  padding-inline: 14px;
}

.topbar-actions .btn-outline {
  background: rgba(255,255,255,.055) !important;
  border-color: rgba(255,255,255,.105) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 6px 22px rgba(0,0,0,.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.topbar-actions .btn-outline:hover {
  transform: translateY(-1px);
  border-color: rgba(110,141,255,.35) !important;
}

.global-glass-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  padding: 7px 11px;
  background:
    linear-gradient(
      120deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.035)
    );
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.075),
    0 7px 26px rgba(0,0,0,.09);
  backdrop-filter: blur(17px);
  -webkit-backdrop-filter: blur(17px);
}

.global-glass-title {
  flex: 0 0 auto;
  font: 800 9px/1 var(--dev-mono, ui-monospace);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ui-muted, #8a99b2);
}

.global-glass-control output {
  min-width: 38px;
  text-align: right;
  font: 800 10px/1 var(--dev-mono, ui-monospace);
  color: var(--primary);
}

/* ---------- iOS-like floating bottom navigation ---------- */

.navigation {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 9999;

  width: min(720px, calc(100vw - 28px));
  max-width: 720px;
  height: 82px;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: visible;

  border-radius: 29px !important;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.76),
      rgba(245,248,255,.52)
    ) !important;

  border: 1px solid rgba(255,255,255,.76) !important;

  box-shadow:
    0 25px 75px rgba(0,0,0,.23),
    0 6px 22px rgba(80,100,150,.08),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(90,110,150,.06);

  backdrop-filter: blur(calc(var(--ui-blur, 22px) + 4px)) saturate(160%);
  -webkit-backdrop-filter: blur(calc(var(--ui-blur, 22px) + 4px)) saturate(160%);
}

.navigation::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.38),
      transparent 42%,
      rgba(110,141,255,.04)
    );
}

.navigation ul {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  padding: 0 6px;
  margin: 0;
}

.navigation ul li {
  position: relative;
  width: 16.666666%;
  height: 100%;
  min-width: 0;
  z-index: 3;
}

.navigation ul li a {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.navigation ul li a .icon {
  position: relative;
  width: auto !important;
  height: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;

  color: #26324a !important;
  font-size: 25px;

  transition:
    transform .48s cubic-bezier(.22,1,.36,1),
    color .35s ease,
    filter .35s ease;
}

.navigation ul li a .text {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translate(-50%, 8px);

  width: auto !important;
  white-space: nowrap;

  color: #26324a !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .015em;

  opacity: 0;

  transition:
    opacity .3s ease,
    transform .45s cubic-bezier(.22,1,.36,1);
}

.navigation ul li.active a .icon {
  transform: translateY(-15px) scale(1.02);
  color: #ffffff !important;
  filter: drop-shadow(0 8px 18px rgba(110,141,255,.28));
}

.navigation ul li.active a .text {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Sliding active pill/orb */
.navigation .indicator {
  position: absolute;
  top: -24px;
  left: 0;

  width: 16.666666%;
  height: 82px;

  margin: 0;
  padding: 0;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  z-index: 1;
  pointer-events: none;

  transition:
    transform .58s cubic-bezier(.16,1,.3,1);
}

.navigation .indicator-circle {
  position: relative;

  width: 68px;
  height: 68px;

  margin: 0;

  border-radius: 24px;

  border: 1px solid rgba(255,255,255,.86);

  background:
    radial-gradient(
      circle at 30% 24%,
      rgba(255,255,255,.54),
      transparent 35%
    ),
    linear-gradient(
      145deg,
      rgba(110,141,255,.90),
      rgba(168,85,247,.72)
    );

  box-shadow:
    0 16px 38px rgba(95,115,190,.26),
    0 0 0 7px rgba(255,255,255,.44),
    inset 0 1px 0 rgba(255,255,255,.55);

  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);

  transition:
    background .55s ease,
    box-shadow .55s ease;
}

.navigation .indicator-circle::before,
.navigation .indicator-circle::after {
  display: none !important;
}

/* Theme-aware active bubble */
body.theme-light .navigation .indicator-circle {
  background:
    radial-gradient(
      circle at 32% 24%,
      rgba(255,255,255,.92),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(110,141,255,.94),
      rgba(168,85,247,.76)
    );
  box-shadow:
    0 16px 38px rgba(83,100,170,.22),
    0 0 0 7px rgba(255,255,255,.58),
    inset 0 1px 0 rgba(255,255,255,.75);
}

body:not(.theme-light) .navigation {
  background:
    linear-gradient(
      135deg,
      rgba(21,27,42,.76),
      rgba(12,17,29,.62)
    ) !important;
  border-color: rgba(255,255,255,.12) !important;
  box-shadow:
    0 25px 75px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.10);
}

body:not(.theme-light) .navigation ul li a .icon,
body:not(.theme-light) .navigation ul li a .text {
  color: #eef3ff !important;
}

body:not(.theme-light) .navigation .indicator-circle {
  border-color: rgba(255,255,255,.18);
}

/* ---------- Scrollable product/category rails ---------- */

.shop-categories-viewport,
.products-grid {
  min-width: 0;
}

.shop-categories-scroll,
.products-grid {
  scrollbar-gutter: stable;
}

/* Mobile: larger iOS-style floating capsule */
@media (max-width: 768px) {
  .topbar {
    top: max(6px, env(safe-area-inset-top));
    width: calc(100% - 18px);
    min-height: 68px;
    padding: 10px 12px;
    border-radius: 24px !important;
  }

  .brand-logo {
    font-size: 18px !important;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .btn,
  .topbar-actions .pill {
    min-height: 38px;
    border-radius: 13px !important;
  }

  .global-glass-control {
    min-width: 145px;
    max-width: 180px;
    height: 38px;
    padding: 5px 8px;
    gap: 7px;
  }

  .global-glass-range {
    min-width: 60px;
  }

  .navigation {
    width: calc(100vw - 22px);
    height: 76px;
    bottom: max(8px, env(safe-area-inset-bottom));
    border-radius: 27px !important;
  }

  .navigation ul {
    padding: 0 4px;
  }

  .navigation .indicator {
    top: -21px;
    height: 76px;
  }

  .navigation .indicator-circle {
    width: 60px;
    height: 60px;
    border-radius: 22px;
  }

  .navigation ul li.active a .icon {
    transform: translateY(-13px) scale(1);
  }

  .navigation ul li a .text {
    bottom: 8px;
    font-size: 9px;
  }

  /* category rail touch behavior */
  .shop-categories-scroll {
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* Small phones */
@media (max-width: 430px) {
  .topbar {
    width: calc(100% - 12px);
  }

  .topbar .brand-logo {
    font-size: 16px !important;
  }

  .navigation {
    width: calc(100vw - 14px);
  }

  .navigation .indicator-circle {
    width: 56px;
    height: 56px;
    border-radius: 20px;
  }

  .navigation ul li a .icon {
    font-size: 22px;
  }

  .navigation ul li a .text {
    font-size: 8px;
  }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body,
  .topbar,
  .navigation,
  .brand-logo {
    animation: none !important;
    transition-duration: .01ms !important;
  }

  body::after {
    animation: none !important;
  }
}


/* =========================================================
   V6 — APPLE / iOS MUSIC STYLE BOTTOM NAVIGATION
   Presentation-only override. Keeps existing navigation
   HTML, URLs, logic and indicator movement intact.
   ========================================================= */

.navigation {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;

  width: min(680px, calc(100vw - 32px)) !important;
  max-width: 680px !important;
  min-width: 0 !important;
  height: 76px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 0 !important;
  overflow: visible !important;

  border-radius: 28px !important;

  /* Neutral Apple-like glass. No blue/green tint. */
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,calc(var(--ui-alpha, .42) * .72)),
      rgba(255,255,255,calc(var(--ui-alpha, .42) * .34))
    ) !important;

  border: 1px solid rgba(255,255,255,.48) !important;

  box-shadow:
    0 20px 55px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.72),
    inset 0 -1px 0 rgba(255,255,255,.12) !important;

  backdrop-filter:
    blur(calc(var(--ui-blur, 22px) + 4px))
    saturate(120%) !important;

  -webkit-backdrop-filter:
    blur(calc(var(--ui-blur, 22px) + 4px))
    saturate(120%) !important;
}

.navigation::before {
  content: "";
  position: absolute;
  inset: 0 !important;
  border-radius: inherit !important;
  pointer-events: none;
  background:
    linear-gradient(
      120deg,
      rgba(255,255,255,.18),
      transparent 42%,
      rgba(255,255,255,.08)
    ) !important;
}

.navigation ul {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;

  display: flex !important;
  align-items: stretch !important;

  box-sizing: border-box !important;
  padding: 7px 8px !important;
  margin: 0 !important;
}

.navigation ul li {
  position: relative !important;

  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;

  display: block !important;
  z-index: 3 !important;
}

.navigation ul li a {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;

  gap: 4px !important;

  text-decoration: none !important;
  color: inherit !important;

  border-radius: 21px !important;

  z-index: 4 !important;
}

/* Icons no longer jump upwards. */
.navigation ul li a .icon,
.navigation ul li.active a .icon {
  position: relative !important;

  width: auto !important;
  height: auto !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;

  transform: none !important;

  color: rgba(35,43,58,.94) !important;
  filter: none !important;

  font-size: 23px !important;

  transition:
    color .24s ease,
    opacity .24s ease,
    transform .24s ease !important;

  z-index: 5 !important;
}

.navigation ul li.active a .icon {
  color: rgba(20,27,39,.98) !important;
  transform: scale(1.02) !important;
}

/* Music-style labels: always present; selected item becomes stronger. */
.navigation ul li a .text,
.navigation ul li.active a .text {
  position: relative !important;

  left: auto !important;
  bottom: auto !important;

  width: auto !important;

  display: block !important;

  opacity: 1 !important;
  transform: none !important;

  margin: 0 !important;

  white-space: nowrap !important;

  color: rgba(35,43,58,.78) !important;

  font-size: 9px !important;
  line-height: 1 !important;
  font-weight: 650 !important;
  letter-spacing: .01em !important;

  transition:
    color .24s ease,
    font-weight .24s ease,
    opacity .24s ease !important;

  z-index: 5 !important;
}

.navigation ul li.active a .text {
  color: rgba(12,18,28,.98) !important;
  font-weight: 800 !important;
}

/*
 * Replace the old floating circle with a flat sliding
 * selection capsule, matching iOS Music navigation.
 */
.navigation .indicator {
  position: absolute !important;

  top: 7px !important;
  left: 8px !important;

  width: calc((100% - 16px) / 6) !important;
  height: calc(100% - 14px) !important;

  margin: 0 !important;
  padding: 0 !important;

  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;

  pointer-events: none !important;
  z-index: 1 !important;

  transition:
    transform .46s cubic-bezier(.22,1,.36,1) !important;
}

.navigation .indicator-circle {
  position: absolute !important;
  inset: 0 !important;

  width: auto !important;
  height: auto !important;

  margin: 0 !important;

  border-radius: 22px !important;

  border: 1px solid rgba(255,255,255,.64) !important;

  /*
   * Neutral translucent selection: no purple, blue or green.
   */
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.62),
      rgba(255,255,255,.30)
    ) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    inset 0 -1px 0 rgba(255,255,255,.10),
    0 6px 20px rgba(0,0,0,.08) !important;

  backdrop-filter:
    blur(calc(var(--ui-blur, 22px) + 2px))
    saturate(115%) !important;

  -webkit-backdrop-filter:
    blur(calc(var(--ui-blur, 22px) + 2px))
    saturate(115%) !important;

  transition: none !important;
}

.navigation .indicator-circle::before,
.navigation .indicator-circle::after {
  display: none !important;
  content: none !important;
}

/* Dark theme: still neutral glass, just darker. */
body:not(.theme-light) .navigation {
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.105),
      rgba(255,255,255,.045)
    ) !important;

  border-color: rgba(255,255,255,.16) !important;

  box-shadow:
    0 20px 60px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.11),
    inset 0 -1px 0 rgba(255,255,255,.035) !important;
}

body:not(.theme-light) .navigation ul li a .icon {
  color: rgba(245,248,255,.90) !important;
}

body:not(.theme-light) .navigation ul li.active a .icon {
  color: #fff !important;
}

body:not(.theme-light) .navigation ul li a .text {
  color: rgba(240,244,252,.68) !important;
}

body:not(.theme-light) .navigation ul li.active a .text {
  color: #fff !important;
}

body:not(.theme-light) .navigation .indicator-circle {
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.16),
      rgba(255,255,255,.075)
    ) !important;

  border-color: rgba(255,255,255,.20) !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 7px 24px rgba(0,0,0,.18) !important;
}

/* Precise indicator positions with the corrected flex layout. */
.navigation ul li:nth-child(1).active ~ .indicator {
  transform: translateX(0) !important;
}

.navigation ul li:nth-child(2).active ~ .indicator {
  transform: translateX(100%) !important;
}

.navigation ul li:nth-child(3).active ~ .indicator {
  transform: translateX(200%) !important;
}

.navigation ul li:nth-child(4).active ~ .indicator {
  transform: translateX(300%) !important;
}

.navigation ul li:nth-child(5).active ~ .indicator {
  transform: translateX(400%) !important;
}

.navigation ul li:nth-child(6).active ~ .indicator {
  transform: translateX(500%) !important;
}

/* Hover only changes icon/text subtly; no colored bubble. */
@media (hover: hover) and (pointer: fine) {
  .navigation ul li:not(.active) a:hover .icon {
    transform: translateY(-1px) !important;
    color: rgba(35,43,58,1) !important;
  }

  body:not(.theme-light) .navigation ul li:not(.active) a:hover .icon {
    color: #fff !important;
  }

  .navigation ul li:not(.active) a:hover .text {
    opacity: .95 !important;
  }
}

/* Mobile: centered with safe-area and no corner drift. */
@media (max-width: 768px) {
  .navigation {
    left: 50% !important;
    width: calc(100vw - 20px) !important;
    max-width: 680px !important;

    bottom: max(8px, env(safe-area-inset-bottom)) !important;

    height: 74px !important;

    border-radius: 27px !important;
  }

  .navigation ul {
    padding: 7px 6px !important;
  }

  .navigation .indicator {
    left: 6px !important;
    width: calc((100% - 12px) / 6) !important;
    height: calc(100% - 14px) !important;
  }

  .navigation ul li a {
    gap: 3px !important;
  }

  .navigation ul li a .icon,
  .navigation ul li.active a .icon {
    font-size: 22px !important;
  }

  .navigation ul li a .text,
  .navigation ul li.active a .text {
    font-size: 8px !important;
  }
}

@media (max-width: 430px) {
  .navigation {
    width: calc(100vw - 14px) !important;
    height: 72px !important;
    border-radius: 26px !important;
  }

  .navigation ul {
    padding: 6px 5px !important;
  }

  .navigation .indicator {
    left: 5px !important;
    top: 6px !important;
    width: calc((100% - 10px) / 6) !important;
    height: calc(100% - 12px) !important;
  }

  .navigation ul li a .icon,
  .navigation ul li.active a .icon {
    font-size: 21px !important;
  }

  .navigation ul li a .text,
  .navigation ul li.active a .text {
    font-size: 7.5px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .navigation .indicator,
  .navigation ul li a .icon,
  .navigation ul li a .text {
    transition: none !important;
  }
}

/* End V6 navigation */

/* =========================================================
   MOBILE TOPBAR / SETTINGS — ADAPTIVE APPLE GLASS
   Presentation-only. Keeps existing controls and logic.
   ========================================================= */

:root {
  --lv-glass-light: rgba(255,255,255,.54);
  --lv-glass-dark: rgba(13,17,27,.58);
  --lv-glass-border-light: rgba(255,255,255,.72);
  --lv-glass-border-dark: rgba(255,255,255,.12);
}

/* Shared visual language for header controls */
.topbar .btn,
.topbar .pill,
.topbar .global-glass-control,
.topbar .glass-control {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  /* One compact, centered glass card instead of a wrapping desktop bar. */
  .topbar {
    position: sticky;
    top: max(7px, env(safe-area-inset-top));
    width: calc(100% - 14px);
    margin: 7px auto 0;
    min-height: unset;
    padding: 11px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    border-radius: 25px !important;
    overflow: visible;
  }

  .brand-zone {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding: 3px 8px 1px;
  }

  .brand-logo {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(17px, 5vw, 21px) !important;
    letter-spacing: -.055em;
    text-align: center;
  }

  .brand-logo::after {
    left: 18%;
    right: 18%;
    bottom: -4px;
    transform: scaleX(1);
  }

  /* Actions become a deliberate 3-slot row. */
  .topbar-actions {
    width: 100%;
    min-width: 0;
    margin: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    gap: 7px;
  }

  .topbar-actions .btn,
  .topbar-actions .pill {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 11px;
    border-radius: 14px !important;
    white-space: nowrap;
  }

  .topbar-actions .pill {
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Keep icon-only controls visually light and tidy on narrow screens. */
  .global-theme-btn {
    width: 42px !important;
    min-width: 42px !important;
    padding: 0 !important;
    border-radius: 14px !important;
  }

  .global-theme-btn .theme-toggle-label {
    display: none !important;
  }

  .global-theme-btn ion-icon {
    font-size: 20px !important;
  }

  /* Glass slider receives its own clean row. */
  .topbar-actions .global-glass-control {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 40px;
    height: 40px;
    padding: 6px 9px;
    gap: 9px;
    border-radius: 15px !important;
  }

  .global-glass-control::before {
    opacity: .55;
  }

  .global-glass-title {
    display: inline-flex;
    align-items: center;
    min-width: 38px;
    font-size: 8px;
  }

  .global-glass-control output {
    min-width: 34px;
    font-size: 9px;
  }

  .global-glass-range {
    width: 100%;
    min-width: 0;
  }

  /* The Shop page's own glass control follows the same mobile layout. */
  .shop-tools-head {
    gap: 12px;
  }

  .shop-tools-head .glass-control {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    padding: 7px 9px;
    border-radius: 15px !important;
  }

  .shop-tools-head .glass-control .compact-input {
    min-width: 0;
    flex: 1 1 auto;
  }
}

@media (max-width: 430px) {
  .topbar {
    width: calc(100% - 10px);
    padding: 9px;
    gap: 8px;
    border-radius: 23px !important;
  }

  .brand-logo {
    font-size: 16px !important;
  }

  .topbar-actions {
    gap: 6px;
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .topbar-actions .btn,
  .topbar-actions .pill {
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 13px !important;
    font-size: 12px;
  }

  .topbar-actions .pill {
    font-size: 11px;
  }

  .topbar-actions .global-glass-control {
    min-height: 38px;
    height: 38px;
    border-radius: 14px !important;
  }

  .global-glass-title {
    display: none;
  }
}

@media (max-width: 350px) {
  .topbar-actions {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .topbar-actions > .btn:last-of-type:not(.global-theme-btn) {
    grid-column: 1 / -1;
  }
}

/* Light/dark adaptive glass: neutral, not blue. */
body.theme-light .topbar,
body.theme-light .topbar .global-glass-control {
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), rgba(246,248,255,.50)) !important;
  border-color: rgba(255,255,255,.82) !important;
  box-shadow:
    0 18px 54px rgba(71,82,120,.13),
    inset 0 1px 0 rgba(255,255,255,.96),
    inset 0 -1px 0 rgba(90,110,150,.06);
}

body:not(.theme-light) .topbar,
body:not(.theme-light) .topbar .global-glass-control {
  background:
    linear-gradient(135deg, rgba(255,255,255,.085), rgba(255,255,255,.035)) !important;
  border-color: rgba(255,255,255,.12) !important;
  box-shadow:
    0 18px 54px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -1px 0 rgba(0,0,0,.12);
}

/* Ensure iOS safe-area never cuts off the floating navigation or header. */
@supports (padding: max(0px)) {
  @media (max-width: 768px) {
    .topbar {
      margin-top: max(7px, env(safe-area-inset-top));
    }

    .navigation {
      bottom: max(8px, env(safe-area-inset-bottom));
    }
  }
}


/* =========================================================
   MOBILE: keep header clean — logout stays available on PC.
   ========================================================= */
@media (max-width: 768px) {
  #logoutBtn,
  #profileLogoutBtn {
    display: none !important;
  }
}


/* =========================================================
   HOMEPAGE ANALYTICS DASHBOARD
   ========================================================= */
.site-dashboard {
  position: relative;
  overflow: hidden;
}

.site-dashboard::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -140px;
  top: -180px;
  border-radius: 50%;
  background: rgba(110, 141, 255, 0.10);
  filter: blur(70px);
  pointer-events: none;
}

.site-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.site-dashboard-title {
  margin: 5px 0 6px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.1;
}

.site-dashboard-subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.site-dashboard-updated {
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--inner-bg);
}

.site-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.site-dashboard-card {
  position: relative;
  min-height: 124px;
  padding: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: var(--inner-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}

.site-dashboard-card::after {
  content: "";
  position: absolute;
  inset: auto -18px -26px auto;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
}

.site-dashboard-card .dash-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 13px;
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
  font-size: 18px;
}

.site-dashboard-card .dash-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-dashboard-card .dash-value {
  margin-top: 5px;
  color: var(--text-main);
  font-size: clamp(21px, 3vw, 29px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-dashboard-card .dash-note {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 10px;
}

.site-dashboard-bottom {
  display: grid;
  grid-template-columns: 1.45fr .85fr;
  gap: 12px;
  margin-top: 12px;
}

.site-dashboard-panel {
  padding: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: var(--inner-bg);
}

.site-dashboard-panel-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 800;
}

.site-dashboard-panel-subtitle {
  margin: 0 0 15px;
  color: var(--text-muted);
  font-size: 11px;
}

.site-dashboard-bars {
  display: grid;
  gap: 12px;
}

.site-dashboard-bar-row {
  display: grid;
  gap: 7px;
}

.site-dashboard-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.site-dashboard-bar-label {
  color: var(--text-main);
  font-weight: 700;
}

.site-dashboard-bar-value {
  color: var(--text-muted);
  font-weight: 700;
}

.site-dashboard-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.site-dashboard-bar > span {
  display: block;
  height: 100%;
  width: 58%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-glow));
  box-shadow: 0 0 20px rgba(110,141,255,.20);
}

.site-dashboard-status-list {
  display: grid;
  gap: 10px;
}

.site-dashboard-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.055);
  color: var(--text-muted);
  font-size: 11px;
}

.site-dashboard-status ion-icon {
  color: var(--text-main);
  font-size: 16px;
  flex: 0 0 auto;
}

@media (max-width: 1050px) {
  .site-dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .site-dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-dashboard-updated {
    align-self: flex-start;
  }

  .site-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-dashboard-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .site-dashboard-grid {
    gap: 9px;
  }

  .site-dashboard-card {
    min-height: 112px;
    padding: 13px;
  }
}
