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

:root {
  --green:       #00c06a;
  --green-mid:   #00a358;
  --green-dark:  #007a40;
  --green-dim:   rgba(0,192,106,.13);
  --accent:      #f0c040;
  --red:         #ff4d6d;
  --blue:        #4895ef;
  --purple:      #8b5cf6;
  --bg:          #0a0e14;
  --bg2:         #111620;
  --bg3:         #1a2030;
  --bg4:         #222a3a;
  --border:      rgba(255,255,255,.07);
  --border2:     rgba(255,255,255,.12);
  --text:        #e8edf5;
  --muted:       #7a8599;
  --card-shadow: 0 8px 32px rgba(0,0,0,.5);
  --radius:      16px;
  --sidebar-w:   252px;
  --transition:  .18s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.screen { min-height: 100vh; }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 99px; }

/* ── Auth ─────────────────────────────────────────────────────────────────── */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.auth-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .28;
}
.orb1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #00c06a, transparent 70%);
  top: -150px; left: -150px;
  animation: float 9s ease-in-out infinite;
}
.orb2 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  bottom: -120px; right: -100px;
  animation: float 11s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-28px) scale(1.06); }
}

.auth-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 20px;
  background: rgba(17,22,32,.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 32px 36px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0,192,106,.1), rgba(139,92,246,.06));
}
.auth-logo-icon { font-size: 2.4rem; }
.auth-logo-text { font-size: .95rem; color: var(--muted); line-height: 1.4; }
.auth-logo-text strong { color: var(--text); font-size: 1.1rem; display: block; }

.auth-form { padding: 28px 36px 36px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); font-size: .9rem; margin-top: -8px; }

.auth-error {
  color: var(--red);
  font-size: .85rem;
  min-height: 18px;
  padding: 0 2px;
}

/* ── Inputs ───────────────────────────────────────────────────────────────── */
.input-wrap { display: flex; flex-direction: column; gap: 6px; }
.input-wrap label { font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.input-wrap input, .input-wrap select {
  padding: 12px 16px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border var(--transition), box-shadow var(--transition);
  width: 100%;
}
.input-wrap input::placeholder { color: var(--muted); }
.input-wrap input:focus, .input-wrap select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,192,106,.12);
}
.input-wrap input[type="datetime-local"] { color-scheme: dark; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.btn.full { width: 100%; }
.btn.primary {
  background: linear-gradient(135deg, var(--green), #00a856);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,192,106,.28);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 8px 28px rgba(0,192,106,.38); }
.btn.primary:active { transform: translateY(0); filter: brightness(.97); }
.btn.primary:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn.ghost {
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text);
}
.btn.ghost:hover { background: var(--bg3); border-color: rgba(255,255,255,.2); }
.btn.danger { background: linear-gradient(135deg, #ff4d6d, #c0392b); color: #fff; box-shadow: 0 4px 16px rgba(255,77,109,.22); }
.btn.danger:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.link { background: transparent; border: none; color: var(--muted); font-size: .88rem; font-weight: 500; }
.btn.link:hover { color: var(--text); }
.btn.large { padding: 15px 36px; font-size: 1rem; border-radius: 14px; }
.btn-arrow { transition: transform var(--transition); }
.btn.primary:hover .btn-arrow { transform: translateX(4px); }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
#app-screen { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 26px 20px;
  border-bottom: 1px solid var(--border);
}
.logo-ball { font-size: 2rem; }
.logo-title { font-size: 1rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.logo-sub { font-size: .73rem; color: var(--muted); }

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
  letter-spacing: -.01em;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active {
  background: var(--green-dim);
  color: var(--green);
  font-weight: 700;
}
.nav-icon {
  width: 21px; height: 21px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-icon svg { width: 100%; height: 100%; display: block; }

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-name { font-size: .83rem; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.user-avatar.sm { width: 30px; height: 30px; font-size: .78rem; }

.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 9px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.logout-btn:hover { border-color: var(--red); color: var(--red); background: rgba(255,77,109,.06); }

/* ── Topbar (mobile) ──────────────────────────────────────────────────────── */
.topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  z-index: 60;
}
.topbar-logo { flex: 1; font-weight: 800; font-size: 1rem; letter-spacing: -.02em; }
.hamburger {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.hamburger:hover { background: var(--bg3); }
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 49;
  backdrop-filter: blur(3px);
}

/* ── Main content ─────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 0;
  background: var(--bg);
}

/* ── Pot hero ─────────────────────────────────────────────────────────────── */
.pot-hero {
  background: linear-gradient(135deg, rgba(0,192,106,.12) 0%, rgba(139,92,246,.07) 60%, rgba(72,149,239,.06) 100%);
  border-bottom: 1px solid var(--border);
  padding: 30px 36px;
  position: relative;
  overflow: hidden;
}
.pot-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(0,192,106,.12), transparent 70%);
  border-radius: 50%;
}
.pot-hero-inner {
  max-width: 860px;
  display: flex;
  align-items: center;
  gap: 36px;
  position: relative;
}
.pot-info { display: flex; flex-direction: column; gap: 5px; }
.pot-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pot-round { font-size: 1.4rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.pot-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -.03em;
  text-shadow: 0 0 32px rgba(240,192,64,.35);
}
.pot-rollover {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0;
  font-weight: 500;
}
.pot-divider { width: 1px; height: 52px; background: var(--border2); }

/* ── Tab ──────────────────────────────────────────────────────────────────── */
.tab { display: none; }
.tab.active { display: block; }
.tab-header { padding: 28px 36px 0; }
.tab-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 22px;
  letter-spacing: -.02em;
  color: var(--text);
}

/* ── Alert ────────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 36px 20px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
}
.alert.alert-lock {
  background: rgba(240,192,64,.08);
  border: 1px solid rgba(240,192,64,.25);
  color: var(--accent);
}
.alert-icon { font-size: 1.1rem; }

/* ── Who submitted ────────────────────────────────────────────────────────── */
.submitted-section {
  padding: 0 36px 16px;
  max-width: 940px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.submitted-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex-shrink: 0;
}
.submitted-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sub-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px 4px 5px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
}
.sub-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.sub-empty { font-size: .82rem; color: var(--muted); font-style: italic; }

/* ── All picks table ──────────────────────────────────────────────────────── */
.all-picks-section { padding: 0 36px 24px; max-width: 940px; }
.ap-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.ap-title {
  padding: 14px 20px 12px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
}
.ap-table-scroll { overflow-x: auto; }
.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.ap-table thead th {
  padding: 10px 12px;
  font-weight: 700;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  white-space: nowrap;
}
.ap-match-header { text-align: center; min-width: 120px; }
.ap-player-col   { text-align: center; min-width: 72px; }
.ap-player-col.ap-me { background: rgba(72,149,239,.07); }
.ap-player-header {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
}
.ap-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #fff;
}
.ap-table tbody tr { border-bottom: 1px solid var(--border); }
.ap-table tbody tr:last-child { border-bottom: none; }
.ap-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.ap-match-cell {
  padding: 6px 10px;
  vertical-align: middle;
}
.ap-match-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ap-logo-wrap {
  position: relative;
  width: 32px; height: 32px;
  flex-shrink: 0;
}
.ap-logo {
  width: 32px; height: 32px;
  object-fit: contain;
  display: block;
}
.ap-logo-init {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  font-size: .75rem; font-weight: 900;
  color: var(--muted);
}
.ap-result-pill {
  display: flex;
  align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 900;
  flex-shrink: 0;
}
.ap-res-home  { background: rgba(76,201,140,.2);  color: var(--green); border: 1px solid var(--green); }
.ap-res-away  { background: rgba(72,149,239,.2);  color: var(--blue);  border: 1px solid var(--blue); }
.ap-res-draw  { background: rgba(255,200,0,.15);  color: var(--accent); border: 1px solid var(--accent); }
.ap-res-pending { background: var(--bg3); color: var(--muted); border: 1px solid var(--border2); }
.ap-cell {
  text-align: center;
  padding: 8px 4px;
  vertical-align: middle;
}
.ap-cell.ap-me { background: rgba(72,149,239,.04); }
.ap-pick {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  font-weight: 800;
  font-size: .8rem;
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border2);
}
.ap-pick.ap-correct {
  background: rgba(76,201,140,.18);
  border-color: var(--green);
  color: var(--green);
}
.ap-pick.ap-wrong {
  background: rgba(230,57,70,.15);
  border-color: var(--red);
  color: var(--red);
}
.ap-none { color: var(--muted); font-size: .75rem; }

/* ── Matches grid (2 per row) ─────────────────────────────────────────────── */
.matches-list {
  padding: 0 36px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 940px;
}

/* ── Match card ───────────────────────────────────────────────────────────── */
.match-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.match-card:hover {
  border-color: var(--border2);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  transform: translateY(-2px);
}

.match-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 16px;
  gap: 8px;
}

.match-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-badge-wrap {
  position: relative;
  width: 48px; height: 48px;
  flex-shrink: 0;
}
.team-logo {
  width: 48px; height: 48px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.team-init {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: none; /* hidden until image fails to load */
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  flex-shrink: 0;
  background: var(--bg3);
  color: var(--muted);
}
.team-init.away { border-color: var(--blue); color: var(--blue); background: rgba(72,149,239,.08); }

.team-name {
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

.match-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.vs-badge {
  font-size: .65rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .1em;
  background: var(--bg3);
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

.match-date {
  font-size: .68rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

.result-pill {
  padding: 4px 11px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.result-pill.home  { background: rgba(0,192,106,.13);  color: var(--green); border: 1px solid rgba(0,192,106,.28); }
.result-pill.draw  { background: rgba(122,133,153,.12); color: var(--muted); border: 1px solid rgba(122,133,153,.28); }
.result-pill.away  { background: rgba(72,149,239,.12);  color: var(--blue);  border: 1px solid rgba(72,149,239,.28); }

/* ── Prediction buttons ───────────────────────────────────────────────────── */
.prediction-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--border);
}

.pred-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  position: relative;
}
.pred-btn:not(:last-child) { border-right: 1px solid var(--border); }
.pred-btn:hover:not([disabled]) { background: var(--bg3); }

.pred-code {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--muted);
  line-height: 1;
  transition: color var(--transition);
}

.pred-team {
  font-size: .67rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
  transition: color var(--transition);
  max-width: 70px;
}

.pred-btn:hover:not([disabled]) .pred-code { color: var(--text); }
.pred-btn:hover:not([disabled]) .pred-team { color: rgba(232,237,245,.6); }

.pred-btn.selected { background: var(--green-dim); }
.pred-btn.selected .pred-code { color: var(--green); }
.pred-btn.selected .pred-team { color: rgba(0,192,106,.65); }

.pred-btn.correct { background: rgba(0,192,106,.18); }
.pred-btn.correct .pred-code { color: var(--green); }
.pred-btn.correct .pred-team { color: rgba(0,192,106,.7); }

.pred-btn.wrong { background: rgba(255,77,109,.1); }
.pred-btn.wrong .pred-code { color: var(--red); }
.pred-btn.wrong .pred-team { color: rgba(255,77,109,.7); }

.pred-btn:disabled { cursor: default; }

.no-matches {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 1rem;
  grid-column: 1 / -1;
}
.no-matches-icon { font-size: 3rem; margin-bottom: 12px; opacity: .35; }

/* ── Submit bar ───────────────────────────────────────────────────────────── */
.submit-bar {
  padding: 22px 36px 36px;
  max-width: 940px;
}

/* ── Leaderboard ──────────────────────────────────────────────────────────── */
.leaderboard-wrap { padding: 0 36px 36px; max-width: 900px; }

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 28px;
  padding: 28px 0 0;
}
.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 160px;
}
.podium-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 900; color: #fff;
  border: 3px solid transparent;
}
.podium-gold   .podium-avatar { width: 68px; height: 68px; font-size: 1.5rem; background: linear-gradient(135deg,#f0c040,#e67e22); border-color: rgba(240,192,64,.5); box-shadow: 0 0 28px rgba(240,192,64,.35); }
.podium-silver .podium-avatar { background: linear-gradient(135deg,#95a5a6,#7f8c8d); border-color: rgba(149,165,166,.35); }
.podium-bronze .podium-avatar { background: linear-gradient(135deg,#cd7f32,#a04000); border-color: rgba(160,64,0,.35); }
.podium-name { font-size: .82rem; font-weight: 700; text-align: center; }
.podium-pts { font-size: .75rem; color: var(--muted); }
.podium-rank { font-size: .7rem; font-weight: 800; padding: 2px 9px; border-radius: 99px; }
.podium-gold   .podium-rank { background: rgba(240,192,64,.18); color: var(--accent); }
.podium-silver .podium-rank { background: rgba(149,165,166,.13); color: #95a5a6; }
.podium-bronze .podium-rank { background: rgba(160,64,0,.13); color: #cd7f32; }
.podium-bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: var(--bg3);
  border-top: 2px solid var(--border);
}
.podium-gold   .podium-bar { height: 72px; border-top-color: rgba(240,192,64,.45); background: rgba(240,192,64,.07); }
.podium-silver .podium-bar { height: 52px; }
.podium-bronze .podium-bar { height: 36px; }

.leaderboard-list { display: flex; flex-direction: column; gap: 8px; }
/* ── Leaderboard rows ─────────────────────────────────────────────────────── */
.lb-row {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.lb-row:hover { border-color: var(--border2); }
.lb-row-first { border-color: rgba(240,192,64,.35); background: rgba(240,192,64,.04); }
.lb-row-first:hover { border-color: rgba(240,192,64,.55); }

.lb-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
}
.lb-rank-badge {
  font-size: .95rem;
  font-weight: 800;
  min-width: 28px;
  text-align: center;
  color: var(--muted);
  flex-shrink: 0;
}
.lb-avatar-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.lb-name-col {
  flex: 1;
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-total-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
}
.lb-total-pts   { font-size: 1.15rem; font-weight: 900; color: var(--green); letter-spacing: -.02em; }
.lb-total-label { font-size: .7rem;   font-weight: 500; color: var(--muted); }

.lb-expand-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--muted);
  font-size: .7rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
  flex-shrink: 0;
}
.lb-expand-btn:hover { background: var(--bg4); color: var(--fg); border-color: var(--blue); }
.lb-expand-btn.open  { transform: rotate(90deg); color: var(--green); border-color: var(--green); }

/* ── Per-round breakdown ─────────────────────────────────────────────────── */
.lb-breakdown {
  border-top: 1px solid var(--border);
  padding: 12px 16px 14px;
  background: var(--bg1);
}
.lb-breakdown.hidden { display: none; }
.lb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lb-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  min-width: 52px;
}
.lb-chip-label { font-size: .65rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.lb-chip-val   { font-size: .95rem; font-weight: 800; color: var(--green); }
.lb-chip-none  { font-size: .95rem; font-weight: 600; color: var(--bg4); }

/* ── League Standings ────────────────────────────────────────────────────── */
.standings-wrap { padding: 0 36px 36px; max-width: 860px; }
.standings-updated { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.st-loading { color: var(--muted); padding: 20px; text-align: center; }
.st-table-scroll { overflow-x: auto; }
.st-table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
  background: var(--bg2); border-radius: 16px; overflow: hidden;
}
.st-table thead tr { background: var(--bg3); border-bottom: 2px solid var(--border); }
.st-table th {
  padding: 10px 10px; font-size: .7rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
}
.st-th-pos  { width: 36px; text-align: center; }
.st-th-team { text-align: left; padding-left: 14px; }
.st-th-num  { text-align: center; width: 38px; }
.st-th-pts  { text-align: center; width: 38px; color: var(--accent) !important; }
.st-row { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.st-row:last-child { border-bottom: none; }
.st-row:hover td { background: rgba(255,255,255,.025); }
.st-pos {
  text-align: center; font-size: .8rem; font-weight: 700;
  color: var(--muted); padding: 10px 4px; width: 36px;
}
.st-pos-1   { color: var(--accent); }
.st-pos-top { color: var(--green); }
.st-pos-bot { color: var(--red); }
.st-team-cell { padding: 8px 8px 8px 14px; }
.st-team-inner { display: flex; align-items: center; gap: 10px; }
.st-logo-wrap { position: relative; width: 28px; height: 28px; flex-shrink: 0; }
.st-logo { width: 28px; height: 28px; object-fit: contain; display: block; }
.st-logo-init {
  position: absolute; inset: 0; display: none; align-items: center;
  justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg3); border: 1px solid var(--border2);
  font-size: .7rem; font-weight: 900; color: var(--muted);
}
.st-name { font-weight: 600; color: var(--text); font-size: .85rem; white-space: nowrap; }
.st-num { text-align: center; padding: 10px 4px; color: var(--muted); font-size: .82rem; }
.st-w   { color: var(--green) !important; font-weight: 600; }
.st-l   { color: var(--red)   !important; font-weight: 600; }
.st-gd-pos { color: var(--green) !important; font-weight: 700; }
.st-gd-neg { color: var(--red)   !important; font-weight: 700; }
.st-pts { text-align: center; padding: 10px 4px; font-weight: 900; font-size: .95rem; color: var(--accent); }

/* Admin standings editor */
.admin-standings-table { margin-top: 10px; }
.ast-scroll { overflow-x: auto; }
.ast-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.ast-table thead tr { border-bottom: 1px solid var(--border); }
.ast-table th {
  padding: 6px 8px; font-size: .68rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
  text-align: center; white-space: nowrap;
}
.ast-th-team { text-align: left; min-width: 160px; }
.ast-th-num  { width: 52px; }
.ast-pts-h   { color: var(--accent) !important; }
.ast-row     { border-bottom: 1px solid var(--border); }
.ast-row:last-child { border-bottom: none; }
.ast-team-cell {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
}
.ast-logo { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.ast-name { font-size: .78rem; font-weight: 600; color: var(--text); }
.ast-table td { padding: 4px 4px; vertical-align: middle; }
.ast-input {
  width: 46px; text-align: center; background: var(--bg3);
  border: 1px solid var(--border2); border-radius: 6px;
  color: var(--text); font-size: .8rem; padding: 4px 2px;
  font-weight: 600;
}
.ast-input:focus { border-color: var(--blue); outline: none; }
.ast-pts { border-color: var(--accent) !important; color: var(--accent) !important; }

/* ── History ──────────────────────────────────────────────────────────────── */
.history-list { padding: 0 36px 36px; max-width: 960px; display: flex; flex-direction: column; gap: 10px; }
.history-round {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.history-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background var(--transition);
}
.history-round-header:hover { background: var(--bg3); }
.history-round-title { font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.history-round-meta { font-size: .8rem; color: var(--muted); text-align: right; line-height: 1.5; }
.history-chevron { color: var(--muted); transition: transform var(--transition); font-size: .75rem; }
.history-round-header.open .history-chevron { transform: rotate(90deg); }
.history-round-body { border-top: 1px solid var(--border); }

/* History summary table */
.hist-table-wrap {
  overflow-x: auto;
  padding: 4px 0 8px;
}
.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  min-width: 360px;
}
.hist-table thead th {
  padding: 10px 10px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}
.hist-table th.hist-name-header { text-align: left; padding-left: 20px; }
.hist-table th.hist-pts-header  { min-width: 64px; }
.hist-table th.hist-match-col   { min-width: 52px; }
.hist-table th.hist-match-col small { color: var(--muted); font-size: .6rem; font-weight: 500; }

.hist-table tbody tr { transition: background var(--transition); }
.hist-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.hist-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}
.hist-table tbody tr:last-child td { border-bottom: none; }

.hist-player-col { text-align: left !important; font-weight: 600; white-space: nowrap; padding-left: 20px !important; }
.hist-pts-col    { font-weight: 800; color: var(--green); font-size: .88rem; white-space: nowrap; padding-right: 20px !important; }
.hist-pts-denom  { color: var(--muted); font-size: .7rem; font-weight: 500; }
.hist-empty      { text-align: center; padding: 18px !important; color: var(--muted); font-style: italic; }

/* Pick cells */
.pick-cell    { font-weight: 800; font-size: .85rem; border-radius: 6px; }
.pick-correct { color: var(--green); background: rgba(0,192,106,.14); }
.pick-wrong   { color: var(--red);   background: rgba(255,77,109,.11); }
.pick-pending { color: var(--muted); }
.pick-none    { color: var(--bg4);   font-weight: 400; }

/* Small button variant */
.btn.btn-sm { padding: 5px 9px; font-size: .78rem; border-radius: 8px; }

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 36px 36px;
  max-width: 900px;
}
.admin-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin-card.full-width { grid-column: 1 / -1; }
.admin-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.admin-card-icon { font-size: 1.2rem; }
.admin-card h3 { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.admin-hint { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.lock-btns { display: flex; flex-direction: column; gap: 8px; }

.admin-results { display: flex; flex-direction: column; gap: 0; }
.admin-result-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.admin-result-row:last-child { border-bottom: none; }
.admin-result-teams { flex: 1; font-size: .9rem; font-weight: 600; }
.score-inputs {
  display: flex; align-items: center; gap: 6px;
}
.score-input {
  width: 54px; text-align: center;
  padding: 8px 6px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  transition: border var(--transition);
  -moz-appearance: textfield;
}
.score-input::-webkit-inner-spin-button,
.score-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.score-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,192,106,.1); }
.score-dash { font-size: 1.2rem; font-weight: 900; color: var(--muted); }

/* ── Winner modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 28px;
  padding: 48px 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 48px 140px rgba(0,0,0,.7);
  animation: slideUp .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp { from { transform: translateY(30px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-confetti { font-size: 2.2rem; margin-bottom: -4px; animation: bounce 1s ease infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.modal-trophy { font-size: 4rem; margin: 8px 0; filter: drop-shadow(0 0 24px rgba(240,192,64,.55)); }
.modal-title { font-size: 2.2rem; font-weight: 900; color: var(--accent); margin-bottom: 12px; letter-spacing: -.02em; }
.modal-body { font-size: 1rem; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }

/* ── Toast ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 12px 24px;
  font-size: .88rem;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 8px 36px rgba(0,0,0,.45);
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  letter-spacing: -.01em;
}
.toast.show { animation: toastIn .3s ease forwards; }
.toast.hide { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform: translateX(-50%) translateY(16px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform: translateX(-50%) translateY(8px); } }

/* ── PIN Modal ────────────────────────────────────────────────────────────── */
.pin-modal-box { max-width: 340px; }
.pin-icon { font-size: 2.4rem; margin-bottom: 8px; }
.pin-title { font-size: 1.4rem !important; letter-spacing: -.02em !important; }
.pin-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0 8px;
}
.pin-digit {
  width: 58px; height: 66px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 800;
  text-align: center;
  outline: none;
  transition: border var(--transition), box-shadow var(--transition);
  caret-color: transparent;
}
.pin-digit:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,192,106,.18);
}
.pin-digit.filled { border-color: var(--green); }
.pin-digit.error  { border-color: var(--red); animation: shake .3s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}
.pin-error { color: var(--red); font-size: .82rem; min-height: 18px; margin-bottom: 4px; }
.pin-actions { display: flex; gap: 10px; margin-top: 16px; }
.pin-actions .btn { flex: 1; }

/* ── Payments modal ───────────────────────────────────────────────────────── */
/* Payments tab */
.payments-content { padding: 0 36px 36px; max-width: 600px; display: flex; flex-direction: column; gap: 0; }
.pay-lock-banner {
  display: flex; align-items: center; gap: 12px;
  background: rgba(240,192,64,.08); border: 1px solid rgba(240,192,64,.3);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px;
  font-size: .85rem; font-weight: 600; color: var(--accent);
}
.pay-lock-icon { font-size: 1.1rem; }
.pay-lock-banner .btn { margin-left: auto; }
.pay-rounds { display: flex; flex-direction: column; gap: 8px; }
.pay-round { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.pay-round-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; cursor: pointer;
  transition: background var(--transition);
}
.pay-round-header:hover { background: rgba(255,255,255,.025); }
.pay-round-header.open .pay-chevron { transform: rotate(90deg); }
.pay-round-left { display: flex; align-items: center; gap: 10px; }
.pay-round-title { font-weight: 700; font-size: .95rem; }
.pay-active-badge {
  background: rgba(72,149,239,.18); color: var(--blue);
  border: 1px solid var(--blue); border-radius: 99px;
  font-size: .68rem; font-weight: 700; padding: 2px 8px;
}
.pay-round-right { display: flex; align-items: center; gap: 10px; }
.pay-progress { font-size: .8rem; color: var(--muted); }
.pay-chevron { color: var(--muted); font-size: .75rem; transition: transform .2s; }
.pay-round-body { border-top: 1px solid var(--border); }
.payments-list { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.payment-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
}
.payment-user { display: flex; align-items: center; gap: 10px; }
.payment-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.payment-name { font-weight: 600; font-size: .88rem; }
.payment-toggle {
  padding: 5px 14px; border-radius: 8px; font-size: .8rem; font-weight: 700;
  border: none; cursor: pointer; transition: all .15s;
}
.payment-toggle.paid   { background: rgba(76,201,140,.18); color: var(--green); border: 1px solid var(--green); }
.payment-toggle.unpaid { background: var(--bg2); color: var(--muted); border: 1px solid var(--border2); }
.payment-toggle:hover  { opacity: .8; }

.payment-avatar.avatar-paid {
  background: linear-gradient(135deg, var(--green), #16a34a);
  box-shadow: 0 0 0 2px rgba(76,201,140,.35);
}
.payment-amount-wrap {
  display: flex; align-items: center; gap: 4px;
}
.pay-euro {
  font-size: .9rem; font-weight: 700; color: var(--muted);
}
.pay-amount-input {
  width: 72px; padding: 5px 8px; border-radius: 8px; text-align: right;
  background: var(--bg2); border: 1px solid var(--border2);
  color: var(--fg); font-size: .88rem; font-weight: 700;
  -moz-appearance: textfield;
}
.pay-amount-input::-webkit-outer-spin-button,
.pay-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pay-amount-input:focus {
  outline: none; border-color: var(--green);
  background: rgba(76,201,140,.06);
}
.pay-amount-input:disabled { opacity: .45; cursor: not-allowed; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .matches-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .topbar { display: flex; }
  .main-content { margin-left: 0; padding-top: 56px; }
  .pot-hero { padding: 20px 18px; }
  .pot-hero-inner { gap: 20px; }
  .pot-amount { font-size: 1.6rem; }
  .tab-header { padding: 20px 18px 0; }
  .tab-title { font-size: 1.3rem; }
  .matches-list, .submit-bar { padding-left: 18px; padding-right: 18px; }
  .submitted-section { padding-left: 18px; padding-right: 18px; }
  .leaderboard-wrap, .history-list { padding-left: 18px; padding-right: 18px; }
  .alert { margin-left: 18px; margin-right: 18px; }
  .admin-grid { grid-template-columns: 1fr; padding-left: 18px; padding-right: 18px; }
  .admin-card.full-width { grid-column: 1; }
  .podium { padding: 12px 0 0; }
}

/* ── Leagues ─────────────────────────────────────────────────────────────── */
.leagues-content { display: flex; flex-direction: column; gap: 0; }

.league-actions {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.league-actions .btn { flex: 1; min-width: 160px; }

.leagues-list { display: flex; flex-direction: column; gap: 16px; }

.league-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.league-card:hover { border-color: var(--border2); }

.league-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px;
}
.league-card-title  { font-size: 1.05rem; font-weight: 800; }
.league-member-count {
  font-size: .75rem; font-weight: 700; color: var(--muted);
  background: var(--bg3); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 20px;
}

.league-code-row {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px 12px;
}
.league-code-label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.league-code {
  font-family: monospace; font-size: 1rem; font-weight: 800;
  letter-spacing: .15em; color: var(--green);
  background: rgba(76,201,140,.1); border: 1px solid rgba(76,201,140,.25);
  padding: 3px 10px; border-radius: 8px;
}
.btn-copy {
  background: none; border: none; cursor: pointer; font-size: .95rem;
  opacity: .6; transition: opacity .15s; padding: 2px 4px;
}
.btn-copy:hover { opacity: 1; }

.lm-list {
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px 12px 12px;
}
.lm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 10px;
  transition: background var(--transition);
}
.lm-row:hover    { background: var(--bg3); }
.lm-row-me       { background: rgba(76,201,140,.07); }
.lm-row-me:hover { background: rgba(76,201,140,.12); }
.lm-rank  { font-size: .95rem; min-width: 28px; text-align: center; flex-shrink: 0; }
.lm-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.lm-name  { flex: 1; font-weight: 600; font-size: .88rem; }
.lm-you   { font-size: .75rem; color: var(--green); font-weight: 500; }
.lm-pts   { font-size: .85rem; font-weight: 800; color: var(--green); flex-shrink: 0; }

/* Leaderboard league title */
.lb-group-title {
  text-align: center; font-size: 1rem; font-weight: 800;
  color: var(--yellow); padding: 12px 0 4px; letter-spacing: .02em;
}

.league-card-footer {
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  display: flex; justify-content: flex-end;
}

/* ── Group bar (predictions tab) ─────────────────────────────────── */
/* Kouponaki brand */
.brand-word {
  font-weight: 800; font-style: italic; letter-spacing: -.02em;
  color: #fff; font-size: 1.3rem;
}
.brand-dot { color: #28be69; }
.brand-mark { display: block; }

/* Auth: Google button + divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 0 10px; color: var(--muted); font-size: .78rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.btn.google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #1f1f1f; font-weight: 700;
  border: 1px solid var(--border);
}
.btn.google:hover { background: #f1f3f4; }

/* Admin oversight badge on league cards */
.league-admin-badge {
  font-size: .66rem; font-weight: 700; vertical-align: middle;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px;
  background: rgba(72,149,239,.15); color: #4895ef;
  border: 1px solid rgba(72,149,239,.4);
}

/* Per-league prize pot banner (Predictions tab) */
.league-pot-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 20px 12px; padding: 12px 16px;
  background: linear-gradient(90deg, rgba(240,192,64,.14), rgba(240,192,64,.04));
  border: 1px solid rgba(240,192,64,.35); border-radius: 12px;
}
.league-pot-banner.hidden { display: none; }
.lpb-icon { font-size: 1.3rem; }
.lpb-label { font-size: .92rem; color: var(--text); }
.lpb-amount {
  margin-left: auto; font-size: 1.5rem; font-weight: 800;
  color: var(--gold, #f0c040); letter-spacing: .01em;
}
.lpb-detail { font-size: .78rem; color: var(--muted); flex-basis: 100%; text-align: right; }

.group-bar { padding: 0 20px 8px; }
.group-bar-inner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--bg2);
  border-radius: 12px; border: 1px solid var(--border);
}
.group-bar-label {
  font-size: .78rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0;
}
.group-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.group-chip {
  padding: 5px 14px; border-radius: 20px; font-size: .82rem; font-weight: 700;
  border: 1.5px solid var(--border); background: transparent; color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.group-chip:hover  { border-color: var(--blue); color: var(--blue); }
.group-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.group-bar-empty {
  padding: 12px 16px; background: rgba(240,196,64,.08);
  border: 1px solid rgba(240,196,64,.25); border-radius: 12px;
  font-size: .85rem; color: var(--text); line-height: 1.5;
}

/* ── League row — expandable per-round breakdown ─────────────────── */
.lm-row { flex-direction: column; align-items: stretch; }
.lm-row-main {
  display: flex; align-items: center; gap: 10px;
}
.lm-row-main .lb-expand-btn {
  margin-left: auto; flex-shrink: 0;
}

/* League settings (creator only) */
.league-settings {
  padding: 12px 14px 4px;
  border-top: 1px solid var(--border);
}
.league-settings-label {
  font-size: .78rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px;
}
.league-pm-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.league-pm-select {
  flex: 1; min-width: 140px; padding: 6px 10px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--bg3);
  color: var(--text); font-size: .85rem;
}
.league-pm-current {
  font-size: .8rem; color: var(--muted); margin-top: 6px;
}
.league-pm-info {
  padding: 8px 14px; font-size: .82rem; color: var(--muted);
  border-top: 1px solid var(--border);
}
.pay-group-bar { margin-bottom: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   MODERN REDESIGN v2 — glassmorphism + Revolut-style mobile navigation
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --green:        #28be69;
  --green-bright: #3ee584;
  --bg:           #070a12;
  --bg2:          #0e1422;
  --bg3:          #161e30;
  --bg4:          #1f2940;
  --glass:        rgba(20, 27, 44, .6);
  --border:       rgba(255,255,255,.08);
  --border2:      rgba(255,255,255,.14);
  --radius:       18px;
}

/* ambient background glow (app screen) */
#app-screen {
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(40,190,105,.09), transparent 60%),
    radial-gradient(700px 420px at -10% 30%, rgba(139,92,246,.06), transparent 60%),
    var(--bg);
}
.main-content { background: transparent; }

/* glass cards everywhere */
.match-card, .lb-row, .history-round, .league-card, .admin-card,
.pay-round, .ap-wrap, .group-bar-inner, .st-table {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
}
.match-card:hover, .league-card:hover, .lb-row:hover {
  border-color: rgba(40,190,105,.35);
  box-shadow: 0 16px 44px rgba(0,0,0,.5), 0 0 32px rgba(40,190,105,.07);
}

/* primary buttons: brighter gradient + glow */
.btn.primary {
  background: linear-gradient(135deg, var(--green-bright), var(--green-mid));
  color: #04130a;
  box-shadow: 0 6px 24px rgba(40,190,105,.35), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn.primary:hover { box-shadow: 0 10px 34px rgba(40,190,105,.5), inset 0 1px 0 rgba(255,255,255,.3); }

/* sidebar: glass + active pill with left indicator */
.sidebar {
  background: rgba(10, 15, 26, .8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-item { border-radius: 14px; position: relative; }
.sidebar .nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 22%; bottom: 22%;
  width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--green-bright), var(--green));
  box-shadow: 0 0 12px rgba(40,190,105,.6);
}

/* topbar: glass */
.topbar {
  background: rgba(7,10,18,.75);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

/* pot hero: floating glass card */
.pot-hero {
  margin: 18px 36px 0;
  border: 1px solid rgba(40,190,105,.25);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(40,190,105,.14), rgba(56,200,232,.05) 70%);
  box-shadow: 0 12px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 22px 28px;
}
.pot-round {
  background: linear-gradient(95deg, #fff, var(--green-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* league pot banner: gold glass */
.league-pot-banner {
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.3), 0 0 28px rgba(240,192,64,.08);
}

/* group chips: pill style */
.group-chip { border-radius: 999px; padding: 7px 16px; }
.group-chip.active {
  background: linear-gradient(135deg, var(--green-bright), var(--green-mid));
  border-color: transparent; color: #04130a;
  box-shadow: 0 4px 16px rgba(40,190,105,.35);
}
.group-chip:hover { border-color: var(--green); color: var(--green-bright); }

/* prediction buttons: smoother feedback */
.pred-btn.selected {
  background: linear-gradient(180deg, rgba(40,190,105,.22), rgba(40,190,105,.1));
  box-shadow: inset 0 0 0 1.5px rgba(40,190,105,.5);
}

/* ── BOTTOM NAV (Revolut floating pill) ─────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; z-index: 70;
  left: 14px; right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 24, 38, .82);
  backdrop-filter: blur(26px) saturate(1.6);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 7px;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  box-shadow: 0 18px 48px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
}
.bnav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 9px 2px 8px; border: none; background: transparent;
  color: var(--muted); font-family: inherit; cursor: pointer;
  border-radius: 999px; position: relative;
  transition: color .25s, background .3s cubic-bezier(.32,.72,.33,1), transform .25s cubic-bezier(.34,1.56,.64,1);
}
.bnav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 23px; height: 23px; line-height: 1;
  opacity: .72;
  transition: opacity .25s, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.bnav-icon svg { width: 100%; height: 100%; display: block; }
.bnav-label {
  font-size: .6rem; font-weight: 700; letter-spacing: .01em;
  transition: color .25s;
}
.bnav-item.active {
  color: var(--green-bright);
  background: rgba(40,190,105,.16);
  box-shadow: inset 0 0 0 1px rgba(40,190,105,.25), 0 4px 18px rgba(40,190,105,.18);
  transform: translateY(-2px);
}
.bnav-item.active .bnav-icon { opacity: 1; transform: scale(1.1); }
.bnav-item:active { transform: scale(.92); }

/* ── MORE SHEET (bottom sheet) ──────────────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end;
  opacity: 0; transition: opacity .22s ease;
}
.sheet-overlay.open { opacity: 1; }
.more-sheet {
  width: 100%;
  background: rgba(16, 22, 36, .97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--border2);
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.32,.72,.33,1);
  box-shadow: 0 -24px 80px rgba(0,0,0,.6);
}
.sheet-overlay.open .more-sheet { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px; border-radius: 4px;
  background: var(--bg4); margin: 4px auto 14px;
}
.sheet-user {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 12px; border-radius: 16px; cursor: pointer;
  background: var(--bg3); border: 1px solid var(--border);
  transition: background .15s;
}
.sheet-user:active { background: var(--bg4); }
.sheet-user .user-avatar { width: 42px; height: 42px; font-size: 1rem; }
.sheet-user-info { flex: 1; min-width: 0; }
.sheet-user-name { font-weight: 800; font-size: .98rem; }
.sheet-user-sub { font-size: .74rem; color: var(--muted); }
.sheet-divider { height: 1px; background: var(--border); margin: 12px 4px; }
.sheet-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 13px 12px; border: none; border-radius: 14px;
  background: transparent; color: var(--text);
  font-family: inherit; font-size: .94rem; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background .15s;
}
.sheet-item:active { background: var(--bg3); }
.sheet-icon {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--border);
}
.sheet-icon svg { width: 19px; height: 19px; display: block; }
.sheet-chevron { margin-left: auto; color: var(--muted); font-size: 1.1rem; font-weight: 400; }
.sheet-danger { color: var(--red); }
.sheet-danger .sheet-icon { background: rgba(255,77,109,.08); border-color: rgba(255,77,109,.25); }

/* ── MOBILE (Revolut mode) ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* bottom nav replaces hamburger + sidebar */
  .bottom-nav { display: grid; }
  .hamburger, .sidebar, .sidebar-overlay { display: none !important; }
  .topbar { padding: 0 16px; }
  .topbar-logo { justify-content: center; }

  .main-content {
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }
  .pot-hero { margin: 14px 14px 0; padding: 18px 20px; }
  .submit-bar {
    position: sticky;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    padding: 12px 14px;
    background: linear-gradient(180deg, transparent, rgba(7,10,18,.9) 40%);
  }

  /* modals become bottom sheets */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-box {
    width: 100%; max-width: 100%;
    border-radius: 26px 26px 0 0;
    padding: 30px 24px calc(30px + env(safe-area-inset-bottom, 0px));
    animation: sheetUp .3s cubic-bezier(.32,.72,.33,1);
  }
  .tab-header { padding: 18px 14px 0; }
  .matches-list, .submitted-section, .all-picks-section,
  .leaderboard-wrap, .history-list, .standings-wrap,
  .payments-content, .admin-grid { padding-left: 14px; padding-right: 14px; }
  .alert, .league-pot-banner { margin-left: 14px; margin-right: 14px; }
  .group-bar { padding: 0 14px 8px; }
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ── Tab switch transition ──────────────────────────────────────────────── */
.tab.active { animation: tabIn .32s cubic-bezier(.22,.9,.32,1); }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tab.active, .modal-box, .bnav-item, .bnav-icon { animation: none !important; transition: none !important; }
}

/* ── Install banner + notifications quick access ────────────────────────── */
.install-banner {
  display: none;
  align-items: center; gap: 12px;
  margin: 14px 36px 0; padding: 12px 14px;
  background: var(--glass);
  border: 1px solid rgba(40,190,105,.32);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.install-banner:not(.hidden) { display: flex; }
.ib-icon { font-size: 1.5rem; flex-shrink: 0; }
.ib-text { flex: 1; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; min-width: 0; }
.ib-text b { font-size: .85rem; }
.ib-text span { font-size: .72rem; color: var(--muted); }
.ib-close {
  background: none; border: none; color: var(--muted);
  font-size: 1rem; cursor: pointer; padding: 4px 6px; flex-shrink: 0;
}
.ib-close:hover { color: var(--text); }
@media (max-width: 768px) {
  .install-banner { margin: 14px 14px 0; }
  .ib-text span { display: none; }
}

.sidebar-tools { padding: 8px 10px; border-top: 1px solid var(--border); }
.notify-on, .notify-on .notify-label { color: var(--green-bright) !important; }

.ios-steps {
  margin: 16px 0 22px 20px;
  display: flex; flex-direction: column; gap: 12px;
  color: var(--muted); font-size: .92rem; line-height: 1.5;
  text-align: left;
}
.ios-steps b { color: var(--text); }
.ios-share-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(72,149,239,.18); color: var(--blue);
  border: 1px solid rgba(72,149,239,.4);
  font-size: .85rem; font-weight: 700; vertical-align: middle;
}

/* ── Day headers (predictions grouped by date) ──────────────────────────── */
.day-header {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 2px; padding: 0 2px;
}
.day-header:first-child { margin-top: 0; }
.day-label {
  font-size: .8rem; font-weight: 800; color: var(--muted);
  text-transform: capitalize; letter-spacing: .04em;
}
.day-today {
  font-size: .68rem; font-weight: 800; letter-spacing: .05em;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(40,190,105,.16); color: var(--green-bright);
  border: 1px solid rgba(40,190,105,.35);
}
.day-header::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* Per-day lock chips on day headers */
.day-lock {
  font-size: .66rem; font-weight: 800; letter-spacing: .03em;
  padding: 3px 10px; border-radius: 999px; flex-shrink: 0;
  background: rgba(255,77,109,.12); color: var(--red);
  border: 1px solid rgba(255,77,109,.3);
}
.day-lock.open {
  background: rgba(240,192,64,.1); color: var(--accent);
  border-color: rgba(240,192,64,.3);
}

/* ── Floating save button (πάντα ορατό, δεξιά) ─────────────────────────── */
.submit-bar {
  position: fixed !important;
  right: 22px; bottom: 22px; left: auto !important;
  z-index: 65; padding: 0 !important; max-width: none; width: auto;
  background: none !important;
}
.submit-bar .btn.large {
  border-radius: 999px; padding: 15px 26px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 6px 24px rgba(40,190,105,.45);
}
@media (max-width: 768px) {
  .submit-bar {
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .submit-bar .btn.large { padding: 14px 20px; font-size: .92rem; }
}

/* ── Το πράσινο selected να μην κόβεται στις γωνίες της κάρτας ──────────── */
.prediction-row .pred-btn:first-child { border-bottom-left-radius: calc(var(--radius) - 1px); }
.prediction-row .pred-btn:last-child  { border-bottom-right-radius: calc(var(--radius) - 1px); }

/* ── ✕ στα ενημερωτικά alerts ───────────────────────────────────────────── */
.alert { position: relative; }
.alert-close {
  margin-left: auto; flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: .6; font-size: .9rem; padding: 4px 6px;
}
.alert-close:hover { opacity: 1; }

/* ── Compact league cards ───────────────────────────────────────────────── */
.league-card-header { padding: 13px 16px 6px; }
.league-card-title { font-size: .98rem; }
.league-code-row { padding: 0 16px 8px; }
.lm-list { padding: 2px 10px 8px; }
.lm-row-main { padding: 0; }
.lm-row { padding: 5px 8px; }
.league-card-footer { padding: 8px 12px; }
.league-settings { padding: 10px 14px 6px; }
.league-settings-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ls-group {
  flex: 1; min-width: 215px;
  display: flex; align-items: center; gap: 7px;
}
.ls-group label {
  font-size: .7rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.ls-group select {
  flex: 1; min-width: 80px; padding: 6px 8px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--bg3);
  color: var(--text); font-size: .82rem;
}
.ls-group .btn-sm { padding: 6px 11px; }
.league-pm-current { font-size: .75rem; color: var(--muted); margin-top: 6px; }
