/* ===== CSS Variables ===== */
.matches-filters {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}

.matches-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: rgba(255,255,255,.85);
  cursor: pointer;
  user-select: none;
}

.matches-filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent,#f5c400);
}
:root {
  /* Backgrounds — dark navy palette */
  --bg:          #0b0e1a;
  --bg2:         #101422;
  --surface:     #161b2c;
  --surface2:    #1d2236;
  --topbar-bg:   #070912;
  --strip-bg:    #0e1120;

  /* Accent — NML Gold */
  --accent:      #f5c400;
  --accent-hover:#ffd024;
  --accent-dim:  rgba(245,196,0,.10);

  /* Status */
  --green:       #22c55e;
  --green-bg:    rgba(34,197,94,.10);
  --yellow:      #f59e0b;
  --yellow-bg:   rgba(245,158,11,.10);
  --red:         #ef4444;
  --red-bg:      rgba(239,68,68,.08);

  /* Text */
  --text:        #eceef8;
  --text-soft:   #8890aa;
  --muted:       #4e5470;

  /* Borders */
  --border:        rgba(255,255,255,.065);
  --border-strong: rgba(255,255,255,.13);
  --border-accent: rgba(245,196,0,.28);

  /* Layout */
  --radius:    8px;
  --radius-lg: 14px;
  --container: 1200px;

  color-scheme: dark;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(11, 14, 26, 0.86), rgba(11, 14, 26, 0.86)),
    url('assets/back.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ===== Container ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Loading ===== */
.loading-overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; z-index: 9999;
  color: var(--muted); font-size: 14px;
}
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== App wrapper ===== */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================================================
   TOPBAR (sticky header)
   =================================================== */
.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

/* Brand row */
.topbar-brand-row {
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.topbar-brand-row .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.topbar-logo {
  width: 42px; height: 42px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}
.topbar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.topbar-brand-name {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.3px;
}
.topbar-brand-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* Admin access */
.admin-access { display: flex; align-items: center; gap: 8px; }
.lock-btn {
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 15px;
  padding: 6px 10px;
  opacity: .65;
  transition: all .18s;
  line-height: 1;
}
.lock-btn:hover { opacity: 1; background: rgba(255,255,255,.13); }
.code-box input {
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text); font-size: 13px;
  outline: none; width: 170px;
  transition: border-color .15s;
}
.code-box input:focus { border-color: var(--accent); }
.admin-badge {
  font-size: 10px; font-weight: 900;
  padding: 3px 9px;
  background: var(--accent);
  color: #07080e;
  border-radius: 4px;
  letter-spacing: 1.5px;
}

/* Navigation row */
.topbar-nav-row .container {
  padding-top: 0;
  padding-bottom: 0;
}
.nav {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav-btn {
  padding: 13px 17px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all .18s;
  letter-spacing: .15px;
}
.nav-btn:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(245,196,0,.04);
}

/* ===================================================
   STATS STRIP
   =================================================== */
.stats-section {
  background: var(--strip-bg);
  border-bottom: 1px solid var(--border);
}
.stats-section .container { padding-top: 0; padding-bottom: 0; }

.stats-bar {
  display: flex;
  align-items: stretch;
}
.stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-right: 1px solid var(--border);
  position: relative;
  transition: background .15s;
}
.stat-card:last-child { border-right: none; }
.stat-card:hover { background: rgba(245,196,0,.03); }

.stat-value {
  font-size: 26px; font-weight: 900;
  color: var(--accent); line-height: 1;
  min-width: 32px;
}
.stat-label {
  font-size: 11px; color: var(--text-soft);
  font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
  line-height: 1.4;
}

/* ===================================================
   MAIN CONTENT
   =================================================== */
.main-content {
  flex: 1;
  padding: 28px 0 60px;
}
.main-content .container { padding-top: 0; padding-bottom: 0; }

/* ===== Tabs ===== */
.tab { display: none; }
.tab.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================
   LEAGUE TABLE TAB
   =================================================== */
.zone-legend {
  display: flex; gap: 8px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.zone-badge {
  font-size: 11px; font-weight: 700;
  padding: 4px 11px; border-radius: 6px;
  letter-spacing: .3px;
}
.zone-playoff { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(34,197,94,.2); }
.zone-qual    { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(245,158,11,.2); }
.zone-out     { background: var(--red-bg);    color: var(--red);    border: 1px solid rgba(239,68,68,.15); }

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}
.league-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}
.league-table thead th {
  background: var(--bg2);
  padding: 12px 14px;
  text-align: center;
  font-weight: 800; font-size: 11px;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted);
  border-bottom: 2px solid var(--border-strong);
}
.league-table thead th.col-team { text-align: left; }

.league-table tbody tr {
  transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.league-table tbody tr:last-child { border-bottom: none; }
.league-table tbody tr:nth-child(even) { background: rgba(255,255,255,.013); }
.league-table tbody tr:hover { background: var(--surface2); }

.league-table tbody td {
  padding: 12px 14px;
  text-align: center;
  color: var(--text-soft);
}
.league-table tbody td.col-team { text-align: left; font-weight: 700; color: var(--text); }
.league-table tbody td.col-pos  { font-weight: 900; width: 44px; color: var(--muted); font-size: 13px; }
.league-table tbody td.col-pts  { font-weight: 900; color: var(--accent); font-size: 16px; }

/* Zone left-border accents */
.league-table tbody tr.zone-playoff-row td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.league-table tbody tr.zone-qual-row    td:first-child { box-shadow: inset 4px 0 0 var(--yellow); }
.league-table tbody tr.zone-out-row     td:first-child { box-shadow: inset 4px 0 0 var(--red); }

/* Form column */
.col-form { min-width: 90px; white-space: nowrap; }
.col-form span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 4px;
  font-size: 10px; font-weight: 800; margin: 0 1.5px;
}
.form-w  { background: rgba(34,197,94,.22);  color: #22c55e; }
.form-d  { background: rgba(245,196,0,.18);  color: #f5c400; }
.form-l  { background: rgba(239,68,68,.18);  color: #ef4444; }
.form-ph { background: rgba(255,255,255,.05); color: rgba(255,255,255,.15); }

/* ===================================================
   MATCHES TAB
   =================================================== */
.matchday { margin-bottom: 32px; }

.matchday-header {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 12px;
  color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.matchday-header::before,
.matchday-header::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--border);
}
.matchday-header span { color: var(--accent); white-space: nowrap; }
.matchday-date {
  color: var(--muted); font-weight: 600;
  font-size: 11px; text-transform: none;
  letter-spacing: 0; margin-left: 4px;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 8px;
}

.match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 13px 16px;
  cursor: pointer;
  transition: all .15s;
  gap: 12px;
}
.match-card:hover {
  background: var(--surface2);
  border-color: var(--border-strong);
  border-left-color: transparent;
}
.match-card.played { border-left-color: var(--accent); }
.match-card.tp     { border-left-color: var(--red) !important; }

.match-home, .match-away {
  font-weight: 600; font-size: 13px;
  color: var(--text-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.match-home { text-align: right; }
.match-away { text-align: left; }
.match-winner { color: var(--text); font-weight: 800; }

.match-score {
  font-size: 15px; font-weight: 900;
  color: var(--muted);
  min-width: 58px; text-align: center;
  letter-spacing: .5px;
  background: var(--bg2);
  border-radius: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.match-card.played .match-score {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

.no-schedule { text-align: center; padding: 80px 20px; color: var(--muted); }
.no-schedule p  { font-size: 16px; margin-bottom: 8px; }
.no-schedule small { font-size: 13px; }

/* ===================================================
   PLAYOFF TAB
   =================================================== */
.playoff-section { margin-bottom: 36px; }
.playoff-section h2 {
  font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  display: flex; align-items: center; gap: 12px;
}
.playoff-section h2::after {
  content: '';
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-accent), transparent);
}

.qual-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.bracket {
  display: flex; align-items: stretch;
  gap: 12px; overflow-x: auto; padding-bottom: 10px;
}
.bracket-round {
  display: flex; flex-direction: column;
  justify-content: space-around;
  min-width: 200px; gap: 8px;
}
.bracket-round-title {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); text-align: center; margin-bottom: 8px;
}
.bracket-match {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  transition: all .14s;
}
.bracket-match:hover { border-color: var(--border-strong); background: var(--surface2); }
.bracket-match.played { border-color: rgba(245,196,0,.35); }
.bracket-match.no-click { cursor: default; }

.bracket-team {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 13px; font-size: 13px; font-weight: 500;
}
.bracket-team + .bracket-team { border-top: 1px solid var(--border); }
.bracket-team .team-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.bracket-team .team-score { font-weight: 900; margin-left: 8px; min-width: 18px; text-align: center; }
.bracket-team.winner { background: var(--accent-dim); }
.bracket-team.winner .team-name { color: var(--accent); font-weight: 800; }
.bracket-team.tbd .team-name { color: var(--muted); font-style: italic; }

.champion-card {
  background: linear-gradient(135deg, rgba(245,196,0,.12), rgba(245,196,0,.04));
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px; text-align: center;
}
.champion-card .trophy { font-size: 44px; margin-bottom: 10px; }
.champion-card .champion-name { font-size: 22px; font-weight: 900; color: var(--accent); }
.champion-card .champion-label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px;
}

.playoff-locked { text-align: center; padding: 60px 20px; color: var(--muted); }
.playoff-locked .lock-icon { font-size: 36px; margin-bottom: 12px; }
.playoff-progress {
  width: 200px; height: 4px;
  background: var(--bg2); border-radius: 2px;
  margin: 14px auto 0; overflow: hidden;
}
.playoff-progress-bar {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width .3s;
}

/* ===================================================
   ADMIN TAB
   =================================================== */
.admin-grid { display: grid; gap: 16px; }
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
}
.admin-card h3 {
  font-size: 14px; font-weight: 800;
  margin-bottom: 6px; color: var(--text);
  text-transform: uppercase; letter-spacing: .4px;
}
.hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }

.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}
.team-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--bg2); border-radius: 8px; font-size: 14px;
  border: 1px solid var(--border);
}
.team-item .team-num { font-weight: 800; color: var(--muted); min-width: 28px; font-size: 12px; }
.team-item input {
  flex: 1; background: transparent; border: none;
  color: var(--text); font-size: 14px; font-weight: 500;
  padding: 4px 0; outline: none;
  border-bottom: 1px solid transparent; transition: border-color .15s;
}
.team-item input:focus { border-bottom-color: var(--accent); }

.seed-row { display: flex; gap: 8px; }
.seed-row input {
  flex: 1; padding: 10px 14px;
  background: var(--bg2); border: 1px solid var(--border-strong);
  border-radius: 8px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color .15s;
}
.seed-row input:focus { border-color: var(--accent); }

/* ===== Import / Export ===== */
.import-export-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.file-label { display: inline-flex; align-items: center; cursor: pointer; }
.import-hint-details { margin-top: 6px; }
.import-hint-details summary {
  font-size: 12px; color: var(--muted);
  cursor: pointer; user-select: none;
}
.import-hint-details summary:hover { color: var(--text); }
.import-hint-code {
  margin-top: 8px; padding: 12px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; font-size: 12px; color: var(--muted);
  overflow-x: auto; line-height: 1.6;
  font-family: 'Courier New', monospace;
}
.custom-table-badge {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 14px;
  background: var(--green-bg); color: var(--green);
  border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid rgba(34,197,94,.2);
}
.custom-table-badge[hidden] { display: none; }
.btn-small { padding: 4px 10px !important; font-size: 12px !important; }

/* ===================================================
   BUTTONS
   =================================================== */
.btn-accent {
  padding: 10px 20px;
  background: var(--accent); color: #07080e;
  border: none; border-radius: 8px;
  font-weight: 800; font-size: 14px;
  transition: background .14s;
}
.btn-accent:hover { background: var(--accent-hover); }
.btn-accent:disabled { opacity: .4; cursor: not-allowed; }

.btn-danger {
  padding: 10px 20px;
  background: var(--red-bg); color: var(--red);
  border: 1px solid rgba(239,68,68,.22); border-radius: 8px;
  font-weight: 700; font-size: 14px; transition: all .14s;
}
.btn-danger:hover { background: rgba(239,68,68,.18); }

.btn-secondary {
  padding: 10px 20px;
  background: var(--surface); color: var(--text-soft);
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-weight: 600; font-size: 14px; transition: all .14s;
}
.btn-secondary:hover { color: var(--text); background: var(--surface2); }

.btn-ghost {
  padding: 10px 20px; background: transparent;
  color: var(--muted); border: none;
  border-radius: 8px; font-weight: 500; font-size: 14px;
}
.btn-ghost:hover { color: var(--text); }

/* ===================================================
   MODAL (base)
   =================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(8px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px; padding: 28px;
  width: 90%; max-width: 440px;
  animation: modalIn .18s ease;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
.modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 20px; text-align: center; }
.modal-match {
  display: flex; align-items: center;
  justify-content: center; gap: 16px; margin-bottom: 24px;
}
.modal-team {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px; flex: 1;
}
.modal-team span { font-weight: 700; font-size: 14px; text-align: center; color: var(--text-soft); }
.modal-team input {
  width: 64px; height: 56px;
  text-align: center; font-size: 28px; font-weight: 900;
  background: var(--bg2);
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text); outline: none; transition: border-color .15s;
}
.modal-team input:focus { border-color: var(--accent); }
.modal-team input:disabled { opacity: .4; }
.modal-vs { font-size: 24px; font-weight: 900; color: var(--muted); padding-top: 28px; }
.modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.match-date-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.match-date-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.match-date-input {
  background: var(--bg2); border: 1px solid var(--border-strong);
  border-radius: 8px; color: var(--text);
  padding: 6px 10px; font-size: 13px; flex: 1;
  outline: none; transition: border-color .15s;
}
.match-date-input:focus { border-color: var(--accent); }

/* ===================================================
   TOAST
   =================================================== */
.toast {
  position: fixed; bottom: 28px;
  left: 50%; transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 12px 28px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0,0,0,.6), 0 0 0 1px rgba(245,196,0,.1);
  animation: toastIn .25s ease;
}
.toast[hidden] { display: none; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  text-align: center; font-size: 12px;
  color: var(--muted);
  padding: 20px 0 32px;
  border-top: 1px solid var(--border);
}

/* ===================================================
   CLUBS TAB
   =================================================== */
.clubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.club-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all .15s;
}
.club-card:hover {
  background: var(--surface2);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.club-card-top {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.club-card-pos { font-size: 12px; font-weight: 900; color: var(--muted); width: 18px; flex-shrink: 0; }
.club-card-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; flex-shrink: 0; }
.club-card-logo-ph {
  width: 36px; height: 36px; border-radius: 6px;
  background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.club-card-name { font-weight: 700; font-size: 14px; color: var(--text); line-height: 1.2; }
.club-card-stats { display: flex; gap: 8px; justify-content: space-between; }
.club-stat { display: flex; flex-direction: column; align-items: center; flex: 1; }
.club-stat-val { font-size: 16px; font-weight: 900; color: var(--text); }
.club-stat-gd { color: var(--text-soft); }
.club-stat-pts { color: var(--accent); }
.club-stat-lbl {
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; margin-top: 2px;
}

/* ===================================================
   HALL OF FAME TAB
   =================================================== */
.hof-content {
  padding: 28px 0 60px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}
.hof-empty {
  color: var(--muted); font-size: 14px;
  text-align: center; padding: 80px 0;
  opacity: .4; letter-spacing: .1em; text-transform: uppercase;
}

.hof-year-block { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hof-year-header {
  display: flex; align-items: center; gap: 16px;
  width: 100%; margin-bottom: 12px;
}
.hof-year-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,196,0,.4), transparent);
}
.hof-year-badge {
  font-size: .75rem; font-weight: 800;
  letter-spacing: .22em; color: var(--accent);
  white-space: nowrap; text-transform: uppercase; opacity: .8;
}
.hof-year-decree {
  font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; opacity: .35; margin-bottom: 40px;
}

.hof-entries { display: flex; flex-direction: column; gap: 48px; width: 100%; max-width: 680px; }
.hof-entry {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  position: relative;
  padding: 32px 40px;
  background: linear-gradient(160deg, rgba(245,196,0,.04) 0%, rgba(255,255,255,.015) 100%);
  border: 1px solid rgba(245,196,0,.14);
  border-radius: 20px;
}
.hof-entry::before, .hof-entry::after {
  content: '';
  position: absolute;
  left: 32px; right: 32px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,196,0,.3), transparent);
}
.hof-entry::before { top: 0; }
.hof-entry::after  { bottom: 0; }

.hof-portrait {
  width: 120px; height: 120px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(245,196,0,.5);
  box-shadow: 0 0 32px rgba(245,196,0,.2), 0 0 0 6px rgba(245,196,0,.06);
  margin-bottom: 4px;
}
.hof-portrait-ph {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(245,196,0,.07);
  border: 3px solid rgba(245,196,0,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 900; color: rgba(245,196,0,.4);
  margin-bottom: 4px;
}

.hof-entry-ornament {
  font-size: .75rem; letter-spacing: .3em;
  color: var(--accent); opacity: .5;
}
.hof-entry-name {
  font-size: 1.75rem; font-weight: 900;
  letter-spacing: .04em; color: #fff;
  text-shadow: 0 0 40px rgba(245,196,0,.25);
  line-height: 1.15;
}
.hof-entry-desc {
  font-size: .92rem; font-style: italic;
  color: rgba(255,255,255,.55);
  line-height: 1.7; max-width: 520px;
  quotes: '\201C' '\201D';
}



/* HoF admin */
.hof-admin-form { display: flex; flex-direction: column; gap: 8px; }
.hof-photo-label {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  border: 1px dashed rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6); font-size: .85rem;
  cursor: pointer; transition: all .15s;
}
.hof-photo-label:hover { border-color: var(--accent); color: var(--accent); }
.hof-photo-preview {
  width: 80px; height: 80px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(245,196,0,.4);
  align-self: center;
}
.hof-admin-thumb {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(245,196,0,.3);
  cursor: pointer; transition: border-color .15s;
}
.hof-admin-thumb:hover { border-color: var(--accent); }
.hof-admin-thumb-ph {
  background: rgba(245,196,0,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: rgba(245,196,0,.5);
}
.hof-admin-form input,
.hof-admin-form textarea {
  padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: #fff; font-size: .88rem; width: 100%;
  font-family: inherit; resize: vertical;
  transition: border-color .15s;
}
.hof-admin-form input:focus,
.hof-admin-form textarea:focus { outline: none; border-color: var(--accent); }
.hof-admin-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.hof-admin-year-group { display: flex; flex-direction: column; gap: 4px; }
.hof-admin-year-label {
  font-size: .72rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: .06em; padding: 6px 0 2px;
}
.hof-admin-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 10px; background: rgba(255,255,255,.04); border-radius: 8px;
}
.hof-admin-entry-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.hof-admin-name { font-size: .85rem; font-weight: 600; }
.hof-admin-desc { font-size: .75rem; opacity: .45; font-style: italic; }
.btn-sm-danger {
  background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3);
  color: #ef4444; border-radius: 6px; padding: 3px 8px;
  font-size: .75rem; cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.btn-sm-danger:hover { background: rgba(239,68,68,.3); }

/* ===================================================
   NON-ADMIN CURSOR OVERRIDES
   =================================================== */
body:not(.admin-mode) .match-card               { cursor: default; }
body:not(.admin-mode) .match-card:hover          { background: var(--surface); border-color: var(--border); border-left-color: transparent; }
body:not(.admin-mode) .match-card.played         { cursor: pointer; }
body:not(.admin-mode) .match-card.played:hover   { border-left-color: var(--accent); background: var(--surface2); }
body:not(.admin-mode) .match-card.tp:hover       { border-left-color: var(--red); }

body:not(.admin-mode) .bracket-match:not(.no-click)       { cursor: default; }
body:not(.admin-mode) .bracket-match:not(.no-click):hover { background: var(--surface); border-color: var(--border); }
body:not(.admin-mode) .bracket-match.played:hover         { border-color: var(--border-accent); }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  .clubs-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 768px) {
  /* Topbar */
  .topbar-brand-sub { display: none; }
  .topbar-logo { width: 34px; height: 34px; border-radius: 8px; }
  .topbar-brand-name { font-size: 15px; }
  .topbar-brand { gap: 9px; }
  .code-box input { width: 130px; font-size: 12px; }
  .lock-btn { padding: 5px 8px; font-size: 14px; }

  /* Nav tabs */
  .nav-btn { padding: 11px 12px; font-size: 12px; }

  /* Stats strip */
  .stat-card { padding: 10px 14px; gap: 8px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 10px; }

  /* Main content */
  .main-content { padding: 20px 0 48px; }
  .container { padding: 0 14px; }

  /* Table — hide secondary columns */
  .col-secondary { display: none; }
  .col-form { min-width: 80px; display: table-cell; }
  .col-p { display: table-cell; }
  .league-table { font-size: 13px; }
  .league-table thead th,
  .league-table tbody td { padding: 10px 10px; }
  .league-table tbody td.col-pts { font-size: 14px; }

  /* Matches */
  .match-grid { grid-template-columns: 1fr; }
  .match-card { padding: 11px 13px; }
  .match-home, .match-away { font-size: 12px; }
  .match-score { font-size: 14px; min-width: 50px; padding: 5px 8px; }

  /* Clubs */
  .clubs-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .club-card { padding: 14px; }
  .club-card-name { font-size: 12px; }
  .club-stat-val { font-size: 14px; }

  /* Modal */
  .modal { padding: 22px 18px; border-radius: 16px; }
  .modal-match { gap: 10px; }
  .modal-team input { width: 52px; height: 48px; font-size: 22px; }

  /* Bracket */
  .bracket { flex-direction: column; align-items: stretch; }
  .bracket-round { min-width: auto; }
  .qual-matches { grid-template-columns: 1fr; }

  /* Admin */
  .team-list { grid-template-columns: 1fr; }

  /* HoF */
  .hof-entry { padding: 24px 20px; }
  .hof-entry-name { font-size: 1.35rem; }
  .hof-content { gap: 48px; }
  .hof-entries { gap: 32px; }
}

@media (max-width: 480px) {
  .stats-bar { flex-wrap: wrap; }
  .stat-card {
    flex: 1 1 calc(50% - 1px);
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .stat-card:nth-child(odd) { border-right: 1px solid var(--border); }
  .stat-card:nth-last-child(-n+2) { border-bottom: none; }

  .clubs-grid { grid-template-columns: 1fr; }
  .zone-legend { gap: 6px; }
  .zone-badge { font-size: 10px; padding: 3px 8px; }
}
