/* ============================================================
   TF EXPONENTIAL FC — Design system
   Display: Bebas Neue (condensed, jersey/scoreboard energy)
   Body:    Karla
   Mono:    Space Mono (scoreboard digits, stat numbers)
   Signature: the black/gold matchday ticker under the nav +
   the angled "shield-cut" section dividers echoing the crest.
   ============================================================ */

:root {
  --ink: #142240;
  --ink-soft: #1e2f56;
  --red: #b61f26;
  --red-deep: #7e1519;
  --gold: #c9972e;
  --pitch: #2f7a4b;
  --paper: #ffffff;
  --paper-dim: #f2f0ec;
  --line: #e4e1da;
  --text: #201d1a;
  --text-mute: #6b6560;

  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Work Sans", "Segoe UI", sans-serif;
  --mono: "Space Mono", "Courier New", monospace;

  --cut: 26px; /* the diagonal shield-cut angle used across dividers */
  --radius: 3px;
  --shadow: 0 10px 30px -12px rgba(10, 18, 38, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; letter-spacing: 0.01em; line-height: 1.1; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--gold); color: var(--ink); padding: 10px 18px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Eyebrow / kicker ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--red);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: var(--red); display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 12px 26px; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost.on-dark { color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-ghost.on-dark:hover { border-color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header { position: sticky; top: 0; z-index: 100; }

.topline {
  background: var(--ink); color: #c9c4bd; font-size: 0.78rem;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topline .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topline a:hover { color: #fff; }

.navbar { background: #fff; border-bottom: 3px solid var(--red); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; }
.brand-text { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.01em; }
.brand-text span { color: var(--red); }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-family: var(--display); font-weight: 600; font-size: 0.98rem; letter-spacing: 0.02em;
  padding: 6px 2px; border-bottom: 3px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { border-color: var(--red); color: var(--red); }

.nav-toggle {
  display: none; background: var(--ink); border: none; color: #fff;
  width: 44px; height: 44px; border-radius: var(--radius); cursor: pointer;
}

/* Matchday ticker — the signature element */
.ticker {
  background: var(--ink); color: var(--gold); overflow: hidden; white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ticker-track {
  display: inline-flex; gap: 48px; padding: 8px 0; animation: scroll-left 32s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.02em; display: inline-flex; gap: 10px; align-items: center; }
.ticker-item b { color: #fff; }
.ticker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: inline-block; }
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   HERO (shield-cut)
   ============================================================ */
.hero {
  position: relative; background: var(--ink); color: #fff; overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
  padding-bottom: calc(56px + var(--cut));
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding-top: 56px; }
.hero-eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-top: 0.2em; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero-lede { color: #d8d3cb; max-width: 46ch; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

.hero-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius); padding: 22px; backdrop-filter: blur(2px);
}
.hero-card .kicker { color: var(--gold); }
.hero-card .kicker::before { background: var(--gold); }
.hero-fixture { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.hero-club { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; text-align: center; font-size: 0.82rem; }
.hero-club img, .club-crest { width: 46px; height: 46px; object-fit: contain; }
.hero-vs { font-family: var(--mono); color: var(--gold); font-size: 0.85rem; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 64px 0; }
.section-alt { background: var(--paper-dim); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }

.divider {
  height: var(--cut); background: var(--ink);
  clip-path: polygon(0 0, 100% 100%, 100% 0);
}
.divider.flip { clip-path: polygon(0 0, 100% 0, 0 100%); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--paper-dim); }
.card-body { padding: 16px 18px 20px; }
.card .kicker { margin-bottom: 8px; }
.card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.card p { color: var(--text-mute); font-size: 0.94rem; margin-bottom: 0; }
.card-meta { font-family: var(--mono); font-size: 0.72rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Player cards ---------- */
.player-card { text-align: center; }
.player-photo { aspect-ratio: 3/4; object-fit: cover; background: var(--paper-dim); }
.player-tag { background: var(--ink); color: #fff; font-family: var(--display); font-weight: 600; font-size: 1rem; padding: 8px 6px; letter-spacing: 0.02em; }
.player-tag b { color: var(--gold); margin-right: 6px; }
.player-position { font-family: var(--mono); font-size: 0.72rem; color: var(--red); text-transform: uppercase; padding: 6px 0; letter-spacing: 0.08em; }

/* ---------- Board / staff cards ---------- */
.person-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.person-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-dim); }
.person-role { color: var(--red); font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Fixture / result rows ---------- */
.match-row {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 18px; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
}
.match-date { font-family: var(--mono); font-size: 0.82rem; color: var(--text-mute); }
.match-teams { display: flex; align-items: center; justify-content: center; gap: 18px; }
.match-team { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 140px; text-align: center; font-weight: 700; font-size: 0.92rem; }
.match-meta { text-align: right; }
.match-meta-actions { text-align: right; }
.match-score { font-family: var(--mono); font-size: 1.3rem; background: var(--ink); color: #fff; padding: 4px 14px; border-radius: var(--radius); white-space: nowrap; flex: none; }
.match-vs { font-family: var(--mono); color: var(--red); font-weight: 700; }
.badge { width: 26px; height: 26px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-family: var(--mono); font-weight: 700; font-size: 0.78rem; }
.badge-w { background: var(--pitch); }
.badge-d { background: var(--gold); color: var(--ink); }
.badge-l { background: var(--red); }

/* ---------- League table ---------- */
.table-wrap { overflow-x: auto; }
table.league { width: 100%; border-collapse: collapse; min-width: 640px; }
table.league th {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  text-align: center; padding: 12px 8px; background: var(--ink); color: #fff;
}
table.league td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
table.league td:nth-child(2) { text-align: left; display: flex; align-items: center; gap: 10px; padding-left: 16px; }
table.league tr.us { background: #fbecec; font-weight: 700; }
table.league td.pts { color: var(--red); font-weight: 800; }
.table-pos-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-right: 6px; vertical-align: middle; }
table.league tr.us .table-pos-dot { background: var(--red); }
.table-crest { width: 26px; height: 26px; object-fit: contain; border-radius: 50%; background: #fff; border: 1px solid var(--line); padding: 2px; }

/* Compact mobile table — hidden on desktop, shown instead of the full table under 640px.
   Redesigned as a two-row card per club so every stat column (P/W/D/L/GD/Pts/GF/GA) is
   readable on a phone, instead of collapsing down to just Played + Points. */
.table-mobile-list { display: none; }
.table-mobile-row { padding: 12px 6px; border-bottom: 1px solid var(--line); }
.table-mobile-row.us { background: #fbecec; border-radius: var(--radius); }
.table-mobile-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.table-mobile-pos { font-family: var(--mono); font-weight: 700; width: 20px; text-align: center; color: var(--text-mute); flex: none; }
.table-mobile-row .table-crest { width: 26px; height: 26px; flex: none; }
.table-mobile-name { flex: 1; font-weight: 600; font-size: 0.92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-mobile-pts { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--red); flex: none; min-width: 50px; text-align: right; }
.table-mobile-pts small { font-family: var(--mono); font-size: 0.6rem; color: var(--text-mute); font-weight: 400; }
.table-mobile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(34px, 1fr)); gap: 4px; padding-left: 36px; }
.table-mobile-stat-item { display: flex; flex-direction: column; align-items: center; }
.table-mobile-stat-item b { font-family: var(--mono); font-size: 0.82rem; font-weight: 700; }
.table-mobile-stat-item span { font-family: var(--mono); font-size: 0.6rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px; }

@media (max-width: 640px) {
  .table-wrap { display: none; }
  .table-mobile-list { display: block; }
}

/* Club name: full name on desktop, short name on mobile — for places where both name
   variants live in the same markup block (e.g. Results page match rows), rather than as
   two separately-toggled desktop/mobile blocks like the league table above. */
.club-name-full { display: inline; }
.club-name-short { display: none; }
@media (max-width: 640px) {
  .club-name-full { display: none; }
  .club-name-short { display: inline; }
}

/* ---------- Gallery ---------- */
.gallery-kind-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.gallery-kind-btn {
  font-family: var(--display); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.02em;
  padding: 9px 18px; border-radius: var(--radius); border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer;
}
.gallery-kind-btn.active { background: var(--ink); color: #fff; }
.gallery-filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.chip.active, .chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.gallery-item { position: relative; cursor: pointer; border-radius: var(--radius); overflow: hidden; }
.gallery-item img { aspect-ratio: 4/3; object-fit: cover; }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px;
  background: linear-gradient(0deg, rgba(10,18,38,0.85), transparent); color: #fff; font-size: 0.8rem; font-weight: 600;
}
.play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(0deg, rgba(10,18,38,0.55), transparent 45%);
}
.play-badge::after {
  content: ""; width: 46px; height: 46px; border-radius: 50%; background: rgba(182,31,38,0.9);
  clip-path: polygon(38% 28%, 38% 72%, 72% 50%);
}
.video-embed { position: relative; width: 100%; padding-top: 56.25%; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.photo-lightbox img { width: 100%; max-height: 75vh; object-fit: contain; border-radius: var(--radius); background: var(--ink); }
.photo-lightbox-actions {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap;
}
.photo-lightbox-actions span { color: #fff; font-size: 0.9rem; }

/* ---------- Stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; }
.stat b { font-family: var(--display); font-weight: 700; font-size: 2.4rem; color: var(--gold); display: block; }
.stat span { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); }
.stats-strip.on-dark b { color: var(--gold); }
.stats-strip.on-dark span { color: #c9c4bd; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ico { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--gold); display: flex; align-items: center; justify-content: center; flex: none; }
.contact-list b { display: block; }
.contact-list span { color: var(--text-mute); font-size: 0.92rem; }
.map-frame { border: 0; width: 100%; height: 320px; border-radius: var(--radius); filter: grayscale(0.15); }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field label { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.form-field input, .form-field textarea {
  font-family: var(--body); font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--red); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: #c9c4bd; padding: 56px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { width: 40px; }
.footer-brand span { font-family: var(--display); font-weight: 700; color: #fff; font-size: 1.2rem; }
.site-footer h4 { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; }
.footer-bottom a { text-decoration: underline; }
.footer-bottom a:hover { color: var(--gold); }
@media (max-width: 640px) {
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .stats-strip, .footer-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 0 0 0 30%; background: var(--ink); flex-direction: column;
    align-items: flex-start; padding: 90px 26px; gap: 4px; transform: translateX(100%);
    transition: transform 0.28s ease; z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { color: #fff; width: 100%; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--gold); border-color: var(--gold); }
  .topline .container { justify-content: center; text-align: center; }

  .grid-3, .grid-4, .stats-strip, .footer-grid, .contact-grid { grid-template-columns: 1fr; }
  .match-row { grid-template-columns: 1fr; text-align: center; display: flex; flex-direction: column; gap: 8px; }
  .match-date { order: 1; }
  .match-meta { order: 2; text-align: center; }
  .match-teams { order: 3; flex-direction: row; }
  .match-meta-actions { order: 2; text-align: center; }
  table.league { min-width: 560px; }
  .hero { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 0 100%); }
  :root { --cut: 14px; }
}

.nav-scrim {
  display: none; position: fixed; inset: 0; background: rgba(10,18,38,0.5); z-index: 98;
}
.nav-scrim.show { display: block; }

/* ---------- Admin area — standalone app shell (own layout, no public header/footer) ---------- */
/* Admin list mobile cards — the reliable replacement for the desktop <table>, shown instead
   of it below 720px. Each admin list page renders both; only one is visible at a time. */
.admin-list-cards { display: none; }
.admin-list-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.admin-list-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.admin-list-card-top img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: var(--paper-dim); }
.admin-list-card-title { font-weight: 700; font-size: 0.98rem; line-height: 1.3; }
.admin-list-card-sub { font-size: 0.82rem; color: var(--text-mute); margin-top: 2px; }
.admin-list-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--text-mute); margin-bottom: 10px; }
.admin-list-card-meta b { color: var(--text); }
.admin-list-card .admin-table-actions { flex-wrap: wrap; }
.admin-list-card.us { border-color: var(--red); background: #fbecec; }
@media (max-width: 720px) {
  .admin-content .table-wrap { display: none; }
  .admin-list-cards { display: block; }
}
.admin-body { margin: 0; background: var(--paper-dim); font-family: var(--body); }
.admin-app { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 232px; flex: none; background: var(--ink); color: #c9c4bd; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 3px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; color: #fff; font-size: 1rem; padding: 6px 8px 18px; letter-spacing: 0.02em; }
.admin-brand img { width: 28px; }
.admin-nav-item { padding: 10px 12px; border-radius: var(--radius); font-size: 0.92rem; }
.admin-nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav-item.active { background: var(--red); color: #fff; }
.admin-sidebar form { margin-top: 4px; }

.admin-content { flex: 1; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.admin-search input {
  border: 1px solid var(--line); border-radius: 20px; padding: 8px 16px; font-family: var(--body);
  font-size: 0.9rem; width: 240px; max-width: 40vw;
}
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 0.85rem;
}
.admin-user-name { font-size: 0.86rem; font-weight: 600; }

.admin-content main { padding: 28px 32px; }

.admin-mobile-toggle {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 60;
  width: 40px; height: 40px; border-radius: var(--radius); background: var(--ink); color: #fff; border: none; cursor: pointer;
}
.admin-scrim { display: none; position: fixed; inset: 0; background: rgba(10,18,38,0.5); z-index: 45; }
.admin-scrim.show { display: block; }

.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.admin-stat-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.admin-stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; }
.admin-stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.admin-stat-card b { font-family: var(--display); font-weight: 700; font-size: 1.9rem; color: var(--red); display: block; }
.admin-stat-card span { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; color: var(--text-mute); }

.admin-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 28px; }
.admin-quick-actions a {
  font-family: var(--display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.02em;
  padding: 10px 18px; border-radius: var(--radius); text-transform: uppercase;
}
.admin-quick-actions a.primary { background: var(--red); color: #fff; }
.admin-quick-actions a.secondary { background: var(--ink); color: #fff; }

.admin-table-actions { display: flex; gap: 8px; }
.admin-table-actions a, .admin-table-actions button {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; padding: 5px 10px;
  border-radius: 3px; border: 1px solid var(--line); background: #fff; cursor: pointer;
}
.admin-table-actions .danger { color: var(--red); border-color: var(--red); }
.admin-flash { background: #eaf6ef; border: 1px solid var(--pitch); color: #1e6b41; padding: 10px 14px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 16px; }
.admin-errors { background: #fdecec; border: 1px solid var(--red); color: var(--red-deep); padding: 10px 14px; border-radius: var(--radius); font-size: 0.88rem; margin-bottom: 16px; }
.admin-errors ul { margin: 0; padding-left: 18px; }
.admin-page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-btn-add {
  background: var(--red); color: #fff; font-family: var(--display); font-weight: 600; letter-spacing: 0.02em;
  padding: 10px 20px; border-radius: var(--radius); text-transform: uppercase; font-size: 0.85rem;
}

.form-field select { font-family: var(--body); font-size: 1rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* form-row-3 / form-row-4: for rows with 3 or 4 short fields (e.g. Apps/Goals/Assists,
   P/W/D/L). Defined as classes rather than inline styles so the mobile breakpoints below
   can actually override them — an inline style="grid-template-columns:…" always wins over
   any class rule (including ones inside a media query), which was collapsing these onto a
   single admin form column and pushing every field off-screen on a phone. */
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* form-split: content column + fixed-width side panel (photo/logo upload, help text, a
   second list, etc). Same reasoning as above — this replaces inline
   style="grid-template-columns: 1fr 340px" on .contact-grid across the admin "add/edit"
   forms, which is what was hiding the actual input fields on mobile. */
.form-split { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.form-split.form-split--wide { grid-template-columns: 1fr 380px; }
@media (max-width: 900px) {
  .form-row-3 { grid-template-columns: 1fr; }
  .form-row-4 { grid-template-columns: repeat(2, 1fr); }
  .form-split, .form-split.form-split--wide { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .form-row-4 { grid-template-columns: 1fr; }
}

/* WordPress-style post editor layout: content column + right-hand meta boxes */
.editor-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.editor-title-input {
  width: 100%; font-family: var(--display); font-weight: 600; font-size: 1.8rem; letter-spacing: 0.01em;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 8px;
}
.editor-slug-row { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--text-mute); margin-bottom: 18px; flex-wrap: wrap; }
.editor-slug-row input { border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; font-family: var(--mono); font-size: 0.82rem; }
.meta-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.meta-box h4 { background: var(--paper-dim); padding: 10px 16px; margin: 0; font-size: 0.85rem; border-bottom: 1px solid var(--line); }
.meta-box .meta-box-body { padding: 16px; }
.featured-image-preview { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); background: var(--paper-dim); margin-bottom: 10px; }
.image-upload-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.image-upload-tabs button {
  flex: 1; padding: 6px; font-size: 0.75rem; font-family: var(--mono); text-transform: uppercase;
  border: 1px solid var(--line); background: #fff; cursor: pointer; border-radius: 3px;
}
.image-upload-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

@media (max-width: 1080px) {
  .editor-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed; left: 0; top: 0; height: 100vh; width: 240px; z-index: 50;
    transform: translateX(-100%); transition: transform 0.25s ease;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-mobile-toggle { display: flex; align-items: center; justify-content: center; }
  .admin-topbar { padding: 14px 18px 14px 64px; }
  .admin-search { display: none; }
  .admin-content main { padding: 20px 16px; }
  .admin-stat-grid, .admin-stat-grid.cols-5, .admin-stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .admin-page-head { flex-direction: column; align-items: flex-start; }

  /* Admin list tables reuse .league from the public League Table, which forces a 640px
     min-width — appropriate there (8+ stat columns), actively harmful here (most admin
     lists only have 3-5 columns and were being pushed almost entirely off-screen on a
     phone with no visible cue to scroll). Let columns size naturally instead. */
  .admin-content table.league { min-width: 0; width: 100%; table-layout: fixed; }
  .admin-content table.league th, .admin-content table.league td { padding: 8px 6px; font-size: 0.82rem; word-break: break-word; }
  .admin-content .admin-table-actions { flex-direction: column; gap: 4px; }
  .admin-content .admin-table-actions a, .admin-content .admin-table-actions button { width: 100%; text-align: center; }
}

/* ---------- Article layout (News Details) ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.article-related-item { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.article-related-item img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); flex: none; background: var(--paper-dim); }
.article-related-item a { font-weight: 700; font-size: 0.92rem; line-height: 1.3; }
.breadcrumb { font-size: 0.82rem; color: var(--text-mute); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--red); }
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
}

/* ---------- Rich-text article body (output from the Quill editor) ---------- */
.article-body h2 { font-size: 1.5rem; margin-top: 1.2em; }
.article-body h3 { font-size: 1.2rem; margin-top: 1.1em; }
.article-body p { margin-bottom: 1em; }
.article-body ul, .article-body ol { margin: 0 0 1em 1.4em; }
.article-body blockquote {
  border-left: 3px solid var(--red); margin: 1.2em 0; padding: 4px 0 4px 18px;
  color: var(--text-mute); font-style: italic;
}
.article-body a { color: var(--red); text-decoration: underline; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 14px 0; display: block; }
.article-body .ql-video { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: var(--radius); margin: 18px 0; }

/* ---------- Hero carousel ---------- */
.hero-carousel { position: relative; min-height: 260px; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateX(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.hero-slide.active { position: relative; opacity: 1; visibility: visible; transform: translateX(0); }
.hero-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.3); border: none; cursor: pointer; padding: 0; }
.hero-dot.active { background: var(--gold); width: 22px; border-radius: 5px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: var(--red); border-color: var(--red); }
.hero-arrow.prev { left: -6px; }
.hero-arrow.next { right: -6px; }

/* ---------- News carousel ---------- */
.carousel-wrap { position: relative; }
.carousel-row {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-bottom: 6px; -ms-overflow-style: none; scrollbar-width: none;
}
.carousel-row::-webkit-scrollbar { display: none; }
.carousel-row .card { flex: 0 0 280px; scroll-snap-align: start; }
.carousel-arrow {
  position: absolute; top: 40%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.carousel-arrow.prev { left: -18px; }
.carousel-arrow.next { right: -18px; }
@media (max-width: 720px) {
  .carousel-arrow { display: none; }
  .carousel-row .card { flex: 0 0 100%; max-width: 100%; scroll-snap-align: center; }
}

/* ---------- Club-logo page loader (shown while a full page — public site or admin —
   is loading, and briefly during the login → admin dashboard transition) ---------- */
.app-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.app-loader.app-loader--hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.app-loader__logo { width: 84px; height: 84px; animation: logo-pulse 1.15s ease-in-out infinite; }
@keyframes logo-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .app-loader__logo { animation: none; }
}

/* ---------- Custom confirmation modal — replaces the native browser confirm() dialog for
   destructive actions (delete, disable/enable). Native confirm() can't be restyled and
   looks jarring/untrustworthy inside a themed admin UI, so all confirm-before-submit forms
   route through this instead (see data-confirm handling in site.js). ---------- */
.confirm-modal {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(10,18,38,0.6); align-items: center; justify-content: center; padding: 20px;
}
.confirm-modal.show { display: flex; }
.confirm-modal-box {
  background: #fff; border-radius: var(--radius); padding: 26px 26px 20px; max-width: 380px; width: 100%;
  box-shadow: var(--shadow); border-top: 4px solid var(--red);
}
.confirm-modal-box p { font-size: 1rem; font-weight: 600; margin-bottom: 22px; color: var(--text); line-height: 1.5; }
.confirm-modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-modal-actions .btn { padding: 9px 20px; font-size: 0.85rem; }

/* ---------- Video modal (YouTube lightbox) ---------- */
.video-modal {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(10,18,38,0.88); align-items: center; justify-content: center; padding: 20px;
}
.video-modal.show { display: flex; }
.video-modal-inner { width: 100%; max-width: 860px; }
.video-modal-close {
  display: flex; justify-content: flex-end; margin-bottom: 10px;
}
.video-modal-close button {
  background: var(--gold); border: none; color: var(--ink); font-family: var(--display);
  font-size: 0.95rem; padding: 8px 16px; border-radius: var(--radius); cursor: pointer;
}



/* ---------- Contact form alerts ---------- */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.4);
    color: #16803c;
}

.alert-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.4);
    color: #b91c1c;
}

    .alert-error ul {
        margin: 0;
        padding-left: 18px;
    }