/* === Beyblade Tournament Command Center — Niksen Coffee Cup Edition === */
/* Aesthetic: Street competition poster × dark mode SaaS                  */
/* Acid green (primary) × Electric blue × Hot magenta × Pure black        */

:root {
  /* Backgrounds — pure deep black with subtle warm shifts */
  --bg-base: #07070a;
  --bg-app: #0c0c10;
  --bg-elevated: #131319;
  --bg-card: #16161d;
  --bg-card-hover: #1c1c25;
  --bg-inset: #0e0e13;

  /* Borders */
  --border-subtle: #1f1f29;
  --border-default: #2a2a36;
  --border-strong: #383848;

  /* Text */
  --text-primary: #f1f1ee;
  --text-secondary: #a8a8a2;
  --text-tertiary: #6b6b66;
  --text-muted: #45454a;
  --text-disabled: #2f2f36;

  /* Primary — ACID GREEN (the hero color, like the poster bg) */
  --acid-900: #4a5a0c;
  --acid-700: #8fa61a;
  --acid-500: #c5f02c;   /* hero acid */
  --acid-400: #d6ff44;
  --acid-300: #e3ff7a;
  --acid-glow: rgba(197, 240, 44, 0.2);

  /* Electric blue */
  --electric-900: #0a1a8a;
  --electric-700: #1a40d8;
  --electric-500: #2a5cff;
  --electric-400: #5879ff;
  --electric-glow: rgba(42, 92, 255, 0.25);

  /* Hot magenta — used for warnings / disputes */
  --magenta-700: #a8194a;
  --magenta-500: #ff2d6f;
  --magenta-400: #ff5990;
  --magenta-glow: rgba(255, 45, 111, 0.2);

  /* Coffee — brand undertone (subtle, used as warm neutral) */
  --coffee-900: #2a1d12;
  --coffee-700: #4a3220;
  --coffee-500: #6f4e37;
  --cream-500: #e8dcc4;
  --cream-300: #f0e7d4;

  /* Status */
  --gold-500: #ffd43b;
  --gold-400: #ffe066;
  --gold-glow: rgba(255, 212, 59, 0.22);
  --success-500: var(--acid-500);
  --danger-500: var(--magenta-500);
  --warning-500: #ff9824;

  /* Shadows */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.025) inset, 0 8px 24px -12px rgba(0,0,0,0.7);
  --shadow-pop: 0 24px 60px -20px rgba(0,0,0,0.85), 0 0 0 1px var(--border-strong);
  --shadow-acid: 0 0 0 1px rgba(197,240,44,0.35), 0 0 32px -8px var(--acid-500);
}

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

html, body {
  height: 100%;
  font-family: "IBM Plex Sans", "Noto Sans TC", system-ui, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

#root { height: 100%; }

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 6px; border: 2px solid var(--bg-app); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* === Layout === */
.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  height: 100vh;
  background: var(--bg-app);
  position: relative;
}

/* halftone backdrop */
.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.012) 1px, transparent 0);
  background-size: 14px 14px;
  z-index: 0;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* === Sidebar === */
.sidebar {
  background: var(--bg-base);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 4px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--acid-500);
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6), 0 0 28px -4px var(--acid-glow);
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2px solid #0a0a08;
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-25deg);
}
.brand-mark span {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 800;
  color: #0a0a08;
  font-size: 18px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.04em;
  font-style: italic;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.brand-text em {
  font-style: normal;
  font-size: 10px;
  color: var(--acid-500);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
}

.sidebar-section-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 14px 8px 6px;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  position: relative;
  text-align: left;
  width: 100%;
}
.sidebar-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}
.sidebar-link.active {
  background: var(--bg-card);
  color: var(--acid-400);
}
.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--acid-500);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--acid-500);
}
.sidebar-link .icon {
  width: 16px; height: 16px;
  color: currentColor;
  opacity: 0.85;
  flex-shrink: 0;
}
.sidebar-link .count {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--text-tertiary);
  background: var(--bg-inset);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.sidebar-link.active .count {
  background: var(--acid-500);
  color: #0a0a08;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.event-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
}
.event-badge::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--acid-500) 0%, var(--acid-500) 50%, transparent 50%);
  opacity: 0.6;
}
.event-badge .live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--acid-400);
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}
.live-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid-500);
  box-shadow: 0 0 10px var(--acid-500);
  animation: pulse 1.4s infinite;
}
.event-badge .event-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.event-badge .event-meta {
  font-size: 10.5px;
  color: var(--text-tertiary);
  font-family: "JetBrains Mono", monospace;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* === Topbar === */
.topbar {
  height: 56px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
}
.topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 120px;
  height: 2px;
  background: var(--acid-500);
  box-shadow: 0 0 12px var(--acid-glow);
}
.topbar-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.topbar-title strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.topbar-title em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--text-tertiary);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border-default);
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}
.status-pill .num {
  color: var(--text-primary);
  font-weight: 700;
}
.status-pill.live {
  background: rgba(197, 240, 44, 0.06);
  border-color: rgba(197, 240, 44, 0.3);
  color: var(--acid-400);
}
.status-pill.live .num { color: var(--acid-300); }

.topbar-clock {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* === Page === */
.page {
  flex: 1;
  overflow: auto;
  padding: 24px 28px 48px;
  position: relative;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}
.page-header h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-header h1 .accent {
  display: inline-block;
  width: 6px;
  height: 26px;
  background: var(--acid-500);
  margin-right: 4px;
  box-shadow: 0 0 12px var(--acid-glow);
}
.page-header .crumb {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin-bottom: 6px;
}
.page-header .crumb .sep { color: var(--acid-500); margin: 0 6px; }
.page-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 6px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.01em;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.06s, box-shadow 0.12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 14px; height: 14px; }

.btn-primary {
  background: var(--acid-500);
  color: #0a0a08;
  box-shadow: 0 0 0 1px rgba(197,240,44,0.4), 0 4px 20px -4px var(--acid-glow);
}
.btn-primary:hover {
  background: var(--acid-400);
  box-shadow: 0 0 0 1px rgba(197,240,44,0.6), 0 6px 26px -4px var(--acid-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-strong); }

.btn-ghost {
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }

.btn-danger {
  background: rgba(255, 45, 111, 0.1);
  color: var(--magenta-400);
  border: 1px solid rgba(255, 45, 111, 0.3);
}
.btn-danger:hover { background: rgba(255, 45, 111, 0.18); }

.btn-electric {
  background: rgba(42, 92, 255, 0.12);
  color: #8fa8ff;
  border: 1px solid rgba(42, 92, 255, 0.35);
}
.btn-electric:hover { background: rgba(42, 92, 255, 0.2); }

.btn-acid {
  background: rgba(197, 240, 44, 0.1);
  color: var(--acid-400);
  border: 1px solid rgba(197, 240, 44, 0.3);
}
.btn-acid:hover { background: rgba(197, 240, 44, 0.18); }

.btn-sm { height: 28px; padding: 0 10px; font-size: 11.5px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.card-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.card-header h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-header h3 .acid-tick {
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--acid-500);
}
.card-header .sub {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.card-body { padding: 16px; }
.card-tight .card-body { padding: 12px; }
.card-flush .card-body { padding: 0; }

.card-accent-acid::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--acid-500);
  box-shadow: 0 0 8px var(--acid-glow);
}
.card-accent-electric::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--electric-500);
}
.card-accent-magenta::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--magenta-500);
}

/* === Status chips === */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border-radius: 4px;
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg-inset);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
  white-space: nowrap;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip-acid { color: var(--acid-400); background: rgba(197,240,44,0.08); border-color: rgba(197,240,44,0.3); }
.chip-electric { color: #8fa8ff; background: rgba(42,92,255,0.1); border-color: rgba(42,92,255,0.35); }
.chip-gold { color: var(--gold-500); background: rgba(255,212,59,0.08); border-color: rgba(255,212,59,0.3); }
.chip-magenta { color: var(--magenta-400); background: rgba(255,45,111,0.08); border-color: rgba(255,45,111,0.3); }
.chip-warning { color: var(--warning-500); background: rgba(255,152,36,0.08); border-color: rgba(255,152,36,0.3); }
.chip-muted { color: var(--text-tertiary); }
.chip-cream { color: var(--cream-300); background: rgba(232,220,196,0.06); border-color: rgba(232,220,196,0.2); }

/* === Big numbers === */
.stat {
  font-family: "Space Grotesk", sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.stat-xl { font-size: 48px; }
.stat-lg { font-size: 34px; }
.stat-md { font-size: 22px; }

.stat-label {
  font-size: 10.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
}

.stat-delta {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* === Progress === */
.progress-track {
  height: 6px;
  background: var(--bg-inset);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.progress-fill {
  height: 100%;
  background: var(--acid-500);
  border-radius: 100px;
  box-shadow: 0 0 12px var(--acid-glow);
  transition: width 0.4s ease;
}
.progress-fill.electric { background: var(--electric-500); box-shadow: 0 0 12px var(--electric-glow); }
.progress-fill.magenta { background: var(--magenta-500); box-shadow: 0 0 12px var(--magenta-glow); }
.progress-fill.gold { background: var(--gold-500); box-shadow: 0 0 12px var(--gold-glow); }

/* === Speed lines decoration === */
.speed-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    repeating-linear-gradient(115deg,
      transparent 0,
      transparent 28px,
      rgba(197,240,44,0.06) 28px,
      rgba(197,240,44,0.06) 29px,
      transparent 29px,
      transparent 80px);
}

.halftone {
  position: absolute;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0);
  background-size: 6px 6px;
  opacity: 0.25;
}

/* === Forms === */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field-label {
  font-size: 10.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
}
.input, .select, .textarea {
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  border-radius: 7px;
  padding: 8px 11px;
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color 0.12s, background 0.12s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--acid-500);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--acid-glow);
}
.textarea { resize: vertical; min-height: 100px; font-family: "IBM Plex Sans", sans-serif; line-height: 1.55; }

.search-input {
  position: relative;
}
.search-input input {
  padding-left: 32px;
  width: 100%;
}
.search-input .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
}

.toggle-group {
  display: inline-flex;
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}
.toggle-group button {
  padding: 5px 11px;
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
}
.toggle-group button.active {
  background: var(--acid-500);
  color: #0a0a08;
}

/* Switch */
.switch {
  width: 32px;
  height: 18px;
  background: var(--bg-inset);
  border: 1px solid var(--border-default);
  border-radius: 100px;
  position: relative;
  cursor: pointer;
  transition: background 0.12s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: transform 0.18s, background 0.12s;
}
.switch.on { background: var(--acid-500); border-color: var(--acid-500); }
.switch.on::after { transform: translateX(14px); background: #0a0a08; }

/* === Tables === */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  font-family: "Space Grotesk", sans-serif;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  vertical-align: middle;
}
.table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.table tbody tr:hover { background: var(--bg-card-hover); }
.table tbody tr.selected { background: rgba(197,240,44,0.05); }
.table .num { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--text-tertiary); font-weight: 600; }

/* === Layouts === */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--border-subtle); margin: 12px 0; }
.vdivider { width: 1px; background: var(--border-subtle); align-self: stretch; }

/* Utility */
.mono { font-family: "JetBrains Mono", monospace; }
.heading-font { font-family: "Space Grotesk", sans-serif; }
.italic-display { font-style: italic; transform: skewX(-6deg); display: inline-block; }

/* === Avatar === */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-inset);
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--cream-300);
  flex-shrink: 0;
  border: 1px solid var(--border-default);
  position: relative;
  letter-spacing: -0.02em;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; border-radius: 6px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; border-radius: 10px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; border-radius: 14px; }
.avatar.attack {
  background: linear-gradient(135deg, rgba(255,45,111,0.18), rgba(255,45,111,0.04));
  border-color: rgba(255,45,111,0.35);
  color: var(--magenta-400);
}
.avatar.defense {
  background: linear-gradient(135deg, rgba(42,92,255,0.2), rgba(42,92,255,0.04));
  border-color: rgba(42,92,255,0.35);
  color: #8fa8ff;
}
.avatar.stamina {
  background: linear-gradient(135deg, rgba(255,212,59,0.16), rgba(255,212,59,0.04));
  border-color: rgba(255,212,59,0.35);
  color: var(--gold-400);
}
.avatar.balance {
  background: linear-gradient(135deg, rgba(197,240,44,0.16), rgba(197,240,44,0.04));
  border-color: rgba(197,240,44,0.35);
  color: var(--acid-400);
}

/* === Drawer === */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 40;
  backdrop-filter: blur(2px);
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 460px;
  background: var(--bg-app);
  border-left: 1px solid var(--border-strong);
  z-index: 41;
  box-shadow: -20px 0 60px -10px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 50;
  display: grid;
  place-items: center;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  width: 460px;
  max-width: 92vw;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: popIn 0.16s ease;
}
@keyframes popIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  gap: 4px;
}
.tab {
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
}
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--acid-400); border-bottom-color: var(--acid-500); }

/* Toast */
.toast-host {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: var(--shadow-pop);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.18s ease;
}
.toast.success { border-color: rgba(197,240,44,0.5); }
.toast.danger { border-color: rgba(255,45,111,0.5); }
@keyframes toastIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Barcode mock (poster element) */
.barcode {
  display: inline-flex;
  align-items: stretch;
  height: 22px;
  gap: 1px;
}
.barcode span {
  display: block;
  background: var(--text-primary);
  width: 2px;
}
.barcode span:nth-child(2n) { width: 1px; height: 100%; }
.barcode span:nth-child(3n) { width: 3px; }
.barcode span:nth-child(5n) { width: 1px; }

/* Tag (poster-style strip) */
.tag-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--acid-500);
  color: #0a0a08;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
  font-style: italic;
}
