/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:           #0d1117;
  --surface:      #161b22;
  --surface2:     #1c2128;
  --border:       #30363d;
  --border-hover: #484f58;
  --primary:      #238636;
  --primary-h:    #2ea043;
  --primary-dim:  #1a6427;
  --danger:       #da3633;
  --warning:      #e3b341;
  --text:         #e6edf3;
  --text-muted:   #8b949e;
  --text-dim:     #6e7681;
  --radius:       8px;
  --radius-sm:    4px;
  --nav-h:        56px;
}

body.light {
  --bg:           #f6f8fa;
  --surface:      #ffffff;
  --surface2:     #eef0f3;
  --border:       #d0d7de;
  --border-hover: #8c959f;
  --primary:      #1a7f37;
  --primary-h:    #157d2f;
  --primary-dim:  #d1f0d9;
  --danger:       #cf222e;
  --warning:      #9a6700;
  --text:         #1f2328;
  --text-muted:   #636c76;
  --text-dim:     #8c959f;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
input { font: inherit; }

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

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface2);
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface); border-color: var(--border-hover); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #da363322; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface2); border-color: var(--border); color: var(--text); }
#theme-toggle { font-size: 18px; padding: 6px 8px; line-height: 1; border: none; background: none; color: var(--text-muted); cursor: pointer; }
#theme-toggle:hover { color: var(--text); }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ── Auth ───────────────────────────────────────────────────────────────── */
#auth-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
}
.auth-logo { font-size: 48px; text-align: center; margin-bottom: 8px; }
.auth-title { font-size: 22px; font-weight: 700; text-align: center; }
.auth-subtitle { color: var(--text-muted); font-size: 14px; text-align: center; margin-bottom: 24px; }

.tab-bar {
  display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; margin-bottom: 20px;
}
.tab {
  flex: 1; padding: 8px; background: transparent; border: none;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.tab.active { background: var(--primary); color: #fff; }
.tab:not(.active):hover { background: var(--surface2); color: var(--text); }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  padding: 10px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
}
.auth-form input:focus { outline: none; border-color: var(--primary); }
.form-error { font-size: 13px; color: var(--danger); min-height: 18px; }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h); display: flex; align-items: center; gap: 16px;
  padding: 0 20px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-brand { font-size: 16px; font-weight: 700; white-space: nowrap; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 6px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  color: var(--text-muted); transition: color .15s, background .15s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface2); }
.nav-user { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.nav-name { font-size: 13px; color: var(--text-muted); }

/* ── Main content ───────────────────────────────────────────────────────── */
#main { padding: 24px 20px; max-width: 1100px; margin: 0 auto; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.page-title { font-size: 20px; font-weight: 700; }

/* ── Filter tabs ─────────────────────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 20px;
  background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.filter-tab:hover { border-color: var(--border-hover); color: var(--text); }
.filter-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Sort toolbar ────────────────────────────────────────────────────────── */
.matches-toolbar { display: flex; align-items: center; margin-bottom: 16px; }
.sort-tabs { display: flex; gap: 4px; }
.sort-tab {
  padding: 5px 14px; border: 1px solid var(--border); border-radius: 20px;
  background: none; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer;
  transition: all .15s;
}
.sort-tab:hover { color: var(--text); border-color: var(--border-hover); }
.sort-tab.active { background: var(--surface); border-color: var(--accent); color: var(--accent); }

/* ── Match grid ──────────────────────────────────────────────────────────── */
.matches-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.matches-separator {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 12px;
}
.matches-separator:first-child { margin-top: 0; }
.sep-line { flex: 1; height: 1px; background: var(--border); }
.sep-label { font-size: 13px; font-weight: 600; color: var(--text-muted); white-space: nowrap; text-transform: capitalize; }
.matches-empty {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: 15px;
}

/* ── Match card ──────────────────────────────────────────────────────────── */
.match-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  transition: border-color .15s, transform .1s;
  display: flex; flex-direction: column; gap: 12px;
}
.match-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.group-chip {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted); background: var(--surface2);
  padding: 2px 8px; border-radius: 10px;
}

.status-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
.badge-open    { background: #1f6321; color: #7ee787; }
.badge-locked  { background: #4a3000; color: var(--warning); }
.badge-done    { background: #1c2128; color: var(--text-muted); border: 1px solid var(--border); }

.card-teams {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.team-side { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 40%; }
.team-side.away { align-items: flex-end; text-align: right; }
.team-flag { font-size: 28px; line-height: 1; }
.flag-img { width: 28px; height: auto; vertical-align: middle; border-radius: 2px; }
.team-name { font-size: 13px; font-weight: 600; }
.vs-divider {
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  background: var(--surface2); padding: 4px 8px; border-radius: 4px;
}
.result-score {
  display: flex; flex-direction: column; align-items: center;
  font-size: 13px; font-weight: 700; color: var(--primary-h); gap: 2px;
}

.card-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }
.card-meta span { display: flex; align-items: center; gap: 5px; }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 10px;
}
.my-bet-chip {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px;
}
.chip-home { background: #1a3a5c; color: #79c0ff; }
.chip-draw { background: #3a2d00; color: var(--warning); }
.chip-away { background: #1f1f5c; color: #b08cff; }
.chip-win  { background: #1f6321; color: #7ee787; }
.chip-loss { background: #3d1c1c; color: #ffa198; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.modal-box {
  position: relative; z-index: 1; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; padding: 24px;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none; color: var(--text-muted);
  font-size: 18px; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--surface2); color: var(--text); }

/* ── Match modal content ─────────────────────────────────────────────────── */
.modal-match-top {
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.modal-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modal-teams {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0;
}
.modal-team { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 38%; }
.modal-team.away { align-items: flex-end; text-align: right; }
.modal-flag { font-size: 40px; }
.modal-team-name { font-size: 16px; font-weight: 700; }
.modal-vs {
  font-size: 14px; font-weight: 700; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.modal-time { font-size: 12px; color: var(--text-muted); }

.modal-result-banner {
  background: var(--surface2); border-radius: var(--radius-sm);
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.result-label { font-size: 13px; font-weight: 700; }
.result-home { color: #79c0ff; }
.result-draw { color: var(--warning); }
.result-away { color: #b08cff; }
.payout-info { font-size: 12px; color: var(--text-muted); }

.lock-notice {
  background: #4a300022; border: 1px solid #e3b34144;
  border-radius: var(--radius-sm); padding: 8px 12px;
  color: var(--warning); font-size: 13px; text-align: center;
}
.already-bet {
  background: #1f632133; border: 1px solid #238636;
  border-radius: var(--radius-sm); padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.already-bet .bet-text { font-size: 14px; font-weight: 600; }

/* ── Prediction buttons ─────────────────────────────────────────────────── */
.bet-section { margin-bottom: 24px; }
.bet-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.pred-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.pred-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; border: 2px solid var(--border);
  border-radius: var(--radius); background: var(--surface2);
  color: var(--text); transition: all .15s;
}
.pred-btn:hover { border-color: var(--border-hover); background: var(--bg); }
.pred-btn.selected { border-color: var(--primary); background: #23863622; }
.pred-code { font-size: 22px; font-weight: 800; }
.pred-desc { font-size: 11px; color: var(--text-muted); text-align: center; line-height: 1.3; }
.pred-btn[data-pred="home"] .pred-code { color: #79c0ff; }
.pred-btn[data-pred="draw"] .pred-code { color: var(--warning); }
.pred-btn[data-pred="away"] .pred-code { color: #b08cff; }

.place-bet-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.stake-note { font-size: 13px; color: var(--text-muted); }
.bet-error { font-size: 13px; color: var(--danger); }

/* ── Bets list in modal ──────────────────────────────────────────────────── */
.bets-hidden-notice {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px;
  font-size: 14px; color: var(--text);
}
.bets-hidden-notice p {
  margin: 6px 0 0; font-size: 13px; color: var(--text-muted);
}
.bets-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.bets-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bets-table th {
  text-align: left; padding: 6px 10px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); font-weight: 500;
}
.bets-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.bets-table tr:last-child td { border-bottom: none; }
.bets-table tr.won td { background: #1f63210d; }
.bets-table tr.lost td { background: #da36330d; }
.win-marker  { color: #7ee787; font-weight: 700; }
.loss-marker { color: #ffa198; }

/* ── Profile / My bets ───────────────────────────────────────────────────── */
.profile-stats {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px;
}
.stat-card {
  flex: 1; min-width: 90px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 12px; text-align: center;
}
.stat-val { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-lbl { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-win  { border-color: #238636; }
.stat-win .stat-val  { color: #7ee787; }
.stat-loss { border-color: #da3633; }
.stat-loss .stat-val { color: #ffa198; }
.stat-pending .stat-val { color: var(--warning); }

.profile-section-title {
  font-size: 15px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 24px 0 10px;
}

.profile-bet-list { display: flex; flex-direction: column; gap: 8px; }

.profile-bet-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 14px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  flex-wrap: wrap;
}
.profile-bet-row.won  { border-color: #238636; background: rgba(35,134,54,.08); }
.profile-bet-row.lost { border-color: #da3633; background: rgba(218,54,51,.08); }
.profile-bet-row.pending { border-color: var(--border); }

.profile-bet-match { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-bet-teams { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-bet-meta  { font-size: 12px; color: var(--text-muted); }

.profile-bet-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.profile-bet-pred   { font-size: 13px; color: var(--text-muted); }
.profile-bet-result { font-size: 12px; color: var(--text-muted); }

.outcome-badge {
  font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 20px; white-space: nowrap;
}
.badge-won     { background: rgba(35,134,54,.25); color: #7ee787; }
.badge-lost    { background: rgba(218,54,51,.25);  color: #ffa198; }
.badge-pending { background: rgba(210,153,34,.2);  color: var(--warning); }

.profile-empty {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted); font-size: 15px; line-height: 1.6;
}
.profile-empty a { color: var(--accent); }

.nav-name { cursor: pointer; }
.nav-name:hover { color: var(--accent); text-decoration: none; }

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.leaderboard { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
}
.lb-rank { font-size: 18px; font-weight: 800; width: 32px; text-align: center; }
.lb-rank-1 { color: #ffd700; }
.lb-rank-2 { color: #c0c0c0; }
.lb-rank-3 { color: #cd7f32; }
.lb-name { flex: 1; font-size: 15px; font-weight: 600; }
.lb-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lb-net { font-size: 16px; font-weight: 700; }
.lb-net.positive { color: #7ee787; }
.lb-net.negative { color: #ffa198; }
.lb-net.zero { color: var(--text-muted); }
.lb-details { font-size: 12px; color: var(--text-muted); }
.lb-empty { text-align: center; padding: 60px; color: var(--text-muted); }

/* ── Gruppestillinger ────────────────────────────────────────────────────── */
.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.standings-group { background: var(--surface); border-radius: 12px; padding: 16px; }
.standings-group-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings-table th { color: var(--text-muted); font-weight: 600; font-size: 12px; text-align: center; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.standings-table th:nth-child(2) { text-align: left; }
.standings-table td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--border); }
.standings-table td:nth-child(2) { text-align: left; }
.standings-table tr:last-child td { border-bottom: none; }
.standings-pos { color: var(--text-muted); font-size: 12px; width: 20px; }
.standings-team { white-space: nowrap; }
.standings-pts { font-size: 15px; }

/* ── Admin panel ─────────────────────────────────────────────────────────── */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.admin-tab-btn {
  background: none; border: none; padding: 10px 20px; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .15s;
}
.admin-tab-btn:hover { color: var(--text); }
.admin-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-tab-content { display: flex; flex-direction: column; gap: 24px; }
.admin-tab-content.hidden { display: none; }
.admin-sections { display: flex; flex-direction: column; gap: 32px; }
.admin-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.admin-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

.match-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-form .full { grid-column: 1 / -1; }
.match-form input, .match-form select {
  padding: 9px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px; width: 100%;
}
.match-form input:focus, .match-form select:focus { outline: none; border-color: var(--primary); }
.form-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: block; }

.admin-edit-form { width: 100%; }
.admin-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.admin-edit-grid .full { grid-column: 1 / -1; }
.admin-edit-grid input {
  width: 100%; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 13px; box-sizing: border-box;
}
.admin-edit-grid input:focus { outline: none; border-color: var(--primary); }
.admin-edit-grid select {
  width: 100%; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 13px; box-sizing: border-box;
}
.match-form select {
  padding: 9px 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 14px; width: 100%;
}
.admin-edit-actions { display: flex; gap: 8px; }
.admin-matches { display: flex; flex-direction: column; gap: 8px; }
.admin-match-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.admin-match-info { flex: 1; min-width: 0; }
.admin-match-title { font-size: 14px; font-weight: 600; }
.admin-match-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.admin-match-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-result-form { display: flex; gap: 6px; align-items: center; }
.admin-result-form select {
  padding: 5px 8px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 13px;
}
.result-chip {
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 10px;
}
.result-chip.home { background: #1a3a5c; color: #79c0ff; }
.result-chip.draw { background: #3a2d00; color: var(--warning); }
.result-chip.away { background: #1f1f5c; color: #b08cff; }

.users-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.users-table th { text-align: left; padding: 8px 12px; color: var(--text-muted); border-bottom: 1px solid var(--border); font-weight: 500; }
.users-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.users-table tr:last-child td { border-bottom: none; }
.admin-badge { font-size: 11px; background: var(--primary-dim); color: #7ee787; padding: 2px 6px; border-radius: 4px; }

.admin-user-list { display: flex; flex-direction: column; gap: 10px; }
.admin-user-row {
  padding: 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; display: flex; flex-direction: column; gap: 10px;
}
.admin-user-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-user-name { font-size: 14px; font-weight: 600; }
.admin-user-date { font-size: 12px; color: var(--text-muted); }
.admin-user-bets-list { display: flex; flex-direction: column; gap: 4px; }
.admin-user-bet-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; padding: 5px 8px; background: var(--surface); border-radius: 6px;
}
.admin-user-bet-match { flex: 1; min-width: 180px; }
.admin-user-bet-pred {
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
  background: var(--primary-dim); color: var(--text);
}
.admin-user-bet-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.admin-user-no-bets { font-size: 12px; color: var(--text-muted); padding: 4px 0; margin: 0; }

/* ── Loading / Spinner ───────────────────────────────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; padding: 60px; gap: 10px; color: var(--text-muted); }
.spinner {
  width: 20px; height: 20px; border: 2px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 18px;
  font-size: 14px; z-index: 999; box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: opacity .3s;
}
#toast.success { border-color: var(--primary); color: #7ee787; }
#toast.error   { border-color: var(--danger); color: #ffa198; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .navbar { gap: 8px; padding: 0 12px; }
  .nav-name { display: none; }
  #main { padding: 16px 12px; }
  .matches-grid-row { grid-template-columns: 1fr; }
  .modal-box { padding: 16px; }
  .pred-buttons { gap: 6px; }
  .match-form { grid-template-columns: 1fr; }
  .match-form .full { grid-column: 1; }
}
