* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0606;
  --card: #171010;
  --border: #333;
  --gold: #ffd54f;
  --orange: #ff9800;
  --green: #00e676;
  --red: #ff5252;
  --text: #ffffff;
  --muted: #bbbbbb;
}
body { font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin: 6px 0; }

/* ---------- Auth ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(circle at top, #2a0808, #0a0606 60%); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 28px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.brand { text-align: center; margin-bottom: 22px; }
.logo-mark { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 14px; background: linear-gradient(135deg, var(--gold), var(--orange)); display: flex; align-items: center; justify-content: center; font-weight: 900; color: #000; font-size: 18px; }
.brand h1 { font-size: 20px; margin-bottom: 4px; }
.brand p { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab-btn { flex: 1; padding: 11px; border-radius: 10px; background: #1f1414; color: var(--muted); border: 1px solid var(--border); font-weight: 700; cursor: pointer; font-size: 14px; font-family: inherit; }
.tab-btn.active { background: linear-gradient(135deg, var(--gold), var(--orange)); color: #000; border-color: transparent; }
.auth-form label { display: block; font-size: 12px; font-weight: 700; margin: 12px 0 5px; }
.auth-form input { width: 100%; padding: 13px 14px; border-radius: 11px; border: 1.5px solid var(--border); background: #1a1a1a; color: #fff; font-size: 16px; font-family: inherit; }
.auth-form input:focus { outline: 2px solid var(--gold); }
.btn-primary { width: 100%; margin-top: 14px; padding: 14px; border-radius: 12px; border: none; background: linear-gradient(135deg, #ff9800, #ff5722); color: #fff; font-size: 16px; font-weight: 900; cursor: pointer; font-family: inherit; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.hint { color: var(--muted); font-size: 12px; text-align: center; margin-top: 12px; }

/* ---------- Dashboard ---------- */
.dash-body { background: #0d0808; }
.dash-topbar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: rgba(13,8,8,.95); border-bottom: 1px solid var(--border); z-index: 10; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-row .logo-mark { width: 38px; height: 38px; font-size: 14px; margin: 0; }
.brand-row small { display: block; color: var(--muted); font-size: 12px; }
.btn-ghost { padding: 10px 16px; border-radius: 10px; background: transparent; border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-family: inherit; }
.btn-ghost:hover { color: #fff; border-color: var(--gold); }
.dash-main { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.card h2 { font-size: 15px; margin-bottom: 10px; color: var(--gold); }
.code-big { font-size: 28px; font-weight: 900; letter-spacing: 2px; font-family: Menlo, Monaco, monospace; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table td { padding: 8px 4px; border-bottom: 1px solid #222; }
.info-table td:first-child { color: var(--muted); width: 40%; }
.status-banner { padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.status-banner.pending { background: rgba(255,152,0,.12); border: 1px solid rgba(255,152,0,.4); color: var(--orange); }
.status-banner.approved { background: rgba(0,230,118,.1); border: 1px solid rgba(0,230,118,.4); color: var(--green); }
.link-box { background: #1a1a1a; border: 1px dashed var(--border); border-radius: 10px; padding: 12px; font-size: 13px; word-break: break-all; margin-top: 8px; color: var(--gold); display: block; text-decoration: none; }
.link-box.live-link:hover { border-color: var(--gold); color: #fff; }
.muted-card { color: var(--muted); font-size: 13px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Sprint 2: stats grid, QR, orders ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.stat-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 26px; font-weight: 900; margin: 6px 0 2px; color: var(--gold); }
.stat-note { font-size: 11px; color: #777; }

.btn-small { padding: 9px 14px; border-radius: 10px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--orange)); color: #000; }
.btn-gold:disabled { opacity: .6; cursor: default; }

.qr-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; }
.qr-wrap img { image-rendering: pixelated; border: 1px solid var(--border); border-radius: 10px; background: #fff; padding: 8px; }

.table-wrap { overflow-x: auto; margin-top: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 9px 6px; border-bottom: 1px solid #222; }
.data-table .mono { font-family: Menlo, Monaco, monospace; font-size: 12px; color: var(--gold); }
.empty-row { text-align: center; color: #777; padding: 18px 6px !important; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; background: rgba(255,152,0,.15); color: var(--orange); border: 1px solid rgba(255,152,0,.3); }

/* ---------- Sprint 3: wallet ---------- */
.wallet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 4px; }
.withdraw-form label { display: block; font-size: 12px; font-weight: 700; margin: 10px 0 5px; }
.withdraw-form input { width: 100%; padding: 12px 14px; border-radius: 11px; border: 1.5px solid var(--border); background: #1a1a1a; color: #fff; font-size: 15px; font-family: inherit; }
.withdraw-form input:focus { outline: 2px solid var(--gold); }

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .code-big { font-size: 22px; }
}
