/* style.css - iOS Glass V10 (Full Refresh, Unified, Lightweight) */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;500;700;900&family=Chakra+Petch:wght@400;600;700&display=swap');

:root{
  /* Palette */
  --primary: #5b8dff;
  --primary-rgb: 91,141,255;
  --accent: #7ef0ff;
  --accent-rgb: 126,240,255;
  --secondary: #ff7ad9;
  --secondary-rgb: 255,122,217;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* Background */
  --bg-1: #0b0f1a;
  --bg-2: #101a2e;
  --blob-1: rgba(var(--primary-rgb),0.20);
  --blob-2: rgba(var(--accent-rgb),0.16);

  /* Surfaces */
  --surface-1: rgba(12,20,36,0.66);
  --surface-2: rgba(17,28,48,0.78);
  --surface-3: rgba(28,42,70,0.90);

  /* Borders & Rings */
  --border: rgba(173,194,230,0.24);
  --border-strong: rgba(201,220,255,0.36);
  --ring: rgba(var(--primary-rgb),0.28);

  /* Shadows */
  --shadow-soft: 0 14px 30px -24px rgba(0,0,0,0.75);
  --shadow-hover: 0 26px 60px -32px rgba(0,0,0,0.9);
  --glow-strong: 0 0 0 1px rgba(255,255,255,0.08), 0 24px 70px -30px rgba(var(--primary-rgb),0.55);

  /* Glass */
  --glass-surface: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03));
  --glass-blur: 1px;
  --glass-sheen: linear-gradient(120deg, rgba(255,255,255,0.45), rgba(255,255,255,0) 45%, rgba(255,255,255,0.15));
  --edge-light: rgba(255,255,255,0.35);
  --edge-dark: rgba(0,0,0,0.25);

  /* Typography */
  --font-ui: 'Vazirmatn', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: 'Chakra Petch', 'Vazirmatn', system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-main: #eef3ff;
  --text-muted: #a9b6cc;
  --bg: #0d1422;
  --bg-panel: rgba(11,18,33,0.84);
  --glass-border: rgba(178,205,244,0.22);
  --glass-edge-top: rgba(222,236,255,0.34);
  --glass-edge-bottom: rgba(0,0,0,0.34);

  /* Section accents */
  --section-dashboard-rgb: 91,141,255;
  --section-orders-rgb: 16,185,129;
  --section-challenges-rgb: 245,158,11;
  --section-challenge-group-rgb: 236,72,153;
  --section-messages-rgb: 6,182,212;
  --section-transactions-rgb: 139,92,246;
  --section-saved-rgb: 249,115,22;
  --section-achievements-rgb: 234,179,8;
  --section-quests-rgb: 34,197,94;
  --section-leaderboard-rgb: 251,191,36;
  --section-settings-rgb: 148,163,184;
  --section-referral-rgb: 244,63,94;

  /* Ultra-light palette */
  --dist-ultra-surface: #101725;
  --dist-ultra-surface-soft: #0d1421;
  --dist-ultra-border: rgba(255,255,255,0.10);

  /* Layout */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-normal: 180ms var(--ease);
}

/* Light Mode */
body.light-mode{
  --primary: #3b82f6;
  --primary-rgb: 59,130,246;
  --accent: #06b6d4;
  --accent-rgb: 6,182,212;
  --secondary: #f43f5e;
  --secondary-rgb: 244,63,94;
  --bg-1: #f4f7ff;
  --bg-2: #e9efff;
  --blob-1: rgba(var(--primary-rgb),0.16);
  --blob-2: rgba(var(--accent-rgb),0.14);
  --surface-1: rgba(255,255,255,0.88);
  --surface-2: rgba(255,255,255,0.94);
  --surface-3: rgba(255,255,255,0.99);
  --border: rgba(15,23,42,0.10);
  --border-strong: rgba(15,23,42,0.18);
  --ring: rgba(var(--primary-rgb),0.18);
  --text-main: #0b1220;
  --text-muted: #334155;
  --bg: #f3f7ff;
  --bg-panel: rgba(255,255,255,0.92);
  --glass-border: rgba(15,23,42,0.14);
  --glass-edge-top: rgba(255,255,255,0.92);
  --glass-edge-bottom: rgba(148,163,184,0.25);
  --glass-surface: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(255,255,255,0.9));
  --edge-light: rgba(255,255,255,0.7);
  --edge-dark: rgba(15,23,42,0.08);

  /* Ultra-light palette */
  --dist-ultra-surface: #ffffff;
  --dist-ultra-surface-soft: #f8fafc;
  --dist-ultra-border: rgba(15,23,42,0.12);
}

/* Reset & base */
*{ box-sizing:border-box; }
html,body{ min-height:100%; height:auto; margin:0; padding:0; }
body, button, input, textarea, select{
  font-family: var(--font-ui) !important;
}
.font-eng{ font-family: var(--font-display) !important; }

/* Lenis integration (prevents stop-before-end scrolling) */
html.lenis,
html.lenis body{
  height: auto;
}
.lenis.lenis-smooth{
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped{
  overflow: hidden;
}
.lenis.lenis-scrolling iframe{
  pointer-events: none;
}

body{
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.85;
  direction: rtl;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    url('download1.jpg'),
    radial-gradient(1200px 900px at 8% -10%, rgba(var(--primary-rgb),0.28), transparent 60%),
    radial-gradient(900px 700px at 95% 15%, rgba(var(--accent-rgb),0.22), transparent 60%),
    radial-gradient(700px 520px at 50% 110%, rgba(var(--secondary-rgb),0.16), transparent 65%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat-y;
  background-position: center 120px, 8% -10%, 95% 15%, 50% 110%, top center;
  background-size: clamp(520px, 58vw, 1100px), auto, auto, auto, 100% 100%;
  background-attachment: fixed, scroll, scroll, scroll, scroll;
  background-color: var(--bg-1);
}

:where(
  .header,
  .card,
  .sidebar,
  .main-content,
  .order-item,
  .stat-card,
  .hero-card,
  .support-modal-card,
  .admin-accordion
){
  color: var(--text-main);
}

::selection{
  background: rgba(var(--primary-rgb),0.22);
  color: var(--text-main);
}

h1,h2,h3,h4{
  letter-spacing:0;
  line-height:1.35;
}
h1,h2,h3{
  font-family: var(--font-display);
  background: linear-gradient(90deg, #e8f1ff, var(--primary), var(--accent));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  text-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
body.light-mode h1,
body.light-mode h2,
body.light-mode h3{
  background:none;
  color: var(--text-main);
  -webkit-text-fill-color: var(--text-main);
  text-shadow: none;
}

p{ margin:0; }
small{
  line-height:1.6;
  color: var(--text-muted);
}

/* Scrollbar */
*{ scrollbar-width: thin; scrollbar-color: rgba(var(--primary-rgb),0.35) rgba(255,255,255,0.05); }
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background: rgba(255,255,255,0.04); border-radius:999px; }
::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(var(--primary-rgb),0.55), rgba(var(--accent-rgb),0.45));
  border:2px solid rgba(0,0,0,0.25);
  border-radius:999px;
}
::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, rgba(var(--primary-rgb),0.70), rgba(var(--accent-rgb),0.55));
}

[data-scroll-container="1"]{
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Background glow */
body::before, body::after{
  content:''; position:fixed; z-index:-1;
  filter: blur(60px);
  border-radius:50%;
  opacity:0.22;
  mix-blend-mode: screen;
  animation:none;
}
body::before{
  width:70vw; height:70vw;
  background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb),0.55), transparent 60%);
  top:-30%; left:-25%;
}
body::after{
  width:60vw; height:60vw;
  background: radial-gradient(circle at 60% 40%, rgba(var(--accent-rgb),0.45), transparent 60%);
  bottom:-25%; right:-20%;
}

/* Layout */
.container{ padding:40px 5%; max-width:1400px; margin:0 auto; }
.grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap:10px; }
.grid.grid-4{ grid-template-columns: repeat(4, 1fr); }
.grid.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid.grid-5{ grid-template-columns: repeat(5, 1fr); }
@media (max-width:1280px){ .grid.grid-4{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:768px){ .grid.grid-4, .grid.grid-3{ grid-template-columns: 1fr; } }
@media (max-width:1200px){ .grid.grid-5{ grid-template-columns: repeat(3,1fr); } }
@media (max-width:900px){ .grid.grid-5{ grid-template-columns: repeat(2,1fr); } }
@media (max-width:600px){ .grid.grid-5{ grid-template-columns: 1fr; } }

/* Sections */
.section{ margin-bottom:30px; position:relative; }
.section:not(:last-of-type)::after{
  content:""; position:absolute; left:6%; right:6%; bottom:-18px; height:1px;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb),0.25), rgba(var(--accent-rgb),0.20), transparent);
  opacity:0.55;
}
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin-bottom:14px;
}
.section-kicker{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 12px; border-radius:999px;
  background: linear-gradient(120deg, rgba(var(--primary-rgb),0.2), rgba(var(--accent-rgb),0.12));
  border:1px solid rgba(var(--primary-rgb),0.28);
  color:#dbe7ff; font-size:0.85rem;
  box-shadow: 0 8px 18px -14px rgba(var(--primary-rgb),0.6);
}
.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:999px;
  background: linear-gradient(120deg, rgba(var(--accent-rgb),0.25), rgba(var(--primary-rgb),0.18));
  border:1px solid rgba(var(--accent-rgb),0.28);
  color: var(--text-main); font-size:0.8rem; line-height:1.6;
  box-shadow: 0 8px 18px -14px rgba(var(--accent-rgb),0.6);
}
.section-title{ margin:6px 0 0; font-size:1.6rem; }
.section-desc{ margin:6px 0 0; color: var(--text-muted); }

/* Header */
.header{
  display:flex; align-items:center; justify-content:space-between;
  padding:15px 30px; height:90px;
  position:sticky; top:20px; z-index:100; margin:0 20px;
  border-radius: var(--radius-lg);
}
.logo{
  font-family: var(--font-display) !important;
  font-weight:800; font-size:1.8rem; letter-spacing:3px;
  background: linear-gradient(90deg, #dff2ff 10%, var(--primary) 45%, var(--accent));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  filter: drop-shadow(0 0 18px rgba(var(--primary-rgb),0.45));
}
body.light-mode .logo{
  background:none; color: var(--primary);
  -webkit-text-fill-color: var(--primary);
  filter:none;
}

/* Card */
.card{
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  position:relative; overflow:hidden;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.card:hover{
  transform: translateY(-2px);
}
.card h3{ font-size:1.5rem; margin:0 0 15px; font-weight:700; }

/* Feature + Nav Cards */
.nav-card, .feature-card{
  text-align:center;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; min-height:220px;
  position:relative;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.nav-card .icon-large,
.feature-card .icon-large{
  font-size:2.4rem; color:var(--primary);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.35));
}
.nav-card:hover, .feature-card:hover{
  transform: translateY(-3px);
}
.feature-card strong{ font-size:1.05rem; }

/* Support */
.support-grid{ display:grid; grid-template-columns: 1fr 1.1fr; gap:16px; }
@media (max-width:900px){ .support-grid{ grid-template-columns: 1fr; } }
.support-card h3{ margin:0 0 10px; }
.support-form .input-row{ margin-top:10px; }
.support-note{ opacity:0.7; font-size:0.9rem; }

/* Auth pages */
.auth-page-shell{
  max-width: 980px;
}

.auth-card{
  max-width: 560px;
  margin: 0 auto;
}

.auth-card-head{
  text-align: center;
  margin-bottom: 14px;
}

.auth-card-head h2{
  margin: 10px 0 6px;
}

.auth-card-head p{
  color: var(--text-muted);
}

.auth-login-steps{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:8px;
  margin: 4px 0 10px;
}

.auth-login-step{
  border:1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.8rem;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
}

.auth-login-step.is-active{
  border-color: rgba(var(--primary-rgb), 0.55);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.14);
  font-weight: 700;
}

.auth-login-step.is-done{
  border-color: rgba(34,197,94,0.45);
  color: #86efac;
  background: rgba(34,197,94,0.12);
}

.auth-login-tip{
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-icon-wrap{
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),0.24), rgba(var(--accent-rgb),0.16));
  border: 1px solid rgba(var(--primary-rgb),0.25);
  color: var(--primary);
}

.auth-field{
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.auth-field label{
  font-size: 0.92rem;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.auth-row.between{
  grid-template-columns: 1fr 1fr;
}

.auth-turnstile-slot{
  width: 100%;
  min-height: 68px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}
.auth-turnstile-slot:empty{
  display: none;
}

.switch-label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  user-select: none;
}

.switch-label input{
  width: 16px !important;
  height: 16px !important;
}

.auth-card-foot{
  margin-top: 14px;
  display: grid;
  gap: 7px;
  font-size: 0.92rem;
  text-align: center;
}

.auth-card-foot a{
  color: var(--primary);
}

.form-alert{
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.form-alert.success{
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.35);
  color: #86efac;
}

.form-alert.error{
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.35);
  color: #fca5a5;
}

body.light-mode .form-alert.success{
  color: #166534;
}
body.light-mode .form-alert.error{
  color: #991b1b;
}

/* Modal shared style */
.support-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 12000;
  background: rgba(2,8,18,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.support-modal.open{
  display: flex;
}

.support-modal-card{
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--glass-surface);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.support-modal-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.support-modal-header small{
  display: block;
  color: var(--text-muted);
}

.support-modal-body{
  display: grid;
  gap: 10px;
  padding: 16px;
}

/* Rich text editor shell */
.rich-editor-shell{
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(7,11,22,0.5);
  overflow: hidden;
}

.rich-editor-fallback{
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(7,11,22,0.5);
  color: var(--text-main);
  padding: 12px;
  resize: vertical;
  line-height: 1.8;
}

.ck.ck-editor{
  direction: rtl;
}

.rich-editor-shell .ck.ck-editor__main > .ck-editor__editable{
  min-height: 260px;
  background: rgba(7,11,22,0.68) !important;
  color: var(--text-main) !important;
  caret-color: var(--text-main);
}

.rich-editor-shell .ck.ck-toolbar{
  background: rgba(7,11,22,0.86) !important;
  border-color: var(--border) !important;
}

.rich-editor-shell .ck.ck-toolbar .ck-button{
  color: var(--text-main) !important;
}

.rich-editor-shell .ck.ck-toolbar .ck-button.ck-on{
  background: rgba(255,255,255,0.14) !important;
}

body.light-mode .rich-editor-shell{
  background: #fff;
  border-color: rgba(15,23,42,0.14);
}

body.light-mode .rich-editor-fallback{
  background: #fff;
  border-color: rgba(15,23,42,0.14);
  color: #0b1220;
}

body.light-mode .rich-editor-shell .ck.ck-editor__main > .ck-editor__editable{
  background: #fff !important;
  color: #0b1220;
  caret-color: #0b1220;
}

body.light-mode .rich-editor-shell .ck.ck-toolbar{
  background: #f8fbff !important;
  border-color: rgba(15,23,42,0.14) !important;
}

body.light-mode .rich-editor-shell .ck.ck-toolbar .ck-button{
  color: #0b1220 !important;
}

/* Reusable stats/layout helpers */
.user-grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.stat-card{
  background: linear-gradient(160deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.stat-number{
  margin: 6px 0 0;
  font-size: 1.9rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--primary);
}

/* User panel (transparent glass) */
body.user-page{
  --lg-blur: 28px;
  --lg-sat: 220%;
  --lg-border: rgba(255,255,255,0.34);
  --lg-top-edge: rgba(255,255,255,0.68);
  --lg-bottom-edge: rgba(0,0,0,0.24);
  --lg-mist-1: rgba(255,255,255,0.26);
  --lg-mist-2: rgba(255,255,255,0.06);
  --lg-chroma-a: rgba(var(--primary-rgb),0.32);
  --lg-chroma-b: rgba(var(--accent-rgb),0.26);
}

body.user-page .user-panel{
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  isolation: isolate;
}

body.user-page .user-panel::before{
  content: "";
  position: absolute;
  inset: -6% -4% auto;
  height: 280px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 90% at 20% 10%, rgba(var(--primary-rgb),0.26), transparent 70%),
    radial-gradient(55% 80% at 85% 25%, rgba(var(--accent-rgb),0.20), transparent 72%);
  filter: blur(26px);
  opacity: 0.9;
}

body.user-page .user-panel::after{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: calc(var(--radius-lg) + 8px);
  background:
    linear-gradient(130deg, rgba(255,255,255,0.08), rgba(255,255,255,0)),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 10px);
  opacity: 0.3;
}

body.user-page .sidebar{
  padding: 18px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

body.user-page .main-content{
  min-height: calc(100vh - 40px);
}

body.user-page .user-mobile-header{
  display: none;
}

body.user-page .user-menu-toggle{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
  display: grid;
  place-items: center;
  cursor: pointer;
}

body.user-page .user-sidebar-backdrop{
  display: none;
}

body.user-page .nav-item{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin: 6px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
  color: var(--text-main);
  text-decoration: none;
}

body.user-page .nav-item:hover{
  transform: translateX(-4px);
}

body.user-page .nav-item.active{
  color: var(--text-main);
}

body.user-page .nav-item i{
  margin-left: 10px;
  width: 20px;
  text-align: center;
}

body.user-page .user-grid{
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

body.user-page .user-grid > *{
  min-width: 0;
}

body.user-page .drag-handle{
  cursor: grab;
  opacity: 0.75;
  user-select: none;
}

body.user-page .drag-handle:active{
  cursor: grabbing;
}

body.user-page .card.is-touch-sorting{
  opacity: 0.88;
  transform: scale(0.995);
  border-color: rgba(var(--primary-rgb),0.65);
}

body.user-page .stats-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 25px;
}

body.user-page .stat-card{
  padding: 18px;
  text-align: center;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}

body.user-page .stat-card:hover{
  transform: translateY(-3px);
}

body.user-page .stat-value{
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 16px rgba(var(--primary-rgb),0.30);
}

body.user-page .stat-label{
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

body.user-page .order-item{
  border-right: 4px solid var(--primary);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

body.user-page .order-status{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

body.user-page .badge{
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(var(--secondary-rgb),0.90);
  color: white;
  margin-right: 5px;
}

body.user-page .message-bubble{
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  position: relative;
}

body.user-page .message-user{
  background: linear-gradient(135deg, rgba(var(--primary-rgb),0.88), rgba(var(--accent-rgb),0.76));
  color: #fff;
  margin-right: auto;
  border-bottom-right-radius: 5px;
}

body.user-page .message-admin{
  background: linear-gradient(145deg, rgba(255,255,255,0.19), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.30);
  margin-left: auto;
  border-bottom-left-radius: 5px;
  backdrop-filter: blur(14px) saturate(185%);
  -webkit-backdrop-filter: blur(14px) saturate(185%);
}

body.user-page .quick-actions{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

body.user-page .action-btn{
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background-color 160ms var(--ease);
}

body.user-page .action-btn:hover{
  transform: translateY(-2px);
}

body.user-page .progress-bar{
  height: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  margin: 10px 0;
  overflow: hidden;
}

body.user-page .progress-fill{
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width 400ms var(--ease);
}

body.user-page .xp-animation{
  text-shadow: 0 0 12px rgba(var(--secondary-rgb),0.35);
}

body.user-page .notification-badge{
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.light-mode.user-page .message-admin{
  background: linear-gradient(145deg, rgba(255,255,255,0.86), rgba(255,255,255,0.64));
  border-color: rgba(15,23,42,0.12);
}

@media (max-width: 1080px){
  body.user-page .user-mobile-header{
    position: sticky;
    top: 10px;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 14px 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px) saturate(170%);
    -webkit-backdrop-filter: blur(12px) saturate(170%);
  }

  body.user-page .user-panel{
    grid-template-columns: 1fr;
    position: relative;
    z-index: 1500;
  }

  body.user-page.user-menu-open .user-panel{
    pointer-events: none;
  }

  body.user-page .sidebar{
    position: fixed;
    top: 14px;
    right: 14px;
    bottom: 14px;
    width: min(86vw, 340px);
    max-height: calc(100vh - 28px);
    margin: 0;
    overflow-y: auto;
    z-index: 1510;
    transform: translateX(calc(100% + 24px));
    transition: transform 240ms var(--ease);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    pointer-events: auto;
  }

  body.user-page.user-menu-open .sidebar{
    transform: translateX(0);
    pointer-events: auto;
  }

  body.user-page .user-sidebar-backdrop{
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1490;
    background: rgba(2,8,20,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms var(--ease);
  }

  body.user-page.user-menu-open .user-sidebar-backdrop{
    opacity: 1;
    pointer-events: auto;
  }

  body.user-page .main-content{
    min-height: auto;
  }
}

@media (max-width: 900px){
  body.user-page .user-grid{
    grid-template-columns: 1fr;
  }
  body.user-page .user-grid > *{
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 640px){
  body.user-page .user-panel{
    padding: 14px;
    gap: 14px;
  }
  body.user-page .stats-grid{
    grid-template-columns: 1fr;
  }
}

/* Admin panel layout fixes (desktop/laptop) */
body.admin-page .container.user-grid{
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

body.admin-page .container.user-grid > *{
  width: 100%;
}

body.admin-page .admin-accordion{
  margin-bottom: 24px;
}

body.admin-page .admin-accordion .admin-accordion-body{
  padding: 0 26px 26px;
}

body.admin-page .admin-stats-grid{
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

body.admin-page .admin-notes-grid{
  grid-template-columns: 1.7fr 1fr !important;
}

body.admin-page .admin-challenge-grid{
  grid-template-columns: 1.1fr 1fr !important;
}

body.admin-page .admin-content-head-grid{
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 2fr) !important;
}

body.admin-page .admin-product-grid{
  grid-template-columns: 1fr 1fr !important;
}

body.admin-page .admin-easy-toolbar{
  display:grid;
  gap:12px;
  margin-bottom:20px;
  border-top: 3px solid var(--primary);
}

body.admin-page .admin-easy-toolbar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

body.admin-page .admin-easy-menu-toggle{
  display:none;
}

body.admin-page .admin-easy-backdrop{
  display:none;
}

body.admin-page .admin-easy-toolbar-controls{
  display:grid;
  grid-template-columns: minmax(220px,1fr) minmax(220px,1fr) repeat(3, auto);
  gap:8px;
  align-items:center;
}

body.admin-page .admin-easy-toolbar-quick{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

body.admin-page .admin-easy-toolbar-controls .btn,
body.admin-page .admin-easy-toolbar-quick .btn{
  white-space:nowrap;
}

body.admin-page .admin-easy-shell{
  display:grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap:18px;
  align-items:start;
}

body.admin-page .admin-easy-sidebar{
  position:sticky;
  top:118px;
  display:grid;
  gap:8px;
  padding:16px;
  max-height: calc(100vh - 138px);
  overflow:auto;
}

body.admin-page .admin-easy-menu{
  display:grid;
  gap:6px;
}

body.admin-page .admin-easy-nav-item{
  width:100%;
  border:1px solid rgba(255,255,255,0.14);
  border-radius:11px;
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
  padding:11px 12px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  cursor:pointer;
  font-weight:600;
  text-align:right;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease), background-color 140ms var(--ease), box-shadow 140ms var(--ease);
}

body.admin-page .admin-easy-nav-item span{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

body.admin-page .admin-easy-nav-item:hover{
  transform: translateX(-1px);
  border-color: rgba(var(--primary-rgb),0.3);
}

body.admin-page .admin-easy-nav-item.active{
  border-color: rgba(var(--primary-rgb),0.45);
  background: rgba(var(--primary-rgb),0.15);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb),0.14);
}

body.admin-page .admin-easy-content{
  min-width:0;
}

body.admin-page .admin-easy-content > *{
  scroll-margin-top: 115px;
}

body.admin-page .admin-easy-hidden{
  display:none !important;
}

@media (max-width: 1440px){
  body.admin-page .container{
    padding-left: 3%;
    padding-right: 3%;
  }

  body.admin-page .header{
    margin-left: 12px;
    margin-right: 12px;
    padding-left: 18px;
    padding-right: 18px;
    min-height: 78px;
    height: auto;
  }
}

@media (max-width: 1280px){
  body.admin-page .admin-easy-menu-toggle{
    display:inline-flex;
  }

  body.admin-page .admin-easy-backdrop{
    display:block;
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 24, 0.56);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 170ms var(--ease);
    z-index: 1088;
  }

  body.admin-page .admin-easy-toolbar-controls{
    grid-template-columns: 1fr 1fr;
  }

  body.admin-page .admin-easy-shell{
    grid-template-columns: 1fr;
  }

  body.admin-page .admin-easy-sidebar{
    position: fixed;
    top: 92px;
    right: 14px;
    bottom: 14px;
    width: min(340px, calc(100vw - 28px));
    max-height: none;
    z-index: 1090;
    transform: translateX(calc(100% + 22px));
    transition: transform 170ms var(--ease);
    box-shadow: 0 22px 50px rgba(0,0,0,0.42);
  }

  body.admin-page .admin-easy-menu{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-page.admin-easy-menu-open{
    overflow: hidden;
  }

  body.admin-page.admin-easy-menu-open .admin-easy-sidebar{
    transform: translateX(0);
  }

  body.admin-page.admin-easy-menu-open .admin-easy-backdrop{
    opacity: 1;
    pointer-events: auto;
  }

  body.admin-page .admin-stats-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.admin-page .admin-notes-grid{
    grid-template-columns: 1fr !important;
  }

  body.admin-page .admin-challenge-grid{
    grid-template-columns: 1fr !important;
  }

  body.admin-page .admin-product-grid{
    grid-template-columns: 1fr !important;
  }

  body.admin-page .admin-accordion .admin-accordion-body{
    padding: 0 20px 22px;
  }
}

@media (max-width: 1024px){
  body.admin-page .admin-easy-toolbar-controls{
    grid-template-columns: 1fr;
  }

  body.admin-page .admin-easy-menu{
    grid-template-columns: 1fr;
  }

  body.admin-page .admin-easy-toolbar-quick{
    justify-content:flex-start;
  }

  body.admin-page .admin-content-head-grid{
    grid-template-columns: 1fr !important;
  }

  body.admin-page .admin-accordion > summary{
    padding: 16px 18px;
  }
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:14px 30px; border-radius: var(--radius-pill);
  font-weight:700; cursor:pointer; text-decoration:none;
  background: rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.14);
  color: var(--text-main);
  box-shadow: 0 6px 14px -12px rgba(0,0,0,0.45);
  transition: transform 140ms var(--ease), background-color 140ms var(--ease), border-color 140ms var(--ease);
}
.btn:hover{ transform: translateY(-1px); border-color: var(--border-strong); }
.btn:active{ transform: translateY(0); }

.btn-sm{
  padding: 8px 14px;
  font-size: 0.86rem;
  min-height: 34px;
}

.btn-block{
  width: 100%;
  display: inline-flex;
}

.btn-primary{
  color:#fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),1), rgba(var(--accent-rgb),0.95));
}

.btn-danger{ color:#fff; border-color: rgba(var(--secondary-rgb),0.35); }

.btn-success{
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(34,197,94,1), rgba(16,185,129,0.95));
}

body.light-mode .btn{
  background: rgba(255,255,255,0.95);
  border:1px solid rgba(15,23,42,0.12);
  color:#0b1220;
  box-shadow: 0 6px 14px -12px rgba(15,23,42,0.22);
}
body.light-mode .btn-danger{
  color:#b91c1c; background: rgba(255,255,255,0.95);
}
body.light-mode .btn-success{
  color:#fff;
  background: linear-gradient(135deg, #34d399, #10b981);
}

/* Inputs */
input, textarea, select{
  width:100%; padding:16px; border-radius:var(--radius-md);
  background: rgba(8,12,20,0.62);
  border:1px solid var(--border);
  color: var(--text-main);
  color-scheme: dark;
  box-shadow: 0 4px 12px -10px rgba(0,0,0,0.45);
  transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}
body.light-mode input,
body.light-mode textarea,
body.light-mode select{
  background:#ffffff; border:1px solid rgba(15,23,42,0.12); color:#0b1220;
  color-scheme: light;
}
input:focus{
  border-color: rgba(var(--primary-rgb),0.55);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb),0.2);
  background: rgba(8,12,20,0.62);
}
textarea:focus, select:focus{ outline:none; }
input::placeholder, textarea::placeholder{ color: rgba(156,163,175,0.8); }
body.light-mode input::placeholder,
body.light-mode textarea::placeholder{ color: rgba(71,85,105,0.8); }
input[disabled], textarea[disabled], select[disabled]{ opacity:0.6; cursor:not-allowed; }

select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.65) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.65) 50%, transparent 50%);
  background-position: 16px 50%, 22px 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-left: 44px;
}

/* Checkbox & Radio */
input[type="checkbox"], input[type="radio"]{
  appearance:none;
  width:18px !important; height:18px !important;
  padding:0 !important;
  border-radius:6px;
  border:1px solid var(--border-strong);
  background: rgba(255,255,255,0.04);
  display:inline-grid; place-content:center;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
  vertical-align: middle;
  flex: 0 0 auto;
}
input[type="radio"]{ border-radius:50%; }
input[type="checkbox"]::after{
  content:""; width:9px; height:5px;
  border-left:2px solid #bff7ff;
  border-bottom:2px solid #bff7ff;
  transform: rotate(-45deg); opacity:0;
}
input[type="radio"]::after{
  content:""; width:8px; height:8px; border-radius:50%;
  background: var(--primary); opacity:0;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
  background: rgba(var(--primary-rgb),0.12);
}
input[type="checkbox"]:checked::after,
input[type="radio"]:checked::after{ opacity:1; }

/* Switch */
.switch{ display:inline-flex; align-items:center; gap:10px; cursor:pointer; user-select:none; }
.switch input{ position:absolute; opacity:0; width:1px; height:1px; }
.switch-slider{
  width:46px; height:26px; border-radius:999px;
  background: rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.35);
  position:relative;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.switch-slider::after{
  content:""; position:absolute; top:3px; right:3px;
  width:18px; height:18px; border-radius:50%;
  background: rgba(255,255,255,0.90);
  box-shadow: 0 8px 18px -10px rgba(0,0,0,0.7);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.switch input:checked + .switch-slider{
  background: rgba(var(--primary-rgb),0.18);
  border-color: rgba(var(--primary-rgb),0.35);
}
.switch input:checked + .switch-slider::after{
  transform: translateX(-20px);
  background: #dbe7ff;
}

/* Content stream */
.content-stream{
  display:flex; flex-direction:column; gap:14px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-1));
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:16px;
  box-shadow: var(--shadow-soft);
}
.content-row{
  padding:12px 12px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
}
.content-row:hover{
  border-color: rgba(var(--primary-rgb),0.28);
  background: rgba(255,255,255,0.05);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}
.content-row:last-child{ border-bottom:none; }
.content-row-head{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px; flex-wrap:wrap;
}
.content-title{ font-weight:700; color: var(--primary); text-decoration:none; }
.content-title:hover{ opacity:0.9; }
.content-meta{ font-size:0.8rem; color: var(--text-muted); margin-top:4px; }
.content-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.content-snippet{
  margin-top:10px;
  color: var(--text-main);
  opacity:0.9;
  line-height:1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.content-snippet.locked{ filter: blur(4px); opacity:0.5; user-select:none; }
.content-detail{ display:grid; gap:16px; }
.attachment-row{
  display:flex; justify-content:space-between; align-items:center;
  gap:10px; padding:10px;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  background: rgba(0,0,0,0.12);
}
.content-media{
  margin:10px 0; border-radius:var(--radius-md); overflow:hidden;
  border:1px solid var(--border);
  background: rgba(0,0,0,0.25);
}
.content-media img,
.content-media video{ width:100%; display:block; border-radius:var(--radius-sm); }
.content-body{ line-height:1.9; }

/* Horizontal slider */
.h-scroll{
  display:flex; gap:12px; overflow-x:auto; padding:4px 4px 10px;
  scroll-snap-type:x mandatory; -webkit-overflow-scrolling: touch;
}
.h-scroll::-webkit-scrollbar{ height:6px; }
.h-scroll::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.18); border-radius:999px; }
.mini-card, .mini-news{
  border-radius:var(--radius-md);
  background: linear-gradient(160deg, var(--surface-2), var(--surface-1));
  border:1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--edge-light);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}
.mini-card{
  flex:0 0 auto; min-width:190px; display:flex; align-items:center; gap:12px;
  padding:12px 14px; cursor:pointer; scroll-snap-align:start;
}
.mini-card i{ width:26px; text-align:center; font-size:1.2rem; color: var(--primary); }
.mini-card small{ display:block; opacity:0.72; }
.mini-news{ padding:12px 14px; cursor:pointer; }
.mini-card:hover, .mini-news:hover{
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.06);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(var(--primary-rgb),0.18);
}

.mini-news-line{
  margin-top: 6px;
  opacity: 0.78;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-slider-header{
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.quick-slider-actions{ display:flex; gap:8px; }
.slider-btn{
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text-main);
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.slider-btn:hover{ background: rgba(255,255,255,0.1); transform: translateY(-1px); }

/* Home enhancements */
.nav-inline{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.auth-buttons{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.hero-card{
  padding:28px 32px;
  background: linear-gradient(160deg, rgba(10,16,28,0.9), rgba(16,26,44,0.6));
  border:1px solid var(--border-strong);
  box-shadow: var(--shadow-hover), var(--glow-strong);
  position: relative;
}
.hero-card::after{
  content:""; position:absolute; inset:0;
  background: var(--glass-sheen);
  opacity:0.28; pointer-events:none;
  mix-blend-mode: screen;
}
.hero-grid{ display:grid; grid-template-columns: 1.1fr 0.9fr; gap:24px; align-items:center; }
.hero-title{
  font-size:2.2rem; margin:8px 0 6px; font-weight:900;
  background: linear-gradient(90deg, #e8f1ff, var(--primary), var(--accent));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
body.light-mode .hero-title{
  background:none; color: var(--text-main); -webkit-text-fill-color: var(--text-main);
}
.hero-subtitle{ margin:0; opacity:0.85; color: var(--text-muted); }
.hero-badge{
  display:inline-flex; align-items:center; gap:8px; padding:6px 12px;
  border-radius:999px; background: linear-gradient(120deg, rgba(var(--primary-rgb),0.22), rgba(var(--accent-rgb),0.12));
  border:1px solid rgba(var(--primary-rgb),0.28); color:#dbe7ff; font-size:0.85rem;
  position:relative; overflow:hidden;
  box-shadow: 0 10px 24px -18px rgba(var(--primary-rgb),0.6);
}
.hero-badge::after{
  content:""; position:absolute; inset:-30% 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-120%);
  pointer-events:none;
}
.hero-cta{ display:flex; gap:10px; margin-top:16px; flex-wrap:wrap; }
.hero-stats{ display:grid; gap:10px; }
.stat-mini{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-radius:var(--radius-sm);
  background: linear-gradient(160deg, var(--surface-2), var(--surface-1));
  border:1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--edge-light);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.stat-mini:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(var(--primary-rgb),0.18);
}
.stat-mini-label{ opacity:0.75; }
.stat-mini-value{ font-weight:800; color: var(--secondary); }

.quick-card{
  display:flex; align-items:center; gap:14px; text-decoration:none;
  border-radius:var(--radius-lg); padding:18px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface-1));
  border:1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--edge-light);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.quick-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(var(--primary-rgb),0.18);
}
.quick-ic{
  width:44px; height:44px; border-radius:14px; display:grid; place-items:center;
  background: rgba(var(--primary-rgb),0.12); border:1px solid rgba(var(--primary-rgb),0.22);
  color:#dbe7ff;
}

/* Footer */
.site-footer{
  margin-top:60px;
  padding:30px 0 50px;
  border-top:1px solid var(--border);
  background: linear-gradient(180deg, rgba(12,16,26,0.45), rgba(6,8,14,0.7));
}
.footer-grid{ display:grid; grid-template-columns: 1.2fr 1fr; gap:24px; align-items:flex-start; }
.footer-brand .logo{ font-size:1.4rem; }
.footer-links{ display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.footer-links a{ color: var(--text-muted); text-decoration:none; }
.footer-links a:hover{ color: var(--text-main); }
.footer-stats{ display:grid; gap:6px; text-align:left; }
.footer-stats-grid{ display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; margin-top:10px; }
.footer-stat-col{ display:grid; gap:8px; }
.footer-stat-item{ font-size:0.9rem; color: var(--text-muted); }
.footer-stat-item span{ color: var(--text-main); font-weight:700; margin-right:6px; }
@media (max-width:900px){
  .footer-grid{ grid-template-columns: 1fr; }
  .footer-stats-grid{ grid-template-columns: 1fr; }
  .footer-stats{ text-align:right; }
}

/* Tables */
table{ width:100%; border-collapse:separate; border-spacing:0 10px; }
th{
  text-align:right;
  color: var(--text-main);
  background: rgba(255,255,255,0.06);
  padding:15px;
}
td{
  background: rgba(8,13,25,0.56);
  color: var(--text-main);
  padding:15px;
  border-top:1px solid rgba(255,255,255,0.08);
  border-bottom:1px solid rgba(0,0,0,0.24);
}
tr td:first-child{ border-radius:0 var(--radius-md) var(--radius-md) 0; border-right:4px solid var(--primary); }
tr td:last-child{ border-radius:var(--radius-md) 0 0 var(--radius-md); }
tr:hover td{ background: rgba(255,255,255,0.05); }
body.light-mode th{
  color:#0b1220;
  background: rgba(15,23,42,0.06);
}
body.light-mode td{
  background: rgba(255,255,255,0.94);
  color:#0b1220;
  border-top:1px solid rgba(15,23,42,0.08);
  border-bottom:1px solid rgba(148,163,184,0.24);
}

/* Toast */
.toast{
  position:fixed; top:20px; right:20px;
  z-index:10000;
  padding:12px 18px;
  min-width: 220px;
  max-width:360px;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-ui);
  font-size:0.92rem;
  line-height:1.7;
  border:1px solid transparent;
  box-shadow: 0 18px 40px -26px rgba(2,6,23,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  white-space: pre-line;
}
.toast.success{
  background: linear-gradient(135deg, rgba(34,197,94,0.98), rgba(16,185,129,0.96));
  border-color: rgba(16,185,129,0.82);
}
.toast.error{
  background: linear-gradient(135deg, rgba(239,68,68,0.98), rgba(220,38,38,0.96));
  border-color: rgba(239,68,68,0.82);
}
.toast.info{
  background: linear-gradient(135deg, rgba(37,99,235,0.98), rgba(14,165,233,0.96));
  border-color: rgba(59,130,246,0.82);
}

/* Bottom nav */
.bottom-nav{
  position:fixed; left:50%; transform: translateX(-50%);
  bottom:12px; z-index:10040; display:none;
  gap:10px; padding:10px 12px;
  border-radius:999px;
}
.bottom-nav a{
  width:42px; height:42px; border-radius:14px;
  display:grid; place-items:center;
  color: var(--text-main);
  text-decoration:none;
}
.bottom-nav a.active{
  color:#dbe7ff;
  border-color: rgba(var(--primary-rgb),0.35);
  background: rgba(var(--primary-rgb),0.12);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.16);
}
@media (max-width:768px){
  body.has-bottom-nav{ padding-bottom: 86px; }
  .bottom-nav{ display:flex; }
}

/* Support Chat */
.chat-fab{
  position:fixed; right:30px; bottom:30px;
  width:60px; height:60px; border-radius:50%;
  display:grid; place-items:center;
  color: var(--primary);
  cursor:pointer; z-index:10020;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease);
}
.chat-fab:hover{ transform: translateY(-2px); }
.chat-fab-dot{
  position:absolute; top:8px; right:10px; width:10px; height:10px;
  border-radius:50%; background:#ff4757; box-shadow: 0 0 0 2px rgba(0,0,0,0.25);
  display:none;
}
.chat-popup{
  position:fixed; right:30px; bottom:105px;
  width:380px; max-width: calc(100vw - 30px); max-height:70vh;
  display:none; flex-direction:column;
  border-radius: var(--radius-lg);
  z-index:10030; overflow:hidden;
}
.chat-popup.open{ display:flex; }
.chat-header{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 16px; border-bottom:1px solid rgba(255,255,255,0.10);
}
.chat-title{ display:grid; gap:2px; }
.chat-title strong{ font-size:1rem; }
.chat-title small{ opacity:0.7; }
.chat-close{
  border:0; width:34px; height:34px; border-radius:var(--radius-sm);
  color: var(--text-main); cursor:pointer;
}
.chat-body{ display:flex; gap:12px; padding:12px 12px 0; overflow:hidden; }
.chat-sessions{
  width:120px; border-left:1px solid rgba(255,255,255,0.08);
  padding-left:8px; overflow-y:auto; display:none;
}
.chat-session{
  padding:8px 10px; border-radius:var(--radius-sm);
  cursor:pointer;
  margin-bottom:8px; font-size:0.85rem;
}
.chat-session.active{
  border-color: rgba(var(--primary-rgb),0.35);
  background: rgba(var(--primary-rgb),0.12);
}
.chat-thread{ flex:1; display:flex; flex-direction:column; min-width:0; }
.chat-meta{ display:grid; grid-template-columns: 1fr 1fr; gap:8px; margin-bottom:8px; }
.chat-meta input{ padding:10px 12px; border-radius:var(--radius-md); }
.chat-messages{ flex:1; overflow-y:auto; padding:6px 6px 12px; display:flex; flex-direction:column; gap:10px; }
.chat-msg{
  max-width:85%; padding:10px 12px; border-radius:var(--radius-md);
  font-size:0.92rem; line-height:1.7;
}
.chat-msg.user{ align-self:flex-start; border-bottom-right-radius:6px; }
.chat-msg.admin{ align-self:flex-end; border-bottom-left-radius:6px; background: rgba(var(--primary-rgb),0.14); }
.chat-time{ display:block; font-size:0.75rem; opacity:0.6; margin-top:4px; }
.chat-footer{ display:flex; flex-wrap:wrap; gap:8px; padding:12px; border-top:1px solid rgba(255,255,255,0.10); }
.chat-footer .auth-turnstile-slot{ order:-1; margin:0 0 4px; min-height:66px; }
.chat-footer input{ flex:1; padding:12px 14px; border-radius:var(--radius-md); }
.chat-send{
  width:46px; border-radius:var(--radius-md);
  color: var(--text-main); cursor:pointer;
}
.chat-popup.admin .chat-sessions{ display:block; }
.chat-popup.admin .chat-meta{ display:none; }

.private-chat-box{
  margin-top:10px;
}
.private-chat-messages{
  max-height:260px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  direction:ltr;
  gap:10px;
  padding:10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}
.private-chat-empty{
  opacity:0.7;
  padding:8px 2px;
}
.private-chat-msg{
  display:flex;
  width:100%;
}
.private-chat-msg.mine{
  justify-content:flex-end;
}
.private-chat-msg.peer{
  justify-content:flex-start;
}
.private-chat-bubble{
  max-width:min(82%, 460px);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  font-size:0.9rem;
  line-height:1.8;
  direction:rtl;
}
.private-chat-msg.mine .private-chat-bubble{
  max-width:min(86%, 500px);
  background: linear-gradient(180deg, rgba(59,130,246,0.32), rgba(37,99,235,0.20));
  border-color: rgba(96,165,250,0.72);
  border-bottom-right-radius:6px;
  text-align:right;
  box-shadow: 0 6px 18px rgba(37,99,235,0.22);
}
.private-chat-msg.peer .private-chat-bubble{
  max-width:min(72%, 420px);
  background: rgba(148,163,184,0.16);
  border-color: rgba(148,163,184,0.38);
  border-bottom-left-radius:6px;
  text-align:right;
}
.private-chat-text{
  white-space:pre-wrap;
  word-break:break-word;
}
.private-chat-time{
  display:block;
  margin-top:6px;
  opacity:0.65;
  font-size:0.72rem;
}
.private-chat-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:flex-start;
}
.private-chat-input{
  flex:1;
  min-width:200px;
}
body.light-mode .private-chat-messages{
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
body.light-mode .private-chat-msg.peer .private-chat-bubble{
  background: rgba(15,23,42,0.06);
  border-color: rgba(15,23,42,0.18);
}
body.light-mode .private-chat-msg.mine .private-chat-bubble{
  background: rgba(59,130,246,0.20);
  border-color: rgba(59,130,246,0.44);
}

/* Admin accordion */
.admin-accordion{ padding:0; }
.admin-accordion > summary{
  list-style:none; cursor:pointer; user-select:none;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:22px 35px;
}
.admin-accordion > summary::-webkit-details-marker{ display:none; }
.admin-accordion > summary::after{
  content:"\25BE"; font-size:1.3rem; opacity:0.75;
  transform: rotate(0deg); transition: transform 0.2s ease;
}
.admin-accordion[open] > summary::after{ transform: rotate(180deg); }
.admin-accordion .admin-accordion-body{
  padding:0 35px 35px; border-top:1px solid rgba(255,255,255,0.10);
}

.admin-helper-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin:8px 0 12px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,0.14);
  border-radius:10px;
  background: rgba(255,255,255,0.04);
}

.admin-helper-summary{
  margin:0;
  font-size:0.84rem;
  color: var(--text-muted);
}

.admin-helper-summary[data-state="ok"]{
  color: var(--success);
}

.admin-helper-summary[data-state="warn"]{
  color: var(--warning);
}

.admin-helper-summary[data-state="error"]{
  color: var(--secondary);
}

.admin-helper-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.admin-command-center{
  display: grid;
  gap: 12px;
}

.admin-command-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-command-tools{
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) repeat(4, auto);
  gap: 8px;
  align-items: center;
}

.admin-command-tools .btn{
  white-space: nowrap;
}

.admin-master-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.admin-master-grid label{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  user-select: none;
}

.admin-command-foot{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1120px){
  .admin-command-tools{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px){
  .admin-command-tools{
    grid-template-columns: 1fr;
  }
}

.admin-config-toolbar-shell{
  margin: 0 0 14px;
}

.admin-config-toolbar{
  display:grid;
  gap:10px;
  padding:12px;
  border:1px solid rgba(255,255,255,0.14);
  border-radius:12px;
  background: rgba(255,255,255,0.03);
}

.admin-config-toolbar-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.admin-config-main-row{
  align-items:center;
}

.admin-config-main-left{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-width:0;
}

.admin-config-mode-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:0.88rem;
  color: var(--text-muted);
}

.admin-config-mode-select{
  min-width: 130px;
  width: auto;
  padding: 7px 10px;
}

.admin-config-toolbar-actions{
  justify-content:flex-start;
}

.admin-config-ops-row{
  align-items:flex-start;
}

.admin-config-ops{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.admin-config-mode-group{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.admin-config-switches{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.admin-config-mode-group .btn.is-active{
  border-color: rgba(var(--primary-rgb),0.48);
  background: rgba(var(--primary-rgb),0.18);
  color: #dbe7ff;
}

.admin-save-btn.is-dirty{
  border-color: rgba(245,158,11,0.45);
  box-shadow: 0 0 0 2px rgba(245,158,11,0.2);
}

.admin-field-changed{
  border-color: rgba(245,158,11,0.62) !important;
  background: rgba(245,158,11,0.08) !important;
}

.admin-config-search{
  min-width: 220px;
  max-width: 380px;
  width: min(100%, 380px);
  padding: 10px 12px;
}

.admin-config-guide-row{
  align-items:center;
}

.admin-config-guide-row.is-hidden{
  display:none;
}

.admin-config-guide-inline{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.admin-config-guide-inline.is-hidden{
  display:none;
}

.admin-config-guide-controls{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.admin-config-guide-select{
  min-width: 220px;
  max-width: 420px;
  width: min(100%, 420px);
  padding: 8px 10px;
}

.admin-config-guide-summary{
  font-size:0.84rem;
}

.admin-config-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:0.88rem;
  color: var(--text-muted);
}

.admin-config-toggle input{
  margin:0;
}

.admin-config-tools{
  border:1px dashed rgba(255,255,255,0.18);
  border-radius:10px;
  overflow:hidden;
}

.admin-config-tools > summary{
  cursor:pointer;
  list-style:none;
  padding:8px 10px;
  font-size:0.86rem;
  color: var(--text-muted);
}

.admin-config-tools > summary::-webkit-details-marker{
  display:none;
}

.admin-config-tools[open] > summary{
  border-bottom:1px dashed rgba(255,255,255,0.14);
}

.admin-config-tools-body{
  display:grid;
  gap:10px;
  padding:10px;
}

.admin-hidden-by-mode,
.admin-hidden-by-toggle,
.admin-hidden-by-search,
.admin-hidden-by-changes,
.admin-hidden-by-guide{
  display:none !important;
}

.admin-block-muted{
  opacity:0.56;
  filter:saturate(0.72);
}

@media (max-width:900px){
  .admin-config-toolbar-row{
    justify-content:flex-start;
  }
  .admin-config-main-left{
    width:100%;
  }
  .admin-config-guide-controls{
    width:100%;
  }
  .admin-config-guide-inline{
    width:100%;
  }
  .admin-config-mode-label{
    width:100%;
    justify-content:space-between;
  }
  .admin-config-mode-select{
    width: 170px;
  }
  .admin-config-guide-select{
    max-width:none;
    width:100%;
  }
}

body.light-mode .admin-helper-row{
  background: rgba(15,23,42,0.03);
  border-color: rgba(15,23,42,0.14);
}
body.light-mode .admin-easy-nav-item{
  background: rgba(15,23,42,0.03);
  border-color: rgba(15,23,42,0.12);
  color: #0b1220;
}
body.light-mode .admin-easy-nav-item.active{
  border-color: rgba(var(--primary-rgb),0.45);
  background: rgba(var(--primary-rgb),0.12);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb),0.1);
}
body.light-mode .admin-easy-toolbar{
  background: rgba(15,23,42,0.03);
  border-color: rgba(15,23,42,0.14);
}
body.light-mode .admin-easy-sidebar{
  background: rgba(15,23,42,0.03);
  border-color: rgba(15,23,42,0.14);
}
body.light-mode #admin-easy-toggle-mode{
  color:#0b1220;
  background: rgba(var(--primary-rgb),0.12);
}
body.light-mode .admin-master-grid label{
  background: rgba(15,23,42,0.03);
  border-color: rgba(15,23,42,0.12);
}
body.light-mode .admin-config-toolbar{
  background: rgba(15,23,42,0.03);
  border-color: rgba(15,23,42,0.14);
}
body.light-mode .admin-config-tools{
  border-color: rgba(15,23,42,0.2);
}
body.light-mode .admin-config-tools[open] > summary{
  border-bottom-color: rgba(15,23,42,0.14);
}
body.light-mode .admin-field-changed{
  background: rgba(245,158,11,0.09) !important;
}
/* Misc */
:where(a, button, input, textarea, select, .btn):focus-visible{
  outline:none; box-shadow: 0 0 0 3px var(--ring); border-color: var(--border-strong);
}

/* Mobile */
@media (max-width:768px){
  body{
    font-size:14px;
    background-attachment: scroll, scroll, scroll, scroll, scroll;
    background-size: clamp(360px, 86vw, 760px), auto, auto, auto, 100% 100%;
    background-position: center 96px, 8% -10%, 95% 15%, 50% 110%, top center;
  }
  .header{ height:auto; flex-direction:column; padding:15px; gap:15px; margin:10px; }
  .header div{ width:100%; justify-content:center; display:flex; }
  .logo{ font-size:1.4rem; }
  .card{ padding:20px; margin:10px 0; }
  .btn{ padding:10px 20px; font-size:0.9rem; }
  .grid{ grid-template-columns: 1fr; gap:15px; }
  input, textarea, select{ padding:12px; }
  table{ display:block; overflow-x:auto; }
  th, td{ padding:10px; font-size:0.85rem; }
  .container{ padding:20px 5%; }
  .toast{ top:10px; right:10px; max-width:250px; font-size:0.8rem; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-title{ font-size:1.8rem; }
  .chat-fab{ right:16px; bottom:16px; width:52px; height:52px; }
  .chat-popup{ right:10px; bottom:80px; width: calc(100vw - 20px); }
  .chat-sessions{ width:100px; }
  .auth-row,
  .auth-row.between{ grid-template-columns: 1fr; }
  .auth-login-steps{ grid-template-columns: 1fr; }
  .support-modal-card{ max-height:92vh; overflow:auto; }
  .user-grid{ grid-template-columns: 1fr; }
}

body.has-bottom-nav .chat-fab{ bottom: 90px; }
body.has-bottom-nav .chat-popup{ bottom: 150px; }

/* =========================================================
   Theme Coverage Refresh
   ========================================================= */

:where(
  .header,
  .card,
  .nav-card,
  .feature-card,
  .mini-card,
  .mini-news,
  .content-stream,
  .quick-card,
  .support-modal-card,
  .chat-popup,
  .bottom-nav,
  .action-btn,
  .stat-card,
  .order-item,
  .attachment-row,
  .admin-accordion,
  .sidebar,
  .hero-card,
  .stat-mini,
  .admin-config-toolbar,
  .admin-config-tools,
  .admin-helper-row,
  .admin-config-guide-inline
){
  background: linear-gradient(162deg, rgba(20,33,58,0.90), rgba(11,18,34,0.82)) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow:
    0 16px 36px -26px rgba(0,0,0,0.74),
    inset 0 1px 0 var(--glass-edge-top) !important;
  backdrop-filter: blur(14px) saturate(170%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(170%) !important;
}

body.light-mode :where(
  .header,
  .card,
  .nav-card,
  .feature-card,
  .mini-card,
  .mini-news,
  .content-stream,
  .quick-card,
  .support-modal-card,
  .chat-popup,
  .bottom-nav,
  .action-btn,
  .stat-card,
  .order-item,
  .attachment-row,
  .admin-accordion,
  .sidebar,
  .hero-card,
  .stat-mini,
  .admin-config-toolbar,
  .admin-config-tools,
  .admin-helper-row,
  .admin-config-guide-inline
){
  background: linear-gradient(158deg, rgba(255,255,255,0.95), rgba(242,248,255,0.82)) !important;
  box-shadow:
    0 14px 28px -20px rgba(15,23,42,0.22),
    inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

:where(
  .header,
  .card,
  .nav-card,
  .feature-card,
  .mini-card,
  .mini-news,
  .content-stream,
  .quick-card,
  .support-modal-card,
  .chat-popup,
  .bottom-nav,
  .action-btn,
  .stat-card,
  .order-item,
  .attachment-row,
  .admin-accordion,
  .sidebar,
  .hero-card,
  .stat-mini,
  .admin-config-toolbar,
  .admin-config-tools
){
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

:where(
  .header,
  .card,
  .nav-card,
  .feature-card,
  .mini-card,
  .mini-news,
  .content-stream,
  .quick-card,
  .support-modal-card,
  .chat-popup,
  .bottom-nav,
  .action-btn,
  .stat-card,
  .order-item,
  .attachment-row,
  .admin-accordion,
  .sidebar,
  .hero-card,
  .stat-mini,
  .admin-config-toolbar,
  .admin-config-tools
)::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 48%, rgba(255,255,255,0.08));
  mix-blend-mode: normal;
  opacity: 0.2;
  z-index: 0;
}

:where(
  .header,
  .card,
  .nav-card,
  .feature-card,
  .mini-card,
  .mini-news,
  .content-stream,
  .quick-card,
  .support-modal-card,
  .chat-popup,
  .bottom-nav,
  .action-btn,
  .stat-card,
  .order-item,
  .attachment-row,
  .admin-accordion,
  .sidebar,
  .hero-card,
  .stat-mini,
  .admin-config-toolbar,
  .admin-config-tools
) > *{
  position: relative;
  z-index: 1;
}

body.light-mode :where(
  .header,
  .card,
  .nav-card,
  .feature-card,
  .mini-card,
  .mini-news,
  .content-stream,
  .quick-card,
  .support-modal-card,
  .chat-popup,
  .bottom-nav,
  .action-btn,
  .stat-card,
  .order-item,
  .attachment-row,
  .admin-accordion,
  .sidebar,
  .hero-card,
  .stat-mini,
  .admin-config-toolbar,
  .admin-config-tools
)::before{
  mix-blend-mode: normal;
  opacity: 0.18;
}

body.user-page .section-content{
  --section-rgb: var(--section-dashboard-rgb);
}
body.user-page #orders-section{ --section-rgb: var(--section-orders-rgb); }
body.user-page #challenges-section{ --section-rgb: var(--section-challenges-rgb); }
body.user-page #challenge-group-section{ --section-rgb: var(--section-challenge-group-rgb); }
body.user-page #messages-section{ --section-rgb: var(--section-messages-rgb); }
body.user-page #transactions-section{ --section-rgb: var(--section-transactions-rgb); }
body.user-page #saved-section{ --section-rgb: var(--section-saved-rgb); }
body.user-page #achievements-section{ --section-rgb: var(--section-achievements-rgb); }
body.user-page #quests-section{ --section-rgb: var(--section-quests-rgb); }
body.user-page #leaderboard-section{ --section-rgb: var(--section-leaderboard-rgb); }
body.user-page #settings-section{ --section-rgb: var(--section-settings-rgb); }
body.user-page #referral-section{ --section-rgb: var(--section-referral-rgb); }

body.user-page .section-content > .card{
  border-right: 4px solid rgba(var(--section-rgb),0.86) !important;
  box-shadow:
    0 16px 34px -24px rgba(var(--section-rgb),0.35),
    0 12px 28px -24px rgba(0,0,0,0.72),
    inset 0 1px 0 var(--glass-edge-top) !important;
}

body.light-mode.user-page .section-content > .card{
  box-shadow:
    0 14px 28px -18px rgba(var(--section-rgb),0.18),
    0 12px 24px -18px rgba(15,23,42,0.14),
    inset 0 1px 0 rgba(255,255,255,0.94) !important;
}

body.user-page .section-content > .card::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 95% at 100% 0%, rgba(var(--section-rgb),0.18), transparent 56%);
  opacity: 0.8;
}

body.user-page .nav-item{
  border: 1px solid transparent;
  --nav-rgb: var(--section-dashboard-rgb);
}
body.user-page .nav-item[onclick*="showSection('orders')"]{ --nav-rgb: var(--section-orders-rgb); }
body.user-page .nav-item[onclick*="showSection('challenges')"]{ --nav-rgb: var(--section-challenges-rgb); }
body.user-page .nav-item[onclick*="showSection('challenge-group')"]{ --nav-rgb: var(--section-challenge-group-rgb); }
body.user-page .nav-item[onclick*="showSection('messages')"]{ --nav-rgb: var(--section-messages-rgb); }
body.user-page .nav-item[onclick*="showSection('transactions')"]{ --nav-rgb: var(--section-transactions-rgb); }
body.user-page .nav-item[onclick*="showSection('saved')"]{ --nav-rgb: var(--section-saved-rgb); }
body.user-page .nav-item[onclick*="showSection('achievements')"]{ --nav-rgb: var(--section-achievements-rgb); }
body.user-page .nav-item[onclick*="showSection('quests')"]{ --nav-rgb: var(--section-quests-rgb); }
body.user-page .nav-item[onclick*="showSection('leaderboard')"]{ --nav-rgb: var(--section-leaderboard-rgb); }
body.user-page .nav-item[onclick*="showSection('settings')"]{ --nav-rgb: var(--section-settings-rgb); }
body.user-page .nav-item[onclick*="showSection('referral')"]{ --nav-rgb: var(--section-referral-rgb); }

body.user-page .nav-item:hover{
  background: linear-gradient(130deg, rgba(var(--nav-rgb),0.20), rgba(var(--nav-rgb),0.08)) !important;
  border-color: rgba(var(--nav-rgb),0.44) !important;
}

body.user-page .nav-item.active{
  background: linear-gradient(130deg, rgba(var(--nav-rgb),0.35), rgba(var(--nav-rgb),0.14)) !important;
  border-color: rgba(var(--nav-rgb),0.58) !important;
  box-shadow: 0 10px 24px -18px rgba(var(--nav-rgb),0.62) !important;
}

body.light-mode.user-page .nav-item.active{
  color: #0b1220;
}

body.user-page #inbox-window{
  background: var(--bg-panel) !important;
  border: 1px solid var(--glass-border) !important;
}

body.user-page #challenge-group-section .card{
  overflow: hidden;
}

body.user-page #challenge-group-section input,
body.user-page #challenge-group-section select{
  width: 100%;
  max-width: 100%;
}

body.user-page #challenge-group-section .order-item{
  align-items: flex-start;
}

body.light-mode::before,
body.light-mode::after{
  display: block !important;
  opacity: 0.24 !important;
  filter: blur(68px) !important;
  mix-blend-mode: multiply !important;
}

body.light-mode::before{
  background: radial-gradient(circle at 26% 16%, rgba(96,165,250,0.45), transparent 64%) !important;
}

body.light-mode::after{
  background: radial-gradient(circle at 78% 30%, rgba(125,211,252,0.38), transparent 64%) !important;
}

body.visit-gate-page .visit-gate-container{
  max-width: 560px;
  margin: 4rem auto;
  text-align: center;
}

body.visit-gate-page #turnstile-box{
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

body.visit-gate-page #gate-status{
  margin-top: 1rem;
  min-height: 1.5rem;
}

body.visit-gate-page #gate-status[data-state="error"]{
  color: #ef4444;
}
