:root{
  --bg-1:#140a24; --bg-2:#24093f; --bg-3:#0a0712;
  --panel:rgba(15,23,42,.58); --border:rgba(255,255,255,.10);
  --text:#f3f4f6; --muted:#a8b1c7;
  --violet:#8b5cf6; --sky:#38bdf8; --fuchsia:#d946ef;
  --gold-1:#f7d774; --gold-2:#ffb941; --gold-3:#fff1b8;
  --success:#10b981; --warning:#f59e0b; --danger:#ef4444;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;color:var(--text);
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    linear-gradient(rgba(8,4,18,.78), rgba(12,7,20,.86)),
    linear-gradient(180deg,var(--bg-1) 0%, var(--bg-2) 40%, var(--bg-3) 100%);
  overflow-x:hidden; position:relative;
  min-height:100vh;
}
a{color:inherit;text-decoration:none}
.hidden{display:none !important}
.container{max-width:1400px;margin:0 auto;padding:0 60px;position:relative;z-index:1}
.container-wide{max-width:1600px;margin:0 auto;padding:0 80px;position:relative;z-index:1}
.glass{background:var(--panel);backdrop-filter:blur(16px);border:1px solid var(--border);box-shadow:0 18px 40px rgba(0,0,0,.28)}
.header{position:sticky;top:0;z-index:40;border-bottom:1px solid var(--border);background:rgba(2,6,23,.72);backdrop-filter:blur(16px)}
.nav{display:flex;align-items:center;justify-content:space-between;gap:40px;padding:24px 0;min-height:90px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:16px;min-width:0;cursor:pointer}
.brand-mark{
  width:50px;height:50px;border-radius:20px;position:relative;overflow:hidden;
  background:linear-gradient(135deg,var(--violet),var(--fuchsia),var(--sky));
  box-shadow:0 16px 34px rgba(139,92,246,.45);flex-shrink:0;
}
.brand-name{
  font-size:1.5rem;font-weight:800;white-space:nowrap;
  background:linear-gradient(90deg,#d8c9ff,#ffd8ff,#d3efff);
  -webkit-background-clip:text;background-clip:text;color:transparent;letter-spacing:-0.02em;
}
.brand-tag{font-size:.9rem;color:var(--muted);font-weight:500}
.nav-links{display:flex;gap:40px;font-size:1rem;align-items:center;font-weight:500}
.nav-links a:hover{color:#d8c9ff}
.cart-badge{
  position:absolute;top:-8px;right:-8px;
  background:var(--danger);color:#fff;
  font-size:.7rem;font-weight:700;
  border-radius:999px;padding:2px 6px;
  min-width:18px;text-align:center;
}
.button{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  padding:14px 28px;border-radius:999px;font-weight:700;border:1px solid var(--border);
  cursor:pointer;position:relative;overflow:hidden;background:rgba(255,255,255,.06);color:var(--text);
  transition:all .25s ease;font-size:1rem;
}
.button:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(0,0,0,.35)}
.button:disabled{opacity:.5;cursor:not-allowed;transform:none}
.button-primary{background:linear-gradient(90deg,#7c3aed,#0ea5e9);border:none;color:#fff;box-shadow:0 14px 30px rgba(56,189,248,.18)}
.button-success{background:var(--success);border:none;color:#fff}
.button-danger{background:var(--danger);border:none;color:#fff}
.button-gold{background:linear-gradient(90deg,var(--gold-2),var(--gold-1));border:none;color:var(--bg-1);font-weight:800}
.button-sm{padding:8px 14px;font-size:.9rem}
.hero{text-align:center;padding:100px 0 80px}
.hero-badge{display:inline-flex;align-items:center;gap:12px;padding:12px 24px;border-radius:999px;font-size:1rem;color:#f1f5f9}
.dot{width:10px;height:10px;border-radius:50%;background:linear-gradient(90deg,var(--violet),var(--gold-1));display:inline-block}
.hero-title{
  margin:32px auto 0;max-width:1100px;font-size:5.5rem;line-height:1.05;font-weight:900;
  background:linear-gradient(90deg,#dccbff,#ffd9f8,#d7f2ff);-webkit-background-clip:text;background-clip:text;color:transparent;letter-spacing:-0.02em;
}
.hero-copy{margin:28px auto 0;max-width:800px;font-size:1.25rem;line-height:1.8;color:#d5d9e5}
.hero-actions{margin-top:40px;display:flex;justify-content:center;gap:20px;flex-wrap:wrap}
.section{padding:80px 0;position:relative;z-index:1}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:48px;flex-wrap:wrap}
.section-head h2{margin:0;font-size:3rem;font-weight:800}
.section-head p{margin:12px 0 0;color:var(--muted);font-size:1.15rem}
.grid{display:grid;gap:32px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
.card{
  border-radius:28px;padding:24px;position:relative;overflow:hidden;
  transition:transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover{transform:translateY(-3px);border-color:rgba(255,215,120,.24);box-shadow:0 22px 48px rgba(0,0,0,.32)}
.card h3{margin:0;font-size:1.6rem}
.card p{color:#d2d8e6;line-height:1.7}
.card-kicker{font-size:.75rem;letter-spacing:.24em;text-transform:uppercase;font-weight:700}
.theme-violet .card-kicker{color:#d8c9ff}
.theme-sky .card-kicker{color:#9bdfff}
.theme-fuchsia .card-kicker{color:#f8b9ff}
.theme-gold .card-kicker{color:var(--gold-1)}
.product-image,.event-image{
  height:240px;border-radius:22px;display:flex;align-items:center;justify-content:center;
  font-size:1.7rem;font-weight:800;color:#fff;position:relative;overflow:hidden;
  background-size:cover;background-position:center;
}
.price{font-size:1.8rem;font-weight:800;color:var(--gold-1);margin-top:14px}
.stock-badge{
  display:inline-block;padding:6px 12px;border-radius:999px;
  font-size:.8rem;font-weight:700;margin-top:10px;
}
.in-stock{background:rgba(16,185,129,.2);color:var(--success);border:1px solid rgba(16,185,129,.3)}
.low-stock{background:rgba(245,158,11,.2);color:var(--warning);border:1px solid rgba(245,158,11,.3)}
.out-of-stock{background:rgba(239,68,68,.2);color:var(--danger);border:1px solid rgba(239,68,68,.3)}
.event-date{
  display:inline-block;padding:8px 16px;border-radius:12px;
  background:rgba(139,92,246,.2);border:1px solid rgba(139,92,246,.3);
  font-weight:700;font-size:.9rem;margin-top:12px;
}
.modal-overlay{
  display:none;position:fixed;inset:0;z-index:100;
  background:rgba(0,0,0,.8);backdrop-filter:blur(8px);
  align-items:center;justify-content:center;padding:20px;
}
.modal-overlay.active{display:flex}
.modal-content{
  background:var(--bg-1);border:1px solid var(--border);
  border-radius:28px;padding:32px;max-width:600px;width:100%;
  max-height:90vh;overflow-y:auto;position:relative;
}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}
.modal-header h2{margin:0}
.close-btn{
  background:none;border:none;color:var(--text);
  font-size:1.5rem;cursor:pointer;padding:0;
  width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}
.close-btn:hover{background:rgba(255,255,255,.1)}
.input,.textarea,.select{
  width:100%;border-radius:18px;border:1px solid var(--border);
  background:rgba(2,6,23,.55);color:var(--text);padding:14px 16px;font:inherit;
  margin-bottom:16px;
}
.textarea{min-height:130px;resize:vertical}
.label{display:block;margin-bottom:8px;font-weight:600;font-size:.9rem}
.admin-shell{display:grid;grid-template-columns:280px 1fr;min-height:100vh}
.admin-sidebar{
  border-right:1px solid var(--border);background:rgba(2,6,23,.78);
  backdrop-filter:blur(16px);position:sticky;top:0;height:100vh;overflow:auto;
  padding:24px 16px;display:flex;flex-direction:column;
}
.admin-main{padding:28px;overflow-y:auto}
.admin-nav{display:flex;flex-direction:column;gap:8px;margin-top:24px}
.admin-nav-item{
  padding:12px 16px;border-radius:16px;cursor:pointer;
  transition:all .2s ease;font-weight:600;
}
.admin-nav-item:hover{background:rgba(255,255,255,.08)}
.admin-nav-item.active{background:linear-gradient(90deg,rgba(124,58,237,.3),rgba(14,165,233,.3));border:1px solid rgba(139,92,246,.4)}
.admin-card{padding:24px;border-radius:24px;margin-bottom:24px}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:20px;margin-bottom:32px}
.stat-card{padding:20px;border-radius:20px;text-align:center}
.stat-value{font-size:2.5rem;font-weight:800;margin:8px 0}
.stat-label{color:var(--muted);font-size:.9rem}
.product-row,.event-row,.member-row{
  display:grid;grid-template-columns:80px 1fr auto auto auto;
  gap:16px;align-items:center;padding:16px;
  border-radius:16px;margin-bottom:12px;
  background:rgba(255,255,255,.03);
}
.product-thumb,.event-thumb{
  width:80px;height:80px;border-radius:12px;
  background-size:cover;background-position:center;
}
.file-input{display:none}
.file-label{
  display:inline-flex;align-items:center;gap:8px;
  padding:12px 18px;border-radius:999px;
  background:rgba(255,255,255,.06);border:1px solid var(--border);
  cursor:pointer;font-weight:600;transition:all .2s ease;
}
.file-label:hover{background:rgba(255,255,255,.1);transform:translateY(-2px)}
.login-container{
  display:flex;align-items:center;justify-content:center;
  min-height:100vh;padding:20px;
}
.login-box{
  max-width:400px;width:100%;padding:40px;
  border-radius:28px;text-align:center;
}
.login-box h1{margin:0 0 8px;font-size:2rem}
.login-box p{color:var(--muted);margin:0 0 32px}
.cart-item{
  display:flex;gap:16px;padding:16px;
  border-radius:16px;background:rgba(255,255,255,.03);
  margin-bottom:12px;align-items:center;
}
.cart-thumb{
  width:80px;height:80px;border-radius:12px;
  background-size:cover;background-position:center;
  flex-shrink:0;
}
.cart-info{flex:1}
.cart-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.qty-control{
  display:flex;align-items:center;gap:8px;
  background:rgba(255,255,255,.05);
  padding:4px;border-radius:12px;
}
.qty-btn{
  width:32px;height:32px;border:none;
  background:rgba(255,255,255,.1);color:var(--text);
  border-radius:8px;cursor:pointer;font-weight:700;
}
.qty-btn:hover{background:rgba(255,255,255,.2)}
.order-row{
  padding:16px;border-radius:16px;
  background:rgba(255,255,255,.03);
  margin-bottom:12px;display:grid;
  grid-template-columns:1fr auto auto;gap:16px;align-items:center;
}
.status-badge{
  padding:6px 12px;border-radius:999px;
  font-size:.8rem;font-weight:700;
}
.status-pending{background:rgba(245,158,11,.2);color:var(--warning)}
.status-completed{background:rgba(16,185,129,.2);color:var(--success)}
.status-active{background:rgba(139,92,246,.2);color:var(--violet)}
.muted{color:var(--muted)}
.small{font-size:.9rem}
.age-gate{
  position:fixed;inset:0;z-index:200;
  background:rgba(0,0,0,.95);backdrop-filter:blur(12px);
  display:flex;align-items:center;justify-content:center;
}
.age-gate-content{
  text-align:center;max-width:500px;padding:40px;
}
.age-gate h1{font-size:3rem;margin:0 0 16px}
.age-gate p{font-size:1.1rem;line-height:1.7;margin:0 0 32px}
.text-editor-grid{display:grid;gap:16px;margin-bottom:16px}
.alert{
  padding:16px 20px;border-radius:16px;margin-bottom:16px;
  border-left:4px solid;
}
.alert-warning{background:rgba(245,158,11,.15);border-color:var(--warning);color:#fbbf24}
.alert-success{background:rgba(16,185,129,.15);border-color:var(--success);color:#34d399}
.alert-info{background:rgba(56,189,248,.15);border-color:var(--sky);color:#7dd3fc}
.code-block{
  background:rgba(0,0,0,.3);padding:16px;border-radius:12px;
  font-family:monospace;font-size:.9rem;overflow-x:auto;
  margin:16px 0;border:1px solid var(--border);
}
@media(max-width:768px){
  .grid-3,.grid-2{grid-template-columns:1fr}
  .admin-shell{grid-template-columns:1fr}
  .admin-sidebar{height:auto;position:relative}
  .product-row,.event-row,.member-row{grid-template-columns:60px 1fr;gap:12px}
  .nav{gap:12px}
  .nav-links{gap:16px;font-size:.85rem}
  .hero-title{font-size:2.5rem}
  .hero-copy{font-size:1rem}
  .section{padding:40px 0}
  .section-head h2{font-size:2rem}
  .container{padding:0 20px}
  .modal-content{padding:20px;margin:10px}
  .tier-price{font-size:2rem}
  .stat-value{font-size:2rem}
  .cart-item{flex-direction:column}
  .cart-actions{flex-wrap:wrap}
}
@media(max-width:480px){
  .hero-title{font-size:1.8rem}
  .hero{padding:60px 0 40px}
  .hero-badge{font-size:.85rem;padding:10px 16px}
  .button{padding:12px 20px;font-size:.9rem}
  .nav-links{gap:12px;font-size:.8rem}
  .brand-name{font-size:1.2rem}
  .grid-3,.grid-2{gap:20px}
}

/* ============================================================
   POLISH LAYER — additions only, no existing rules replaced
   ============================================================ */

/* --- 1. Smooth page transitions --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-transition { animation: fadeInUp .45s ease both; }
.section         { animation: fadeInUp .5s ease both; }
.section:nth-child(2) { animation-delay: .08s; }
.section:nth-child(3) { animation-delay: .12s; }
.section:nth-child(4) { animation-delay: .16s; }

/* --- 2. Card hover glow --- */
.card {
  box-shadow: 0 0 0 0 rgba(139,92,246,0);
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,.35);
  box-shadow:
    0 22px 48px rgba(0,0,0,.32),
    0 0 32px rgba(139,92,246,.12),
    inset 0 1px 0 rgba(255,255,255,.06);
}

/* --- 3. Button press feedback --- */
.button:active {
  transform: translateY(1px) scale(.97);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  filter: brightness(.9);
}
.button:disabled:active {
  transform: none;
  box-shadow: none;
  filter: none;
}

/* --- 4. Smoother modal open/close --- */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  transform: translateY(24px) scale(.96);
  opacity: 0;
  transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .3s ease;
}
.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* --- 5. Better form input focus --- */
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139,92,246,.25), 0 0 20px rgba(139,92,246,.08);
  background: rgba(2,6,23,.7);
}
.input::placeholder,
.textarea::placeholder {
  color: rgba(168,177,199,.5);
}

/* --- 6. Animated gradient text in hero --- */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-title {
  background-size: 200% auto;
  animation: gradientShift 6s ease infinite;
}
.hero-badge {
  animation: fadeInUp .6s ease both;
}
.hero-copy {
  animation: fadeInUp .6s ease .15s both;
}
.hero-actions {
  animation: fadeInUp .6s ease .25s both;
}

/* --- 7. Typography scale and spacing refinement --- */
:root {
  --text-xs: .75rem;
  --text-sm: .9rem;
  --text-base: 1rem;
  --text-lg: 1.15rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 3rem;
  --text-4xl: 5.5rem;
  --leading-tight: 1.1;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 80px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-full: 999px;
}
body {
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* --- 8. Admin sidebar polish --- */
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1px solid transparent;
  position: relative;
}
.admin-nav-item:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.06);
}
.admin-nav-item.active {
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(139,92,246,.15);
}
.admin-nav-item.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--violet), var(--sky));
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }

/* --- 9. Subtle animated background pattern --- */
@keyframes bgDrift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(30px, -20px) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 600px 600px at 15% 20%, rgba(139,92,246,.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 80% 70%, rgba(217,70,239,.05) 0%, transparent 70%),
    radial-gradient(ellipse 400px 400px at 50% 50%, rgba(56,189,248,.04) 0%, transparent 70%);
  animation: bgDrift 25s ease-in-out infinite;
}

/* --- 10. Better mobile breakpoints --- */
@media(max-width:1200px) {
  .container { padding: 0 32px; }
  .container-wide { padding: 0 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 4rem; }
  .section-head h2 { font-size: 2.5rem; }
}
@media(max-width:1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 70px 0 60px; }
  .hero-title { font-size: 3.2rem; }
}
@media(max-width:768px) {
  .container, .container-wide { padding: 0 20px; }
  .hero { padding: 50px 0 40px; }
  .hero-title { font-size: 2.4rem; }
  .hero-copy { font-size: 1.05rem; }
  .section { padding: 50px 0; }
  .section-head h2 { font-size: 2rem; }
  .nav { min-height: 64px; padding: 16px 0; }
  .brand-name { font-size: 1.2rem; }
  .brand-mark { width: 38px; height: 38px; }
  .card { padding: 18px; border-radius: 20px; }
  .card h3 { font-size: 1.3rem; }
  .price { font-size: 1.5rem; }
  .stat-value { font-size: 2rem; }
  .button { padding: 12px 22px; font-size: .95rem; }
  .modal-content { padding: 24px; border-radius: 20px; }
  .login-box { padding: 28px; }
  .login-box h1 { font-size: 1.6rem; }
}
@media(max-width:480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.9rem; }
  .nav-links { gap: 10px; font-size: .8rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .button { width: 100%; }
  .admin-shell { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* --- Extra refinements --- */

/* Smooth scrollbar everywhere */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.25); border-radius: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.15); }

/* Selection color */
::selection {
  background: rgba(139,92,246,.35);
  color: #fff;
}

/* Focus-visible ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* Cart badge pulse */
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
.cart-badge { animation: badgePulse 2s ease-in-out infinite; }

/* Gold button shimmer */
.button-gold {
  background-size: 200% auto;
  transition: all .3s ease;
}
.button-gold:hover {
  background-position: right center;
  box-shadow: 0 8px 24px rgba(247,215,116,.2);
}

/* Status badge transitions */
.status-badge {
  transition: all .2s ease;
}

/* Hero badge subtle border */
.hero-badge {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
}

/* ============================================================
   DASHBOARD — Admin Dashboard Enhancements
   ============================================================ */

/* ── Dashboard: Welcome Banner ── */
.dashboard-container { animation: fadeInUp .45s ease both; }
.welcome-banner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 32px 36px; border-radius: 24px; margin-bottom: 32px;
  background: linear-gradient(135deg, rgba(139,92,246,.15), rgba(56,189,248,.1));
  border: 1px solid rgba(139,92,246,.25);
}
.welcome-text h1 { margin: 0 0 6px; font-size: 2rem; }
.welcome-text p { margin: 0; }
.welcome-date {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 16px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  font-weight: 600; white-space: nowrap;
}
.date-icon { font-size: 1.3rem; }

/* ── Dashboard: Quick Actions ── */
.quick-actions {
  display: flex; gap: 16px; margin-bottom: 32px; flex-wrap: wrap;
}
.quick-action-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px; border-radius: 18px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all .25s ease; text-decoration: none;
}
.quick-action-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,215,120,.24);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.action-icon { font-size: 1.4rem; }

/* ── Dashboard: Stat Cards ── */
.stat-card { position: relative; overflow: hidden; }
.stat-icon { font-size: 2.2rem; margin-bottom: 8px; }
.stat-change {
  font-size: .8rem; font-weight: 600; margin-top: 6px;
  padding: 4px 10px; border-radius: 999px; display: inline-block;
}
.stat-change.positive {
  background: rgba(16,185,129,.15); color: var(--success);
}
.stat-change.negative {
  background: rgba(239,68,68,.15); color: var(--danger);
}

/* ── Dashboard: Row layout ── */
.dashboard-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-bottom: 24px;
}

/* ── Dashboard: At a Glance ── */
.at-a-glance h3 { margin: 0 0 20px; }
.glance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.glance-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  transition: all .2s ease;
}
.glance-item:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(139,92,246,.2);
}
.glance-icon { font-size: 1.8rem; }
.glance-info { display: flex; flex-direction: column; }
.glance-label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.glance-value { font-size: 1.4rem; font-weight: 800; }

/* ── Dashboard: Mini Chart ── */
.mini-chart h3 { margin: 0 0 20px; }
.chart-container {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; height: 200px; padding: 20px 10px 0;
}
.chart-bar-wrapper {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; height: 100%; justify-content: flex-end;
}
.chart-bar {
  width: 100%; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--violet), var(--sky));
  min-height: 8px; position: relative;
  transition: all .3s ease;
}
.chart-bar:hover {
  filter: brightness(1.2);
  box-shadow: 0 4px 16px rgba(139,92,246,.3);
}
.chart-bar-value {
  position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%);
  font-size: .75rem; font-weight: 700; color: var(--muted);
  white-space: nowrap;
}
.chart-bar-label {
  margin-top: 8px; font-size: .8rem; color: var(--muted);
  font-weight: 600;
}

/* ── Dashboard: Order row enhancements ── */
.order-row-left { }
.order-row-center {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.order-row-right { text-align: right; }
.type-badge {
  padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
}
.order-type-shop {
  background: rgba(56,189,248,.15); color: var(--sky);
  border: 1px solid rgba(56,189,248,.3);
}
.order-type-event {
  background: rgba(139,92,246,.15); color: var(--violet);
  border: 1px solid rgba(139,92,246,.3);
}
.payment-badge {
  font-size: .75rem; color: var(--muted);
  padding: 4px 8px; border-radius: 8px;
  background: rgba(255,255,255,.04);
}
.status-cancelled {
  background: rgba(239,68,68,.2); color: var(--danger);
}

/* ── Dashboard: Events list ── */
.events-list { display: flex; flex-direction: column; gap: 14px; }
.event-row {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 18px; border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  transition: all .2s ease;
}
.event-row:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(139,92,246,.2);
}
.event-info {
  display: flex; flex-direction: column; min-width: 180px;
}
.event-name { font-weight: 700; }
.event-bar-container {
  flex: 1; display: flex; align-items: center; gap: 12px;
}
.event-bar-bg {
  flex: 1; height: 10px; border-radius: 999px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.event-bar-fill {
  height: 100%; border-radius: 999px;
  transition: width .6s cubic-bezier(.16,1,.3,1);
}
.event-bar-label {
  font-size: .8rem; font-weight: 700; color: var(--muted);
  white-space: nowrap;
}
.event-price {
  font-weight: 800; color: var(--gold-1);
  font-size: 1.1rem; white-space: nowrap;
}

/* ── Dashboard: Responsive ── */
@media(max-width: 1024px) {
  .dashboard-row { grid-template-columns: 1fr; }
}
@media(max-width: 768px) {
  .welcome-banner { flex-direction: column; gap: 16px; text-align: center; }
  .welcome-text h1 { font-size: 1.5rem; }
  .quick-actions { flex-direction: column; }
  .quick-action-btn { justify-content: center; }
  .glance-grid { grid-template-columns: 1fr; }
  .event-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .event-bar-container { width: 100%; }
  .order-row-left, .order-row-center, .order-row-right {
    text-align: left;
  }
  .chart-container { height: 150px; }
}
@media(max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ==================== Admin Orders Page ==================== */
.admin-orders-page {
  padding: 0;
}

.orders-header {
  margin-bottom: 32px;
}

.orders-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.orders-header .muted {
  margin: 0;
  font-size: 1rem;
}

/* Stat icons */
.stat-icon {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  opacity: 0.6;
}

/* Filters bar */
.orders-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.filter-btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(139,92,246,.2), rgba(56,189,248,.2));
  border-color: var(--violet);
  color: #fff;
}

.filter-count {
  background: rgba(255,255,255,.12);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.filter-btn.active .filter-count {
  background: rgba(255,255,255,.2);
}

/* Orders table card */
.orders-table-card {
  padding: 0;
  overflow: hidden;
}

.orders-table-wrapper {
  overflow-x: auto;
}

/* Orders table */
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.orders-table thead {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid var(--border);
}

.orders-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.orders-table td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

/* Column widths */
.col-id { width: 140px; }
.col-date { width: 120px; }
.col-type { width: 100px; }
.col-items { width: 80px; text-align: center; }
.col-total { width: 100px; }
.col-status { width: 120px; }
.col-payment { width: 120px; }
.col-actions { width: 50px; text-align: center; }

/* Order row - override the base .order-row for table context */
.orders-table .order-row {
  padding: 0;
  border-radius: 0;
  background: none;
  margin-bottom: 0;
  display: table-row;
  cursor: pointer;
  transition: all 0.2s ease;
}

.orders-table .order-row:hover {
  background: rgba(255,255,255,.04);
}

.orders-table .order-row.expanded {
  background: rgba(139,92,246,.06);
}

.order-id-text {
  font-weight: 700;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--sky);
}

.date-text {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Type badges */
.type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.type-shop {
  background: rgba(56,189,248,.15);
  color: var(--sky);
}

.type-event {
  background: rgba(245,158,11,.15);
  color: var(--warning);
}

.items-count {
  font-weight: 600;
  color: var(--text);
}

.total-amount {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
}

/* Status badges with icons */
.orders-table .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-icon {
  font-size: 0.9rem;
}

.status-cancelled {
  background: rgba(239,68,68,.2);
  color: #ef4444;
}

.payment-text {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Expand button */
.expand-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expand-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}

/* Order detail row */
.order-detail-row td {
  padding: 0;
  border-bottom: 1px solid rgba(139,92,246,.2);
}

.order-details {
  padding: 24px;
  margin: 0;
  border-radius: 0;
  animation: expandIn 0.2s ease;
}

@keyframes expandIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-section h4 {
  margin: 0 0 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.detail-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.95rem;
}

.detail-label {
  color: var(--muted);
  font-weight: 600;
  min-width: 80px;
}

.detail-value {
  color: #fff;
  font-weight: 500;
}

.detail-items-raw {
  background: rgba(0,0,0,.2);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  max-height: 200px;
  overflow-y: auto;
}

.items-json {
  margin: 0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-all;
}

.detail-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.detail-total {
  font-size: 1.1rem;
  color: var(--text);
}

.detail-total strong {
  color: var(--success);
  font-size: 1.3rem;
  margin-left: 8px;
}

/* Empty state */
.orders-empty {
  text-align: center;
  padding: 80px 40px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.6;
}

.orders-empty h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  color: var(--text);
}

.orders-empty .muted {
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Loading state */
.orders-loading {
  text-align: center;
  padding: 60px 40px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--violet);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Orders page responsive */
@media (max-width: 768px) {
  .orders-header h1 {
    font-size: 1.5rem;
  }

  .orders-filters {
    padding: 12px 16px;
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .orders-table th,
  .orders-table td {
    padding: 12px;
    font-size: 0.85rem;
  }

  .col-payment,
  .col-items {
    display: none;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .order-details {
    padding: 16px;
  }
}
