/* ============================================================
   AffiliateHub clone — design system
   Self-hosted TikTok Affiliate dashboard (frontend)
   ============================================================ */

:root {
  /* base surfaces */
  --bg: #0b0d13;
  --surface: rgba(21, 24, 32, 0.7);
  --surface-solid: #12141b;
  --surface-2: rgba(15, 17, 23, 0.8);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);

  /* text */
  --text: #e8eaf2;
  --text-dim: #a2a7b8;
  --text-mute: #6b7080;

  /* brand gradient */
  --grad-brand: linear-gradient(100deg, #8b5cf6 0%, #ec4899 100%);
  --grad-brand-soft: linear-gradient(100deg, rgba(139, 92, 246, 0.18), rgba(236, 72, 153, 0.16));

  /* accents */
  --violet: #8b5cf6;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --green: #34d399;
  --gold: #fbbf24;
  --orange: #fb7136;

  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;

  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 18px 50px -12px rgba(139, 92, 246, 0.28);
  --sidebar-w: 280px;

  --font: "LINE Seed Sans TH", "Noto Sans Thai", "Prompt", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(960px 960px at 12% -10%, rgba(139, 92, 246, 0.18), rgba(0, 0, 0, 0) 60%),
    radial-gradient(800px 800px at 110% 0%, rgba(236, 72, 153, 0.16), rgba(0, 0, 0, 0) 55%),
    radial-gradient(768px 768px at 50% 120%, rgba(34, 211, 238, 0.12), rgba(0, 0, 0, 0) 55%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(236, 72, 153, 0.35); }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* ============================================================
   Brand logo
   ============================================================ */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--grad-brand);
  box-shadow: 0 8px 22px -6px rgba(236, 72, 153, 0.55);
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: .2px; }
.brand-name span { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 10px; letter-spacing: 2.5px; color: var(--text-mute); font-weight: 700; margin-top: 2px; }

/* ============================================================
   App shell
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(17,19,27,0.92), rgba(12,14,20,0.92));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 16px 12px;
}

.sidebar .brand { padding: 4px 8px 18px; }

.sidebar-cta {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  margin-bottom: 18px;
  font-weight: 700;
  transition: .18s;
}
.sidebar-cta:hover { border-color: var(--line-2); background: rgba(255,255,255,0.06); }
.sidebar-cta .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--grad-brand-soft); display: grid; place-items: center; color: var(--violet); }
.sidebar-cta .badge {
  margin-left: auto; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 20px; color: #fff;
  background: var(--grad-brand);
}

.nav-group { margin-bottom: 6px; }
.nav-group > .nav-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: 0;
  color: var(--text-mute); font-size: 12px; font-weight: 800; letter-spacing: .5px;
  padding: 10px 12px 6px; text-align: left;
}
.nav-group > .nav-head svg { width: 14px; height: 14px; opacity: .6; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 13px;
  color: var(--text-dim); font-weight: 600; font-size: 15px;
  transition: .16s; position: relative;
}
.nav-item svg { width: 20px; height: 20px; opacity: .85; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(139,92,246,0.20), rgba(236,72,153,0.14));
  box-shadow: inset 0 0 0 1px rgba(139,92,246,0.35);
}
.nav-item.active svg { opacity: 1; color: var(--violet); }
.nav-item .tag {
  margin-left: auto; font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 20px; color: #fff; background: var(--grad-brand);
}

.sidebar-foot { margin-top: auto; padding-top: 12px; }
.sidebar-user {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; background: rgba(255,255,255,0.03); margin-bottom: 10px;
}
.sidebar-user .email { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .plan { font-size: 12px; color: var(--gold); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.sidebar-meta { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 8px; font-size: 12px; color: var(--text-dim); }
.sidebar-meta b { color: var(--green); }
.sidebar-meta a { color: var(--violet); font-weight: 700; }
.logout { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text-dim); font-weight: 600; border-radius: 12px; }
.logout:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.logout svg { width: 18px; height: 18px; }

/* ============================================================
   Main
   ============================================================ */
.main { flex: 1; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 32px;
  background: rgba(11,13,19,0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .tb-title h1 { margin: 0; font-size: 22px; font-weight: 800; }
.topbar .tb-title .sync { font-size: 12.5px; color: var(--text-mute); margin-top: 3px; }
.topbar .spacer { flex: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text); font-weight: 700; font-size: 14px; transition: .16s;
}
.pill:hover { border-color: var(--line-2); }
.pill svg { width: 16px; height: 16px; }
.pill .chev { opacity: .5; }
.pill.accent svg:first-child { color: var(--violet); }

.tb-updated { font-size: 12.5px; color: var(--text-mute); }

.content { padding: 28px 32px 60px; max-width: 1400px; }

.page-head { margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.page-head h2 { margin: 0; font-size: 26px; font-weight: 800; }
.page-head .chip {
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,0.03);
}

/* card base */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: 22px 24px; }

.section-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.section-title .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--grad-brand-soft); color: var(--violet); }
.section-sub { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

/* ============================================================
   KPI hero cards
   ============================================================ */
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.kpi {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  padding: 26px 28px; min-height: 150px;
  background: var(--surface);
}
.kpi::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 100% 0%, var(--glow, rgba(52,211,153,0.16)), transparent 60%);
}
.kpi.green { --glow: rgba(52,211,153,0.20); }
.kpi.gold  { --glow: rgba(251,191,36,0.20); }
.kpi .kpi-label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text-dim); }
.kpi .kpi-label svg { width: 18px; height: 18px; }
.kpi.green .kpi-label svg { color: var(--green); }
.kpi.gold  .kpi-label svg { color: var(--gold); }
.kpi .kpi-value { font-size: 52px; font-weight: 800; line-height: 1.05; margin: 14px 0 8px; letter-spacing: -1px; }
.kpi.green .kpi-value { color: var(--green); }
.kpi.gold  .kpi-value { color: var(--gold); }
.kpi .kpi-foot { font-size: 13px; color: var(--text-mute); }

/* ============================================================
   Chart
   ============================================================ */
.chart-wrap { margin-bottom: 22px; }
.chart-box { height: 320px; position: relative; margin-top: 16px; }
.chart-box svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid line { stroke: rgba(255,255,255,0.06); }
.chart-axis text { fill: var(--text-mute); font-size: 12px; }
.chart-area { fill: url(#areaGrad); }
.chart-line { fill: none; stroke: url(#lineGrad); stroke-width: 2.5; }
.chart-dot { fill: var(--bg); stroke: var(--violet); stroke-width: 3; }

/* ============================================================
   two-column layout
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 22px; }

/* best sellers list */
.rank-list { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-radius: 14px; transition: .16s; }
.rank-item:hover { background: rgba(255,255,255,0.03); }
.rank-no { width: 26px; text-align: center; font-weight: 800; font-size: 15px; color: var(--text-mute); flex-shrink: 0; }
.rank-item:nth-child(1) .rank-no { color: var(--gold); }
.rank-thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: #1c1f2a; flex-shrink: 0; border: 1px solid var(--line); }
.rank-body { min-width: 0; flex: 1; }
.rank-name { font-size: 14px; font-weight: 600; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rank-meta { font-size: 12.5px; color: var(--text-mute); margin-top: 4px; }
.rank-amt { font-weight: 800; color: var(--green); font-size: 15px; white-space: nowrap; flex-shrink: 0; }

/* live vs video */
.lv-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.lv-cell { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; background: rgba(255,255,255,0.02); }
.lv-cell .lv-h { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--text-dim); }
.lv-cell.live .lv-h svg { color: var(--pink); }
.lv-cell.video .lv-h svg { color: var(--cyan); }
.lv-cell .lv-v { font-size: 26px; font-weight: 800; margin: 10px 0 4px; }
.lv-cell .lv-c { font-size: 12.5px; color: var(--text-mute); }

/* ============================================================
   gamification row
   ============================================================ */
.game-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; margin-bottom: 22px; }

.streak { display: flex; flex-direction: column; }
.streak-top { display: flex; align-items: center; gap: 18px; }
.fire {
  width: 76px; height: 76px; border-radius: 20px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #fb923c, #f43f5e);
  box-shadow: 0 12px 30px -8px rgba(251,113,54,0.6);
  font-size: 34px;
}
.streak-lbl { font-size: 14px; color: var(--text-dim); font-weight: 600; }
.streak-num { font-size: 40px; font-weight: 800; line-height: 1; margin-top: 4px; }
.streak-num span { font-size: 18px; color: var(--text-dim); font-weight: 700; margin-left: 6px; }
.streak-bars { display: flex; gap: 8px; margin: 20px 0 14px; }
.streak-bars i { height: 8px; flex: 1; border-radius: 20px; background: linear-gradient(90deg, #fb923c, #f43f5e); }
.streak-note { font-size: 13px; color: var(--text-dim); }

.rank-card { position: relative; overflow: hidden; }
.rank-card-inner { display: flex; align-items: center; gap: 20px; }
.crown {
  position: relative; width: 92px; height: 92px; border-radius: 24px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 40px;
  background: linear-gradient(150deg, #a855f7, #6366f1);
  box-shadow: 0 12px 34px -8px rgba(139,92,246,0.7);
}
.crown .lv { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: var(--surface-solid); border: 1px solid var(--line-2); border-radius: 12px; padding: 3px 10px; font-size: 12px; font-weight: 800; text-align: center; line-height: 1.1; }
.rank-card .rc-role { font-size: 13px; color: var(--text-dim); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.rank-card .rc-title { font-size: 30px; font-weight: 800; margin: 4px 0 6px; background: linear-gradient(100deg, #fbbf24, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rank-card .rc-xp { font-size: 13px; color: var(--text-mute); }
.rank-card .rc-xp b { color: var(--text); }
.power { margin-top: 20px; }
.power-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.power-head .pct { color: var(--pink); }
.power-track { height: 10px; border-radius: 20px; background: rgba(255,255,255,0.07); overflow: hidden; }
.power-fill { height: 100%; border-radius: 20px; background: var(--grad-brand); }
.power-note { margin-top: 12px; font-size: 13px; color: var(--gold); }

/* ============================================================
   deep insights grid
   ============================================================ */
.insight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.metric {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px;
  background: rgba(255,255,255,0.02);
}
.metric .m-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-dim); font-weight: 600; }
.metric .m-h svg { width: 17px; height: 17px; opacity: .8; }
.metric .m-v { font-size: 27px; font-weight: 800; margin: 12px 0 10px; }
.metric.green .m-v { color: var(--green); }
.metric.gold  .m-v { color: var(--gold); }
.metric.pink  .m-v { color: var(--pink); }
.metric .m-tag { font-size: 11.5px; font-weight: 700; color: var(--text-dim); padding: 3px 10px; border-radius: 20px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); }
.metric .m-tag.live { color: var(--pink); background: rgba(236,72,153,0.12); border-color: rgba(236,72,153,0.25); }

/* ============================================================
   Login page
   ============================================================ */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 40px; padding: 40px 6vw;
}
.auth-hero { max-width: 560px; }
.auth-hero .brand { margin-bottom: 34px; }
.auth-hero h1 { font-size: 52px; line-height: 1.12; font-weight: 800; margin: 0 0 22px; letter-spacing: -1px; }
.auth-hero h1 .g { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.auth-hero .lead { font-size: 17px; color: var(--text-dim); line-height: 1.6; margin-bottom: 30px; }
.auth-feats { display: flex; flex-direction: column; gap: 16px; }
.auth-feat { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--text-dim); }
.auth-feat .fi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--violet); flex-shrink: 0; }
.auth-feat .fi svg { width: 19px; height: 19px; }

.auth-card {
  justify-self: end; width: 100%; max-width: 440px;
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card); padding: 34px;
}
.auth-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #8b5cf6, #ec4899, #22d3ee);
}
.auth-card h2 { font-size: 28px; font-weight: 800; margin: 6px 0 6px; }
.auth-card .sub { color: var(--text-dim); font-size: 14.5px; margin-bottom: 22px; }

.tabs { display: flex; gap: 6px; background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 15px; padding: 5px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--text-dim); font-weight: 700; font-size: 15px; padding: 11px; border-radius: 11px; transition: .16s; }
.tabs button.active { color: #fff; background: var(--grad-brand); box-shadow: 0 8px 20px -8px rgba(236,72,153,0.6); }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.input {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0 14px; transition: .16s;
}
.input:focus-within { border-color: rgba(139,92,246,0.5); box-shadow: 0 0 0 3px rgba(139,92,246,0.14); }
.input svg { width: 18px; height: 18px; color: var(--text-mute); flex-shrink: 0; }
.input input { flex: 1; background: none; border: 0; outline: none; color: #fff; font-family: inherit; font-size: 15px; padding: 14px 0; }
.input input::placeholder { color: var(--text-mute); }
.input .eye { background: none; border: 0; color: var(--text-mute); padding: 4px; display: grid; place-items: center; }

.btn-primary {
  width: 100%; border: 0; border-radius: var(--radius-sm);
  background: var(--grad-brand); color: #fff; font-weight: 800; font-size: 16px;
  padding: 16px; margin-top: 6px; transition: .16s;
  box-shadow: 0 14px 32px -10px rgba(236,72,153,0.6);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.divider { display: flex; align-items: center; gap: 14px; color: var(--text-mute); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.btn-ghost {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--radius-sm); padding: 15px; font-weight: 700; font-size: 15px; transition: .16s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--line-2); }
.btn-ghost svg { width: 20px; height: 20px; }

.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-dim); }
.auth-foot a { color: var(--pink); font-weight: 700; }

/* ============================================================
   Add-channel modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 5, 9, 0.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-card);
}
.modal-close {
  position: absolute; top: 20px; right: 20px; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--text-dim);
}
.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-title { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.modal-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }

.help-row {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px;
  background: rgba(255,255,255,0.03); margin-bottom: 20px; font-weight: 700; font-size: 14px;
}
.help-row:hover { border-color: var(--line-2); }
.help-q { display: flex; align-items: center; gap: 9px; }
.help-q svg { width: 18px; height: 18px; color: var(--violet); }
.help-link { color: var(--violet); font-weight: 700; }

.warn-box {
  display: flex; gap: 12px; padding: 16px;
  border: 1px solid rgba(251,191,36,0.28); border-radius: var(--radius-sm);
  background: rgba(251,191,36,0.06); margin-bottom: 20px;
}
.warn-box svg { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; margin-top: 2px; }
.warn-box b { font-size: 14px; color: var(--gold); }
.warn-box p { margin: 6px 0 0; font-size: 13px; color: var(--text-dim); line-height: 1.55; }

.cookie-area {
  width: 100%; min-height: 130px; resize: vertical;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px; color: #fff; font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.5;
  outline: none;
}
.cookie-area:focus { border-color: rgba(139,92,246,0.5); box-shadow: 0 0 0 3px rgba(139,92,246,0.14); }
.field-hint { font-size: 12.5px; color: var(--text-mute); margin-top: 8px; }

.modal-actions { display: flex; gap: 12px; margin-top: 6px; }
.modal-actions .btn-ghost { flex: 1; margin: 0; }
.modal-actions .btn-primary { flex: 1; margin: 0; }
.btn-test svg { color: var(--cyan); }
.modal-status { margin-top: 14px; font-size: 13.5px; text-align: center; min-height: 18px; }
.modal-status.ok { color: var(--green); }
.modal-status.err { color: #fb7185; }
.modal-status.loading { color: var(--text-dim); }

/* ============================================================
   responsive
   ============================================================ */
.menu-toggle { display: none; }

@media (max-width: 1100px) {
  .kpi-row, .grid-2, .game-row { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-card { justify-self: center; }
}

@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: .25s; box-shadow: 40px 0 80px rgba(0,0,0,0.5); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
  .topbar { padding: 14px 16px; }
  .content { padding: 20px 16px 50px; }
  .kpi .kpi-value { font-size: 40px; }
  .topbar .tb-hide { display: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; }
}
