/* =====================================================
   G.A.M.E by Codall — App Stylesheet
   Montserrat · #0E2F2A · #16A085
   ===================================================== */

:root {
  --pitch-dark: #0E2F2A;
  --pitch-mid: #16A085;
  --pitch-green: #2d6a2d;
  --pitch-line: rgba(255,255,255,0.2);
  --accent: #16A085;
  --accent-light: #1abc9c;
  --accent-dim: rgba(22,160,133,0.15);
  --white: #ffffff;
  --off-white: #f4f6f4;
  --surface: #ffffff;
  --surface-2: #f4f6f4;
  --surface-3: #e8ede8;
  --border: #dce8dc;
  --border-strong: #b8ccb8;
  --text: #0E2F2A;
  --text-mid: #3a5a3a;
  --text-light: #6a8a6a;
  --text-muted: #9aaa9a;
  --yellow: #f0c040;
  --red: #e03030;
  --amber: #e07820;
  --blue: #2060c0;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --topbar-h: 56px;
  --bnav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: 'Montserrat', sans-serif;
  --shadow: 0 2px 12px rgba(14,47,42,0.12);
  --shadow-lg: 0 8px 32px rgba(14,47,42,0.18);
}

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

html { height: 100%; -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--font);
  background: var(--pitch-dark);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--pitch-dark);
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

/* ===== SPLASH ===== */
.splash {
  position: fixed; inset: 0;
  background: var(--pitch-dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; z-index: 200;
  transition: opacity 0.5s;
}
.splash-logo { animation: splashPop 0.6s cubic-bezier(0.34,1.56,0.64,1) both; }
.splash-wordmark {
  font-size: 32px; font-weight: 900;
  letter-spacing: 0.15em; color: var(--white);
  animation: splashFade 0.6s 0.2s both;
}
.splash-tagline {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; color: var(--accent);
  text-transform: uppercase;
  animation: splashFade 0.6s 0.4s both;
}
@keyframes splashPop { from{opacity:0;transform:scale(0.6)} to{opacity:1;transform:scale(1)} }
@keyframes splashFade { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ===== AUTH ===== */
.screen {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--off-white);
}

.auth-wrap {
  min-height: 100vh;
  background: var(--pitch-dark);
  display: flex; flex-direction: column;
  align-items: center; padding: 60px 24px 40px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-wordmark {
  font-size: 28px; font-weight: 900;
  letter-spacing: 0.15em; color: var(--white);
  margin-top: 12px;
}
.auth-sub { font-size: 11px; color: var(--accent); letter-spacing: 0.1em; margin-top: 2px; }
.auth-tabs {
  display: flex; gap: 0; width: 100%; max-width: 340px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 3px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; padding: 10px; font-family: var(--font);
  font-size: 13px; font-weight: 600; background: none;
  border: none; color: rgba(255,255,255,0.5); cursor: pointer;
  border-radius: var(--radius-sm); transition: all 0.2s;
}
.auth-tab.active { background: var(--accent); color: var(--white); }
.auth-form { width: 100%; max-width: 340px; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 20px; margin-bottom: 8px;
  background: #ffffff; color: #3c4043;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  border: 1.5px solid rgba(255,255,255,0.2); border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s;
}
.btn-google:hover { background: #f8f8f8; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.btn-google:active { transform: scale(0.97); }

.divider-auth {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: rgba(255,255,255,0.3); font-size: 11px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
}
.divider-auth::before, .divider-auth::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.12);
}

.auth-hint { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 16px; line-height: 1.5; }
.auth-error {
  background: rgba(224,48,48,0.15); border: 1px solid rgba(224,48,48,0.3);
  color: #ff8080; font-size: 13px; padding: 10px 12px;
  border-radius: var(--radius-sm); margin-bottom: 12px;
}

/* ===== FIELD INPUTS ===== */
.field-group { margin-bottom: 14px; }
.field-label { display: block; font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.field-label.dark { color: var(--text-light); }
.field-input {
  width: 100%; padding: 12px 14px; font-family: var(--font);
  font-size: 15px; background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12); border-radius: var(--radius);
  color: var(--white); outline: none; transition: border-color 0.2s;
}
.field-input::placeholder { color: rgba(255,255,255,0.25); }
.field-input:focus { border-color: var(--accent); background: rgba(255,255,255,0.12); }
.field-input.light {
  background: var(--surface); border-color: var(--border);
  color: var(--text);
}
.field-input.light::placeholder { color: var(--text-muted); }
.field-input.light:focus { border-color: var(--accent); }
select.field-input option { background: var(--pitch-dark); }
select.field-input.light option { background: var(--white); color: var(--text); }
textarea.field-input { resize: vertical; min-height: 80px; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--white); font-family: var(--font);
  font-size: 14px; font-weight: 700; padding: 14px 20px;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: all 0.15s; letter-spacing: 0.02em;
}
.btn-primary:hover { background: var(--accent-light); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-full { width: 100%; margin-bottom: 8px; }
.btn-primary.btn-dark { background: var(--pitch-dark); }
.btn-primary.btn-sm { font-size: 12px; padding: 8px 14px; }

.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); color: var(--text); font-family: var(--font);
  font-size: 14px; font-weight: 600; padding: 13px 20px;
  border: 1.5px solid var(--border-strong); border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary:active { transform: scale(0.97); }
.btn-secondary.btn-full { width: 100%; }
.btn-secondary.btn-sm { font-size: 12px; padding: 8px 14px; }

.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; color: rgba(255,255,255,0.5); font-family: var(--font);
  font-size: 13px; font-weight: 500; padding: 10px;
  border: none; cursor: pointer; transition: color 0.15s;
}
.btn-ghost:hover { color: var(--white); }
.btn-ghost.dark { color: var(--text-light); }
.btn-ghost.dark:hover { color: var(--text); }
.btn-ghost.btn-full { width: 100%; justify-content: center; }

.btn-danger {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: none; color: var(--red); font-family: var(--font);
  font-size: 13px; font-weight: 600; padding: 10px 14px;
  border: 1.5px solid var(--red); border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s;
}
.btn-danger:hover { background: rgba(224,48,48,0.1); }

.btn-icon {
  width: 36px; height: 36px; display: flex; align-items: center;
  justify-content: center; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-mid); transition: all 0.15s;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h); background: var(--pitch-dark);
  display: flex; align-items: center; padding: 0 16px;
  gap: 12px; flex-shrink: 0; position: relative; z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-back {
  width: 36px; height: 36px; display: flex; align-items: center;
  justify-content: center; background: rgba(255,255,255,0.08);
  border: none; border-radius: var(--radius-sm); color: var(--white);
  cursor: pointer; flex-shrink: 0;
}
.topbar-logo { display: flex; align-items: center; gap: 8px; flex: 1; }
.topbar-title { font-size: 16px; font-weight: 800; color: var(--white); letter-spacing: 0.05em; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.topbar-action {
  width: 36px; height: 36px; display: flex; align-items: center;
  justify-content: center; background: rgba(255,255,255,0.08);
  border: none; border-radius: var(--radius-sm); color: var(--white);
  cursor: pointer; font-size: 18px;
}

/* ===== MAIN CONTENT AREA ===== */
#app-main {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
  background: var(--off-white);
}
#screen-container {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--bnav-h) + var(--safe-bottom));
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  height: calc(var(--bnav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--pitch-dark);
  display: flex; align-items: center;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.35); font-family: var(--font);
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 8px 4px;
  transition: color 0.15s; position: relative;
}
.bnav-item.active { color: var(--accent); }
.bnav-item.active svg { stroke: var(--accent); }
.bnav-live { padding-top: 4px; }
.bnav-live-btn {
  width: 48px; height: 48px; background: var(--accent);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; margin-bottom: 2px;
  box-shadow: 0 4px 16px rgba(22,160,133,0.4);
  color: var(--white);
}
.bnav-live.active .bnav-live-btn { background: var(--red); box-shadow: 0 4px 16px rgba(224,48,48,0.4); }

/* ===== CARDS ===== */
.card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: 0 1px 4px rgba(14,47,42,0.06);
}
.card-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.card-body { padding: 16px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 10px;
}
.section-label {
  font-size: 11px; font-weight: 700; color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* ===== SCREEN PADDING ===== */
.screen-pad { padding: 16px; }
.screen-scroll { padding: 0 16px 16px; }

/* ===== HERO CARDS ===== */
.hero-card {
  background: var(--pitch-dark); border-radius: var(--radius-lg);
  padding: 20px; margin: 16px; position: relative; overflow: hidden;
}
.hero-card::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 48px);
  pointer-events: none;
}
.hero-card-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); text-transform: uppercase; margin-bottom: 4px; }
.hero-card-title { font-size: 20px; font-weight: 800; color: var(--white); line-height: 1.2; }
.hero-card-sub { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* ===== SCORE DISPLAY ===== */
.score-display {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 16px 0;
}
.score-team { text-align: center; flex: 1; }
.score-team-name { font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 4px; }
.score-num { font-size: 52px; font-weight: 900; color: var(--white); line-height: 1; font-variant-numeric: tabular-nums; }
.score-sep { font-size: 28px; color: rgba(255,255,255,0.3); font-weight: 300; }
.score-result-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
}
.score-result-badge.win { background: rgba(22,160,133,0.2); color: var(--accent); }
.score-result-badge.loss { background: rgba(224,48,48,0.2); color: #ff8080; }
.score-result-badge.draw { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }

/* ===== TIMER ===== */
.timer-display {
  font-size: 48px; font-weight: 900; color: var(--white);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em; line-height: 1;
}
.timer-period { font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* ===== PITCH ===== */
.pitch-wrap {
  background: var(--pitch-green); border-radius: var(--radius-lg);
  position: relative; overflow: hidden; user-select: none;
  touch-action: none;
}
.pitch-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pitch-player {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; z-index: 2; touch-action: none;
}
.pitch-player-jersey {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--white);
  border: 2.5px solid rgba(255,255,255,0.6);
  transition: transform 0.1s; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.pitch-player-jersey:active { transform: scale(1.15); }
.pitch-player-name {
  font-size: 9px; font-weight: 700; color: var(--white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8); text-align: center;
  max-width: 52px; line-height: 1.2; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.pitch-player-time {
  font-size: 8px; font-weight: 600; color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.4); padding: 1px 4px; border-radius: 3px;
}
.pitch-player.opp .pitch-player-jersey { border-color: rgba(255,200,0,0.8); }
.pitch-bench-strip {
  background: rgba(0,0,0,0.3); border-top: 1px solid rgba(255,255,255,0.1);
  padding: 8px; display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none;
}
.pitch-bench-strip::-webkit-scrollbar { display: none; }
.bench-player {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; flex-shrink: 0; width: 52px;
}
.bench-player-jersey {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.bench-player-name { font-size: 8px; font-weight: 600; color: rgba(255,255,255,0.7); text-align: center; line-height: 1.2; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== EVENT GRID ===== */
.event-overlay-wrap {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14,47,42,0.95); display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
.event-step-label {
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px;
}
.event-team-choice {
  display: flex; gap: 16px; width: 100%; max-width: 340px;
}
.event-team-btn {
  flex: 1; padding: 20px 12px; background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12); border-radius: var(--radius-lg);
  color: var(--white); font-family: var(--font); font-size: 13px;
  font-weight: 700; cursor: pointer; text-align: center;
  transition: all 0.15s; letter-spacing: 0.04em;
}
.event-team-btn:hover, .event-team-btn.selected { border-color: var(--accent); background: var(--accent-dim); }
.event-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; width: 100%; max-width: 340px;
}
.event-type-btn {
  padding: 14px 8px; background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.10); border-radius: var(--radius);
  color: var(--white); font-family: var(--font); font-size: 11px;
  font-weight: 700; cursor: pointer; text-align: center;
  transition: all 0.15s; display: flex; flex-direction: column;
  align-items: center; gap: 6px; letter-spacing: 0.02em;
}
.event-type-btn .evt-icon { font-size: 22px; }
.event-type-btn:hover, .event-type-btn.selected { border-color: var(--accent); background: var(--accent-dim); }
.event-player-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; width: 100%; max-width: 360px; max-height: 60vh;
  overflow-y: auto;
}
.event-player-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.10); border-radius: var(--radius);
  cursor: pointer; transition: all 0.15s;
}
.event-player-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.event-player-num { font-size: 18px; font-weight: 900; color: var(--white); line-height: 1; }
.event-player-name { font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.6); text-align: center; line-height: 1.3; }
.event-cancel-btn {
  margin-top: 20px; background: none; border: none; color: rgba(255,255,255,0.4);
  font-family: var(--font); font-size: 13px; cursor: pointer; padding: 8px 20px;
}

/* ===== EVENT LOG ===== */
.event-log { }
.event-log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.event-log-item:last-child { border-bottom: none; }
.event-log-time {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  font-variant-numeric: tabular-nums; min-width: 28px;
}
.event-log-icon { font-size: 18px; flex-shrink: 0; }
.event-log-text { flex: 1; }
.event-log-type { font-size: 13px; font-weight: 600; color: var(--text); }
.event-log-player { font-size: 11px; color: var(--text-light); margin-top: 1px; }
.event-log-side {
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 4px; letter-spacing: 0.06em;
}
.event-log-side.home { background: var(--accent-dim); color: var(--accent); }
.event-log-side.away { background: rgba(224,48,48,0.1); color: var(--red); }
.event-log-del {
  width: 28px; height: 28px; display: flex; align-items: center;
  justify-content: center; background: none; border: none;
  color: var(--text-muted); cursor: pointer; border-radius: 4px;
  font-size: 16px;
}
.event-log-del:hover { color: var(--red); background: rgba(224,48,48,0.08); }

/* ===== STAT TABLES ===== */
.stat-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stat-table th {
  text-align: left; padding: 8px 10px; font-weight: 700;
  color: var(--text-light); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.stat-table th.num { text-align: right; }
.stat-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.stat-table td.num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-table tr:last-child td { border-bottom: none; }
.stat-table tr:hover td { background: var(--surface-2); }
.stat-player-name { font-weight: 700; color: var(--text); }
.stat-player-num { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.stat-highlight { color: var(--accent); font-weight: 800; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; padding: 3px 8px;
  border-radius: 20px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
}
.badge-green { background: rgba(22,160,133,0.15); color: var(--accent); }
.badge-red { background: rgba(224,48,48,0.12); color: #cc2020; }
.badge-yellow { background: rgba(240,192,64,0.15); color: #a07010; }
.badge-blue { background: rgba(32,96,192,0.12); color: var(--blue); }
.badge-grey { background: var(--surface-2); color: var(--text-light); }
.badge-amber { background: rgba(224,120,32,0.12); color: var(--amber); }

/* ===== PLAYER CHIPS ===== */
.player-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 20px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; color: var(--text);
}
.player-chip:hover { border-color: var(--accent); color: var(--accent); }
.player-chip.selected { background: var(--accent); border-color: var(--accent); color: var(--white); }
.player-chip.starting { background: rgba(22,160,133,0.12); border-color: var(--accent); color: var(--accent); }
.player-chip.bench { background: rgba(32,96,192,0.08); border-color: var(--blue); color: var(--blue); }
.player-chip.unavailable { background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }
.player-chip-num { font-weight: 900; min-width: 18px; text-align: center; }

/* ===== LIST ROWS ===== */
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.1s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); }
.list-row-icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); flex-shrink: 0;
}
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-size: 14px; font-weight: 700; color: var(--text); }
.list-row-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.list-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.list-row-chevron { color: var(--text-muted); font-size: 18px; }

/* ===== JERSEY SWATCH ===== */
.jersey-swatch {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  overflow: hidden; border: 1.5px solid var(--border);
}

/* ===== MATCH CARD ===== */
.match-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden; margin-bottom: 10px;
  cursor: pointer; transition: all 0.15s;
}
.match-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.match-card-header {
  padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.match-card-comp { font-size: 10px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.08em; }
.match-card-date { font-size: 10px; color: var(--text-muted); }
.match-card-body { padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.match-card-teams { flex: 1; }
.match-card-vs { font-size: 15px; font-weight: 800; color: var(--text); }
.match-card-vs span { color: var(--text-muted); font-weight: 400; }
.match-card-score { font-size: 28px; font-weight: 900; color: var(--pitch-dark); font-variant-numeric: tabular-nums; }

/* ===== TABS ===== */
.tab-bar {
  display: flex; background: var(--surface); border-bottom: 2px solid var(--border);
  overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 12px 16px; font-family: var(--font); font-size: 12px;
  font-weight: 700; color: var(--text-light); background: none;
  border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(14,47,42,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-content {
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 480px; max-height: 85vh;
  overflow-y: auto; padding: 20px;
  animation: slideUp 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.modal-handle {
  width: 40px; height: 4px; background: var(--border-strong);
  border-radius: 2px; margin: 0 auto 20px;
}
.modal-title { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 16px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: calc(var(--bnav-h) + var(--safe-bottom) + 12px);
  left: 50%; transform: translateX(-50%);
  background: var(--pitch-dark); color: var(--white);
  padding: 10px 20px; border-radius: 20px; font-size: 13px; font-weight: 600;
  z-index: 999; box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
@keyframes toastIn { from{opacity:0;transform:translateX(-50%) translateY(12px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* ===== VOTING ===== */
.vote-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 2px solid var(--border); padding: 16px; margin-bottom: 10px;
  cursor: pointer; transition: all 0.15s;
}
.vote-card:hover { border-color: var(--accent); }
.vote-card.selected { border-color: var(--accent); background: var(--accent-dim); }
.vote-card-name { font-size: 16px; font-weight: 800; color: var(--text); }
.vote-card-num { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.vote-points-selector { display: flex; gap: 8px; margin-top: 8px; }
.vote-point-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border); background: none;
  font-family: var(--font); font-size: 14px; font-weight: 800;
  cursor: pointer; transition: all 0.15s; color: var(--text);
}
.vote-point-btn.selected-3 { background: var(--accent); border-color: var(--accent); color: var(--white); }
.vote-point-btn.selected-2 { background: var(--pitch-dark); border-color: var(--pitch-dark); color: var(--white); }
.vote-point-btn.selected-1 { background: var(--border-strong); border-color: var(--border-strong); color: var(--text); }

/* ===== EMPTY STATES ===== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px; text-align: center;
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state-sub { font-size: 13px; color: var(--text-light); line-height: 1.5; margin-bottom: 20px; }

/* ===== CLUB ADMIN (PC layout) ===== */
@media (min-width: 768px) {
  #app {
    max-width: 100%;
    flex-direction: row;
  }
  .admin-sidebar {
    width: 240px; background: var(--pitch-dark); height: 100vh;
    display: flex; flex-direction: column; flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,0.08);
    overflow-y: auto;
  }
  .admin-main { flex: 1; overflow-y: auto; height: 100vh; }
  #screen-container { padding-bottom: 16px; }
  .bottom-nav { display: none; }
  #topbar { display: none; }
  .mobile-only { display: none; }
}

/* ===== LIVE GAME SPECIFIC ===== */
.live-header {
  background: var(--pitch-dark); padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.live-controls { display: flex; gap: 8px; }
.live-ctrl-btn {
  padding: 10px 16px; font-family: var(--font); font-size: 12px;
  font-weight: 700; border-radius: var(--radius); cursor: pointer;
  transition: all 0.15s; border: 1.5px solid rgba(255,255,255,0.2);
  color: var(--white); background: none; letter-spacing: 0.04em;
}
.live-ctrl-btn.start { background: var(--accent); border-color: var(--accent); }
.live-ctrl-btn.pause { background: var(--amber); border-color: var(--amber); color: var(--white); }
.live-ctrl-btn.danger { border-color: var(--red); color: var(--red); }

/* ===== EVENT FAB ===== */
.event-fab {
  position: fixed; bottom: calc(var(--bnav-h) + var(--safe-bottom) + 16px);
  right: 16px; z-index: 20;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(22,160,133,0.5);
  font-size: 28px; color: var(--white);
  transition: all 0.2s; font-weight: 300;
}
.event-fab:hover { transform: scale(1.08); }
.event-fab:active { transform: scale(0.95); }

/* ===== PITCH TOGGLE ===== */
.pitch-toggle {
  display: flex; gap: 4px; background: rgba(0,0,0,0.3);
  border-radius: 6px; padding: 3px;
}
.pitch-toggle-btn {
  padding: 4px 10px; border-radius: 4px; border: none;
  font-family: var(--font); font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.5); background: none; cursor: pointer;
  transition: all 0.15s; letter-spacing: 0.04em;
}
.pitch-toggle-btn.active { background: rgba(255,255,255,0.15); color: var(--white); }

/* ===== FORMATION SELECTOR ===== */
.formation-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.formation-btn {
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--border); background: none;
  font-family: var(--font); font-size: 12px; font-weight: 700;
  color: var(--text-mid); cursor: pointer; transition: all 0.15s;
}
.formation-btn.active { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* ===== AVAILABILITY COUNTER ===== */
.avail-counter {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--accent-dim);
  border-radius: var(--radius); margin-bottom: 12px;
  border: 1px solid rgba(22,160,133,0.2);
}
.avail-counter-num { font-size: 18px; font-weight: 900; color: var(--accent); }
.avail-counter-label { font-size: 12px; color: var(--text-mid); font-weight: 600; }

/* ===== LOADING ===== */
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; gap: 12px; }
.loading-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* ===== COLOUR PICKERS ===== */
.colour-row { display: flex; gap: 8px; flex-wrap: wrap; }
.colour-swatch {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.15s;
  flex-shrink: 0;
}
.colour-swatch.selected { border-color: var(--pitch-dark); box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--pitch-dark); }
input[type="color"].colour-custom {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--border); padding: 0; background: none;
}

/* ===== FQ EXPORT NOTE ===== */
.fq-note {
  background: rgba(32,96,192,0.08); border: 1px solid rgba(32,96,192,0.2);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px;
  font-size: 12px; color: var(--blue); line-height: 1.5;
}

/* ===== DIVIDERS ===== */
.divider { height: 1px; background: var(--border); margin: 8px 0; }
.divider-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em; margin: 12px 0;
}
.divider-label::before, .divider-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ===== MISC ===== */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-mono { font-variant-numeric: tabular-nums; }
.fw-900 { font-weight: 900; }
.fw-700 { font-weight: 700; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
