/* ═══════════════════════════════════════════════
   EL BARRIO — Design System
   ═══════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg:        #06070F;
  --surface:   #0C0F1E;
  --surface-2: #121626;
  --surface-3: #1A1F32;
  --surface-4: #222840;
  --border:    #1C2236;
  --border-2:  #252E4A;

  /* Text */
  --text:      #E8EEFF;
  --text-2:    #A8B4D8;
  --muted:     #5A6890;
  --faint:     #2E3A58;

  /* Brand gold */
  --gold:           #F5C842;
  --gold-light:     #FFF8C0;
  --gold-dark:      #B8760E;
  --gold-glow:      rgba(245,200,66,0.35);
  --gold-dim:       rgba(245,200,66,0.10);
  --gold-gradient:  linear-gradient(135deg, #FFF8C0 0%, #F5C842 22%, #C88A1A 52%, #E8A830 76%, #FFE066 100%);

  /* Accent blue-purple */
  --accent:          #4C7FFF;
  --accent-2:        #7C5CFF;
  --accent-ink:      #FFFFFF;
  --accent-glow:     rgba(76,127,255,0.28);
  --accent-dim:      rgba(76,127,255,0.10);
  --accent-gradient: linear-gradient(135deg, #4C7FFF 0%, #7C5CFF 100%);

  /* Status */
  --hot:    #FF4757;
  --green:  #22C55E;
  --amber:  #F59E0B;
  --teal:   #14B8A6;

  /* Shadows */
  --shadow:    0 20px 60px rgba(0,0,0,.80);
  --shadow-md: 0 8px 28px rgba(0,0,0,.55);
  --shadow-sm: 0 2px 10px rgba(0,0,0,.40);
  --ring:      0 0 0 3px;

  /* Typography */
  --display:  "Anton", "Bebas Neue", Impact, sans-serif;
  --ui:       "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-cond:  "Barlow Condensed", "Barlow", sans-serif;

  /* Radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Transition */
  --t: .14s ease;
  --transition: .14s ease;
}

[data-theme="light"] {
  --bg:        #F0F2FF;
  --surface:   #FFFFFF;
  --surface-2: #EBEEff;
  --surface-3: #E0E5FF;
  --surface-4: #D4DAFF;
  --border:    #CBD2F0;
  --border-2:  #B8C0E8;
  --text:      #0A0E1A;
  --text-2:    #3A456A;
  --muted:     #5060A0;
  --faint:     #C8D0F0;
  --accent:         #3D6FFF;
  --accent-2:       #6B4FE8;
  --accent-glow:    rgba(61,111,255,0.22);
  --accent-dim:     rgba(61,111,255,0.09);
  --accent-gradient: linear-gradient(135deg, #3D6FFF 0%, #6B4FE8 100%);
  --shadow:    0 10px 30px rgba(10,14,40,.12);
  --shadow-md: 0 4px 16px rgba(10,14,40,.10);
  --shadow-sm: 0 2px 8px rgba(10,14,40,.08);
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

::selection { background: rgba(76,127,255,0.30); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

::placeholder { color: var(--muted); opacity: 0.6; }

body {
  font-family: var(--ui);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Page entrance ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.main > * { animation: fadeUp .28s ease both; }
.main > *:nth-child(2) { animation-delay: .04s; }
.main > *:nth-child(3) { animation-delay: .08s; }
.main > *:nth-child(4) { animation-delay: .12s; }

/* ══════════════════════════════════════════════
   SHELL
   ══════════════════════════════════════════════ */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  background: linear-gradient(180deg,
    #08102A 0%,
    var(--surface) 14%,
    var(--surface) 100%);
  border-right: 1px solid var(--border);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100px;
  background: radial-gradient(ellipse at 50% 0%, rgba(245,200,66,0.09) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Brand ── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 24px;
}

.brand-mark {
  width: 40px; height: 48px;
  background: none;
  display: grid; place-items: center;
  flex-shrink: 0;
  filter:
    drop-shadow(0 5px 16px rgba(76,127,255,0.48))
    drop-shadow(0 2px 6px rgba(0,0,0,.65));
  transition: filter .25s, transform .25s;
}

.brand-mark:hover {
  filter:
    drop-shadow(0 8px 24px rgba(124,92,255,0.58))
    drop-shadow(0 3px 10px rgba(0,0,0,.65));
  transform: translateY(-2px) scale(1.04);
}

.brand-mark svg { width: 100%; height: 100%; overflow: visible; }

.brand-name {
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}

.brand-name small {
  display: block;
  font-family: var(--ui-cond);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .22em;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ── Nav ── */
.nav-section {
  font-family: var(--ui-cond);
  font-size: 9.5px;
  letter-spacing: .22em;
  color: var(--faint);
  text-transform: uppercase;
  font-weight: 700;
  padding: 16px 10px 5px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

.nav-section:first-of-type { border-top: none; margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background var(--t), color var(--t), transform .1s;
  position: relative;
  letter-spacing: .01em;
}

.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item:active { transform: scale(0.98); }

.nav-item.active {
  background: linear-gradient(90deg, rgba(245,200,66,0.10) 0%, rgba(245,200,66,0.03) 100%);
  color: var(--gold);
  font-weight: 700;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--gold-gradient);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--gold-glow);
}

.nav-item .icon {
  width: 17px; height: 17px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity .14s;
}

.nav-item:hover .icon,
.nav-item.active .icon { opacity: 1; }

.nav-spacer { flex: 1; }

.nav-meta {
  font-size: 10.5px;
  color: var(--muted);
  padding: 10px 10px 4px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   MAIN
   ══════════════════════════════════════════════ */
.main {
  padding: 32px 40px 72px;
  max-width: 1440px;
  width: 100%;
}

/* ── Page header ── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(245,200,66,0.10);
}

.page-title {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 46px;
  line-height: .9;
  margin: 0;
  position: relative;
  display: inline-block;
}

.page-title::after {
  content: "";
  position: absolute;
  bottom: -7px; left: 0;
  width: 2.2em; height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(245,200,66,0.25) 70%, transparent 100%);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--gold-glow);
}

.page-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 12px;
  font-weight: 400;
  letter-spacing: .01em;
}

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Section row ── */
.section-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 28px 0 14px;
}

.section-row h2 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 22px;
  margin: 0;
  color: var(--text);
  position: relative;
  padding-left: 14px;
}

.section-row h2::before {
  content: "";
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 3px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

/* ══════════════════════════════════════════════
   SORTEO HERO BUTTON
   ══════════════════════════════════════════════ */
.btn-sorteo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: var(--gold-gradient);
  color: #0A0E14;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: .12em;
  font-weight: 400;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 4px 20px var(--gold-glow),
    0 1px 0 rgba(255,255,255,0.25) inset,
    0 -1px 0 rgba(0,0,0,0.18) inset;
  transition: transform .18s, box-shadow .18s, filter .18s;
}

.btn-sorteo-shine {
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.38) 50%, transparent 70%);
  transform: skewX(-15deg);
  animation: shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%   { left: -80%; }
  45%  { left: 130%; }
  100% { left: 130%; }
}

.btn-sorteo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 36px var(--gold-glow),
    0 0 0 1px rgba(255,240,140,0.4),
    0 1px 0 rgba(255,255,255,0.3) inset;
  filter: brightness(1.07);
}

.btn-sorteo:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 3px 12px var(--gold-glow);
  filter: brightness(0.96);
}

/* ══════════════════════════════════════════════
   BUTTON SYSTEM
   ══════════════════════════════════════════════ */
.btn {
  border: 1px solid var(--border-2);
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface-2) 100%);
  color: var(--text);
  padding: 8px 15px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: .02em;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.05) inset,
    0 2px 6px rgba(0,0,0,.30);
  transition: background var(--t), border-color var(--t), box-shadow var(--t), transform .1s, filter var(--t), color var(--t);
  white-space: nowrap;
  line-height: 1;
}

.btn:hover {
  background: linear-gradient(180deg, var(--surface-4) 0%, var(--surface-3) 100%);
  border-color: var(--border-2);
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.07) inset,
    0 4px 14px rgba(0,0,0,.40);
}

.btn:active {
  transform: scale(0.97) translateY(1px);
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}

/* Primary */
.btn-primary {
  background: var(--accent-gradient);
  color: #FFF;
  border-color: transparent;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.15) inset,
    0 3px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6090FF 0%, #9070FF 100%);
  color: #FFF;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.20) inset,
    0 8px 24px var(--accent-glow);
  filter: none;
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px var(--accent-glow);
  background: var(--accent-gradient);
}

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--hot);
  border-color: rgba(255,71,87,0.35);
  box-shadow: none;
}

.btn-danger:hover {
  background: var(--hot);
  color: white;
  border-color: var(--hot);
  box-shadow: 0 4px 16px rgba(255,71,87,0.35);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
  box-shadow: none;
}

/* Gold outline */
.btn-gold {
  background: transparent;
  color: var(--gold);
  border-color: rgba(245,200,66,0.35);
  box-shadow: none;
}

.btn-gold:hover {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 4px 16px var(--gold-dim);
}

/* Sizes */
.btn-sm { padding: 5px 11px; font-size: 11.5px; gap: 5px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-xl {
  padding: 16px 32px;
  font-size: 15px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Icon-only */
.btn-icon {
  padding: 0;
  width: 32px; height: 32px;
  justify-content: center;
  border-radius: var(--r-sm);
}
.btn-icon.btn-sm { width: 26px; height: 26px; }
.btn-icon.round  { border-radius: 50%; }

/* ══════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════ */
.card {
  background: linear-gradient(155deg,
    var(--surface-2) 0%,
    var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,0.06) 40%,
    rgba(255,255,255,0.06) 60%,
    transparent 100%);
  border-radius: var(--r) var(--r) 0 0;
  pointer-events: none;
}

.card:hover {
  border-color: rgba(245,200,66,0.18);
  box-shadow:
    0 8px 28px rgba(0,0,0,.38),
    0 0 0 1px rgba(245,200,66,0.06);
  transform: translateY(-1px);
}

.card-pad-lg { padding: 26px 28px; }

.card-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.card-title {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 17px;
  margin: 0;
  color: #FFFFFF;
}

/* Gold accent card */
.card-gold {
  border-color: rgba(245,200,66,0.25);
  background: linear-gradient(155deg, #1A2050 0%, #0C1030 100%);
}

.card-gold::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold-gradient);
  border-radius: var(--r) var(--r) 0 0;
  box-shadow: 0 0 16px var(--gold-glow);
}

/* ══════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-family: var(--ui-cond);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 700;
}

.input, .select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .14s, box-shadow .14s, background .14s;
  width: 100%;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}

.input:hover, .select:hover {
  border-color: var(--border-2);
}

.input:focus, .select:focus {
  border-color: var(--accent);
  background: var(--surface-3);
  box-shadow:
    0 0 0 3px var(--accent-dim),
    0 1px 0 rgba(255,255,255,0.03) inset;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%235A6890' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.input.editable {
  background: transparent;
  border: 1px dashed transparent;
  padding: 4px 6px;
  box-shadow: none;
}

.input.editable:hover { border-color: var(--surface-4); }
.input.editable:focus {
  border-style: solid;
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.row { display: flex; gap: 10px; align-items: center; }

/* ══════════════════════════════════════════════
   STATS
   ══════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat {
  background: linear-gradient(155deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px 18px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.stat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--surface-4);
  border-radius: 3px 0 0 3px;
  transition: background .2s, box-shadow .2s;
}

.stat:hover {
  border-color: rgba(245,200,66,0.22);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,0,0,.45), 0 0 20px var(--gold-dim);
}

.stat:hover::before {
  background: var(--gold-gradient);
  box-shadow: 0 0 14px var(--gold-glow);
}

.stat-label {
  font-family: var(--ui-cond);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--muted);
  font-weight: 700;
}

.stat-value {
  font-family: var(--display);
  font-size: 46px;
  line-height: 1;
  margin-top: 8px;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}

.stat-foot {
  color: var(--muted);
  font-size: 11px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Accent stat card */
.stat.accent {
  background: linear-gradient(145deg, #1C2A72 0%, #0D1845 50%, #060D28 100%);
  border: 1px solid rgba(245,200,66,0.30);
  box-shadow:
    0 6px 28px rgba(0,0,0,.55),
    0 0 0 1px rgba(245,200,66,0.12),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

.stat.accent::before {
  background: var(--gold-gradient);
  box-shadow: 0 0 16px var(--gold-glow);
}

.stat.accent .stat-label  { color: rgba(245,200,66,0.65); }
.stat.accent .stat-value  { color: #FFFFFF; }
.stat.accent .stat-foot   { color: rgba(255,255,255,.45); }

.stat.accent:hover {
  border-color: rgba(245,200,66,0.50);
  box-shadow: 0 14px 40px rgba(0,0,0,.55), 0 0 32px var(--gold-dim);
}

/* ══════════════════════════════════════════════
   TEAM CARDS
   ══════════════════════════════════════════════ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.team-card {
  background: linear-gradient(155deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  overflow: hidden;
}

.team-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
}

.team-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 6px 22px rgba(0,0,0,.32);
  transform: translateY(-1px);
}

.team-head { display: flex; align-items: center; gap: 12px; }

.team-badge {
  width: 44px; height: 44px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0;
  flex-shrink: 0;
  color: white;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}

.team-name {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 17px;
  letter-spacing: .03em;
  line-height: 1.1;
  flex: 1;
}

.team-meta { color: var(--muted); font-size: 11px; }

.player-list {
  display: flex; flex-direction: column;
  gap: 2px;
  margin: 4px 0;
}

.player-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px;
  border-radius: var(--r-xs);
  font-size: 12.5px;
  transition: background var(--t);
}

.player-row:hover { background: var(--surface-3); }

.player-num {
  font-family: var(--display);
  background: var(--surface-3);
  width: 24px; height: 24px;
  border-radius: var(--r-xs);
  display: grid; place-items: center;
  font-size: 11px;
  flex-shrink: 0;
  color: var(--muted);
  border: 1px solid var(--border);
}

.player-name  { flex: 1; }
.player-pos   {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .10em;
  font-family: var(--ui-cond);
}

/* ══════════════════════════════════════════════
   TOMBOLA
   ══════════════════════════════════════════════ */
.tombola-stage {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) { .tombola-stage { grid-template-columns: 1fr; } }

.drum-wrap {
  background: radial-gradient(circle at 50% 25%, var(--surface-2) 0%, var(--bg) 70%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px 20px;
  display: flex; flex-direction: column; align-items: center;
  gap: 18px;
  min-height: 540px;
  position: relative;
  overflow: hidden;
}

.drum-wrap::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(76,127,255,.07) 0%, transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(245,200,66,.06) 0%, transparent 40%);
  pointer-events: none;
}

.drum {
  width: 320px; height: 320px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,.07) 0%, transparent 40%),
    conic-gradient(from 0deg,
      var(--surface-3) 0deg, var(--surface-2) 30deg,
      var(--surface-3) 60deg, var(--surface-2) 90deg,
      var(--surface-3) 120deg, var(--surface-2) 150deg,
      var(--surface-3) 180deg, var(--surface-2) 210deg,
      var(--surface-3) 240deg, var(--surface-2) 270deg,
      var(--surface-3) 300deg, var(--surface-2) 330deg);
  border: 6px solid var(--bg);
  box-shadow:
    inset 0 0 60px rgba(0,0,0,.6),
    0 0 0 4px var(--surface-3),
    0 0 60px var(--accent-glow);
  position: relative;
  display: grid; place-items: center;
}

.drum-glass {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.16) 0%, rgba(255,255,255,.03) 30%, transparent 60%);
  pointer-events: none;
  z-index: 5;
}

.drum-stand {
  width: 60px; height: 50px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface));
  margin-top: -10px;
  border-radius: 0 0 8px 8px;
  position: relative;
  z-index: 1;
}

.drum-stand::before, .drum-stand::after {
  content: ""; position: absolute; bottom: -10px;
  width: 30px; height: 14px;
  background: var(--surface-2);
  border-radius: var(--r-xs);
}

.drum-stand::before { left: -20px; }
.drum-stand::after  { right: -20px; }

.balls-area {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  overflow: hidden;
}

.ball {
  position: absolute;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 14px;
  color: white;
  box-shadow:
    inset -3px -4px 8px rgba(0,0,0,.4),
    inset 3px 4px 8px rgba(255,255,255,.22),
    0 4px 8px rgba(0,0,0,.4);
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  user-select: none;
}

.drum.spinning .ball { animation: tumble 1.2s linear infinite; }

@keyframes tumble {
  0%   { transform: translate(var(--tx,0px), var(--ty,0px)) rotate(0deg); }
  25%  { transform: translate(calc(var(--tx,0px) + 30px), calc(var(--ty,0px) - 40px)) rotate(90deg); }
  50%  { transform: translate(calc(var(--tx,0px) - 20px), calc(var(--ty,0px) + 50px)) rotate(180deg); }
  75%  { transform: translate(calc(var(--tx,0px) - 35px), calc(var(--ty,0px) - 30px)) rotate(270deg); }
  100% { transform: translate(var(--tx,0px), var(--ty,0px)) rotate(360deg); }
}

.drum-chute {
  position: absolute;
  bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 24px;
  background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
  border-radius: 0 0 14px 14px;
  z-index: 6;
  border: 3px solid var(--bg);
  border-top: none;
}

.reveal-area {
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  width: 100%;
}

.last-ball {
  background: var(--gold-gradient);
  color: #0A0E14;
  border-radius: 50%;
  width: 92px; height: 92px;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: .02em;
  text-align: center;
  padding: 8px;
  line-height: 1;
  animation: pop .5s cubic-bezier(.18,1.6,.32,1.1);
  box-shadow:
    0 8px 36px var(--gold-glow),
    0 0 0 3px rgba(245,200,66,0.22),
    inset 0 2px 0 rgba(255,255,255,0.30);
}

@keyframes pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.draw-side { display: flex; flex-direction: column; gap: 16px; }

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t);
}

.group-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
}

.group-head {
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 100%);
  padding: 9px 12px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.group-letter {
  width: 28px; height: 28px;
  background: var(--gold-gradient);
  color: #0A0E14;
  border-radius: var(--r-xs);
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 15px;
  box-shadow: 0 2px 8px var(--gold-glow);
}

.group-team {
  padding: 8px 12px;
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px;
  border-top: 1px solid var(--border);
  cursor: grab;
  background: var(--surface);
  transition: background .10s;
}

.group-team:first-child { border-top: none; }
.group-team:hover { background: var(--surface-2); }
.group-team.dragging { opacity: .35; }

.team-mini-badge {
  border-radius: var(--r-xs);
  display: grid; place-items: center;
  font-family: var(--display);
  color: white;
  flex-shrink: 0;
}

.group-team .team-mini-badge { width: 22px; height: 22px; font-size: 10px; }

.group-team-empty {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  font-style: italic;
  border-top: 1px dashed var(--border);
}

.unassigned-pool {
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
  border-radius: var(--r);
  padding: 14px;
  min-height: 80px;
}

/* ══════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-family: var(--ui-cond);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(245,200,66,0.50);
  padding: 10px 10px;
  border-bottom: 1px solid rgba(245,200,66,0.10);
  font-weight: 700;
  white-space: nowrap;
}

.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.table .pos {
  font-family: var(--display);
  font-size: 16px;
  width: 36px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.table tr.qualify .pos { color: var(--gold); }

.table tr.qualify td:first-child {
  border-left: 3px solid var(--gold);
  box-shadow: inset 4px 0 16px var(--gold-dim);
}

.table tr.qualify {
  background: rgba(245,200,66,0.04);
}

.table .team-cell { display: flex; align-items: center; gap: 10px; }
.table tbody tr { transition: background var(--t); }

.table tbody tr:hover {
  background: var(--surface-2);
}

/* ══════════════════════════════════════════════
   MATCH CARDS
   ══════════════════════════════════════════════ */
.match-list { display: flex; flex-direction: column; gap: 8px; }

.match-card {
  background: linear-gradient(155deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background var(--t), border-color var(--t), box-shadow var(--t), transform var(--t);
  position: relative;
  overflow: hidden;
}

.match-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  pointer-events: none;
}

.match-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  transform: translateY(-1px);
}

.match-main {
  display: grid;
  grid-template-columns: 1fr 120px 1fr auto;
  gap: 16px;
  align-items: center;
}

.match-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.match-detail-field { display: flex; flex-direction: column; gap: 3px; }

.match-detail-label {
  font-family: var(--ui-cond);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  font-weight: 700;
}

.match-team { display: flex; align-items: center; gap: 10px; }
.match-team.home { justify-content: flex-end; text-align: right; }
.match-team.away { justify-content: flex-start; }

.match-score {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: .04em;
}

.match-score input {
  width: 48px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--display);
  font-size: 22px;
  text-align: center;
  padding: 4px;
  outline: none;
  transition: border-color .14s, box-shadow .14s;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
}

.match-score input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.match-score .vs {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .2em;
}

.match-meta {
  font-family: var(--ui-cond);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ══════════════════════════════════════════════
   BRACKET
   ══════════════════════════════════════════════ */
.bracket {
  display: flex;
  gap: 32px;
  padding: 20px 4px;
  overflow-x: auto;
  align-items: stretch;
}

.bracket-round {
  display: flex; flex-direction: column;
  justify-content: space-around;
  gap: 16px;
  min-width: 240px;
}

.bracket-round-label {
  font-family: var(--ui-cond);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.bracket-match {
  background: linear-gradient(155deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}

.bracket-match:hover {
  border-color: var(--border-2);
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  transform: translateY(-1px);
}

.bracket-team {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
  transition: background .10s;
}

.bracket-team:last-child { border-bottom: none; }
.bracket-team:hover { background: var(--surface-3); }

.bracket-team.win {
  background: rgba(34,197,94,0.07);
  font-weight: 600;
  border-left: 2px solid var(--green);
}
.bracket-team.win .bracket-team-score { color: var(--green); }

.bracket-team.lost {
  opacity: 0.45;
  border-left: 2px solid transparent;
}

.bracket-team-name {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.bracket-team-score { font-family: var(--display); font-size: 16px; }
.bracket-empty { color: var(--muted); font-style: italic; }

/* ══════════════════════════════════════════════
   BRACKET — ENHANCED STATES
   ══════════════════════════════════════════════ */

/* Stronger win/loss rows */
.bracket-team.win {
  background: rgba(34,197,94,0.10) !important;
  font-weight: 700;
  border-left: 3px solid var(--green) !important;
}
.bracket-team.win .bracket-team-score { color: var(--green); font-size: 18px; }
.bracket-team.lost {
  opacity: 0.38 !important;
  border-left: 3px solid transparent !important;
  background: transparent !important;
}

/* Final round special border */
.bracket-match.is-final {
  border-color: rgba(245,200,66,.55) !important;
  box-shadow: 0 0 22px rgba(245,200,66,.13), 0 3px 12px rgba(0,0,0,.4) !important;
}

/* Champion row inside bracket match */
.bracket-champion-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 10px;
  background: linear-gradient(90deg, rgba(245,200,66,.10) 0%, rgba(245,200,66,.03) 100%);
  border-top: 1px solid rgba(245,200,66,.28);
  animation: fadeUp .2s ease;
}
.bracket-champion-row .champ-label {
  font-family: var(--ui-cond); font-size: 9px; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold); flex-shrink: 0;
}
.bracket-champion-row .champ-name {
  font-family: var(--display); font-size: 14px; letter-spacing: .04em; color: var(--gold);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Bracket round label improvements */
.bracket-round-label {
  background: var(--surface-3);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  padding: 8px 12px 7px;
  border-bottom: 2px solid var(--border-2);
}
.bracket-round-label.has-champion { border-bottom-color: rgba(245,200,66,.4); }

/* Phase progress bar */
.phase-bar { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.phase-bar-fill { height: 100%; border-radius: 2px; background: var(--accent-gradient); transition: width .55s cubic-bezier(.4,0,.2,1); }
.phase-bar-fill.bar-done { background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%); }
.phase-bar-fill.bar-ko { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); }
.phase-bar-fill.bar-final { background: var(--gold-gradient); }

/* Match card state variants */
.match-card.mc-played { border-left: 3px solid rgba(34,197,94,.48); }
.match-card.mc-ko { border-left: 3px solid rgba(76,127,255,.42); }
.match-card.mc-final { border-color: rgba(245,200,66,.42); box-shadow: 0 0 26px rgba(245,200,66,.09) !important; }
.match-card.mc-champion { border-color: var(--gold) !important; box-shadow: 0 0 36px rgba(245,200,66,.20) !important; }

/* Locked KO match rows */
.ko-row {
  display: flex; align-items: center;
  padding: 11px 16px; gap: 10px;
  transition: background .1s;
}
.ko-row + .ko-row { border-top: 1px solid var(--border); }
.ko-row.ko-win { background: rgba(34,197,94,.09); border-left: 3px solid var(--green); }
.ko-row.ko-loss { opacity: .40; border-left: 3px solid transparent; }
.ko-row.ko-neutral { border-left: 3px solid var(--border); }

.ko-team { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 13.5px; }
.ko-team .ko-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ko-team.is-winner .ko-name { font-weight: 700; }
.ko-score {
  font-family: var(--display); font-size: 26px; min-width: 32px; text-align: center; line-height: 1;
}
.ko-score.sc-win  { color: var(--green); }
.ko-score.sc-loss { color: var(--faint); }

/* Section header with icon */
.section-icon { font-size: 15px; line-height: 1; }
.section-stat {
  font-family: var(--ui-cond); font-size: 11px;
  color: var(--muted); letter-spacing: .04em;
  display: flex; align-items: center; gap: 8px;
}
.section-pct { color: var(--accent); font-weight: 700; }
.section-pct.done { color: var(--green); }

/* ══════════════════════════════════════════════
   LIVE SCOREBOARD
   ══════════════════════════════════════════════ */
.scoreboard {
  background: linear-gradient(180deg, #0D1540 0%, #070E28 60%, #040920 100%);
  border-radius: var(--r-lg);
  padding: 32px;
  border: 1px solid rgba(245,200,66,0.18);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(245,200,66,0.07),
    0 24px 64px rgba(0,0,0,.75);
}

.scoreboard::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,.008) 3px,
    rgba(255,255,255,.008) 4px
  );
  pointer-events: none;
}

.scoreboard::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% -15%, rgba(245,200,66,0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 75% -15%, rgba(245,200,66,0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 110%, rgba(76,127,255,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.score-team {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

.score-team-badge {
  width: 100px; height: 100px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 38px;
  color: white;
  box-shadow: 0 12px 36px rgba(0,0,0,.5);
}

.score-team-name {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 24px;
  letter-spacing: .04em;
}

.score-num {
  font-family: var(--display);
  font-size: 120px;
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px var(--gold-glow));
  font-variant-numeric: tabular-nums;
}

.score-center {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  min-width: 200px;
}

.score-clock {
  font-family: var(--display);
  font-size: 56px;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

.score-period {
  font-family: var(--ui-cond);
  font-size: 11px;
  letter-spacing: .24em;
  color: rgba(245,200,66,0.60);
  text-transform: uppercase;
  font-weight: 700;
}

.score-controls {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.score-btn {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 5px 11px;
  font-family: var(--display);
  letter-spacing: .04em;
  font-size: 13px;
  min-width: 34px;
  transition: background .12s, transform .1s, box-shadow .12s;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}

.score-btn:hover { background: var(--surface-4); box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.score-btn:active { transform: scale(0.93); box-shadow: none; }
.score-btn.minus { color: var(--hot); border-color: rgba(255,71,87,0.25); }
.score-btn.plus  { color: var(--accent); border-color: rgba(76,127,255,0.25); }

/* Live indicator */
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--hot);
  color: white;
  font-family: var(--ui-cond);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  letter-spacing: .20em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(255,71,87,0.40);
}

.live-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: white;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .35; transform: scale(0.8); }
}

/* ══════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════ */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: linear-gradient(155deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255,255,255,0.04) inset;
  animation: slideUp .22s cubic-bezier(.2,.82,.3,1);
  position: relative;
}

.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  opacity: 0.7;
}

@keyframes slideUp {
  from { transform: translateY(18px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-h {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 22px;
  margin: 0 0 18px;
}

/* ══════════════════════════════════════════════
   TAGS & BADGES
   ══════════════════════════════════════════════ */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--ui-cond);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  background: var(--surface-3);
  color: var(--text-2);
  padding: 3px 8px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border-2);
  line-height: 1.4;
  white-space: nowrap;
}

.tag.accent {
  background: var(--gold-gradient);
  color: #0A0E14;
  border-color: transparent;
  box-shadow: 0 2px 8px var(--gold-dim);
}

.tag.gold   { background: rgba(245,200,66,0.12); color: var(--gold); border-color: rgba(245,200,66,0.25); }
.tag.hot    { background: rgba(255,71,87,0.14); color: var(--hot); border-color: rgba(255,71,87,0.25); }
.tag.blue   { background: rgba(76,127,255,0.12); color: var(--accent); border-color: rgba(76,127,255,0.25); }
.tag.green  { background: rgba(34,197,94,0.12); color: var(--green); border-color: rgba(34,197,94,0.25); }
.tag.amber  { background: rgba(245,158,11,0.12); color: var(--amber); border-color: rgba(245,158,11,0.25); }
.tag.pill   { border-radius: 99px; }

/* Badge (number/count) */
.badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px;
  border-radius: 99px;
  font-family: var(--ui-cond);
  font-size: 10px;
  font-weight: 700;
  padding: 0 6px;
  background: var(--surface-3);
  color: var(--muted);
  border: 1px solid var(--border-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.badge.accent { background: var(--accent); color: white; border-color: transparent; }
.badge.gold   { background: var(--gold); color: #0A0E14; border-color: transparent; }
.badge.hot    { background: var(--hot); color: white; border-color: transparent; }

/* ══════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════ */
.empty {
  text-align: center;
  padding: 72px 24px;
  color: var(--muted);
}

.empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--muted);
}

.empty h3 {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 26px;
  letter-spacing: .04em;
  color: var(--text);
  margin: 0 0 8px;
}

.empty p { margin: 0 auto 22px; max-width: 380px; line-height: 1.6; }

/* ══════════════════════════════════════════════
   MISC
   ══════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
  margin: 20px 0;
}

.divider.gold {
  background: linear-gradient(90deg, transparent, rgba(245,200,66,0.15) 30%, rgba(245,200,66,0.15) 70%, transparent);
}

/* Tweaks panel */
.tweaks-panel { font-family: var(--ui); }

/* Utilities */
.flex        { display: flex; }
.grid        { display: grid; }
.gap-4       { gap: 4px; }
.gap-6       { gap: 6px; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }
.gap-20      { gap: 20px; }
.flex-1      { flex: 1; }
.center      { align-items: center; }
.between     { justify-content: space-between; }
.wrap        { flex-wrap: wrap; }
.muted       { color: var(--muted); }
.text-sm     { font-size: 12px; }
.text-xs     { font-size: 10.5px; }
.mono        { font-variant-numeric: tabular-nums; }
.scroll-x    { overflow-x: auto; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uppercase   { text-transform: uppercase; letter-spacing: .06em; }
.font-display { font-family: var(--display); }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ══════════════════════════════════════════════
   GOAL EVENTS PANEL
   ══════════════════════════════════════════════ */
.gep { border-top: 1px solid var(--border); }

.gep-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px 7px 16px;
}

.gep-title {
  font-family: var(--ui-cond);
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}

.gep-list {
  padding: 2px 12px 8px;
  display: flex; flex-direction: column; gap: 2px;
}

.gep-goal {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px; border-radius: var(--r-xs);
  font-size: 12px; transition: background .1s; cursor: default;
}
.gep-goal:hover { background: var(--surface-3); }

.gep-min {
  font-family: var(--display); font-size: 12px;
  color: var(--amber); min-width: 28px; text-align: right;
  flex-shrink: 0; letter-spacing: .02em;
}

.gep-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; box-shadow: 0 0 5px rgba(0,0,0,.4);
}

.gep-names { display: flex; flex-direction: column; gap: 0; flex: 1; min-width: 0; }
.gep-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.gep-assist { font-size: 10px; color: var(--muted); }

.gep-team-short {
  font-family: var(--ui-cond); font-size: 9px; font-weight: 700;
  color: var(--muted); letter-spacing: .1em; flex-shrink: 0; opacity: .6;
}

.gep-remove {
  background: none; border: none; color: var(--muted); font-size: 15px;
  cursor: pointer; padding: 0 3px; border-radius: 3px; line-height: 1;
  opacity: 0; transition: opacity .1s, color .1s; flex-shrink: 0;
}
.gep-goal:hover .gep-remove { opacity: 1; }
.gep-remove:hover { color: var(--hot); }

.gep-form {
  padding: 10px 14px 14px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 9px;
  background: rgba(255,255,255,.018); animation: fadeUp .12s ease;
}

.gep-form-row { display: flex; align-items: flex-start; gap: 10px; }

.gep-label {
  font-family: var(--ui-cond); font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  width: 68px; flex-shrink: 0; text-align: right; padding-top: 9px;
}

/* Scorer row in history */
.result-scorers {
  display: grid; grid-template-columns: 1fr 80px 1fr;
  gap: 10px; padding: 0 16px 8px;
}
.result-scorer-home { display: flex; flex-direction: column; gap: 1px; align-items: flex-end; }
.result-scorer-away { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; }
.result-scorer-name {
  font-size: 10.5px; color: var(--text-2);
  display: flex; align-items: center; gap: 3px;
}
.result-scorer-min { color: var(--amber); font-family: var(--display); font-size: 10px; }
.result-scorer-assist { color: var(--muted); font-size: 9.5px; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav-section, .nav-meta, .nav-spacer { display: none; }
  .nav-item { white-space: nowrap; }
  .nav-item.active::before { display: none; }
  .brand { padding-bottom: 0; }

  .main { padding: 20px 16px 48px; }
  .page-title { font-size: 34px; }
  .stat-value { font-size: 38px; }
  .scoreboard-grid { grid-template-columns: 1fr; }
  .score-num { font-size: 72px; }
  .match-main { grid-template-columns: 1fr 80px 1fr auto; gap: 8px; }
}
