/* ── Variables & Theme ─────────────────────────────── */
:root {
  /* Dark sports theme — single permanent palette */
  --bg: #0c1220;
  --surface: #111827;
  --surface-alt: #1a2540;
  --bg-secondary: #1a2540;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.14);

  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: rgba(59,130,246,0.12);

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #22c55e;
  --success-light: rgba(34,197,94,0.12);
  --warning: #f59e0b;
  --warning-light: rgba(245,158,11,0.12);
  --info: #38bdf8;

  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;

  --shadow: 0 2px 8px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.6);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: .2s ease;

  --glass-bg: rgba(15,23,42,0.88);
  --glass-border: rgba(255,255,255,0.09);
  --glass-shadow: 0 4px 24px rgba(0,0,0,.5);
  --overlay-opacity: rgba(12,18,32,0.5);

  --card-bg: #1a2540;
}
/* Single dark theme — light/dark toggles are no-ops */
[data-theme="light"], [data-theme="dark"] { /* inherits :root */ }

/* ── Reset ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--text); line-height: 1.5; min-height: 100vh;
  background-color: #0c1220;
  background-image:
    radial-gradient(ellipse 800px 700px at -200px -150px, rgba(59,130,246,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 600px 550px at calc(100% + 200px) calc(100% + 100px), rgba(139,92,246,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 400px 350px at 70% 20%, rgba(6,182,212,0.05) 0%, transparent 60%),
    radial-gradient(circle, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: cover, cover, cover, 36px 36px;
  background-attachment: fixed;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ── Navbar ──────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 16, 30, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(59,130,246,0.22);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; height: 52px;
  box-shadow: 0 2px 32px rgba(0,0,0,.7), 0 1px 0 rgba(59,130,246,0.15);
}
.nav-brand { font-weight: 800; font-size: 16px; color: #60a5fa; white-space: nowrap; letter-spacing: .3px; }
.nav-brand span { font-weight: 400; color: var(--text-muted); font-size: 13px; margin-left: 4px; }
.nav-links { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav-links a {
  padding: 6px 12px; border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: var(--transition);
}
.nav-links a:hover { background: rgba(59,130,246,0.08); color: #93c5fd; text-decoration: none; }
.nav-links a.active { background: rgba(59,130,246,0.15); color: #3b82f6; text-decoration: none; box-shadow: inset 0 0 0 1px rgba(59,130,246,0.2); }
.nav-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-right select { padding: 4px 8px; border: 1px solid var(--glass-border); border-radius: var(--radius-sm); background: rgba(255,255,255,0.06); color: var(--text); font-size: 12px; }
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(59,130,246,0.35); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); cursor: pointer;
  font-size: 13px; font-weight: 500; transition: var(--transition); white-space: nowrap;
}
.btn:hover { background: var(--surface-alt); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 10px rgba(59,130,246,0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 4px 20px rgba(59,130,246,0.45);
  transform: translateY(-1px);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 0 16px rgba(59,130,246,0.35); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
/* contrast: dark text on the bright green/amber fills (white was ~1.8:1 — unreadable). */
.btn-success { background: var(--success); color: #05230f; border-color: var(--success); font-weight: 600; }
.btn-warning { background: var(--warning); color: #3a2600; border-color: var(--warning); font-weight: 600; }
.btn-secondary { background: var(--surface-alt); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
/* AUDIT — .btn-xs was used ~53× with NO rule (size faked by inline font-size). Give it a real size. */
.btn-xs { padding: 3px 8px; font-size: 11px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 6px; min-width: 32px; justify-content: center; }
/* Mobile: grow the dense money/attendance micro-buttons to a ~44px tap target on phones. min-width added
   alongside the pre-existing min-height — icon-only buttons (edit/delete/play pencils) were still only ~25-34px
   WIDE even after this rule's height boost, and .btn-icon was missing from the list entirely (its own base
   min-width:32px doesn't scale up on mobile like .btn-xs/.btn-sm now do). */
@media (max-width: 768px) {
  .btn-xs, .btn-sm, .btn-icon { min-height: 36px; min-width: 36px; }
}
/* Convocation presence board: stack players/coaches columns in portrait instead of crushing to 2 cols. */
.conv-people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-alt); }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Cards ───────────────────────────────────────── */
.card {
  position: relative;
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,0.04);
  margin-bottom: 16px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.35), rgba(139,92,246,0.25), transparent);
  border-radius: 999px;
  pointer-events: none;
}
.card:hover {
  border-color: rgba(59,130,246,0.22);
  box-shadow: 0 8px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(59,130,246,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-title { font-size: 16px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 13px; color: var(--text-secondary); }

/* ── Forms ───────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
/* Booking modals: the grid `gap` already spaces rows; drop the redundant per-field bottom margin. */
.bk-grid .form-group { margin-bottom: 0; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text-secondary); }
/* .input is used ~179x app-wide (incl. every league form) but had NO rule → native light controls on the dark
   theme. Alias it onto the themed form-control styling so all those inputs/selects match the app. */
.form-input, .form-select, .form-textarea, .input {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  transition: var(--transition);
  font-size: 14px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus, .input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.form-inline { display: flex; gap: 8px; align-items: end; }
.form-inline .form-group { margin-bottom: 0; flex: 1; }

/* ── Tables ──────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
th { font-weight: 700; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; background: rgba(255,255,255,0.025); }
tr:hover td { background: rgba(59,130,246,0.07); transition: background .12s; }
td.center, th.center { text-align: center; }

/* ── Tags / Badges ───────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
}
.badge-draft { background: rgba(255,255,255,0.07); color: var(--text-secondary); }
.badge-active { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-completed { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-live { background: rgba(239,68,68,0.2); color: #f87171; animation: pulse 1.5s infinite; }
.badge-info { background: rgba(56,189,248,0.15); color: #7dd3fc; }
.badge-scheduled { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-finished { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.badge-pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-approved { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-declined { background: rgba(239,68,68,0.15); color: #f87171; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .7; } }

/* Color dot */
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }

/* ── Layout ──────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 16px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-title {
  font-size: 22px; font-weight: 800;
  background: linear-gradient(135deg, #f1f5f9 30%, #93c5fd 80%, #c4b5fd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
/* REMOVED: dead .grid-4 (repeat(auto-fill,minmax(220px,1fr))) — never paired with .grid in any markup (grep
   confirms zero `class="grid grid-4"` usages), so it never applied. The live .grid-4 (standalone, own
   display:grid + responsive breakpoints, used by the paginated Leagues list) is further down this file. */
.flex { display: flex; gap: 8px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; } .gap-16 { gap: 16px; }

/* ── Tabs ────────────────────────────────────────── */
.tabs {
  display: flex; gap: 3px; padding: 5px;
  background: var(--bg-secondary); border-radius: 14px;
  border-bottom: none; margin-bottom: 20px; overflow-x: auto;
  width: fit-content; max-width: 100%;
}
.tab, .tab-btn {
  padding: 7px 20px; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); border-radius: 10px; border: none;
  background: transparent; transition: var(--transition); white-space: nowrap;
  margin-bottom: 0;
}
.tab:hover, .tab-btn:hover { background: var(--surface); color: var(--text); }
.tab.active, .tab-btn.active {
  background: var(--surface); color: var(--primary); font-weight: 600;
  box-shadow: 0 1px 5px rgba(0,0,0,.10);
}

/* ── Tournament Card ─────────────────────────────── */
.tournament-card {
  position: relative; overflow: hidden;
  background: rgba(17, 24, 39, 0.80); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius-lg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 16px; cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
  display: flex; flex-direction: column; gap: 8px;
}
.tournament-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0; transition: opacity .22s;
}
.tournament-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59,130,246,0.35);
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(59,130,246,0.15), 0 0 40px rgba(59,130,246,0.1);
}
.tournament-card:hover::before { opacity: 1; }
.tournament-card .tc-name { font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.tournament-card .tc-name .sport-glyph { width: 1.55em; height: 1.55em; vertical-align: middle; }
.tournament-card .tc-meta { font-size: 13px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 8px; }
.tournament-card .tc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.tournament-card .tc-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }

/* ── Match Card ──────────────────────────────────── */
.match-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  transition: var(--transition); font-size: 13px;
}
.match-card:hover { box-shadow: var(--shadow); }
.match-card .mc-teams { flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center; }
.match-card .mc-team { font-weight: 600; min-width: 100px; }
.match-card .mc-team.home { text-align: right; }
.match-card .mc-team.away { text-align: left; }
.match-card .mc-score {
  background: rgba(255,255,255,0.06); border-radius: var(--radius-sm);
  padding: 4px 12px; font-weight: 700; font-size: 16px; min-width: 60px; text-align: center;
  border: 1px solid var(--border);
}
.match-card .mc-score.live { background: rgba(239,68,68,0.25); color: #f87171; border-color: rgba(239,68,68,0.4); }
.match-card .mc-info { font-size: 11px; color: var(--text-muted); text-align: right; min-width: 80px; }
.match-card .mc-phase { font-size: 11px; color: var(--text-muted); min-width: 60px; }
.match-card .mc-actions { display: flex; gap: 4px; }
.match-card .mc-team.winner { font-weight: 800; }
/* Public program cards reuse the editor .match-card look; wrap so the feed-links row drops to its own line */
.match-card.pub-mc { flex-wrap: wrap; cursor: default; padding: 14px 18px; }
.match-card.pub-mc.walkover { opacity: .92; }
.match-card.pub-mc .mc-score .wk-score { font-size: 16px; }
/* Public program: bigger, higher-contrast text — team names, score, and the date/time/venue + phase meta which
   were too faint (--text-muted) and small (11px) to read on the dark background. */
.match-card.pub-mc .mc-team { font-size: 15px; font-weight: 700; color: var(--text); }
.match-card.pub-mc .mc-score { font-size: 18px; }
.match-card.pub-mc .mc-info { font-size: 13px; color: var(--text-secondary); gap: 3px; }
.match-card.pub-mc .mc-info > span { color: var(--text); }
.match-card.pub-mc .mc-phase { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }

/* ── Standings Table ─────────────────────────────── */
.standings-table th { font-size: 10px; padding: 6px 8px; }
.standings-table td { padding: 6px 8px; font-size: 13px; }
.standings-table .team-cell { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.standings-table tr.advance { background: var(--success-light); }

/* ── Bracket ─────────────────────────────────────── */
.bracket { display: flex; gap: 32px; overflow-x: auto; padding: 16px 0; align-items: flex-start; }
.bracket-round { display: flex; flex-direction: column; gap: 16px; min-width: 200px; }
.bracket-round-title { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); text-align: center; margin-bottom: 8px; }
.bracket-match {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; font-size: 13px;
}
.bracket-match .bm-team {
  display: flex; justify-content: space-between; padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.bracket-match .bm-team:last-child { border-bottom: none; }
.bracket-match .bm-team.winner { background: var(--success-light); font-weight: 600; }
.bracket-match .bm-team .bm-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bracket-match .bm-team .bm-score { font-weight: 700; min-width: 20px; text-align: right; }

/* ── Wizard ──────────────────────────────────────── */
.wizard-steps {
  display: flex; gap: 0; margin-bottom: 12px; border-bottom: 2px solid var(--border);
}
.wizard-step {
  flex: 1; padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 500;
  color: var(--text-muted); position: relative; cursor: default;
}
.wizard-step.active { color: var(--primary); }
.wizard-step.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--primary);
}
.wizard-step.done { color: var(--success); }
.wizard-step .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--border); color: var(--text-muted);
  font-size: 12px; font-weight: 600; margin-bottom: 4px;
}
.wizard-step.active .step-num { background: var(--primary); color: #fff; }
.wizard-step.done .step-num { background: var(--success); color: #fff; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 12px; }

/* ── Login / Splash ──────────────────────────────── */
.login-page {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden; background: #0a193c;
}
#login-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.login-google-btn {
  position: absolute; top: 20px; right: 20px; z-index: 10;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.95); color: #333; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: var(--transition); text-decoration: none;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.login-google-btn:hover { box-shadow: 0 4px 20px rgba(0,0,0,.5); transform: translateY(-1px); text-decoration: none; }
.login-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; z-index: 5; pointer-events: none;
}
.login-title {
  font-size: 48px; font-weight: 700; color: #fff;
  text-shadow: 0 2px 20px rgba(26,115,232,.5); margin-bottom: 12px;
}
.login-sub {
  font-size: 18px; color: rgba(255,255,255,.7); margin-bottom: 16px; font-weight: 500;
}
.login-desc {
  font-size: 14px; color: rgba(255,255,255,.4); max-width: 480px; line-height: 1.6;
}
@media (max-width: 768px) {
  .login-title { font-size: 28px; }
  .login-sub { font-size: 14px; }
  .login-desc { font-size: 12px; }
}

/* ── Stats Cards ─────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(17,24,39,0.9) 0%, rgba(26,37,64,0.85) 100%);
  border: 1px solid rgba(59,130,246,0.14);
  border-radius: var(--radius); padding: 16px; text-align: center;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
  cursor: default;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  opacity: 0.8;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59,130,246,0.32);
  box-shadow: 0 12px 40px rgba(59,130,246,0.12), 0 0 0 1px rgba(59,130,246,0.1);
}
.stat-card .stat-value {
  font-size: 28px; font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-card .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ── Messages ────────────────────────────────────── */
.message-item {
  display: flex; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.message-item:last-child { border-bottom: none; }
.message-type {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
}
.message-type.system { background: var(--text-muted); }
.message-type.info { background: var(--info); }
.message-type.update { background: var(--warning); }
.message-type.result { background: var(--success); }
.message-type.warning { background: var(--danger); }
.message-type.request { background: var(--primary); }
.message-content { flex: 1; }
.message-meta { font-size: 11px; color: var(--text-muted); }

/* League broadcast messages (renderLeagueMessages) — distinct markup/classes from .message-item above
   (that one is the legacy tournament message list with an 8px dot; this is a card-per-message layout). */
.messages-list { display: flex; flex-direction: column; gap: 8px; }
.message { padding: 10px 12px; border-radius: 8px; background: var(--bg-secondary); border-left: 3px solid var(--text-muted); font-size: 13px; }
.message-info { border-left-color: var(--info); }
.message-update { border-left-color: var(--warning); }
.message-result { border-left-color: var(--success); }
.message-warning { border-left-color: var(--danger); }
.msg-header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; font-size: 12px; }
.msg-type { color: var(--text-secondary); }
.msg-time { margin-left: auto; color: var(--text-muted); }
/* flex-basis lives in a class, not inline on the element — an inline style always wins over a stylesheet
   rule regardless of media query (the same trap .lg-pub-scrollrow above had to avoid), so the mobile
   full-row override below could never take effect if this were set via style="" on the input. */
.lg-msg-input { flex: 1 1 200px; min-width: 150px; }
@media (max-width: 480px) {
  /* No flex-basis hint on the compose row (input/type-select/Send) crushes the text input to ~120px even
     mid-draft on narrow phones. Give the input its own row, type+Send share the one below. */
  .lg-msg-input { flex-basis: 100%; }
}

/* ── Map ─────────────────────────────────────────── */
.map-container { height: 300px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-bottom: 12px; }
.map-container .leaflet-container { height: 100%; width: 100%; }

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  /* Same z-index as .modal-backdrop so the two modal systems stack by DOM order (last opened on
     top) — a showModal opened over a modal() no longer hides behind it. */
  background: rgba(0,0,0,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 18px; font-weight: 600; }

/* ── Toast ───────────────────────────────────────── */
.toast-container {
  /* Above the modal layer (1000) so validation toasts fired from an open form modal are visible;
     still below the cookie banner (8000). */
  position: fixed; top: 60px; right: 16px; z-index: 1100;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 10px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: slideIn .3s ease;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid #f59e0b; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Base (desktop) shape for the entity detail-panel header's badges+buttons group — declared BEFORE the
   responsive block below so its mobile override (same selector, same specificity) wins there by source
   order. Placing it after the media query instead is the exact cascade-order trap called out elsewhere in
   this file: a later unconditional rule beats an earlier media-query rule of equal specificity. */
.dp-hdr-actions { flex-shrink: 0; flex-wrap: wrap; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 0 8px; gap: 6px; }
  .nav-brand span { display: none; }
  .nav-links a { padding: 6px 8px; font-size: 12px; }
  .container { padding: 8px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .match-card { flex-wrap: wrap; }
  .match-card .mc-info { text-align: left; min-width: auto; }
  .wizard-step { font-size: 10px; padding: 8px 4px; }
  .bracket { gap: 16px; }
  .bracket-round { min-width: 160px; }
  /* Section master-detail (#/tournament/:id/sections): fixed 280px list column next to a flex:1 detail panel,
     with no breakpoint at all — on a 375px phone the detail panel (its own tab bar + standings + match list)
     was squeezed into ~63px. Stack list above detail instead. */
  .sections-master-detail { flex-direction: column; }
  .sections-list-col { width: 100% !important; min-width: 0 !important; }
  .sections-detail-col { border-left: none !important; padding-left: 0 !important; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
  /* Entity detail-panel headers (Coaches/Players/Groups): name flex:1 next to a badges+action-buttons group.
     The group refuses to shrink below its content width, so on Players (badge + price pill + 5 buttons) it
     blows out the whole page instead of wrapping; on Coaches it instead crushes the name into a letter-wrap.
     Push the whole group onto its own full-width row below the name, same language as .pt-desc-header. */
  .dp-hdr-actions { flex-basis: 100%; flex-shrink: 1; min-width: 0; }
  /* Group "Squad" tab: Jucatori/Antrenori side-by-side grid — 1fr columns don't shrink below content's
     min-content width, so the squad table alone forces the panel wider than the viewport. Stack on mobile. */
  .gd-lot-grid { grid-template-columns: 1fr !important; }
  /* Match-live Line-ups/Events tabs: two-team side-by-side grid — same overflow shape as .gd-lot-grid. */
  .mls-2col-grid { grid-template-columns: 1fr !important; }
}

/* ── Utility ─────────────────────────────────────── */
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor-pointer { cursor: pointer; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  border-radius: 12px; background: var(--surface-alt); border: 1px solid var(--border);
  font-size: 12px;
}

/* ── Team & League visuals ─────────────────────────── */
.team-logo { width: 32px; height: 32px; vertical-align: middle; display: inline-block; object-fit: contain; }
.team-logo-fallback {
  border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.team-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; cursor: pointer; transition: transform .15s, box-shadow .15s; text-align: center;
}
.team-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.team-card .team-logo { width: 64px; height: 64px; }
.match-row:hover { background: var(--surface-alt); cursor: pointer; }
.standings-table { width: 100%; }
.standings-table th, .standings-table td { padding: 8px 10px; text-align: center; }
.standings-table td:nth-child(3) { text-align: left; }
.badge-live, .badge-active.badge-live { background: #e53935; color: #fff; animation: pulse 1.5s infinite; }
.badge-walkover { background: #ff9800; color: #3a2600; }
.badge-postponed { background: #9e9e9e; color: #1a1a1a; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ── Modal frumos (modal-first UI) ────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  animation: fadeIn .18s ease-out;
}
.modal-shell {
  background: var(--surface); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  width: min(560px, 92vw); max-height: 90vh; overflow: auto;
  animation: slideUp .22s cubic-bezier(.2,.9,.3,1);
}
.modal-shell.modal-wide { width: min(840px, 96vw); }
.modal-shell.modal-xwide { width: min(1080px, 96vw); }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}
.modal-close { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--text-muted); }
.modal-close:hover { color: var(--text); }

/* ── Modal form: label-left, control-right (the wow look) ── */
.mf-grid { display: flex; flex-direction: column; gap: 4px; }
.mf-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--border);
  transition: background 0.15s;
}
.mf-row:hover { background: var(--surface-alt); }
.mf-row:last-child { border-bottom: 0; }
.mf-row-stack { grid-template-columns: 180px 1fr; align-items: start; }

.mf-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  letter-spacing: 0.3px;
}
.mf-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; font-size: 14px;
  background: var(--surface-alt); border-radius: 6px;
  border: 1px solid var(--border);
}
.mf-req { color: #e53935; margin-left: 2px; font-weight: 700; }

.mf-ctrl { display: flex; flex-direction: column; gap: 4px; }
.mf-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mf-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.15);
}
.mf-help { color: var(--text-muted); font-size: 12px; }

/* Toggle switch */
.mf-toggle { position: relative; display: inline-block; width: 46px; height: 24px; cursor: pointer; }
.mf-toggle input { opacity: 0; width: 0; height: 0; }
.mf-toggle-slider {
  position: absolute; inset: 0; background: var(--surface-alt);
  border: 1px solid var(--border); border-radius: 24px;
  transition: 0.2s;
}
.mf-toggle-slider:before {
  content: ""; position: absolute;
  height: 18px; width: 18px;
  left: 2px; top: 2px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: 0.2s;
}
.mf-toggle input:checked + .mf-toggle-slider {
  background: var(--primary); border-color: var(--primary);
}
.mf-toggle input:checked + .mf-toggle-slider:before {
  transform: translateX(22px);
}

@media (max-width: 600px) {
  .mf-row { grid-template-columns: 1fr; gap: 6px; padding: 10px 0; }
  .mf-row-stack { grid-template-columns: 1fr; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Dashboard mari hero cards ────────────── */
.hero-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; padding: 30px 0; max-width: 900px; margin: 0 auto;
}
.hero-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark, #1e5128));
  color: #fff; border-radius: 18px; padding: 36px 24px; text-align: center;
  cursor: pointer; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 6px 24px rgba(0,0,0,0.16); position: relative; overflow: hidden;
}
.hero-card.hc-leagues { background: linear-gradient(135deg, #1565c0, #003c8f); }
.hero-card.hc-tournaments { background: linear-gradient(135deg, #d84315, #8c2200); }
.hero-card.hc-inbox { background: linear-gradient(135deg, #6a1b9a, #38006b); }
.hero-card.hc-discover { background: linear-gradient(135deg, #00695c, #003d33); }
.hero-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.28); }
.hero-card .hc-icon { font-size: 56px; margin-bottom: 12px; opacity: .92; }
.hero-card h2 { margin: 0; font-size: 28px; letter-spacing: 1px; }
.hero-card .hc-meta { margin-top: 8px; font-size: 13px; opacity: .85; }
.hero-card .hc-badge {
  position: absolute; top: 12px; right: 12px;
  background: #fff; color: var(--primary); border-radius: 10px;
  font-size: 12px; font-weight: 700; padding: 4px 10px;
}

/* ── Paginated grid 4x2 ────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid-4 { grid-template-columns: 1fr; } }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 0;
}
.pager .page-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.pager .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager .page-num { font-weight: 600; }

/* ── Splash hero v3 ────────────── */
.splash-hero {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center top, #0d3a78 0%, #061a3a 60%, #000 100%);
  overflow: hidden; color: #fff;
}
.splash-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* DJOOGA — colț stânga-sus, metallic chrome, shimmer */
.splash-brand {
  position: absolute; top: 6vh; left: 6vw; z-index: 3;
  animation: heroIn 1.4s cubic-bezier(.2,.9,.3,1);
  pointer-events: none;
}
.splash-logo {
  font-size: clamp(54px, 9vw, 110px);
  font-weight: 900;
  letter-spacing: 6px;
  margin: 0;
  line-height: 1;
  position: relative;
  /* Metallic chrome */
  background:
    linear-gradient(180deg,
      #ffffff 0%,
      #e8eef8 20%,
      #8aa1c0 45%,
      #2a3d5c 55%,
      #607a9f 75%,
      #f0f4fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.4))
          drop-shadow(0 8px 24px rgba(0,0,0,0.55))
          drop-shadow(0 1px 0 rgba(255,255,255,0.15));
  animation: floatY 5s ease-in-out infinite alternate;
}
/* Shimmer — diagonal moving highlight on top of text */
.splash-logo span {
  position: relative;
  display: inline-block;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}
.splash-logo::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255,255,255,0.85) 48%,
    rgba(255,255,255,1) 50%,
    rgba(255,255,255,0.85) 52%,
    transparent 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  pointer-events: none;
  animation: shimmer 4s ease-in-out infinite;
}
.splash-tagline {
  font-size: clamp(13px, 1.2vw, 17px);
  letter-spacing: 5px;
  margin: 8px 0 0 4px;
  color: #ffd54f;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  opacity: 0.9;
}
@keyframes floatY {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  60% { background-position: -200% 0; }
  100% { background-position: -200% 0; }
}
.login-google-btn-v2 {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #1f1f1f; padding: 12px 28px; border-radius: 26px;
  font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,0.4); text-decoration: none;
  transition: transform .15s;
}
.login-google-btn-v2:hover { transform: translateY(-2px); }

/* ── Google login v3: top-right, splash skin ──────── */
.login-google-btn-v3 {
  position: absolute; top: 24px; right: 28px; z-index: 5;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 22px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
  letter-spacing: .3px;
  border: 1px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all .2s ease;
}
.login-google-btn-v3 svg {
  background: #fff; padding: 5px; border-radius: 50%; box-sizing: content-box;
}
.login-google-btn-v3:hover {
  background: linear-gradient(135deg, #ffd54f, #ff8a00);
  color: #0d2855; border-color: #ffd54f;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(255,180,40,0.45);
}
.login-google-btn-v3:hover svg { background: #fff; }
@media (max-width: 600px) {
  .login-google-btn-v3 { top: 14px; right: 14px; padding: 9px 16px; font-size: 13px; }
  .login-google-btn-v3 span { display: none; }
}
@keyframes heroIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: none; }
}

/* ── Inbox & invites ────────────── */
.inbox-card { padding: 14px 18px; border-left: 4px solid var(--primary); margin-bottom: 12px; background: var(--surface); border-radius: 8px; }
.inbox-card.inv { border-left-color: #1565c0; }
.inbox-card.req { border-left-color: #d84315; }
.inbox-card.dm { border-left-color: #6a1b9a; }

/* ── Compact navbar — discreet brand ─── */
.nav-brand-compact { font-size: 14px; font-weight: 700; opacity: .9; }
.nav-brand-compact .b-tag { color: var(--primary); }

/* ── Club pill in navbar ─── */
.nav-club-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 6px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: var(--transition); white-space: nowrap; max-width: 280px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-club-pill:hover { background: var(--primary); color: #fff; }
.nav-club-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
.nav-club-logo-ph { font-size: 20px; flex-shrink: 0; }
.nav-club-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nav-club-name { overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.nav-club-meta { font-size: 10px; font-weight: 400; opacity: .7; overflow: hidden; text-overflow: ellipsis; }

/* ── Modal form grid (label-left / input-right) ─── */
.modal-form-grid { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; align-items: center; }
.modal-form-grid label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
@media (max-width: 600px) {
  /* Used by ~65 add/edit modals (players, venues, staff, categories, ...) — the fixed 140px label column left
     as little as ~113px for every input/select on a 320px phone. Its sibling .mf-row already gets this same
     stack-to-1-column treatment; this one never did. */
  .modal-form-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .modal-form-grid label { margin-bottom: 2px; }
}

/* ── Progressive disclosure (Add player „Mai multe detalii") ─── */
.ap-more { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 8px; }
.ap-more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-secondary); list-style: none; padding: 6px 0; user-select: none; }
.ap-more > summary::-webkit-details-marker { display: none; }
.ap-more > summary::before { content: '\25B8'; display: inline-block; margin-right: 8px; transition: transform .15s ease; color: var(--text-muted); }
.ap-more[open] > summary::before { transform: rotate(90deg); }
.ap-more > summary:hover { color: var(--text); }

/* ── Row deleted state ─── */
.row-deleted td { color: var(--text-muted) !important; }
.row-deleted td strong { font-weight: 400; }

/* ── Public pages (landing, public tournament/league) ─── */
.pub-loading { text-align: center; padding: 80px 20px; color: var(--text-secondary); font-size: 16px; }
.pub-error { text-align: center; padding: 80px 20px; }
.pub-error h2 { margin-bottom: 12px; }

.pub-landing { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }

/* ─── Public Booking Page ─────────────────────────────── */
.pub-bk-field { margin-bottom: 28px; }
.pub-bk-field-hd { font-size: 15px; font-weight: 700; padding: 8px 0 10px; border-bottom: 2px solid var(--border); margin-bottom: 12px; }
.pub-bk-days { display: flex; flex-wrap: wrap; gap: 12px; }
.pub-bk-day { min-width: 180px; flex: 0 0 auto; }
.pub-bk-day-hd { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.pub-bk-slot { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; background: var(--surface); transition: border-color .15s, background .15s; cursor: pointer; }
.pub-bk-slot:hover { border-color: var(--primary); background: var(--primary-light, rgba(99,102,241,.06)); }
.pub-bk-slot-sel { border-color: var(--primary) !important; background: var(--primary-light, rgba(99,102,241,.1)) !important; box-shadow: 0 0 0 2px var(--primary-light, rgba(99,102,241,.25)); }
.pub-bk-slot-taken { opacity: .4; pointer-events: none; text-decoration: line-through; }
.pub-bk-time { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.pub-bk-notes { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; }
.pub-bk-req-btn { margin-top: 4px; font-size: 11px; padding: 3px 10px; }

/* ─── Pending booking requests panel ─────────────────── */
.pend-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.pend-row:hover { border-color: var(--primary); }

/* ─── Financiar tab ───────────────────────────────────── */
.stat-card .stat-val { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.stat-card .stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 2px; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
.fin-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.fin-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.fin-table tbody tr:hover { background: var(--bg-secondary); }

/* Hero */
.pub-hero { background: linear-gradient(135deg, #0a1628 0%, #1a3460 50%, #0d2040 100%);
  border-radius: 16px; margin: 24px 0 40px; overflow: hidden; }
.pub-hero-inner { padding: 60px 40px; text-align: center; }
.pub-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }
.pub-brand-dot { color: #4da3ff; font-size: 28px; }
.pub-brand-name { font-size: 32px; font-weight: 900; letter-spacing: 4px; text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, #c8d8f0 50%, #7ab3f0 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pub-hero-title { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.pub-hero-sub { font-size: 16px; color: #8ab4d8; margin-bottom: 32px; }
.pub-hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.pub-cta { display: flex; align-items: center; padding: 14px 28px; font-size: 16px; font-weight: 600;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: #fff !important; border-radius: 10px; backdrop-filter: blur(8px); text-decoration: none;
  transition: background .2s, transform .2s; }
.pub-cta:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* Sections */
.pub-section { margin-bottom: 48px; }
.pub-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px;
  padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.pub-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pub-section-header h2 { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }

/* Grid cards */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pub-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; text-decoration: none; color: var(--text);
  transition: box-shadow .2s, transform .2s, border-color .2s; }
.pub-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--primary); text-decoration: none; }
.pub-card-sport { font-size: 28px; flex-shrink: 0; line-height: 1; padding-top: 2px; }
.pub-card-body { min-width: 0; }
.pub-card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.pub-card-meta span { font-size: 12px; color: var(--text-secondary); }
.pub-card-detail { font-size: 12px; color: var(--text-muted); }
.pub-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Empty — scoped to the public login card, whose first <p> is a big emoji. (Unscoped, .empty-state p
   rendered every league/app empty-state SENTENCE at 48px — looked broken.) */
.pub-empty { text-align: center; }
.pub-empty .empty-state p { font-size: 48px; margin-bottom: 12px; }
.pub-empty .empty-state p + p { font-size: 16px; color: var(--text-secondary); margin-bottom: 20px; }

/* Features */
.pub-features { background: var(--surface-alt); border-radius: 16px; padding: 40px 32px; margin-bottom: 48px; }
.pub-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.pub-feature { text-align: center; }
.pub-feature-icon { font-size: 36px; margin-bottom: 12px; }
.pub-feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.pub-feature p { font-size: 13px; color: var(--text-secondary); }

/* Footer */
.pub-footer { text-align: center; padding: 32px 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
.pub-footer p { margin-bottom: 6px; }
.pub-footer a { color: var(--primary); }

/* Tournament detail */
.pub-tournament-header { padding: 24px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.btn-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary);
  font-size: 14px; margin-bottom: 16px; text-decoration: none; }
.btn-back:hover { color: var(--primary); text-decoration: none; }
.pub-tournament-title-row { display: flex; gap: 20px; align-items: flex-start; }
.pub-sport-big { font-size: 48px; flex-shrink: 0; }
.pub-tournament-title-row h1 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.pub-tournament-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pub-tournament-meta span { font-size: 13px; color: var(--text-secondary); }
.pub-tournament-desc { margin-top: 12px; font-size: 14px; color: var(--text-secondary); max-width: 600px; }

/* Venue map */
.pub-venue-card { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.pub-venue-info { min-width: 180px; }
.pub-venue-info strong { font-size: 15px; display: block; margin-bottom: 4px; }
.pub-venue-info p { font-size: 13px; color: var(--text-secondary); }
.pub-map { width: 100%; max-width: 480px; height: 260px; border-radius: 12px;
  border: 1px solid var(--border); flex: 1; min-width: 240px; }

/* Group standings */
.pub-groups-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
/* Grid items default to min-width:auto (their content's intrinsic width), not 0 — a 9-column standings table
   inside .pub-group is wider than that, so the GRID TRACK grows to fit it instead of letting the inner
   ".pub-standings{overflow-x:auto}" scroll, pushing the whole page into horizontal overflow on narrow screens
   (the PTS column falls off the edge with no way to reach it). min-width:0 lets the track shrink so the
   overflow wrapper can actually do its job. */
.pub-group { min-width: 0; }
.pub-group h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.pub-standings { overflow-x: auto; }
.standings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.standings-table th, .standings-table td { padding: 7px 9px; text-align: center; border-bottom: 1px solid var(--border); }
.standings-table th { font-weight: 700; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; }
.standings-table td:nth-child(2) { text-align: left; white-space: nowrap; }
.standings-table tr.qualify td:nth-child(1) { border-left: 3px solid var(--success); }
.qualify-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* League standings — zebra + hover + leader emphasis (scoped so the tournament table is untouched). */
.lg-standings td.lg-team-cell, .lg-standings th.lg-team-cell { text-align: left; white-space: nowrap; }
.lg-standings th { color: var(--text-secondary); font-size: 11px; }
.lg-standings tbody tr:nth-child(even) { background: var(--bg-secondary); }
.lg-standings tbody tr:hover { background: var(--primary-light); }
.lg-standings tbody tr.lg-leader { background: linear-gradient(90deg, rgba(255,193,7,.16), transparent 60%); }
.lg-standings tbody tr.lg-leader td:first-child { border-left: 3px solid #f5b301; }
/* Promotion / play-off / relegation zones: full-row tint (wins over zebra) + brighter left border. */
.lg-standings tbody tr.lg-zone-promote { background: linear-gradient(90deg, rgba(34,197,94,.14), transparent 70%); }
.lg-standings tbody tr.lg-zone-playoff { background: linear-gradient(90deg, rgba(59,130,246,.14), transparent 70%); }
.lg-standings tbody tr.lg-zone-relegate { background: linear-gradient(90deg, rgba(239,68,68,.14), transparent 70%); }
.lg-standings tbody tr.lg-zone-promote td:first-child { border-left: 3px solid #22c55e; }
.lg-standings tbody tr.lg-zone-playoff td:first-child { border-left: 3px solid #3b82f6; }
.lg-standings tbody tr.lg-zone-relegate td:first-child { border-left: 3px solid #ef4444; }
/* Sticky header while the table scrolls; freeze the rank + team identity columns horizontally. Team name is the
   2nd column (.lg-team-cell) in the win-loss standings tables — without freezing it too, scrolling right to see
   Points leaves only a lone sticky rank number with no visible team identity. Scoped to :nth-child(2) rather than
   the bare .lg-team-cell class: some OTHER tables sharing .lg-standings (scorers: #, logo, player, TEAM = cols
   3-4; honours/titles: team is the literal first column, no rank prefix) have .lg-team-cell in a different
   position — stickying it there by class alone would either double-stick two columns to the same left offset
   (scorers) or misalign a table that has no rank column to offset past (honours). :nth-child(2) only matches the
   tables that actually have the assumed rank+team 2-column prefix. */
.lg-standings thead th { position: sticky; top: 0; background: var(--card-bg, var(--bg-secondary)); z-index: 2; }
.lg-standings td:first-child, .lg-standings th:first-child { position: sticky; left: 0; background: var(--card-bg, var(--bg-secondary)); z-index: 1; }
.lg-standings thead th:first-child { z-index: 3; }
.lg-standings td.lg-team-cell:nth-child(2), .lg-standings th.lg-team-cell:nth-child(2) { position: sticky; left: 34px; background: var(--card-bg, var(--bg-secondary)); z-index: 1; }
.lg-standings thead th.lg-team-cell:nth-child(2) { z-index: 3; }
@media (max-width: 640px) {
  /* drop the decorative Forma/Serie columns so the core table (through Points) fits the viewport */
  .lg-standings .lg-col-form { display: none; }
  .lg-standings th, .lg-standings td { padding: 6px 5px; }
  /* The sticky team-name column above has no width cap — a long name can render wider than the whole card
     and, being sticky, stays pinned over the viewport while scrolling, covering the columns after it. */
  .lg-standings td.lg-team-cell:nth-child(2), .lg-standings th.lg-team-cell:nth-child(2) { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
}
/* Adding .lg-team-cell to the ban table (below) picks up the unconditional left-align rule at line 1018 —
   give .lg-player-cell the same treatment so the two adjacent identity columns don't disagree (one left, one
   still center via the generic .standings-table td rule). Scoped like .lg-team-cell, not a bare class, for
   the same specificity reason as .lg-scorer-player-cell above. */
.lg-standings td.lg-player-cell, .lg-standings th.lg-player-cell { text-align: left; white-space: nowrap; }
/* Suspensions ban table: TEAM is the literal first column here (not a rank number like standings/fairplay),
   so it can't reuse the :nth-child(2)-at-34px rule above — that offset assumes a narrow rank prefix and
   would make PLAYER overlap TEAM. Fixed, matching widths keep both sticky without collision. Desktop is
   left unconstrained (full-width table, no scroll, no need to cap names). No thead in this table's markup
   (header is a plain <tr> under <table>), so no thead-scoped z-index rule is needed here. */
@media (max-width: 640px) {
  .lg-susp-table td.lg-team-cell, .lg-susp-table th.lg-team-cell { position: sticky; left: 0; background: var(--card-bg, var(--bg-secondary)); z-index: 1; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lg-susp-table td.lg-player-cell, .lg-susp-table th.lg-player-cell { position: sticky; left: 90px; background: var(--card-bg, var(--bg-secondary)); z-index: 1; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Scorers (current-season) table: #, logo, PLAYER, TEAM, GOALS — PLAYER is the 3rd column (behind a rank
   cell AND a 32px logo cell), so it falls outside the :nth-child(2) sticky rule above and had no cap at
   all; scrolling to see GOALS/TEAM used to scroll the player's own identity off-screen with it. */
/* Scoped like .lg-team-cell above (.lg-standings td.X, not bare .X) — a bare single-class selector loses
   text-align:left to the higher-specificity `.standings-table td { text-align: center }` base rule. */
.lg-standings td.lg-scorer-player-cell, .lg-standings th.lg-scorer-player-cell { text-align: left; white-space: nowrap; }
@media (max-width: 640px) {
  .lg-scorer-cur td.lg-scorer-player-cell, .lg-scorer-cur th.lg-scorer-player-cell { position: sticky; left: 70px; background: var(--card-bg, var(--bg-secondary)); z-index: 1; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
  .lg-scorer-cur thead th.lg-scorer-player-cell { z-index: 3; }
}
/* Authenticated Standings tab (renderLeagueStandings, app.js) has the SAME #/logo/team shape as the scorers
   table above — <th>#</th><th></th><th class="lg-team-cell"> — so its team cell is also the 3rd child, not
   the 2nd, and falls outside the :nth-child(2) rule at line ~1042 despite sharing .lg-team-cell. */
@media (max-width: 640px) {
  .lg-standings-full td.lg-team-cell, .lg-standings-full th.lg-team-cell { position: sticky; left: 70px; background: var(--card-bg, var(--bg-secondary)); z-index: 1; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
  .lg-standings-full thead th.lg-team-cell { z-index: 3; }
}
/* League fixture row: default desktop grid on a class (was inline) so a media query can collapse it on phones. */
.lg-match-row { display: grid; grid-template-columns: 60px 1fr 100px 1fr 100px; gap: 12px; align-items: center; padding: 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
@media (max-width: 600px) {
  .lg-match-row { grid-template-columns: 1fr auto 1fr; grid-template-areas: "meta meta meta" "home score away" "venue venue venue"; gap: 6px 8px; }
  .lg-match-row > :nth-child(1) { grid-area: meta; text-align: left; }
  .lg-match-row > :nth-child(2) { grid-area: home; }
  .lg-match-row > :nth-child(3) { grid-area: score; }
  .lg-match-row > :nth-child(4) { grid-area: away; }
  .lg-match-row > :nth-child(5) { grid-area: venue; text-align: left; }
}
/* Stop iOS zoom-on-focus + give inputs a comfortable tap height on phones. */
@media (max-width: 768px) {
  .input, input[type="number"], input[type="date"], input[type="text"], select.input, textarea.input { font-size: 16px; min-height: 40px; }
  .lg-standings input[type="number"] { min-height: 36px; }
}
/* Native date/time pickers on the permanent dark theme: color-scheme makes the browser render the field + the
   calendar-popup dark; the invert makes the built-in 📅 indicator light so it's actually visible (was black-on-dark). */
:root { color-scheme: dark; }
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] { color-scheme: dark; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator { filter: invert(0.9); opacity: 1; cursor: pointer; width: 20px; height: 20px; }
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
/* Keyboard focus ring (a11y) + async busy state on any control the dispatcher is awaiting. */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tab:focus-visible, .btn:focus-visible, .match-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.is-busy { opacity: .6; cursor: progress; pointer-events: none; }

/* Per-tab refresh button */
.pub-tab-refresh-row { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.pub-refresh-btn {
  font-size: 13px; font-weight: 600; padding: 7px 20px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text-secondary);
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.pub-refresh-btn:hover { background: var(--bg-secondary); color: var(--text); border-color: var(--primary,#1565c0); }
.pub-refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.pub-sugg-btn {
  border: none; border-right: 1px solid var(--border);
  background: transparent; color: var(--text);
  padding: 4px 10px; font-size: 12px; cursor: pointer;
  height: 30px; display: flex; align-items: center; gap: 4px;
  transition: background .15s;
}
.pub-sugg-btn:hover { background: var(--surface-alt); }
@media (max-width: 500px) { .pub-sugg-label { display: none; } }

/* Match cards */
.pub-matches-group { margin-bottom: 28px; }
.match-phase-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-secondary); margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.pub-match { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px;
  font-size: 13px; }
/* Collapsible per-match feeds: the expand only appears when the match has links; the links show only when
   expanded (public program cards stay compact otherwise). Native <details> — no JS handler, CSP-safe. */
.pub-mc-feeds { flex-basis: 100%; width: 100%; margin-top: 8px; }
.pub-mc-feeds > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); font-size: 13px; }
.pub-mc-feeds > summary::-webkit-details-marker { display: none; }
.pub-mc-feeds.has-live > summary { border-color: rgba(220,38,38,.4); }
.pub-mc-feeds .pmf-label { font-weight: 700; }
.pub-mc-feeds .pmf-chev { margin-left: auto; color: var(--text-muted); transition: transform .15s; }
.pub-mc-feeds[open] .pmf-chev { transform: rotate(90deg); }
.pub-mc-feeds .pub-match-links { margin-top: 8px; }
/* Per-match social/feed links (stacked one under another, below the time+teams row). */
.pub-match-links { flex-basis: 100%; width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--border); }
.pub-match-link { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px; }
.pub-match-link .pml-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pub-match-link .pml-name { font-weight: 700; font-size: 14.5px; }
.pub-match-link .pml-url { font-size: 12.5px; color: var(--accent); word-break: break-all; }
/* Live-feed badge — bigger + a clear gap to the name (space between the red part and the title). A white PLAY
   triangle (CSS ::before, not a red-circle emoji) sits before the LIVE text. */
.pub-feed-live { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 12px; font-weight: 800; letter-spacing: .05em; color: #fff; background: #dc2626; border-radius: 7px; padding: 5px 10px; }
.pub-feed-live::before { content: ''; width: 0; height: 0; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.pub-match.finished { opacity: .85; }
.pub-match.live { border-color: #22c55e; background: rgba(34,197,94,0.07); }
.pub-match.walkover { border-left: 3px solid #4ade80; background: rgba(74,222,128,0.06); }
.wk-score { color: #4ade80; font-weight: 700; }
.wk-orig { font-size: 10px; color: var(--text-muted); display: block; font-weight: 400; }
.wk-label { font-size: 9px; color: #4ade80; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.et-badge { font-size: 10px; background: rgba(230,81,0,0.2); color: #fb8c00; border-radius: 4px; padding: 1px 5px; margin-left: 4px; font-weight: 600; }
.pen-badge { font-size: 10px; background: rgba(27,94,32,0.25); color: #66bb6a; border-radius: 4px; padding: 1px 5px; margin-left: 4px; font-weight: 600; }
.pub-match-notes { font-size: 11px; color: var(--text-muted); margin-top: 4px; padding-left: 132px; }
.pub-match-time { width: 119px; font-size: 12px; color: var(--text-muted); flex-shrink: 0; text-align: right; }
.pub-match-date { font-size: 10px; color: var(--text-muted); margin-bottom: 1px; }
.pub-match-teams { flex: 1; display: flex; align-items: center; gap: 8px; }
.pub-match-team { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 6px; }
.pub-match-team.away { justify-content: flex-end; text-align: right; }
/* Winner/loser highlight — bright, high-contrast colors (pale green / pale red, not muted gray) against the
   dark theme, a colored accent bar on the OUTER edge (left for home, right for away, since away is mirrored),
   and a fading gradient — same visual language as the double-elimination bracket's .de-side (kept in sync). */
.pub-match-team.winner { font-weight: 800; color: #86efac;
  background: linear-gradient(90deg, rgba(34,197,94,.24), rgba(34,197,94,.04));
  box-shadow: inset 3px 0 0 #22c55e; }
.pub-match-team.away.winner { background: linear-gradient(270deg, rgba(34,197,94,.24), rgba(34,197,94,.04));
  box-shadow: inset -3px 0 0 #22c55e; }
.pub-match-team.winner .team-dot { box-shadow: 0 0 0 2px rgba(34,197,94,.4); }
.pub-match-team.loser { font-weight: 600; color: #fca5a5;
  background: linear-gradient(90deg, rgba(239,68,68,.16), transparent);
  box-shadow: inset 3px 0 0 #ef4444; }
.pub-match-team.away.loser { background: linear-gradient(270deg, rgba(239,68,68,.16), transparent);
  box-shadow: inset -3px 0 0 #ef4444; }
.pmt-check { color: #86efac; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.pub-match-score { padding: 4px 14px; background: var(--surface-alt); border-radius: 6px;
  font-weight: 700; font-size: 14px; min-width: 64px; text-align: center; flex-shrink: 0; }

/* KO/knockout live match card (koMatchCard) — meta row (M#/date/time/venue) centered on one line, each piece
   its own flex item so it wraps cleanly on narrow screens; final + third-place get the same gold/bronze accent
   already used for the Format-tab bracket template (.bracket-match-mini.final/.third), for consistency. */
.pub-match.ko-match { flex-direction: column; align-items: stretch; gap: 8px; }
.pub-match-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; width: 100%; font-size: 13.5px; font-weight: 600; color: var(--text); }
.pmm-num { font-weight: 800; color: var(--primary); font-size: 14px; }
.pmm-sep { color: var(--text-muted); }
.pub-match.ko-match.pub-match-final { border-color: #ffd700; background: rgba(255,215,0,.07); }
.pub-match.ko-match.pub-match-final .pmm-num { color: #b8860b; }
.pub-match.ko-match.pub-match-third { border-color: #cd7f32; background: rgba(205,127,50,.07); }
/* Per-set score (volleyball/beach volley) — same visual language as the DE diagram's .de-sets/.de-set. */
.pub-match-sets { display: flex; gap: 6px; justify-content: center; margin-top: 3px; font-size: 10px; }
.pms-set { color: var(--text-muted); font-weight: 600; }
.pms-set span.win { color: var(--text); font-weight: 800; }
.pub-match-notes { font-size: 11px; color: var(--text-muted); margin-left: 56px; }
.live-dot { display: inline-block; width: 7px; height: 7px; background: var(--success);
  border-radius: 50%; margin-left: 4px; animation: pulse 1.2s infinite; vertical-align: middle; }

/* Team color dot */
.team-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(0,0,0,.1); }
.team-dot.sm { width: 8px; height: 8px; margin-right: 5px; }

/* Scorers */
.pub-scorers { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pub-scorer-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); font-size: 13px; }
.pub-scorer-row:last-child { border-bottom: none; }
.scorer-rank { width: 24px; font-weight: 700; color: var(--text-muted); text-align: center; flex-shrink: 0; }
.scorer-name { flex: 1; font-weight: 600; }
.scorer-team { color: var(--text-secondary); font-size: 12px; }
.scorer-goals { font-weight: 700; margin-left: auto; }

/* Rules block */
.pub-rules { background: var(--surface-alt); border-left: 4px solid var(--primary); border-radius: 8px; padding: 16px 20px; font-size: 14px; white-space: pre-wrap; }

/* Public navbar home button */
.pub-home-btn { display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  color: var(--text-secondary); transition: background .15s, color .15s; }
.pub-home-btn:hover { background: var(--surface-alt); color: var(--primary); text-decoration: none; }

/* Public navbar controls group (language + theme) */
.pub-nav-controls {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.pub-lang-select {
  border: none; border-right: 1px solid var(--border);
  background: transparent; color: var(--text);
  padding: 4px 6px; font-size: 12px; cursor: pointer;
  outline: none; height: 30px;
}
.pub-lang-select:hover { background: var(--surface-alt); }
.pub-theme-btn { display: none; }

/* Tournament logo in header */
.pub-tournament-logo { width: 72px; height: 86px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.2)); }

/* ── Public tournament page with tabs ─── */
.pub-tournament-page { max-width: 1320px; margin: 0 auto; padding: 20px 20px 60px; }

.pt-header { display: none; }

/* Descriere tab — 3 stacked rows: (1) logo+name+section, sport emblem/flyer on the right, (2) meta details +
   description, (3) go-live/share/telegram actions. Each row is its own flex line so none of them fight the
   others for width (the old single 3-column row squeezed the title between the logo and the emblem badge). */
.pt-descriere { max-width: 760px; }
.pt-desc-header { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.pt-desc-row1 { display: flex; gap: 18px; align-items: flex-start; }
.pt-desc-row3 { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-desc-title { flex: 1; min-width: 0; }
.pt-desc-name { font-size: 24px; font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
.pt-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.pt-meta span { font-size: 13px; color: var(--text-secondary); }
.pt-desc-body { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-top: 8px; }
.pt-desc-awards { margin-bottom: 24px; }
.pt-share-row { margin-top: 8px; }
.pt-share-btn { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 700px) {
  /* Row 1 (logo | title+section | sport emblem+flyer button) still has 3 side-by-side children — on phones that
     squeezes the title into a narrow middle column, the exact bug already fixed once for the old single-row
     header. Stack row 1 too; rows 2/3 are already single flex lines so they just get centered. */
  .pt-desc-row1 { flex-direction: column; align-items: center; text-align: center; }
  .pt-desc-row2, .pt-desc-row3 { align-items: center; text-align: center; }
  .pt-desc-row3 { justify-content: center; }
  .pt-meta { justify-content: center; }
}

/* Public league page: tab bar + round-selector chips + season picker — 4 separate flex-wrap rows with no
   overflow fallback (unlike .pt-tabs on the tournament page). A double round-robin league in this project's own
   seed data has 14 rounds -> 15 chips wrapping onto 3-5 rows before any real content shows. Scroll instead.
   flex-wrap lives HERE, not inline on the elements — an inline style always wins over a stylesheet rule
   regardless of media query, so the desktop wrap behavior must come from the class too or the mobile
   override below can never take effect. */
.lg-pub-scrollrow { flex-wrap: wrap; }
@media (max-width: 700px) {
  .lg-pub-scrollrow { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .lg-pub-scrollrow::-webkit-scrollbar { display: none; }
}

.pt-tabs { display: flex; flex-wrap: wrap; gap: 0; padding: 16px 0 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.pt-tab { background: none; border: none; border-bottom: 3px solid transparent; padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
  transition: color .15s, border-color .15s; white-space: nowrap; margin-bottom: -2px; border-radius: 0; }
.pt-tab:hover { color: var(--text); }
.pt-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.pt-tab-content { }

/* Back button in navbar */
.pub-back-btn {
  display: flex; align-items: center; justify-content: center;
  align-self: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 10px; text-decoration: none;
  color: #93c5fd;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  transition: all .2s ease;
}
.pub-back-btn:hover { background: rgba(59,130,246,0.2); box-shadow: 0 0 12px rgba(99,102,241,0.25); transform: translateX(-2px); }

/* Section labels in clasament */
.pub-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }

/* Rules tab visual */
.pub-rules-wrap { max-width: 680px; }
.pub-rules-body { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 24px; margin-bottom: 16px; }
.pub-rules-section { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
  line-height: 1.75; font-size: 14px; color: var(--text-secondary); }
.pub-rules-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.pub-rules-section:first-child { font-size: 15px; font-weight: 700; color: var(--text); }
.pub-rules-ref { display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.pub-rules-ref-icon { font-size: 24px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.pub-rules-ref strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.pub-rules-ref p { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.pub-rules-ref a { font-size: 12px; font-weight: 600; }

/* Coach message tab */
.pub-coach-msg { display: flex; gap: 20px; max-width: 680px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.pub-coach-msg-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.pub-coach-msg-body { font-size: 14px; line-height: 1.85; color: var(--text-secondary); }
.pub-coach-msg-body p { margin: 0 0 14px; }
.pub-coach-msg-body p:last-child { margin-bottom: 0; }

.pt-venue-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.pt-venue-item { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.pt-venue-item strong { font-size: 14px; display: block; margin-bottom: 3px; }
.pt-venue-item p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.pub-map-lg { height: 340px; max-width: 100%; }

.pub-match-venue { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* Winners / podium tab */
.pub-podium { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin-bottom: 24px; }
.pub-podium-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; }
.pub-podium-row:first-child { background: rgba(255,215,0,0.08); border-color: rgba(255,215,0,0.5); }
.pub-podium-place { display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; min-width: 108px; }
.pub-podium-team { font-size: 15px; font-weight: 700; }
/* Podium medal images (public/img/ui/medal-{1,2,3}.webp) — base size for tight standings cells; bigger in the podium. */
.podium-medal { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.pub-podium-place .podium-medal { width: 34px; height: 34px; margin-right: 7px; }
.pub-final-place .podium-medal { width: 24px; height: 24px; margin-right: 5px; }
/* Glossy heart (public/img/ui/heart.webp) — inline, scales with surrounding font-size (donations link/popup). */
.ui-heart { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: -0.2em; }
.pub-awards { display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.pub-award-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.pub-award-icon { font-size: 20px; min-width: 28px; text-align: center; }
.pub-award-name { font-size: 14px; font-weight: 700; }
.pub-award-team { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* Knockout preview in Clasament */
.pub-knockout-preview { display: flex; flex-direction: column; gap: 8px; max-width: 600px; margin-bottom: 8px; }
.pub-ko-row { display: flex; align-items: center; gap: 12px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; }
.pub-ko-label { font-size: 12px; font-weight: 700; color: var(--primary); min-width: 56px; flex-shrink: 0; }
.pub-ko-teams { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.pub-ko-vs { font-size: 11px; color: var(--text-muted); font-style: italic; }
.pub-tbd { color: var(--text-muted); font-style: italic; font-size: 13px; }
.pub-ko-final { border-color: rgba(255,215,0,0.6); background: rgba(255,215,0,0.07); font-weight: 700; }

/* Final Standings tab */
.pub-final-standings { max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.pub-final-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.pub-final-row.tbd { opacity: .6; background: var(--surface-alt); }
.pub-final-row:nth-child(1) { background: rgba(255,215,0,0.07); border-color: rgba(255,215,0,0.5); }
.pub-final-row:nth-child(2) { background: rgba(192,192,192,0.07); border-color: rgba(192,192,192,0.35); }
.pub-final-row:nth-child(3) { background: rgba(205,127,50,0.07); border-color: rgba(205,127,50,0.4); }
.pub-final-place { display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; min-width: 96px; }
.pub-final-team { font-size: 14px; font-weight: 600; }

/* Match card status styles */
.match-card.mc-live { border-left: 3px solid var(--success); }
.match-card.mc-finished { opacity: .85; }
.mc-info { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-secondary); }

/* Cookie consent banner */
#cookie-banner { position: fixed; bottom: 52px; left: 0; right: 0; z-index: 8000;
  background: var(--surface); border-top: 2px solid var(--primary); box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  padding: 12px 20px; transition: transform .4s ease, opacity .4s ease; }
#cookie-banner.cookie-banner-hide { transform: translateY(100%); opacity: 0; }
#cookie-banner-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#cookie-banner-text { flex: 1; font-size: 12px; color: var(--text-secondary); line-height: 1.5; min-width: 240px; }
#cookie-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
#cookie-decline { background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: 6px; padding: 7px 14px; font-size: 12px; font-weight: 600; cursor: pointer; }
#cookie-decline:hover { border-color: var(--text-muted); }
#cookie-accept { background: var(--primary); color: #fff; border: none; border-radius: 6px;
  padding: 7px 16px; font-size: 12px; font-weight: 700; cursor: pointer; }
#cookie-accept:hover { opacity: .9; }
/* Fixed cookie banner otherwise sits directly over the last element of short pages (e.g. a wizard's only
   submit button) on mobile, making it unreachable/unclickable until the banner is dismissed. */
body.has-cookie-banner { padding-bottom: 200px; }

/* GDPR footer disclaimer */
.site-footer-gdpr {
  font-size: 10px; color: var(--text-muted);
  cursor: pointer; padding: 3px 8px; border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap; font-weight: 500; flex-shrink: 0;
}
.site-footer-gdpr:hover { background: var(--surface-alt); color: var(--primary); }
@media (max-width: 480px) {
  .site-footer { gap: 8px; }
  .site-footer-gdpr { padding: 3px 4px; font-size: 9px; }
}

/* ── Calendar KPI strip ────────────────────────────────────── */
.cal-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.cal-kpi {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.35;
}
.cal-kpi-btn { cursor: pointer; transition: filter .15s, box-shadow .15s; }
.cal-kpi-btn:hover { filter: brightness(1.08); }
.cal-kpi-active { box-shadow: 0 0 0 2px rgba(183,28,28,.35); }

/* ── Calendar grid ─────────────────────────────────────────── */
.cal-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px;
  font-size: 13px;
}
.cal-field-hd {
  width: 110px;
  padding: 8px 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  white-space: nowrap;
}
.cal-day-hd {
  padding: 7px 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  min-width: 115px;
}
.cal-day-hd.cal-today {
  background: rgba(var(--primary-rgb, 99,102,241), 0.12);
  color: var(--primary);
}
.cal-field-cell {
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  vertical-align: top;
  white-space: nowrap;
}
.cal-day-cell {
  padding: 4px 5px;
  border: 1px solid var(--border);
  background: var(--surface);
  vertical-align: top;
  min-height: 60px;
  position: relative;
}
.cal-day-cell.cal-today { background: rgba(var(--primary-rgb, 99,102,241), 0.04); }
.cal-day-cell.cal-partial { background: rgba(245,158,11,.06); }
.cal-day-cell.cal-full { background: rgba(239,68,68,.05); }

.cal-bk {
  border-radius: 5px;
  padding: 3px 6px;
  margin-bottom: 3px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 5px;
  align-items: center;
  transition: opacity .15s;
}
.cal-bk:hover { opacity: .8; }
.cal-bk-cancelled { opacity: .45; text-decoration: line-through; }
/* Team-highlight focus: dim (but keep visible for occupancy context) every card
   that does not belong to the highlighted team. Applied in all card builders. */
.cal-bk-dim { opacity: .28; filter: grayscale(.6); }
.cal-bk-checkedin { box-shadow: inset 0 0 0 1px rgba(5,150,105,.4); }
/* Double-booking marker: red inset outline visible even in greyscale, distinct from
   the green check-in inset. Paired with a ⚠ prefix + aria-label on the card. */
.cal-bk-conflict { box-shadow: inset 0 0 0 2px #c62828; }
.cal-bk-conflict.cal-bk-checkedin { box-shadow: inset 0 0 0 2px #c62828; }
.cal-bk-conflict-mark { color: #c62828; font-weight: 700; margin-right: 2px; line-height: 1; }
.cal-bk-pending { border-left-style: dashed !important; }
.cal-bk-time { font-weight: 700; font-size: 10px; white-space: nowrap; }
.cal-bk-act { font-size: 11px; line-height: 1; margin-right: 2px; vertical-align: -1px; }
.cal-tl-bk-act { font-size: 10px; line-height: 1; margin-right: 2px; vertical-align: -1px; }
.cal-bk-name { font-weight: 600; color: var(--text); }
.cal-bk-half { font-size: 9px; color: var(--text-muted); background: rgba(0,0,0,.08); border-radius: 3px; padding: 1px 4px; }
.cal-add-btn {
  display: block;
  margin-top: 3px;
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  line-height: 1.5;
  opacity: 0;
  transition: opacity .15s;
}
.cal-day-cell:hover .cal-add-btn { opacity: 1; }
.cal-add-btn:hover { background: var(--surface-alt); color: var(--primary); }

/* ─── Calendar Timeline view ────────────────────────────────────── */
.cal-tl-wrap { overflow-x: auto; }
.cal-tl-field-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.cal-tl-outer { display: flex; }
.cal-tl-time-col { flex-shrink: 0; width: 48px; }
.cal-tl-hour-label {
  height: 52px;
  display: flex;
  align-items: flex-start;
  padding-top: 3px;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 10px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-strong);
  box-sizing: border-box;
}
.cal-tl-days { display: flex; flex: 1; min-width: 0; }
.cal-tl-day-col { flex: 1; min-width: 90px; border-left: 1px solid var(--border); }
.cal-tl-day-hd {
  height: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-alt);
  position: sticky;
  top: 0;
  z-index: 2;
  line-height: 1.2;
}
.cal-tl-day-hd.cal-today { background: rgba(var(--primary-rgb,99,102,241),.12); color: var(--primary); }
.cal-tl-day-hd span { font-size: 10px; font-weight: 400; }
.cal-tl-grid { position: relative; }
.cal-tl-hour-line {
  position: absolute; left: 0; right: 0;
  border-top: 1px solid var(--border);
  pointer-events: none;
}
.cal-tl-half-line {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed rgba(255,255,255,.06);
  pointer-events: none;
}
.cal-tl-click-area { position: absolute; inset: 0; z-index: 0; cursor: crosshair; }
.cal-tl-bk {
  position: absolute;
  left: 2px; right: 2px;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 10px;
  cursor: pointer;
  overflow: hidden;
  z-index: 1;
  border-left-width: 3px;
  border-left-style: solid;
  transition: opacity .15s;
  line-height: 1.15;
}
.cal-tl-bk:hover { opacity: .82; }
.cal-tl-bk-time { font-size: 9px; font-weight: 700; color: var(--text); display: block; }
.cal-tl-bk-name { font-size: 10px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.cal-tl-oor { background: rgba(100,100,100,.08); padding: 2px 4px; }
.cal-tl-oor-top { border-bottom: 1px dashed var(--border); }
.cal-tl-oor-bot { border-top: 1px dashed var(--border); }
/* Timeline field tabs (bază – teren) + subfield lanes */
.cal-tl-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.cal-tl-tab { background: transparent; border: 1px solid var(--border); border-bottom: none; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-radius: 8px 8px 0 0; white-space: nowrap; }
.cal-tl-tab:hover { color: var(--text); background: var(--bg-secondary); }
.cal-tl-tab-active { color: var(--text); background: var(--surface-alt); border-bottom: 2px solid var(--primary, #3b82f6); margin-bottom: -1px; }
.cal-tl-empty { padding: 24px; text-align: center; color: var(--text-muted); }
.cal-tl-sub-hd { display: flex; height: 20px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 32px; z-index: 2; }
.cal-tl-sub-hd > span { flex: 1; text-align: center; font-size: 9px; font-weight: 600; color: var(--text-muted); border-left: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 2px; }
.cal-tl-sub-hd > span:first-child { border-left: none; }
.cal-tl-lane-sep { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--border); pointer-events: none; z-index: 0; }
/* 'Acum' (now) line + banner (Improvement #30) — day-of live status on the timeline. */
.cal-tl-now-line {
  position: absolute; left: 0; right: 0;
  height: 0; border-top: 2px solid #ef4444;
  pointer-events: none; z-index: 3;
}
.cal-tl-now-line::before {
  content: ''; position: absolute; left: -3px; top: -4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; box-shadow: 0 0 3px rgba(239,68,68,.7);
}
.cal-tl-now-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 10px; padding: 7px 12px;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 8px; font-size: 12px; line-height: 1.4;
}
.cal-tl-now-badge { font-weight: 700; }
.cal-tl-now-busy { color: #ef4444; }
.cal-tl-now-free { color: #16a34a; }
.cal-tl-now-sep { color: var(--text-muted); opacity: .6; }
.cal-tl-now-next { color: var(--text-muted); font-weight: 600; }
/* Sticky headers on scroll (Improvement #13) — day/field headers pinned on
   vertical scroll, hour gutter pinned on horizontal scroll. Pure CSS, anchors
   to the overflow scroll container / page scroll. */
.cal-tl-time-col { position: sticky; left: 0; z-index: 4; background: var(--surface-alt); }
.cal-tl-time-col .cal-tl-hour-label { background: var(--surface-alt); }
/* Planner (renderCalPlanner) — same behaviour on its inline-styled grid. */
.cal-pl-time-col { position: sticky; left: 0; z-index: 4; }
.cal-pl-corner { position: sticky; top: 0; z-index: 6; background: var(--surface-alt,var(--bg)); }
.cal-pl-field-hd { position: sticky; top: 0; z-index: 5; }
/* ─── Calendar Heatmap view ──────────────────────────────────────── */
.cal-hm-table { border-collapse: collapse; }
.cal-hm-table th, .cal-hm-table td { border: 1px solid var(--border); padding: 0; }
.cal-hm-row-label { font-size: 9px; color: var(--text-muted); padding: 0 4px; text-align: right; white-space: nowrap; background: var(--surface); }
.cal-hm-cell { height: 18px; min-width: 80px; }
/* Calendar view mode toggle */
.cal-view-btn { border-radius: 0 !important; border: none !important; font-size: 16px; padding: 3px 8px !important; }
.cal-view-btn.active { background: var(--primary) !important; color: #fff !important; }
.cal-view-toggle { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
/* ─── Reports modal ─────────────────────────────────────────────── */
.rpt-section-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.rpt-empty { font-size: 12px; color: var(--text-muted); padding: 10px 0; }
.rpt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.rpt-tab { background: transparent; border: none; border-bottom: 2px solid transparent; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-radius: 6px 6px 0 0; }
.rpt-tab:hover { color: var(--text); background: var(--bg-secondary); }
.rpt-tab-active { color: var(--text); border-bottom-color: var(--primary, #3b82f6); }
.rpt-pane { min-height: 220px; }
/* Segmented radio-button group (single-select filters, e.g. convocation status) */
.seg-radio { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-size: 12px; }
.seg-radio label { padding: 4px 10px; cursor: pointer; display: inline-flex; align-items: center; white-space: nowrap; color: var(--text-muted); user-select: none; }
.seg-radio label input { display: none; }
.seg-radio label:hover { background: var(--bg-secondary); }
.seg-radio label:has(input:checked) { background: var(--primary, #3b82f6); color: #fff; }
/* Week-grid subfield split + overlap breakdown */
.cal-subfield-row td.cal-field-cell.cal-subfield-cell { background: var(--surface-alt); }
.cal-subfield-row .cal-day-cell { background: rgba(128,128,128,.03); }
.cal-field-parent td.cal-field-cell { border-top: 2px solid var(--border-strong, var(--border)); }
.cal-ocupat-chip { display: inline-block; font-size: 10px; font-weight: 700; color: #b91c1c; background: rgba(220,38,38,.12); border: 1px solid rgba(220,38,38,.35); border-radius: 6px; padding: 1px 6px; margin-bottom: 2px; cursor: pointer; }
.cal-ocupat-chip:hover { background: rgba(220,38,38,.22); }
.cal-ov-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 12px; padding-bottom: 2px; }
.cal-ov-tab { flex: 0 0 auto; background: transparent; border: 1px solid var(--border); border-bottom: none; padding: 5px 10px; font-size: 11px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-radius: 6px 6px 0 0; white-space: nowrap; }
.cal-ov-tab:hover { color: var(--text); background: var(--bg-secondary); }
.cal-ov-tab-active { color: var(--text); background: var(--surface-alt); border-bottom: 2px solid var(--primary, #3b82f6); }
.cal-ov-pane { min-height: 120px; }


/* ── Fixed footer ─── */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0; height: 76px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--glass-border);
  display: flex; justify-content: center; align-items: center; gap: 28px;
  z-index: 200; box-shadow: 0 -4px 24px rgba(0,0,20,.12);
  padding: 0 16px;
}
.site-footer-icon {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: default; transition: transform .2s ease, filter .2s ease;
  padding: 4px 6px;
}
.site-footer-icon:hover { transform: translateY(-4px) scale(1.08); filter: brightness(1.1) drop-shadow(0 4px 8px rgba(26,115,232,.3)); }
.site-footer-icon img { width: 38px; height: 38px; object-fit: contain; display: block; }
.site-footer-icon span { font-size: 9px; color: var(--text-secondary); letter-spacing: 0.4px; font-weight: 600; white-space: nowrap; }
body { padding-bottom: 80px; }

/* ── Background image + floating particles (DISABLED) ─── */
.bg-particles {
  display: none; /* re-enable: remove this line */
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  /* background-image: url('/img/background.png');
  background-size: cover;
  background-position: center bottom; */
}
/* .bg-particles::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--overlay-opacity, rgba(220, 230, 248, 0.22));
} */
/* .bgp {
  position: absolute; border-radius: 50%;
  background: var(--primary);
  bottom: -20px;
  animation: bgpFloat linear infinite;
}
@keyframes bgpFloat {
  0%   { transform: translateY(0)   scale(1);   opacity: inherit; }
  25%  { transform: translateX(18px) translateY(-25vh) scale(1.05); }
  50%  { transform: translateX(-12px) translateY(-50vh) scale(0.95); }
  75%  { transform: translateX(8px)  translateY(-75vh) scale(1.02); }
  100% { transform: translateY(-105vh) scale(0.7); opacity: 0; }
} */

/* ── Landing page ─── */
.landing-page { max-width: 1160px; margin: 0 auto; padding: 32px 20px 24px; }
.landing-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.landing-panel { background: var(--surface); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,.07);
  display: flex; flex-direction: column; }
.lp-tournaments { border-top: 4px solid #f59e0b; }
.lp-leagues { border-top: 4px solid #3b82f6; }

.landing-panel-header { padding: 20px 24px 18px; border-bottom: 1px solid var(--border); }
.lph-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.lph-icon { font-size: 28px; line-height: 1; }
.lph-count { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 20px;
  padding: 3px 12px; color: var(--text-secondary); }
.landing-panel-header h2 { font-size: 22px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.4px; }
.landing-panel-header p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.4; }
.landing-panel-body { flex: 1; }

.landing-item { display: flex; align-items: center; gap: 12px; padding: 13px 24px;
  border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: background .12s, transform .12s; }
.landing-item:last-child { border-bottom: none; }
.landing-item:hover { background: var(--surface-alt); transform: translateX(3px); text-decoration: none; }
.li-icon { font-size: 22px; flex-shrink: 0; width: 32px; text-align: center; line-height: 1; }
.li-logo { width: 28px; height: 32px; object-fit: contain; }
.li-info { flex: 1; min-width: 0; }
.li-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.landing-empty { padding: 44px 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.landing-empty-icon { font-size: 36px; margin-bottom: 10px; opacity: .35; }

/* Venue surface badge */
.venue-surface-badge { display: inline-block; font-size: 11px; font-weight: 600;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 20px;
  padding: 2px 10px; margin-left: 8px; color: var(--text-secondary); vertical-align: middle; }

.pub-badge.active { background: rgba(34,197,94,0.15); color: #4ade80; }
.pub-badge.done   { background: rgba(59,130,246,0.15); color: #60a5fa; }
.pub-badge.draft  { background: var(--surface-alt); color: var(--text-muted); }

/* ── Tournament bracket schema ─── */
.bracket-wrap { display: flex; gap: 0; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.bracket-col { min-width: 180px; flex: 0 0 auto; }
.bracket-col-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); text-align: center; margin-bottom: 12px; padding: 0 8px; }
.bracket-groups { display: flex; flex-direction: column; gap: 16px; padding: 0 8px; }
.bracket-group { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.bracket-group-label { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.bracket-team { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 13px;
  border-bottom: 1px solid var(--border); }
.bracket-team:last-child { border-bottom: none; }
.bracket-team.qualify { font-weight: 600; }
.bracket-team.eliminated { opacity: .6; }
.bracket-pos { width: 16px; font-size: 11px; color: var(--text-muted); flex-shrink: 0; text-align: center; }
.bracket-adv { margin-left: auto; color: var(--success); font-size: 13px; }
.bracket-elim { margin-left: auto; color: var(--danger); font-size: 13px; }
.bracket-tbd { color: var(--text-muted); font-style: italic; font-size: 12px; }
.bracket-slot-label { font-size: 13px; color: var(--text-secondary); }
.bracket-team.qualify .bracket-slot-label { color: var(--text); }
.bracket-legend { display: flex; gap: 12px; padding: 6px 12px 0; font-size: 11px; }
.bl-qualify { color: var(--success); font-weight: 600; }
.bl-elim { color: var(--text-muted); }

.bracket-arrow-col { display: flex; align-items: center; padding: 0 12px; }
.bracket-flow-legend { display: flex; flex-direction: column; gap: 8px; font-size: 11px; color: var(--text-secondary); }
.legend-qualify, .legend-elim { white-space: nowrap; }

/* Connector column between groups and semifinals */
.bracket-connector-col { display: flex; align-items: center; padding: 0 8px; }
.bracket-connector { display: flex; flex-direction: column; gap: 0; width: 48px; }
.bc-top, .bc-bot { display: flex; flex-direction: column; align-items: center; }
.bc-gap { height: 24px; }
.bc-line { width: 2px; background: var(--border); flex: 1; min-height: 20px; }
.bc-mid { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); writing-mode: vertical-rl; text-orientation: mixed;
  padding: 4px 0; white-space: nowrap; }

.bracket-round { display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.bracket-match-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; min-width: 160px; }
.bracket-match-mini.semi { border-left: 3px solid var(--primary); }
.bracket-match-mini.qual { border-left: 3px solid #f57c00; }
.bracket-match-mini.final { border-left: 3px solid #ffd700; background: rgba(255,215,0,0.07); }
.bracket-match-mini.third { border-left: 3px solid #cd7f32; }
.bracket-match-mini.fifth { border-left: 3px solid var(--success); }
.bracket-match-mini.seventh { border-left: 3px solid var(--text-muted); }
.bm-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.bm-teams { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.bm-teams span { color: var(--primary); }
.bm-to { font-size: 11px; color: var(--text-muted); }

/* Responsive */
@media (max-width: 600px) {
  .pub-hero-inner { padding: 40px 20px; }
  .pub-brand-name { font-size: 24px; }
  .pub-hero-title { font-size: 20px; }
  .pub-tournament-title-row { flex-direction: column; gap: 12px; }
  .pub-sport-big { font-size: 32px; }
  .pub-tournament-title-row h1 { font-size: 20px; }
  .pub-match-teams { flex-direction: column; gap: 4px; }
  .pub-match-team { justify-content: space-between; }
  .pub-match-team.away { justify-content: flex-end; }
  /* Stacked teams (home above away) with the score kept as one compact, centered chip between them — never
     stretched full-width, so "3–2" always reads as a single grouped unit, not split across the row. */
  .pub-match.ko-match .pub-match-score { align-self: center; }
  .pub-features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .pub-groups-grid { grid-template-columns: 1fr; }
  .pub-grid { grid-template-columns: 1fr; }
  .landing-two-col { grid-template-columns: 1fr; }
  .pub-map { max-width: 100%; }
  .pub-venue-card { flex-direction: column; }
}

/* ─── Settings panel ─────────────────────────────────── */
.nav-settings-wrap { position: relative; }
.nav-settings-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; min-width: 210px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18); z-index: 300;
}
.nav-settings-panel.open { display: block; }
.settings-sec { margin-bottom: 14px; }
.settings-sec:last-child { margin-bottom: 0; }
.settings-sec + .settings-sec { padding-top: 12px; border-top: 1px solid var(--border); }
.settings-sec-label { font-size: 10px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.settings-langs { display: flex; gap: 5px; flex-wrap: wrap; }
.slang { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .12s; }
.slang:hover { background: var(--surface-alt); }
.slang.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.stheme { display: none; }
.stheme:hover { background: var(--surface-alt); }

/* Admin panel tabs */
.admin-tabs { display: flex; gap: 4px; padding-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.admin-tab { padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; background: transparent; color: var(--text-secondary); transition: all .15s; }
.admin-tab:hover { background: var(--surface-alt); color: var(--text); }
.admin-tab.active { background: var(--primary); color: #fff; }
.admin-tab.danger-tab.active { background: var(--danger); }

/* Radio pill group (for filter buttons) */
.radio-pill-group { display: flex; gap: 2px; background: var(--surface-alt); border-radius: 8px; padding: 3px; }
.radio-pill { padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text-secondary); transition: all .15s; user-select: none; }
.radio-pill.rp-active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }

/* ═══ VISUAL ENHANCEMENTS ═══════════════════════════════ */

/* Animated gradient accent on active/live badges */
.badge-live {
  background: rgba(239,68,68,0.18) !important;
  color: #f87171 !important;
  animation: livePulse 2s ease-in-out infinite !important;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 0 4px rgba(239,68,68,0.18); }
}

/* Section / page hero strip with sport pitch watermark */
.hero-sport {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(139,92,246,0.06) 100%);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 20px;
}
.hero-sport::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 180' fill='none'%3E%3Crect x='8' y='8' width='304' height='164' rx='6' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Cline x1='160' y1='8' x2='160' y2='172' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Ccircle cx='160' cy='90' r='32' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Ccircle cx='160' cy='90' r='2' fill='rgba(255,255,255,0.06)'/%3E%3Crect x='8' y='58' width='42' height='64' rx='2' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Crect x='270' y='58' width='42' height='64' rx='2' stroke='rgba(255,255,255,0.05)' stroke-width='1.5'/%3E%3Crect x='8' y='70' width='20' height='40' rx='2' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3Crect x='292' y='70' width='20' height='40' rx='2' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: right center;
  opacity: 0.7; pointer-events: none;
}

/* Glowing card variant for featured items */
.card-glow {
  border-color: rgba(59,130,246,0.25) !important;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.12), 0 8px 32px rgba(59,130,246,0.12) !important;
}

/* Tournament / club grid card enhancements */
.card[data-action="openTournament"],
.card[data-action="openClub"],
.card[data-action="openLeague"] {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card[data-action="openTournament"]:hover,
.card[data-action="openClub"]:hover,
.card[data-action="openLeague"]:hover {
  transform: translateY(-4px);
  border-color: rgba(59,130,246,0.3);
  box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 0 1px rgba(59,130,246,0.15), 0 0 32px rgba(59,130,246,0.08);
}

/* Shimmer animation for loading skeletons */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, rgba(255,255,255,0.04) 50%, var(--surface) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Form inputs — enhanced glow */
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18), 0 1px 6px rgba(59,130,246,0.12);
}

/* Floating label card sections */
.card-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--primary); opacity: 0.8;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(59,130,246,0.15);
}

/* Btn success / danger glows */
.btn-success:hover { box-shadow: 0 4px 16px rgba(34,197,94,0.35); transform: translateY(-1px); }
.btn-danger:hover  { box-shadow: 0 4px 16px rgba(239,68,68,0.35); transform: translateY(-1px); }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* Animated top border on navbar */
.navbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(59,130,246,0.5) 30%, rgba(139,92,246,0.4) 60%, transparent 100%);
  pointer-events: none;
}

/* Card header title — keep plain for emoji compatibility */
.card-title { font-size: 16px; font-weight: 700; color: var(--text); }

/* Floating orb accent top-right of container */
.container { position: relative; z-index: 1; }

/* Admin panel tab bar — subtle gradient bottom line */
.admin-tabs { position: relative; }
.admin-tabs::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), rgba(139,92,246,0.2), transparent);
}

/* Hover state on table rows — smoother */
tr { transition: background .1s; }

/* Selection highlight */
::selection { background: rgba(59,130,246,0.3); color: #fff; }

/* ══ Clubs page redesign ══════════════════════════════════════════ */

/* ─── Keyframes ────────────────────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pitchFloat {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(6px) rotate(0.4deg); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes titleShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes borderGlow {
  0%,100% { box-shadow: 0 16px 48px rgba(0,0,0,.55), 0 0 0 1px rgba(var(--sc),.15), 0 0 36px rgba(var(--sc),.07); }
  50%     { box-shadow: 0 16px 56px rgba(0,0,0,.6),  0 0 0 1px rgba(var(--sc),.28), 0 0 52px rgba(var(--sc),.14); }
}

/* ─── Hero Banner ──────────────────────────────────────────────── */
.clubs-hero {
  position: relative; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5,14,29,0.97) 0%, rgba(10,22,40,0.87) 45%, rgba(5,14,29,0.75) 100%),
    url('/img/hero.webp') center/cover no-repeat;
  background-color: #050e1d;
  min-height: 190px;
  display: flex; align-items: stretch;
}
.clubs-hero-pitch {
  position: absolute; right: -20px; top: -15px;
  width: 56%; max-width: 620px; height: 130%;
  opacity: 0.85; pointer-events: none;
  animation: pitchFloat 9s ease-in-out infinite;
}
.clubs-hero-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 40px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.clubs-hero-greeting {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: #60a5fa; margin: 0 0 8px;
  animation: heroFadeUp .5s ease .05s both;
}
.clubs-hero-title {
  font-size: 36px; font-weight: 900; line-height: 1.1;
  background: linear-gradient(90deg, #f1f5f9 0%, #93c5fd 35%, #c4b5fd 55%, #93c5fd 70%, #f1f5f9 100%);
  background-size: 250% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin: 0 0 10px;
  animation: heroFadeUp .5s ease .15s both, titleShimmer 5s linear 1s infinite;
}
.clubs-hero-sub {
  font-size: 13px; color: rgba(255,255,255,0.4); margin: 0;
  animation: heroFadeUp .5s ease .25s both;
}
.btn-hero-create {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; border: none;
  padding: 13px 26px; font-size: 15px; font-weight: 700;
  border-radius: 14px; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 24px rgba(59,130,246,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform .2s, box-shadow .2s, background .2s;
  animation: heroFadeUp .5s ease .35s both;
}
.btn-hero-create:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  box-shadow: 0 8px 40px rgba(59,130,246,0.55);
  transform: translateY(-3px);
}
.clubs-hero.has-img {
  background-image:
    linear-gradient(to right, rgba(5,14,29,0.97) 0%, rgba(5,14,29,0.82) 50%, rgba(5,14,29,0.55) 100%),
    url('/img/hero.webp');
  background-size: cover; background-position: center;
}

/* ─── Filter toolbar ───────────────────────────────────────────── */
.clubs-toolbar {
  display: flex; justify-content: flex-end; align-items: center;
  gap: 10px; flex-wrap: wrap; margin-bottom: 24px;
}

/* ─── Section headers ──────────────────────────────────────────── */
.clubs-section { margin-bottom: 36px; }
.clubs-section-hdr { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.clubs-section-title {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-secondary); white-space: nowrap;
}
.clubs-section-cnt {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: rgba(255,255,255,0.06); border-radius: 20px; padding: 1px 8px;
}
.clubs-section-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,0.08), transparent);
}
.clubs-empty { color: var(--text-muted); font-size: 13px; padding: 12px 0; }

/* ─── Grid ─────────────────────────────────────────────────────── */
.clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(256px, 1fr));
  gap: 14px;
}

/* ─── Club card ────────────────────────────────────────────────── */
.club-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: rgba(17,24,39,0.82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px; cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.clubs-grid .club-card:nth-child(1)  { animation: cardIn .35s ease .00s both; }
.clubs-grid .club-card:nth-child(2)  { animation: cardIn .35s ease .05s both; }
.clubs-grid .club-card:nth-child(3)  { animation: cardIn .35s ease .10s both; }
.clubs-grid .club-card:nth-child(4)  { animation: cardIn .35s ease .15s both; }
.clubs-grid .club-card:nth-child(5)  { animation: cardIn .35s ease .20s both; }
.clubs-grid .club-card:nth-child(6)  { animation: cardIn .35s ease .25s both; }
.clubs-grid .club-card:nth-child(7)  { animation: cardIn .35s ease .30s both; }
.clubs-grid .club-card:nth-child(8)  { animation: cardIn .35s ease .35s both; }
.clubs-grid .club-card:nth-child(n+9){ animation: cardIn .35s ease .40s both; }

.club-card:not(.club-deleted):not(.club-inactive):hover {
  transform: translateY(-5px);
  border-color: rgba(var(--sc), 0.35);
  animation: borderGlow 2.5s ease-in-out infinite;
}
.club-card-hd {
  padding: 18px;
  background: linear-gradient(135deg, rgba(var(--sc),.14) 0%, rgba(var(--sc),.04) 100%);
  border-bottom: 1px solid rgba(var(--sc),.1);
  display: flex; gap: 14px; align-items: flex-start;
  position: relative;
}
.club-card-hd::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, rgba(var(--sc),.9), rgba(var(--sc),.3), transparent);
  border-radius: 16px 16px 0 0;
}
.club-logo-wrap {
  width: 50px; height: 50px; flex-shrink: 0;
  border-radius: 11px;
  background: rgba(var(--sc),.15); border: 1px solid rgba(var(--sc),.28);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.club-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.club-sport-icon { font-size: 24px; line-height: 1; }
.club-identity { flex: 1; min-width: 0; }
.club-name { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.club-owner { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.club-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 9px; font-weight: 800; padding: 2px 7px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}
.badge-inactive { background: rgba(245,158,11,.15); color: #fbbf24; }
.badge-deleted  { background: rgba(239,68,68,.15); color: #f87171; }

.club-stats {
  display: flex; align-items: center; justify-content: space-around;
  padding: 14px 18px; flex: 1;
}
.club-stat { text-align: center; flex: 1; }
.cs-val { display: block; font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.1; }
.cs-key { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-top: 3px; }
.cs-sep { width: 1px; height: 28px; background: rgba(255,255,255,.06); }

.club-actions {
  display: flex; gap: 6px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255,255,255,.05);
}

@media (max-width: 640px) {
  .clubs-hero-title { font-size: 26px; }
  .clubs-hero-content { flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px 16px; }
  .clubs-hero-pitch { display: none; }
  .clubs-grid { grid-template-columns: 1fr; }
}

/* ─── Club detail — left sidebar layout ───────────────────────── */
.club-layout {
  display: flex; min-height: calc(100vh - 56px); align-items: flex-start;
}

/* Sidebar */
.club-sidebar {
  width: 220px; flex-shrink: 0; position: sticky; top: 56px;
  height: calc(100vh - 56px); overflow-y: auto;
  background: rgba(10,14,26,0.6); border-right: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; gap: 0;
  padding: 8px 0 24px;
}
.csb-nav { display: flex; flex-direction: column; padding: 8px 0; }
.csb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; text-decoration: none;
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  /* reserve a 1px border on all sides (transparent) so activating it never shifts layout */
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.csb-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.csb-item.csb-active {
  background: rgba(var(--club-rgb,99,102,241),0.12);
  color: var(--text);
  border-color: rgba(var(--club-rgb,99,102,241),0.4); /* fine border around the whole item */
  border-left-color: rgb(var(--club-rgb,99,102,241)); /* thick accent bar on the left */
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 5px rgba(var(--club-rgb,99,102,241),0.12);
  font-weight: 600;
}
.csb-icon { font-size: 16px; line-height: 1; flex-shrink: 0; }
.csb-icon-img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; display: block; }
.csb-label { font-size: 13px; }

/* Main content area */
.club-main { flex: 1; min-width: 0; padding: 24px; }
.club-main-content { width: 100%; }

/* ── Group-detail tab panel (echipă selectată) ── */
.gd-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.gd-tab { padding: 7px 13px; font-size: 12px; font-weight: 600; color: var(--text-secondary); background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; border-radius: 6px 6px 0 0; transition: color .12s, background .12s, border-color .12s; }
.gd-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.gd-tab-active { color: var(--text); border-bottom-color: var(--primary, #1565c0); }
/* fill remaining height, scroll internally when the active tab overflows */
.gd-panes { max-height: calc(100vh - 300px); min-height: 280px; overflow-y: auto; padding-right: 4px; }
.club-locked-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  border: 1px solid transparent; margin-bottom: 16px;
}

/* Settings tab */
.club-settings-wrap { display: flex; flex-direction: column; gap: 16px; }
.club-settings-sec {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.club-settings-danger { border-color: rgba(239,68,68,0.2); }
.css-hdr {
  padding: 12px 16px; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.css-body { padding: 4px 0; }
.css-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.css-row:last-child { border-bottom: none; }
.css-key { font-size: 12px; color: var(--text-muted); min-width: 110px; flex-shrink: 0; }
.css-val { font-size: 13px; color: var(--text); }

/* ─── Player sub-tabs ──────────────────────────────────── */
.plr-stabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); margin-bottom: 10px; padding-bottom: 0;
}
.plr-stab {
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  border: none; background: none; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  border-radius: 0; transition: color .12s, border-color .12s;
}
.plr-stab:hover { color: var(--text); }
.plr-stab.plr-stab-active { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }
.plr-stab-body { font-size: 13px; }

/* Placeholder for upcoming sections */
.club-section-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 260px; gap: 12px; opacity: 0.6;
}
.csp-icon { font-size: 48px; }
.csp-title { font-size: 20px; font-weight: 700; color: var(--text); }
.csp-desc { font-size: 13px; color: var(--text-muted); text-align: center; }

/* Mobile: sidebar becomes horizontal pill strip at top */
@media (max-width: 768px) {
  .club-layout { flex-direction: column; }
  .club-sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07);
    padding-bottom: 0;
  }
  .csb-nav { flex-direction: row; overflow-x: auto; padding: 4px 8px; gap: 0; }
  .csb-item {
    padding: 8px 12px; border: none; border-bottom: 3px solid transparent;
    border-radius: 0; box-shadow: none;
    flex-shrink: 0; gap: 5px;
  }
  .csb-item.csb-active { border-color: transparent; border-bottom-color: rgb(var(--club-rgb,99,102,241)); border-radius: 0; box-shadow: none; }
  .csb-label { font-size: 12px; }
  .club-main { padding: 16px; }
}

/* ─── In-tab sub-tabs (filter card on top + tab panel below; used by Buget, P&L) ─── */
.subtab-bar { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.subtab-btn {
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; border-radius: 6px 6px 0 0; transition: background .12s, color .12s, border-color .12s;
}
.subtab-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.subtab-btn.subtab-active { color: var(--text); border-bottom-color: var(--primary, #6366f1); background: rgba(99,102,241,0.09); }

/* ─── Tournaments strip (bottom of clubs page) ─────────────────── */
.clubs-tournaments-strip {
  margin-top: 8px; padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.15);
}
.cts-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 12px;
}
.cts-icon { font-size: 18px; }
.cts-label {
  font-size: 12px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--text-secondary);
}
.cts-badge {
  font-size: 11px; font-weight: 700;
  background: rgba(245,158,11,0.18); color: #f59e0b;
  border-radius: 20px; padding: 1px 9px;
}
.cts-sep { flex: 1; }
.cts-link {
  font-size: 12px; font-weight: 600; text-decoration: none;
  color: var(--text-secondary); padding: 5px 12px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
  transition: color .15s, border-color .15s, background .15s;
}
.cts-link:hover { color: var(--text); border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.04); }
.cts-create {
  background: rgba(245,158,11,0.1); color: #f59e0b;
  border-color: rgba(245,158,11,0.25);
}
.cts-create:hover { background: rgba(245,158,11,0.2); border-color: rgba(245,158,11,0.5); color: #fbbf24; }

/* ══ Public navbar brand ══════════════════════════════════════════ */
.pub-brand {
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; flex-shrink: 0;
  width: 40px; height: 40px;
  margin: 6px 0;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(59,130,246,0.22) 0%, rgba(99,102,241,0.14) 100%);
  border: 1px solid rgba(99,102,241,0.35);
  box-shadow: 0 2px 8px rgba(59,130,246,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: all .2s ease;
}
.pub-brand:hover {
  background: linear-gradient(145deg, rgba(59,130,246,0.35) 0%, rgba(99,102,241,0.25) 100%);
  box-shadow: 0 0 18px rgba(99,102,241,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.pub-home-icon { color: #93c5fd; display: block; filter: drop-shadow(0 0 4px rgba(147,197,253,0.5)); }
.pub-login-btn {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff; text-decoration: none;
  padding: 7px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(59,130,246,0.35);
  transition: transform .15s, box-shadow .15s;
}
.pub-login-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,0.5); }

/* Public club card extras */
.pub-club-card { cursor: pointer; }
.pub-club-tc {
  font-size: 11px; font-weight: 700; white-space: nowrap;
  background: rgba(59,130,246,0.12); color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: 20px; padding: 2px 9px; flex-shrink: 0;
}

/* ── Public club hero ──────────────────────────────────────────── */
.pub-club-hero {
  background:
    linear-gradient(135deg, rgba(5,14,29,0.96) 0%, rgba(10,22,40,0.88) 50%, rgba(5,14,29,0.8) 100%),
    url('/img/hero.webp') center/cover no-repeat;
  background-color: #050e1d;
  border-bottom: 1px solid rgba(var(--sc),0.15);
}
.pub-club-hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px;
  display: flex; align-items: center; gap: 20px;
}
.pub-club-logo {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: 16px;
  background: rgba(var(--sc),0.15); border: 1px solid rgba(var(--sc),0.3);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pub-club-logo img { width: 100%; height: 100%; object-fit: contain; }
.pub-club-name { font-size: 26px; font-weight: 900; color: #fff; margin: 0 0 6px; }
.pub-club-city { font-size: 13px; color: rgba(255,255,255,0.5); }
.pub-club-desc { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 4px; }

/* ── Tournament list cards ─────────────────────────────────────── */
.tourn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 14px; }
.tourn-card {
  display: block; position: relative; overflow: hidden;
  background: rgba(17,24,39,0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 3px solid rgba(var(--sc),0.7);
  border-radius: 14px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: cardIn .35s ease both;
}
.tourn-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--sc),0.35);
  box-shadow: 0 6px 28px rgba(0,0,0,.4), 0 0 0 1px rgba(var(--sc),0.2);
}
.tourn-card-top {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px 8px;
  background: linear-gradient(90deg, rgba(var(--sc),0.1) 0%, transparent 100%);
}
.tourn-card-bot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 14px 18px;
}
.tourn-club-logo-wrap { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,0.06); }
.tourn-club-logo { width: 40px; height: 40px; object-fit: contain; display: block; }
.tourn-sport-icon { font-size: 28px; flex-shrink: 0; width: 38px; text-align: center; }
/* Sport badge on the RIGHT of the card top (the logo/crest sits on the left). */
.tourn-sport-r { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; }
.tourn-sport-r img, .tourn-sport-r .sport-glyph { width: 30px; height: 30px; object-fit: contain; }
.tourn-name { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.tourn-meta { font-size: 11px; color: var(--text-muted); }
.tourn-status {
  font-size: 10px; font-weight: 700; white-space: nowrap;
  padding: 3px 9px; border-radius: 20px; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: .3px;
}

/* ══ Settings panel — version section ════════════════════════════ */
.settings-versions { border-top: 1px solid var(--border); }
.ver-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-secondary); padding: 3px 0;
}
.ver-tag {
  font-family: monospace; font-size: 11px; font-weight: 700;
  background: rgba(59,130,246,0.12); color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 5px; padding: 1px 7px;
}
.ver-tag.ver-warn {
  background: rgba(245,158,11,0.12); color: #fbbf24;
  border-color: rgba(245,158,11,0.25);
}
.ver-patches-link {
  display: block; margin-top: 6px;
  font-size: 11px; font-weight: 600; color: #fbbf24;
  text-decoration: none;
}
.ver-patches-link:hover { text-decoration: underline; }

/* ══ Patches tab ══════════════════════════════════════════════════ */
.patches-group-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 10px;
}
.patch-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.patch-row:last-child { border-bottom: none; }
.patch-info { flex: 1; min-width: 0; }
.patch-ver { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.patch-ver strong { color: #60a5fa; }
.patch-desc { font-size: 12px; color: var(--text-muted); }
.patch-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; opacity: .7; }
.patch-actions { display: flex; gap: 6px; flex-shrink: 0; }
.patch-ok { font-size: 12px; font-weight: 700; color: var(--success); flex-shrink: 0; }
.patch-applied .patch-ver { opacity: .65; }
.patch-applied .patch-desc { opacity: .55; }

/* Hover utilities — CSP migration: replace inline onmouseover/onmouseout style toggles with :hover rules.
   !important where the element sets the same property inline (base state stays inline, hover wins). */
.hover-lift:hover { box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.hover-dim:hover { opacity: .85; }
.hover-undim:hover { opacity: 1 !important; }
.hover-bg-bright:hover { background: rgba(255,255,255,.18) !important; }

/* Discover CTA — the public landing "Vezi ce poate face" button (ball-in-magnifier image + gradient pill). */
.disc-cta {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 20px;
  padding: 12px 20px 12px 12px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(139,92,246,0.16));
  border: 1px solid rgba(96,165,250,0.35);
  box-shadow: 0 8px 30px -8px rgba(59,130,246,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.disc-cta:hover {
  transform: translateY(-2px); text-decoration: none; border-color: rgba(96,165,250,0.6);
  box-shadow: 0 14px 40px -10px rgba(59,130,246,0.6), inset 0 1px 0 rgba(255,255,255,0.09);
}
.disc-cta img { width: 58px; height: 58px; display: block; flex: 0 0 auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.45)); }
.disc-cta-body { display: flex; flex-direction: column; line-height: 1.22; }
.disc-cta-t { font-weight: 800; font-size: 17px; }
.disc-cta-s { font-size: 12.5px; color: var(--text-secondary); }
.disc-cta-arrow { font-size: 20px; color: #60a5fa; margin-left: 6px; transition: transform .18s ease; }
.disc-cta:hover .disc-cta-arrow { transform: translateX(4px); }

/* ─── Evenimente tab — per-player event glyphs (v1.1.339): slim 3D cards + shiny chips ─── */
.ev-row { display:flex; align-items:center; gap:6px; padding:6px 4px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.ev-row .ev-name { flex:1; font-size:13px; min-width:96px; }
.ev-below { flex-basis:100%; display:flex; gap:5px; flex-wrap:wrap; align-items:center; margin-top:4px; padding-left:26px; }
.ev-below:empty { display:none; }
/* a slim playing-card glyph (yellow/red) — clickable to remove */
.ev-cardg {
  width:15px; height:21px; border-radius:3px; border:none; cursor:pointer; padding:0;
  box-shadow: 0 1px 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 3px rgba(0,0,0,.22);
  transition: transform .12s ease, filter .12s ease;
}
.ev-cardg:hover { transform: translateY(-2px) rotate(-3deg); filter: brightness(1.12); }
.ev-cardg-y { background: linear-gradient(150deg, #ffe14d 0%, #ffc400 55%, #f0a800 100%); }
.ev-cardg-r { background: linear-gradient(150deg, #ff5a52 0%, #e53935 55%, #c31712 100%); }
/* a shiny event chip (fouls/penalties/subs) — icon + count, click removes one */
.ev-chip {
  display:inline-flex; align-items:center; gap:4px; font-size:12px; font-weight:600;
  border:1px solid var(--border); border-radius:9px; padding:3px 9px; cursor:pointer; background: transparent; color: var(--text);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.ev-chip:hover { transform: translateY(-1px); background: rgba(127,127,127,.12); border-color: var(--text-muted); }
.ev-chip strong { font-weight:800; }
/* type classes kept (emitted by JS); the coloured inline-SVG icon signals the type — no background fill */
/* add buttons row — flat: the emoji icon carries the meaning, no colored fill behind it */
.ev-add { border:1px solid var(--border); border-radius:8px; cursor:pointer; font-size:16px; line-height:1; padding:5px 9px; min-height:36px;
  background: transparent; color: var(--text); transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.ev-add:hover:not(:disabled) { transform: translateY(-1px); background: rgba(127,127,127,.12); border-color: var(--text-muted); }
.ev-add:disabled { opacity:.35; cursor:not-allowed; }
/* type classes kept (emitted by JS) but no longer paint a background — the glyph alone signals the type */

/* ─── Goluri tab — two columns (home | away) ─── */
.gol-cols { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:640px){ .gol-cols { grid-template-columns:1fr; } }
.gol-col { border:1px solid var(--border); border-radius:10px; padding:10px; }
.gol-col-head { display:flex; align-items:center; justify-content:space-between; font-weight:700; margin-bottom:8px; padding-bottom:6px; border-bottom:2px solid var(--border); }
.gol-col-head .gol-count { font-size:12px; color:var(--text-muted); font-weight:600; }
.gol-goal { display:flex; align-items:center; gap:5px; padding:5px 2px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.gol-slot { padding:5px 2px; border-bottom:1px dashed var(--border); }
.gol-slot select { width:100%; }

/* ══════════════════════════════════════════════════════════════════════════
   PUBLIC VIEW — Glassmorphism premium (v2)
   Motion is GPU-only (transform/opacity); the diagonal sheen animates ONLY on
   hover → zero idle cost. Custom icons drop into the .*-icon <img> slots.
   ══════════════════════════════════════════════════════════════════════════ */

/* Tournament cards (club public page). BUGFIX: markup uses .tourn-card-hd, which had
   NO rule → text hugged the card edge. Give it real padding + a clean 2-part layout. */
.tourn-card-hd {
  display: flex; align-items: center; gap: 15px;
  padding: 20px 22px;
  background: linear-gradient(100deg, rgba(var(--sc),0.12) 0%, transparent 62%);
}
.tourn-card {
  background: linear-gradient(150deg, rgba(30,41,59,0.72) 0%, rgba(13,20,34,0.86) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid rgb(var(--sc));
  border-radius: 18px;
  box-shadow: 0 12px 30px -14px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, border-color .25s;
  will-change: transform;
}
.tourn-card::before { /* diagonal sheen, parked off-card until hover */
  content: ''; position: absolute; top: 0; left: -60%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,0.13) 50%, transparent 100%);
  transform: skewX(-18deg); pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1;
}
.tourn-card > * { position: relative; z-index: 2; }
.tourn-card:hover {
  transform: translateY(-5px) scale(1.012);
  border-color: rgba(var(--sc),0.55);
  box-shadow: 0 24px 46px -18px rgba(0,0,0,0.85), 0 0 0 1px rgba(var(--sc),0.32),
    0 0 26px -4px rgba(var(--sc),0.35), inset 0 1px 0 rgba(255,255,255,0.10);
}
.tourn-card:hover::before { opacity: 1; animation: pubSheen .7s ease; }
@keyframes pubSheen { from { left: -60%; } to { left: 135%; } }

/* Glossy round sport badge — a custom icon <img> (see the ChatGPT prompt) drops right in */
.tourn-sport-icon {
  width: 52px; height: 52px; flex-shrink: 0; text-align: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1;
}
/* The glossy 3D ball webp is self-contained (own gloss + glow) → no badge disk behind it. */
.tourn-sport-icon img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.42)); }
/* Canonical sport icon anywhere the old emoji sat — sizes to the surrounding font-size (1em). */
.sport-glyph { width: 1em; height: 1em; object-fit: contain; vertical-align: -0.15em; display: inline-block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
/* Tournament-wizard sport picker (cards, mirrors the league wizard's .lgw-sport-card). */
.twiz-sport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; margin-top: 6px; }
.twiz-sport-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border: 2px solid var(--border); border-radius: 14px; background: var(--card-bg); cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; font: inherit; color: inherit; }
.twiz-sport-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.twiz-sport-card.sel { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,.18); }
.twiz-sport-ic { font-size: 44px; line-height: 1; }
.twiz-sport-ic .sport-glyph { width: 1em; height: 1em; vertical-align: middle; }
.twiz-sport-nm { font-weight: 700; font-size: 14px; text-align: center; }
/* Double-elimination bracket diagram (public Format tab + editor Format tab): columns per round, horizontal scroll. */
.de-diagram { display: flex; flex-direction: column; gap: 18px; }
.de-sec { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--card-bg); }
.de-sec.wb { border-left: 4px solid #1565c0; }
.de-sec.lb { border-left: 4px solid #c62828; }
.de-sec.gf { border-left: 4px solid #f9a825; }
.de-sec-h { font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.de-cols { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.de-cols::-webkit-scrollbar { display: none; }
.de-col { display: flex; flex-direction: column; gap: 10px; min-width: 138px; justify-content: space-around; }
/* Bracket column titles ("Semifinale Winners" …): were 10px --text-muted → barely visible. Now bigger + a
   metallic chrome-silver gradient with a solid bright-silver fallback (guaranteed visible if background-clip:text
   is unsupported — avoids the transparent-text trap). min-height keeps a long wrapped label (e.g. German
   "Winners-Halbfinale") from making its column taller than short single-line neighbors in the same row. */
.de-col-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; text-align: center; color: #dbe4ee; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .de-col-h {
    background: linear-gradient(180deg, #ffffff 0%, #dbe4ee 42%, #8fa1b6 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
  }
}
.de-match { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; font-size: 12px; }
.de-match.live { border-color: var(--success); box-shadow: 0 0 0 2px rgba(46,125,50,.18); }
/* Walkover-decided matches had no visual marker at all — identical to a normally-played result. */
.de-match.wo { border-color: #f5a623; }
.de-match.wo .de-mnum .de-sc::after { content: 'WO'; margin-left: 6px; font-size: 8px; font-weight: 800; padding: 1px 5px; border-radius: 4px; background: rgba(245,166,35,.22); color: #f5a623; }
.de-mnum { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1px 6px; font-size: 9px; font-weight: 800; color: var(--primary); background: var(--bg-secondary); padding: 3px 7px; }
.de-mnum .de-sc { color: var(--text); font-weight: 800; }
.de-setpar { font-weight: 400; color: var(--text-secondary); font-size: 9px; }
.de-side { padding: 5px 8px; border-top: 1px dashed var(--border); position: relative; }
.de-side:first-of-type { border-top: none; }
/* Played match: winner = thin green accent bar + a shiny 3D metallic ✓ badge, pale-green bold name; loser = thin
   RED accent bar + pale-red name — high-contrast on the dark theme (NOT muted gray, which read as barely-there).
   Both use an inset box-shadow for the bar (no layout shift). Kept in sync with .pub-match-team's koMatchCard
   equivalent (public/js/app.js) so the live KO bracket and the DE bracket read as one consistent visual language. */
.de-side.win { background: linear-gradient(90deg, rgba(34,197,94,.24), rgba(34,197,94,.04)); box-shadow: inset 3px 0 0 #22c55e; padding-right: 24px; }
.de-side.win .de-tname { font-weight: 800; color: #86efac; }
.de-side.win::after {
  content: '✓'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 900; color: #fff; line-height: 1;
  background: linear-gradient(145deg, #bbf7d0 0%, #22c55e 52%, #15803d 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.45), inset 0 1px 1.5px rgba(255,255,255,.7), inset 0 -1px 1px rgba(0,0,0,.28);
}
.de-side.lose { background: linear-gradient(90deg, rgba(239,68,68,.2), transparent); box-shadow: inset 3px 0 0 #ef4444; }
.de-side.lose .de-tname { font-weight: 700; color: #fca5a5; }
.de-tname { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.de-stat { display: block; font-size: 9px; color: var(--text-secondary); font-weight: 600; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.de-sets { display: flex; gap: 7px; margin-top: 2px; }
.de-set { font-size: 10px; font-weight: 600; color: var(--text-muted); min-width: 13px; text-align: center; }
.de-set.win { color: var(--text); font-weight: 800; }
.de-tbd { color: var(--text-muted); font-style: italic; }
/* Clasament (live) bracket: wider cells so the per-team M/S/P line + set-score parentheses fit. */
.de-diagram.live .de-col { min-width: 196px; }
.tourn-name { font-size: 16.5px; font-weight: 800; letter-spacing: .2px; }
.tourn-meta { font-size: 12px; margin-top: 4px; opacity: .85; }

/* Hero — glossy club logo, gradient title, inline location pin slot */
.pub-club-logo { position: relative;
  box-shadow: 0 12px 26px -10px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -6px 12px rgba(0,0,0,0.28); }
.pub-club-logo::after { content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background: linear-gradient(160deg, rgba(255,255,255,0.22) 0%, transparent 45%); }
.pub-club-name { background: linear-gradient(180deg,#ffffff 0%,#cbd7e6 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 20px rgba(120,170,255,0.18); }
.pub-club-city { display:inline-flex; align-items:center; gap:6px; }
.pub-pin-icon { width:16px; height:16px; object-fit:contain; vertical-align:-3px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }

/* Login button — subtle sheen sweep on hover */
.pub-login-btn { position: relative; overflow: hidden; }
.pub-login-btn::before { content:''; position:absolute; top:0; left:-80%; width:60%; height:100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.38), transparent);
  transform: skewX(-18deg); opacity:0; transition: opacity .2s; }
.pub-login-btn:hover::before { opacity:1; animation: pubSheen .7s ease; }

/* Section/category tabs — glass pills (screenshot 3) */
.pt-tabs { gap: 8px; border-bottom: none; padding: 12px 0 12px; flex-wrap: wrap; justify-content: center; }
.pt-tab {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(150deg, rgba(30,41,59,0.6), rgba(13,20,34,0.72));
  padding: 11px 17px; font-weight: 700; font-size: 15px; flex: 0 0 auto; white-space: nowrap;
  box-shadow: 0 2px 8px -4px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform .15s, box-shadow .15s, color .15s, background .15s, border-color .15s;
}
.pt-tab:hover { transform: translateY(-1px); color: var(--text); }
.pt-tab.active {
  color: #fff; border-color: rgba(59,130,246,0.55);
  background: linear-gradient(150deg, #3b82f6, #2563eb);
  box-shadow: 0 7px 16px -6px rgba(59,130,246,0.7), inset 0 1px 0 rgba(255,255,255,0.25);
}
.pt-tab-icon { width:22px; height:22px; object-fit:contain; vertical-align:-6px; margin-right:6px; }

@media (max-width: 700px) {
  /* The tab bar (Info/Schedule/Bracket/Final Ranking/Live-Social) doesn't fit in one row on narrow screens;
     flex-wrap + justify-content:center (the "glass pills" rule above) then wraps into uneven, oddly-centered
     rows (worse: sometimes a single tab stranded alone on its own centered row). Swipeable single-row scroll —
     the standard mobile tab pattern — reads far better than a multi-row wrap. Placed AFTER the unconditional
     "glass pills" rule above so it actually wins the cascade at this width (a media query has no specificity
     edge over a later same-specificity rule — source order still decides).  */
  .pt-tabs { gap: 6px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-inline: 2px; }
  .pt-tabs::-webkit-scrollbar { display: none; }
  .pt-tab { padding: 9px 13px; font-size: 13px; }
}

/* Section detail header — glossy sport badge fallback + roomier header */
.pub-tournament-header { padding: 28px 4px 30px; }
.pub-sport-big {
  width: 66px; height: 66px; display: inline-flex; align-items:center; justify-content:center;
  font-size: 34px; border-radius: 20px;
  background: radial-gradient(120% 120% at 30% 20%, rgba(255,255,255,0.26), transparent 46%),
    linear-gradient(150deg, rgba(59,130,246,0.92), rgba(37,99,235,0.6));
  box-shadow: 0 10px 22px -8px rgba(59,130,246,0.6), inset 0 1px 1px rgba(255,255,255,0.42), inset 0 -4px 8px rgba(0,0,0,0.25);
}

@media (prefers-reduced-motion: reduce) {
  .tourn-card, .tourn-card:hover, .pt-tab, .pt-tab:hover { transform: none; }
  .tourn-card:hover::before, .pub-login-btn:hover::before { animation: none; opacity: 0; }
}
