/* ============================================================
   Dopamina.Dev — shared design system
   ============================================================ */
:root {
  --bg:           #0b0b0d;
  --bg-soft:      #0f0f12;
  --surface:      #141417;
  --surface-2:    #18181c;
  --surface-3:    #1d1d22;
  --border:       #242429;
  --border-2:     #2e2e35;
  --text:         #fafafa;
  --text-dim:     #a1a1aa;
  --text-muted:   #71717a;

  --purple:         #a855f7;
  --purple-hover:   #c084fc;
  --purple-dim:     rgba(168, 85, 247, 0.13);
  --purple-glow:    rgba(168, 85, 247, 0.30);

  --green:        #22c55e;
  --green-dim:    rgba(34, 197, 94, 0.13);
  --amber:        #f59e0b;
  --amber-dim:    rgba(245, 158, 11, 0.13);
  --red:          #ef4444;
  --red-dim:      rgba(239, 68, 68, 0.13);
  --blue:         #3b82f6;
  --blue-dim:     rgba(59, 130, 246, 0.13);

  --r-sm: 8px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --maxw: 1180px;
  --shadow: 0 8px 30px rgba(0,0,0,0.35);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(168,85,247,0.07), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }
img { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted   { color: var(--text-muted); }
.dim     { color: var(--text-dim); }
.pink    { color: var(--purple); }
.mono    { font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }
.center  { text-align: center; }
.flex    { display: flex; }
.spacer  { flex: 1; }
.hide    { display: none !important; }

/* ───────── Navbar ───────── */
.nav-wrap { position: sticky; top: 0; z-index: 50; background: #0d0d10; border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; height: 64px; gap: 8px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.logo span { color: var(--purple); }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: 26px; }
.nav-link {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--r-sm); transition: .15s;
}
.nav-link svg { width: 16px; height: 16px; opacity: .85; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--text); background: var(--surface-2); }
.nav-link.active svg { color: var(--purple); opacity: 1; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; color: var(--text-dim); background: none; border: none;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.dot {
  position: absolute; top: 4px; right: 4px; background: var(--purple); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  border: 2px solid var(--bg);
}

.user { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 6px; border-radius: 999px; transition: .15s; margin-left: 6px; }
.user:hover { background: var(--surface-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), #7e22ce); color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.user-name { font-size: 14px; font-weight: 500; color: #e4e4e7; }
.user-caret { color: var(--text-muted); width: 14px; height: 14px; }

/* dropdown */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 6px; opacity: 0; transform: translateY(-6px);
  pointer-events: none; transition: .14s;
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-head { padding: 10px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-head .h { font-weight: 600; font-size: 14px; }
.menu-head .s { font-size: 12px; color: var(--text-muted); }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--text-dim); transition: .12s; }
.menu-item svg { width: 16px; height: 16px; }
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-item.danger:hover { background: var(--red-dim); color: var(--red); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; padding: 10px 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; transition: .15s; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 4px 16px var(--purple-glow); }
.btn-primary:hover { background: var(--purple-hover); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--surface-3); border-color: #3a3a42; }
.btn-outline { background: transparent; color: var(--text-dim); border-color: var(--border-2); }
.btn-outline:hover { color: var(--text); border-color: #3a3a42; background: var(--surface); }
.btn-danger { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* ───────── Badges / tags ───────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; border-radius: 5px; padding: 3px 7px;
  background: var(--purple-dim); color: var(--purple);
}
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-amber { background: var(--amber-dim); color: var(--amber); }
.badge-red   { background: var(--red-dim);   color: var(--red); }
.badge-blue  { background: var(--blue-dim);  color: var(--blue); }
.badge-gray  { background: var(--surface-3); color: var(--text-dim); }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-dim); }

/* ───────── Cards ───────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card-pad { padding: 22px; }
.card-link { transition: .15s; }
.card-link:hover { border-color: var(--border-2); background: var(--surface-2); }

/* ───────── Page header ───────── */
.page-head { padding: 52px 0 8px; }
.page-title { font-size: 38px; font-weight: 800; letter-spacing: -0.025em; background: linear-gradient(180deg, #fff, #c4c4cc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-sub { margin-top: 8px; color: var(--text-muted); font-size: 15.5px; }

/* ───────── Forms ───────── */
.field { margin-bottom: 18px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input, .textarea, .select {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--border-2); color: var(--text);
  font-size: 14.5px; font-family: inherit; padding: 11px 13px; border-radius: var(--r-sm); transition: .15s;
}
.input::placeholder, .textarea::placeholder { color: #56565e; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-dim); }
.textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-muted); }
.input-icon .input { padding-left: 40px; }

/* ───────── Tables ───────── */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); padding: 12px 16px; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.table tbody tr { transition: .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }

/* ───────── Footer ───────── */
.footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 14px; transition: .12s; }
.footer-links a:hover { color: var(--text); }

/* ───────── Admin layout ───────── */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side { border-right: 1px solid var(--border); background: var(--bg-soft); padding: 20px 16px; position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; }
.admin-badge { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--purple); background: var(--purple-dim); padding: 3px 7px; border-radius: 5px; }
.side-group { margin-top: 14px; }
.side-group-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 0 10px 8px; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm); color: var(--text-dim); font-size: 14px; font-weight: 500; transition: .13s; margin-bottom: 2px; }
.side-link svg { width: 17px; height: 17px; opacity: .8; }
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--purple-dim); color: var(--purple); }
.side-link.active svg { opacity: 1; }
.side-link .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--text-dim); padding: 1px 7px; border-radius: 999px; }
.admin-main { padding: 28px 34px 60px; min-width: 0; }
.admin-topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.admin-h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }

/* stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 14px; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.stat-delta { font-size: 12.5px; font-weight: 600; margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; }
.up { color: var(--green); } .down { color: var(--red); }

/* misc grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .nav-links, .user-name { display: none; }
  .grid-2, .product-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Components
   ============================================================ */

/* hero */
.hero { padding: 80px 0 60px; text-align: center; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border-2); padding: 6px 14px; border-radius: 999px; }
.hero h1 { font-size: 56px; font-weight: 900; letter-spacing: -0.035em; line-height: 1.05; margin: 24px 0 0; background: linear-gradient(180deg, #fff 30%, #b9b9c2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero h1 .accent { background: linear-gradient(120deg, var(--purple), #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 600px; margin: 20px auto 0; font-size: 17px; color: var(--text-dim); }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; }
.hero-stats { display: flex; gap: 44px; justify-content: center; margin-top: 56px; flex-wrap: wrap; }
.hero-stat .n { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.hero-stat .l { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.section { padding: 36px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.section-head .link { color: var(--text-dim); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.section-head .link:hover { color: var(--purple); }

/* product cards */
.product { overflow: hidden; display: flex; flex-direction: column; }
.product-media {
  height: 132px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.product-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.55)); pointer-events: none; z-index: 2; }

/* HUD overlay (placeholder when no real image) */
.product-media .hud-overlay,
.pd-hero .hud-overlay {
  position: absolute; inset: 0;
  display: block;
  pointer-events: none;
  z-index: 1;
}
.product-media .hud-overlay svg,
.pd-hero .hud-overlay svg { width: 100%; height: 100%; }

/* real screenshot image */
.product-media .photo,
.pd-hero .photo,
.cart-thumb .photo,
.cart-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  display: block;
}
/* when a real photo is present, hide the HUD placeholder + hero label */
.product-media.has-photo .hud-overlay,
.pd-hero.has-photo .hud-overlay,
.cart-thumb.has-photo .hud-overlay,
.product-media.has-photo .hero-label,
.pd-hero.has-photo .hero-label { display: none; }

/* hero label — visible in placeholder mode (centerpiece) */
.product-media .hero-label {
  position: relative;
  z-index: 2;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.65);
  padding: 0 14px;
  text-align: center;
}
.pd-hero .hero-label {
  position: relative;
  z-index: 2;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 4px 28px rgba(0,0,0,0.6);
}
.m-rust       { background: radial-gradient(120% 120% at 20% 0%, #b45309, #7c2d12); }
.m-apex       { background: radial-gradient(120% 120% at 20% 0%, #b91c1c, #450a0a); }
.m-eft        { background: radial-gradient(120% 120% at 20% 0%, #3f6212, #1a2e05); }
.m-dbd        { background: radial-gradient(120% 120% at 20% 0%, #6d28d9, #2e1065); }
.m-dayz       { background: radial-gradient(120% 120% at 20% 0%, #0e7490, #083344); }
.m-siege      { background: radial-gradient(120% 120% at 20% 0%, #1d4ed8, #172554); }
.m-cs2        { background: radial-gradient(120% 120% at 20% 0%, #ca8a04, #422006); }
.m-fivem      { background: radial-gradient(120% 120% at 20% 0%, #0369a1, #0c1f44); }
.m-fortnite   { background: radial-gradient(120% 120% at 20% 0%, #7c3aed, #1e1b4b); }
.m-valorant   { background: radial-gradient(120% 120% at 20% 0%, #be123c, #4c0519); }
.m-arc        { background: radial-gradient(120% 120% at 20% 0%, #475569, #0f172a); }
.m-dma        { background: radial-gradient(120% 120% at 20% 0%, #0891b2, #0c4a6e); }
.m-bloodstrike{ background: radial-gradient(120% 120% at 20% 0%, #991b1b, #1c0606); }
.m-polygon    { background: radial-gradient(120% 120% at 20% 0%, #a21caf, #3b0764); }
.m-farlight   { background: radial-gradient(120% 120% at 20% 0%, #0d9488, #134e4a); }
.m-drv        { background: radial-gradient(120% 120% at 20% 0%, #525b6c, #1e293b); }
.m-spoofer    { background: radial-gradient(120% 120% at 20% 0%, #db2777, #500724); }
.m-injector   { background: radial-gradient(120% 120% at 20% 0%, #d97706, #451a03); }
.m-bo6        { background: radial-gradient(120% 120% at 20% 0%, #7f1d1d, #0a0a0a); }
.m-mapper     { background: radial-gradient(120% 120% at 20% 0%, #4f46e5, #1e1b4b); }
.product-media .tag { position: absolute; top: 10px; left: 10px; z-index: 3; background: rgba(0,0,0,0.72); color: #fff; }
.cart-thumb { position: relative; overflow: hidden; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-row { display: flex; align-items: center; justify-content: space-between; }
.product-name { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.product-seller { font-size: 13px; color: var(--text-muted); }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.price { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.price small { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* feature / how-it-works */
.feature { display: flex; gap: 14px; }
.feature .ic { width: 42px; height: 42px; border-radius: var(--r); background: var(--purple-dim); color: var(--purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feature .ic svg { width: 20px; height: 20px; }
.feature h3 { font-size: 16px; font-weight: 700; }
.feature p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* forum category rows */
.cat-list { display: flex; flex-direction: column; gap: 14px; }
.cat-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.cat-icon { width: 46px; height: 46px; border-radius: var(--r); background: var(--purple-dim); color: var(--purple); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-icon svg { width: 22px; height: 22px; }
.cat-info { flex: 1; min-width: 0; }
.cat-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.cat-desc { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.cat-meta { text-align: right; flex-shrink: 0; }
.cat-meta .n { font-size: 16px; font-weight: 700; }
.cat-meta .l { font-size: 12px; color: var(--text-muted); }

/* thread list */
.thread-row { display: flex; align-items: center; gap: 14px; padding: 15px 20px; }
.thread-main { flex: 1; min-width: 0; }
.thread-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.thread-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.thread-stats { display: flex; gap: 26px; flex-shrink: 0; }
.thread-stat { text-align: center; }
.thread-stat .n { font-size: 15px; font-weight: 700; }
.thread-stat .l { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.pin { color: var(--purple); }

/* thread view (posts) */
.post { display: flex; gap: 16px; padding: 20px; }
.post + .post { border-top: 1px solid var(--border); }
.post-avatar { width: 44px; height: 44px; border-radius: var(--r); font-size: 16px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.post-body { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-author { font-weight: 700; font-size: 14.5px; }
.role-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 4px; }
.role-owner { background: var(--purple-dim); color: var(--purple); }
.role-staff { background: var(--blue-dim); color: var(--blue); }
.role-member { background: var(--surface-3); color: var(--text-dim); }
.post-time { font-size: 12.5px; color: var(--text-muted); margin-left: auto; }
.post-content { font-size: 14.5px; color: #d4d4d8; line-height: 1.7; }
.post-content p + p { margin-top: 12px; }
.post-actions { display: flex; gap: 16px; margin-top: 14px; }
.post-action { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.post-action:hover { color: var(--purple); }
.post-action svg { width: 15px; height: 15px; }

/* breadcrumb */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-muted); padding-top: 28px; }
.crumb a:hover { color: var(--text); }
.crumb svg { width: 14px; height: 14px; opacity: .6; }

/* auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 410px; }
.auth-logo { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-logo span { color: var(--purple); }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head h1 { font-size: 22px; font-weight: 800; }
.auth-head p { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.auth-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-foot a { color: var(--purple); font-weight: 600; }
.divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--text-muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-dim); }

/* cart */
.cart-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.cart-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.cart-thumb { width: 64px; height: 48px; border-radius: var(--r-sm); flex-shrink: 0; }
.cart-item-main { flex: 1; min-width: 0; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; color: var(--text-dim); }
.summary-row.total { font-size: 18px; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; }
@media (max-width: 860px) { .cart-grid { grid-template-columns: 1fr; } }

/* product detail */
.pd-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; margin-top: 24px; }
.pd-hero {
  height: 280px;
  border-radius: var(--r-lg);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.pd-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.45)); pointer-events: none; z-index: 2; }

.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.pd-thumbs:empty { display: none; }
.pd-thumb {
  position: relative;
  width: 84px; height: 56px;
  border-radius: var(--r-sm);
  border: 2px solid var(--border-2);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: border-color .12s;
}
.pd-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.sel { border-color: var(--purple); }
.pd-thumb:hover:not(.sel) { border-color: var(--border); }
.pd-feature-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pd-feature-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); list-style: none; }
.pd-feature-list svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }
.plan { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--border-2); border-radius: var(--r); cursor: pointer; transition: .14s; }
.plan:hover { border-color: #3a3a42; }
.plan.sel { border-color: var(--purple); background: var(--purple-dim); }
.plan .radio { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--border-2); flex-shrink: 0; }
.plan.sel .radio { border-color: var(--purple); background: radial-gradient(circle, var(--purple) 40%, transparent 45%); }
.plan-name { font-weight: 600; font-size: 14px; }
.plan-price { margin-left: auto; font-weight: 800; }
@media (max-width: 860px) { .pd-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Toast, notifications, polish
   ============================================================ */
#toast-host {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border-2);
  color: var(--text); font-size: 14px; font-weight: 500;
  padding: 11px 16px 11px 12px; border-radius: var(--r);
  box-shadow: var(--shadow-lg); min-width: 240px; max-width: 380px;
  pointer-events: auto;
  transform: translateY(12px); opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.toast.in   { transform: translateY(0); opacity: 1; }
.toast.out  { transform: translateY(12px); opacity: 0; }
.toast-ic { width: 26px; height: 26px; border-radius: 6px; display:flex; align-items:center; justify-content:center; flex-shrink: 0; background: var(--surface-3); color: var(--text-dim); }
.toast-ic svg { width: 14px; height: 14px; }
.toast-success .toast-ic { background: var(--green-dim); color: var(--green); }
.toast-error   .toast-ic { background: var(--red-dim);   color: var(--red); }
.toast-info    .toast-ic { background: var(--blue-dim);  color: var(--blue); }

/* notification panel */
#notif-panel {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90;
  pointer-events: none; opacity: 0; transition: opacity .15s;
}
#notif-panel.open { opacity: 1; pointer-events: auto; }
.notif-card {
  position: absolute; top: 72px; right: 24px;
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: translateY(-6px); transition: transform .15s;
}
#notif-panel.open .notif-card { transform: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.notif-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .12s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.read { opacity: .55; }
.notif-item .ic { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item .ic svg { width: 16px; height: 16px; }
.notif-item .t { font-size: 14px; font-weight: 600; }
.notif-item .s { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* dot pulse animation on update */
.dot.pulse { animation: dot-pulse .35s ease; }
@keyframes dot-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.btn.pulse { animation: btn-pulse .35s ease; }
@keyframes btn-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* disabled buttons */
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* focus-visible polish */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--purple); outline-offset: 2px;
}
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: none; /* fields already have a focus ring via border + box-shadow */
}

/* category filter chips on products page (extends .pill behaviour) */
.cat-chip { cursor: pointer; user-select: none; transition: background .12s, color .12s; }
.cat-chip.active { background: var(--purple-dim); color: var(--purple); }
.cat-chip:hover:not(.active) { background: var(--surface-3); color: var(--text); }

.chip-filter { cursor: pointer; user-select: none; transition: background .12s, color .12s; }
.chip-filter.active { background: var(--purple-dim); color: var(--purple); }
.chip-filter:hover:not(.active) { background: var(--surface-3); color: var(--text); }

/* post action 'liked' state */
.post-action.liked { color: var(--purple); }
.post-action.liked svg { fill: var(--purple); }

/* nav-link span: hide label on narrow desktop preview but keep icon */
@media (max-width: 980px) {
  .nav-link span { display: none; }
  .nav-link { padding: 8px 10px; }
}

/* page padding adjustment for crumbs at top */
.container > .crumb:first-child { padding-top: 24px; }

/* role tag for 'seller' */
.role-seller { background: var(--blue-dim); color: var(--blue); }

/* ============================================================
   Legal — terms page + checkout disclaimer
   ============================================================ */
.legal-callout {
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(180deg, var(--purple-dim), transparent);
}
.legal-acknowledge {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, var(--amber-dim), transparent);
  margin-top: 28px;
}
.legal-list {
  list-style: none;
  counter-reset: legal;
  padding: 0;
  margin: 28px 0 0;
  display: flex; flex-direction: column; gap: 14px;
}
.legal-list li {
  counter-increment: legal;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px 22px 68px;
  position: relative;
}
.legal-list li::before {
  content: counter(legal);
  position: absolute; left: 22px; top: 20px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-dim); color: var(--purple);
  border-radius: 8px;
  font-size: 14px; font-weight: 800;
  font-feature-settings: 'tnum';
}
.legal-list h3 {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.legal-list p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
}

/* compact disclaimer used on the cart and product pages */
.disclaimer {
  background: var(--bg-soft);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start;
}
.disclaimer-ic {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--purple-dim); color: var(--purple);
  display: flex; align-items: center; justify-content: center;
}
.disclaimer-ic svg { width: 14px; height: 14px; }
.disclaimer-body { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.disclaimer-body .t { font-weight: 700; color: var(--text); font-size: 13px; }
.disclaimer-body a { color: var(--purple); font-weight: 600; }

/* required acknowledgment row in the cart summary */
.ack-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  cursor: pointer;
}
.ack-row input[type=checkbox] {
  margin-top: 2px;
  width: 16px; height: 16px;
  flex-shrink: 0;
  accent-color: var(--purple);
}
.ack-row a { color: var(--purple); font-weight: 600; }

/* ============================================================
   Unskippable first-visit disclaimer modal
   ============================================================ */
body.modal-locked { overflow: hidden; }
body.modal-locked * { user-select: none; }
body.modal-locked .modal-legal, body.modal-locked .modal-legal * { user-select: text; }

#disclaimer-modal {
  position: fixed; inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}
#disclaimer-modal.open  { opacity: 1; pointer-events: auto; }
#disclaimer-modal.closing { opacity: 0; }

#disclaimer-modal .modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 6, 10, 0.86);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.modal-legal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(168, 85, 247, 0.12);
  transform: scale(0.96) translateY(8px);
  transition: transform .2s ease;
  overflow: hidden;
}
#disclaimer-modal.open .modal-legal { transform: scale(1) translateY(0); }

.modal-legal .modal-head {
  display: flex; gap: 14px; align-items: center;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-legal .legal-lock {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--purple-dim); color: var(--purple);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-legal .legal-lock svg { width: 19px; height: 19px; }
.modal-legal .modal-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--purple);
}
.modal-legal .modal-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.modal-legal .modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-legal .modal-lede {
  font-size: 14.5px; color: var(--text-dim); line-height: 1.65;
}

.modal-legal .legal-list-compact { margin-top: 16px; gap: 8px; }
.modal-legal .legal-list-compact li {
  padding: 14px 16px 14px 54px;
}
.modal-legal .legal-list-compact li::before {
  left: 14px; top: 13px;
  width: 26px; height: 26px;
  font-size: 12px;
}
.modal-legal .legal-list-compact h3 { font-size: 14.5px; margin-bottom: 4px; }
.modal-legal .legal-list-compact p { font-size: 13px; line-height: 1.55; }

.modal-legal .modal-foot {
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* nicer scrollbar inside the modal */
.modal-legal .modal-body::-webkit-scrollbar { width: 10px; }
.modal-legal .modal-body::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 0; }
.modal-legal .modal-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; border: 2px solid var(--surface); }
.modal-legal .modal-body::-webkit-scrollbar-thumb:hover { background: #3a3a42; }

@media (max-width: 560px) {
  .modal-legal { max-height: 92vh; }
  .modal-legal .modal-head, .modal-legal .modal-body, .modal-legal .modal-foot { padding-left: 18px; padding-right: 18px; }
  .modal-legal .modal-title { font-size: 19px; }
}



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