/* ── ACES Club Leaderboard — Bright Premium UI ── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── TOKENS ─── */
:root {
  --green:      #1A7A4A;
  --green-2:    #22A05A;
  --green-3:    #0F5C35;
  --green-pale: #E8F5EE;
  --green-pale2:#D4EDE0;
  --gold:       #C9A84C;
  --gold-2:     #E6C55A;
  --gold-pale:  #FBF4E0;
  --bg:         #F2F7F4;
  --surface:    #FFFFFF;
  --surface-2:  #F7FAF8;
  --border:     #DDE8E2;
  --border-2:   rgba(201,168,76,0.35);
  --text:       #0F2D18;
  --text-2:     #3A5A45;
  --muted:      #7A9A87;
  --muted-2:    #A8C4B4;
  --red:        #D63031;
  --red-pale:   #FDECEA;
  --win-green:  #1A7A4A;
  --radius:     12px;
  --radius-lg:  16px;
  --radius-sm:  8px;
  --shadow:     0 1px 3px rgba(15,44,24,0.04), 0 2px 12px rgba(15,44,24,0.08);
  --shadow-md:  0 2px 4px rgba(15,44,24,0.04), 0 4px 24px rgba(15,44,24,0.10);
  --shadow-lg:  0 4px 6px rgba(15,44,24,0.05), 0 10px 40px rgba(15,44,24,0.14);
  --trans:      all 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

#app { max-width: 980px; margin: 0 auto; padding-bottom: 60px; }

/* ─── HEADER ─── */
header {
  background: linear-gradient(180deg, #0d5530 0%, var(--green-3) 100%);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(201,168,76,0.15), 0 4px 20px rgba(15,44,24,0.25);
}

.header-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
}

.header-brand { display: flex; align-items: center; gap: 12px; }

.header-logo-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.header-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 4px; color: #fff; line-height: 1;
}
.header-sub { font-size: 10px; color: rgba(255,255,255,0.55); letter-spacing: 2px; margin-top: 1px; font-family: 'Inter', sans-serif; }

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

.admin-chip {
  background: rgba(201,168,76,0.15); border: 1px solid rgba(201,168,76,0.35);
  border-radius: 20px; padding: 4px 12px;
  font-size: 11px; font-weight: 600; color: var(--gold-2);
  font-family: 'Inter', sans-serif;
  box-shadow: 0 0 8px rgba(201,168,76,0.1);
}

#admin-toggle {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); padding: 7px 10px;
  font-size: 15px; cursor: pointer; color: rgba(255,255,255,0.7);
  transition: var(--trans);
}
#admin-toggle:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* Logout in admin bar */
#admin-bar .btn-sm { font-size: 11px; }

/* ─── TABS ─── */
.tabs {
  display: flex; gap: 2px;
  overflow-x: auto; padding: 6px 12px;
  scrollbar-width: none; border-top: 1px solid rgba(255,255,255,0.06);
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  background: none; border: none; border-bottom: none;
  padding: 8px 16px; font-size: 12px;
  font-family: 'Inter', sans-serif; font-weight: 500;
  color: rgba(255,255,255,0.5); cursor: pointer;
  transition: var(--trans); white-space: nowrap;
  border-radius: 6px; position: relative;
  border-left: 2px solid transparent;
}
.tab:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); }
.tab.active {
  color: var(--gold-2); background: rgba(201,168,76,0.1);
  border-left-color: var(--gold);
  font-weight: 600;
}

/* ─── PANELS ─── */
.panel { display: none !important; padding: 20px; }
.panel.active { display: block !important; animation: slideUp 0.2s ease; }

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

/* ─── PANEL HEADER ─── */
.panel-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.panel-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px; letter-spacing: 3px; color: var(--text); line-height: 1;
}
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: 'Inter', sans-serif; }

/* ─── SKILL FILTER TABS ─── */
.skill-filter-tabs { display: flex; gap: 4px; }
.skill-tab {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 5px 14px;
  font-size: 12px; font-weight: 500; font-family: 'Inter', sans-serif;
  color: var(--text-2); cursor: pointer; transition: var(--trans);
  box-shadow: 0 1px 2px rgba(15,44,24,0.04);
}
.skill-tab:hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.skill-tab.active {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  border-color: var(--green);
  color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(26,122,74,0.25);
}

/* ─── LEADERBOARD TABLE ─── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: var(--trans);
}
.table-wrap:hover { box-shadow: var(--shadow-lg); }

#leaderboard-table {
  width: 100%; border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  background: var(--surface);
}

/* Header */
#leaderboard-table thead tr {
  background: var(--green-3);
}
#leaderboard-table thead th {
  padding: 12px 14px; text-align: left;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: rgba(255,255,255,0.55); white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.06);
}
#leaderboard-table thead th:last-child { border-right: none; }
#leaderboard-table thead th.sortable { cursor: pointer; }
#leaderboard-table thead th.sortable:hover { color: var(--gold); }

/* Body rows */
#leaderboard-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}
#leaderboard-table tbody tr:last-child { border-bottom: none; }
#leaderboard-table tbody tr:hover {
  background: var(--green-pale) !important;
  box-shadow: inset 3px 0 0 var(--green);
  transform: scale(1.002);
}

/* Top 3 row highlights */
#leaderboard-table tbody tr:nth-child(1) {
  background: linear-gradient(90deg, rgba(201,168,76,0.06), var(--surface));
}
#leaderboard-table tbody tr:nth-child(2) {
  background: linear-gradient(90deg, rgba(160,160,160,0.05), var(--surface));
}
#leaderboard-table tbody tr:nth-child(3) {
  background: linear-gradient(90deg, rgba(180,120,50,0.05), var(--surface));
}

#leaderboard-table td {
  padding: 13px 14px; vertical-align: middle;
  font-size: 13px; color: var(--text-2);
  border-right: 1px solid rgba(0,0,0,0.03);
}
#leaderboard-table td:last-child { border-right: none; }

/* Column widths */
.col-rank   { width: 50px; text-align: center; }
.col-name   { min-width: 160px; }
.col-num    { width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.col-w      { color: var(--green) !important; font-weight: 700; }
.col-l      { color: var(--muted) !important; }
.col-total  { color: var(--text-2) !important; }
.col-pct    { min-width: 120px; }
.col-sets   { width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.col-games  { width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.col-streak { width: 64px; text-align: center; }
.col-action { width: 36px; text-align: center; }
.sep        { color: var(--border); margin: 0 2px; }

/* Rank labels */
.rank-gold, .rank-silver, .rank-bronze, .rank-default {
  display: inline-block; width: 26px; height: 26px;
  border-radius: 50%; line-height: 26px;
  font-family: 'Inter', sans-serif; font-weight: 700;
  font-size: 11px; text-align: center;
}
.rank-gold   { background: var(--gold-pale); color: #7A5C00; border: 1.5px solid rgba(201,168,76,0.5); }
.rank-silver { background: #F3F3F3; color: #666; border: 1.5px solid #D0D0D0; }
.rank-bronze { background: #FBF0E8; color: #8B5A2B; border: 1.5px solid #D4A077; }
.rank-default{ background: transparent; color: var(--muted); border: none; font-weight: 400; }

/* Player cell */
.player-cell {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.player-full-name {
  font-weight: 600; font-size: 14px; color: var(--text);
  letter-spacing: -0.2px;
}

/* Division pills */
.div-pill {
  font-size: 9px; font-weight: 700; padding: 2px 8px;
  border-radius: 3px; letter-spacing: 0.8px;
  font-family: 'Inter', sans-serif; text-transform: uppercase;
}
.div-beginner    { background: var(--green-pale); color: var(--green-3); }
.div-experienced { background: var(--gold-pale);  color: #7A5C00; }

/* Win % bar */
.pct-bar  { display: flex; align-items: center; gap: 8px; }
.pct-track{ flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; min-width: 48px; }
.pct-fill { height: 100%; border-radius: 2px; background: var(--green); transition: width 0.5s ease; }
.pct-label{ font-size: 11px; font-weight: 600; color: var(--muted); min-width: 30px; text-align: right; }

/* Streak */
.streak-w    { background: var(--green-pale); color: var(--green-3); padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.streak-l    { background: #FEF0EE; color: #C0392B; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.streak-none { color: var(--muted-2); font-size: 12px; }

/* Delete button */
.btn-del {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--red-pale); border: 1px solid rgba(214,48,49,0.2);
  color: var(--red); font-size: 11px; font-weight: 700;
  cursor: pointer; transition: var(--trans);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
.btn-del:hover { background: #FBDADA; border-color: var(--red); }

/* MVP banner */
.mvp-banner {
  background: var(--gold-pale); border-bottom: 1px solid rgba(201,168,76,0.25);
  padding: 10px 20px; display: flex; align-items: center; gap: 14px;
}
.mvp-crown {
  background: var(--gold); color: white;
  font-size: 9px; font-weight: 800; letter-spacing: 2px;
  padding: 3px 8px; border-radius: 3px; font-family: 'Inter', sans-serif;
}
.mvp-name { font-weight: 700; font-size: 14px; color: var(--text); }
.mvp-stat { font-size: 12px; color: var(--muted); font-family: 'Inter', sans-serif; }

/* Hide on small/medium screens */
@media (max-width: 640px)  { .hide-sm { display: none !important; } }
@media (max-width: 780px)  { .hide-md { display: none !important; } }

/* Rank-up animation */
@keyframes rankUp { from { background: rgba(26,122,74,0.12); } to { background: transparent; } }
.rank-up { animation: rankUp 1.5s ease; }

/* ─── FORM CARDS ─── */
.form-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: var(--trans);
}
.form-card:hover { box-shadow: var(--shadow-md); }
.form-card-icon { font-size: 28px; margin-bottom: 8px; }
.form-card-title { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.form-card-sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }

/* ─── FORM ELEMENTS ─── */
.form-row { margin-bottom: 13px; }
.form-label,
.form-row label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted);
  font-family: 'Inter', sans-serif;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 600px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

input[type="text"], input[type="number"], input[type="date"],
input[type="time"], input[type="password"], select, textarea {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 13px;
  color: var(--text); font-size: 13px; font-family: 'DM Sans', sans-serif;
  width: 100%; transition: var(--trans); outline: none; -webkit-appearance: none;
  box-shadow: inset 0 1px 2px rgba(15,44,24,0.04);
}
input:focus, select:focus {
  border-color: var(--green); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(26,122,74,0.1), inset 0 1px 2px rgba(15,44,24,0.02);
}
input::placeholder { color: var(--muted-2); }

.form-msg { margin-top: 10px; font-size: 13px; font-weight: 500; min-height: 18px; }
.msg-ok  { color: var(--green); }
.msg-err { color: var(--red); }

/* ─── BUTTONS ─── */
.btn-primary {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  border: none; border-radius: var(--radius-sm); padding: 11px 22px;
  color: #fff; font-size: 13px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer; transition: var(--trans);
  box-shadow: 0 2px 4px rgba(26,122,74,0.2), 0 4px 12px rgba(26,122,74,0.25);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0; transition: opacity 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(26,122,74,0.25), 0 8px 24px rgba(26,122,74,0.3); }
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 4px rgba(26,122,74,0.3); }

.btn-secondary {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 16px;
  color: var(--text-2); font-size: 13px; font-weight: 500;
  font-family: 'Inter', sans-serif; cursor: pointer; transition: var(--trans);
  box-shadow: 0 1px 3px rgba(15,44,24,0.05);
}
.btn-secondary:hover { border-color: var(--green); color: var(--green); background: var(--green-pale); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(26,122,74,0.1); }
.btn-secondary:active { transform: translateY(0); }

.btn-sm  { padding: 6px 12px; font-size: 11px; }
.btn-xs  { padding: 4px 10px; font-size: 11px; }

.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

.btn-danger {
  background: var(--red-pale); border: 1.5px solid rgba(214,48,49,0.25);
  border-radius: var(--radius-sm); padding: 5px 12px;
  color: var(--red); font-size: 11px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer; transition: var(--trans);
  box-shadow: 0 1px 3px rgba(214,48,49,0.08);
}
.btn-danger:hover { background: #FBDADA; border-color: var(--red); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(214,48,49,0.15); }
.btn-danger:active { transform: translateY(0); }

/* ─── MATCH LIST ─── */
.match-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.match-list li {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; transition: var(--trans);
  box-shadow: var(--shadow);
}
.match-list li:hover { border-color: var(--green-pale2); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.winner-badge {
  background: var(--green-pale); border: 1px solid var(--green-pale2);
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; font-weight: 600; color: var(--green);
  font-family: 'Inter', sans-serif;
}
.match-players { font-size: 13px; font-weight: 500; color: var(--text); }
.match-score {
  font-family: 'Bebas Neue', sans-serif; font-size: 18px;
  letter-spacing: 2px; color: var(--gold);
}
.match-meta { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: 'Inter', sans-serif; }

/* ─── SCHEDULE MATCH ─── */
.tourney-badge {
  background: var(--gold-pale); border: 1px solid var(--border-2);
  border-radius: 20px; padding: 2px 9px;
  font-size: 10px; font-weight: 600; color: #7A5C00;
  font-family: 'Inter', sans-serif; letter-spacing: 0.5px;
}

/* ─── H2H ─── */
.h2h-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-top: 16px;
  box-shadow: var(--shadow-md);
}
.h2h-card .big {
  font-family: 'Bebas Neue', sans-serif; font-size: 40px;
  letter-spacing: 4px; color: var(--text); margin-bottom: 8px;
}
.h2h-card hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.h2h-card p  { font-size: 13px; color: var(--text-2); margin-top: 8px; font-family: 'Inter', sans-serif; }

/* ─── BRACKETS ─── */
.tourney-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px;
  cursor: pointer; transition: var(--trans); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.tourney-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--green), var(--green-2));
}
.tourney-card:hover { border-color: var(--green-pale2); box-shadow: var(--shadow-md); transform: translateX(3px); }
.tourney-card h4 { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.tourney-card p  { font-size: 12px; color: var(--muted); font-family: 'Inter', sans-serif; }

.tourney-champion {
  background: var(--gold-pale); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 10px 16px; margin-bottom: 16px;
  font-weight: 700; color: #7A5C00; font-size: 15px; font-family: 'Inter', sans-serif;
}

.bracket { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 8px; }
.bracket-round { min-width: 175px; flex-shrink: 0; }
.bracket-round h4 {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--gold); margin-bottom: 10px; font-family: 'Inter', sans-serif;
}
.bracket-match {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden;
  box-shadow: var(--shadow);
}
.bracket-match.completed { border-color: var(--green-pale2); }
.bracket-slot {
  padding: 9px 12px; font-size: 13px; font-weight: 500;
  border-bottom: 1px solid var(--border); color: var(--text-2);
}
.bracket-slot:last-of-type { border-bottom: none; }
.bracket-slot.winner { color: var(--green); background: var(--green-pale); font-weight: 700; }
.bracket-slot.empty  { color: var(--muted-2); }

/* ─── SETS ─── */
.sets-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; margin-top: 16px;
}
.set-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.set-label { font-size: 12px; font-weight: 600; color: var(--muted); font-family: 'Inter', sans-serif; min-width: 36px; }
.set-dash  { font-size: 14px; color: var(--muted); }
.set-row input { width: 62px; text-align: center; }
.set-tb    { width: 52px !important; }

/* ─── ROSTER ─── */
.roster-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 20px;
  box-shadow: var(--shadow); transition: var(--trans);
}
.roster-card:hover { box-shadow: var(--shadow-md); }
.roster-card-title { font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 12px; }
.roster-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  margin-bottom: 6px; transition: var(--trans);
}
.roster-item:hover { border-color: var(--green-pale2); }
.roster-item span { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }

/* ─── PENDING CARDS ─── */
.pending-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; transition: var(--trans);
}
.pending-card:hover { border-color: var(--green-pale2); transform: translateY(-1px); box-shadow: var(--shadow); }
.pending-card b { font-size: 13px; font-weight: 600; color: var(--text); }

/* ─── ADMIN SECTIONS ─── */
.admin-section {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: var(--trans);
}
.admin-section:hover { box-shadow: var(--shadow-md); }
.admin-section-header {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 14px;
}
.admin-section-sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }

.badge-count {
  background: var(--green); color: #fff;
  border-radius: 20px; padding: 2px 9px; font-size: 11px;
  font-weight: 700; font-family: 'Inter', sans-serif; min-width: 24px; text-align: center;
}

/* Skill assignment row */
.skill-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); margin-bottom: 6px;
  background: var(--surface-2); transition: var(--trans);
}
.skill-row:hover { border-color: var(--green-pale2); }
.skill-row.unset { border-color: rgba(201,168,76,0.4); background: var(--gold-pale); }
.skill-row .player-label { font-weight: 600; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.unset-badge {
  background: var(--gold-pale); color: #7A5C00;
  border: 1px solid var(--border-2); border-radius: 20px;
  padding: 1px 8px; font-size: 9px; font-weight: 700;
  font-family: 'Inter', sans-serif; letter-spacing: 0.5px; text-transform: uppercase;
}
.skill-row select { width: auto; min-width: 140px; font-size: 12px; padding: 6px 10px; }

/* ─── SUBMIT GRID ─── */
.submit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .submit-grid { grid-template-columns: 1fr; } }

/* ─── INFO BANNER ─── */
.info-banner {
  background: var(--green-pale); border: 1px solid var(--green-pale2);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px;
  font-size: 12px; color: var(--green-3); display: flex; gap: 8px; align-items: flex-start;
  font-family: 'Inter', sans-serif; line-height: 1.5;
}
.info-icon { flex-shrink: 0; }

/* ─── EMPTY STATES ─── */
.empty-state {
  text-align: center; padding: 48px 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); margin-top: 8px;
  box-shadow: inset 0 2px 4px rgba(15,44,24,0.02);
}
.empty-icon {
  font-size: 14px; margin-bottom: 12px;
  width: 40px; height: 40px; line-height: 40px;
  margin-left: auto; margin-right: auto;
  background: var(--green-pale); color: var(--green);
  border-radius: 50%; font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: 1.5px solid var(--green-pale2);
}
.empty-title { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty-sub { font-size: 12px; color: var(--muted); font-family: 'Inter', sans-serif; max-width: 280px; margin: 0 auto; line-height: 1.6; }

/* ─── ROUND ROBIN ─── */
.rr-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--trans);
}
.rr-card:hover { box-shadow: var(--shadow-lg); }
.rr-header {
  background: var(--green-3); padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.rr-header-title { font-family: 'Bebas Neue', sans-serif; font-size: 20px; letter-spacing: 3px; color: #fff; }
.rr-body { padding: 16px 20px; }
.rr-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .rr-groups { grid-template-columns: 1fr; } }

.rr-group-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--gold); margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 2px solid var(--gold-pale);
  font-family: 'Inter', sans-serif;
}

.rr-table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: 'Inter', sans-serif; }
.rr-table th { padding: 6px 8px; font-size: 9px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); text-align: center; }
.rr-table th:first-child { text-align: left; }
.rr-table td { padding: 8px 8px; text-align: center; border-bottom: 1px solid rgba(0,0,0,0.04); color: var(--text-2); }
.rr-table td:first-child { text-align: left; font-weight: 600; color: var(--text); }
.rr-table tr:hover td { background: var(--surface-2); }
.rr-table .top-row td { background: var(--green-pale); }
.rr-table .top-row td:first-child { color: var(--green); }

.rr-admin-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.rr-matchup {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  margin-bottom: 4px; font-size: 12px; transition: var(--trans);
}
.rr-matchup:hover { border-color: var(--green-pale2); }
.rr-matchup.played { background: var(--green-pale); border-color: var(--green-pale2); }
.rr-week-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 10px 0 6px; font-family: 'Inter', sans-serif; }

.rr-knockout {
  border-top: 1px solid var(--border); padding: 16px 20px;
  background: var(--surface-2);
}
.rr-knockout-title { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.semi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 500px) { .semi-grid { grid-template-columns: 1fr; } }

.semi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.semi-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 6px; font-family: 'Inter', sans-serif; }
.semi-matchup { font-weight: 600; font-size: 13px; color: var(--text); }
.semi-result { font-size: 12px; color: var(--green); margin-top: 4px; font-family: 'Inter', sans-serif; }

.final-card {
  background: var(--green-3); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.final-label { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: rgba(201,168,76,0.7); margin-bottom: 8px; font-family: 'Inter', sans-serif; }
.final-matchup { font-weight: 600; font-size: 14px; color: #fff; }
.final-champion { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 3px; color: var(--gold-2); }
.final-champ-label { font-size: 11px; color: rgba(255,255,255,0.5); letter-spacing: 2px; margin-top: 2px; font-family: 'Inter', sans-serif; text-transform: uppercase; }

/* Status badges */
.status-active    { background: var(--green-pale); color: var(--green); border: 1px solid var(--green-pale2); border-radius: 20px; padding: 2px 9px; font-size: 10px; font-weight: 600; font-family: 'Inter', sans-serif; }
.status-completed { background: var(--gold-pale); color: #7A5C00; border: 1px solid var(--border-2); border-radius: 20px; padding: 2px 9px; font-size: 10px; font-weight: 600; font-family: 'Inter', sans-serif; }

/* ─── PIN MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15,44,24,0.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 32px;
  width: 100%; max-width: 360px;
  box-shadow: 0 8px 16px rgba(15,44,24,0.1), 0 20px 60px rgba(15,44,24,0.2);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-icon { font-size: 28px; margin-bottom: 12px; }
.modal-box h3 { font-weight: 700; font-size: 18px; color: var(--text); margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; font-family: 'Inter', sans-serif; }
.pin-details {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.pin-details summary { cursor: pointer; color: var(--green); font-weight: 500; margin-bottom: 10px; }
.pin-details input { margin-bottom: 8px; }

/* ─── HIDDEN ─── */
.hidden { display: none !important; }

/* ─── SCROLL ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ─── FLASH ─── */
@keyframes rowFlash {
  0%   { background: var(--gold-pale); }
  100% { background: transparent; }
}
.new-entry { animation: rowFlash 1.8s ease; }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── Round robin extras ─── */
.done-tag {
  background: var(--green-pale); color: var(--green);
  font-size: 9px; font-weight: 700; padding: 1px 6px;
  border-radius: 3px; letter-spacing: 0.5px; text-transform: uppercase;
  font-family: 'Inter', sans-serif; margin-right: 4px;
}
.vs-sep { color: var(--muted); font-weight: 400; margin: 0 4px; font-size: 11px; }

/* ─── SCHEDULE SPLIT LAYOUT ─── */
.schedule-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .schedule-split { grid-template-columns: 1fr; } }

/* ─── CLICKABLE PLAYER NAMES ─── */
.player-link { cursor: pointer; transition: color 0.15s; }
.player-link:hover { color: var(--green); text-decoration: underline; }

/* ─── STICKY SCHEDULE DIVISION HEADERS (mobile) ─── */
@media (max-width: 640px) {
  .schedule-split .rr-group-title {
    position: sticky; top: 52px; z-index: 10;
    background: var(--bg); padding: 8px 0; margin-bottom: 8px;
    border-bottom: 2px solid var(--gold-pale);
  }
}

/* ─── WHATSAPP SHARE ─── */
.wa-share {
  display: inline-block; margin-left: 8px;
  font-size: 10px; font-weight: 600; color: #25D366;
  text-decoration: none; padding: 2px 8px;
  border: 1px solid rgba(37,211,102,0.3); border-radius: 10px;
  transition: all 0.15s;
}
.wa-share:hover { background: rgba(37,211,102,0.1); border-color: #25D366; }
