/* =============================================================
   CLUBOS — 2026 Sports Platform Design System
   A premium, mobile-first UI: glassmorphism, gradients, motion.
   Theme colors are injected via CSS variables on <html> from the
   club branding settings (see base.html).
   ============================================================= */

:root {
  /* Brand (overridden inline from club settings) */
  --brand-primary: #6c5ce7;
  --brand-secondary: #00d2ff;
  --brand-accent: #ff6b81;

  /* Surfaces (dark default) */
  --bg-0: #07080f;
  --bg-1: #0d1020;
  --bg-2: #12162a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f4f6ff;
  --text-dim: #aab1cc;
  --text-faint: #6b7390;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.25);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 10px 40px -8px var(--brand-primary);

  --grad-brand: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  --grad-accent: linear-gradient(135deg, var(--brand-accent), var(--brand-primary));
  --grad-text: linear-gradient(120deg, #fff 0%, var(--brand-secondary) 100%);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Sora", "Inter", system-ui, sans-serif;

  --nav-h: 72px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light theme variant */
[data-theme="light"] {
  --bg-0: #eef1f8;
  --bg-1: #f6f8fc;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(20, 25, 60, 0.08);
  --border-strong: rgba(20, 25, 60, 0.16);
  --text: #10142a;
  --text-dim: #4a5170;
  --text-faint: #8b91ac;
  --shadow: 0 18px 50px rgba(40, 50, 90, 0.14);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; margin: 0 0 0.4em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 12% 8%, color-mix(in srgb, var(--brand-primary) 35%, transparent), transparent 60%),
    radial-gradient(55% 45% at 88% 12%, color-mix(in srgb, var(--brand-secondary) 28%, transparent), transparent 55%),
    radial-gradient(50% 60% at 50% 110%, color-mix(in srgb, var(--brand-accent) 22%, transparent), transparent 60%);
  background-color: var(--bg-0);
  pointer-events: none;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 20px; }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 12px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.72rem; font-weight: 700;
  color: var(--brand-secondary); margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--grad-brand); border-radius: 2px; }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Glass cards ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-sm);
}
.card { padding: 22px; }
.card-hover { transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.card-hover:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 100px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, opacity 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -8px var(--brand-primary); }
.btn-ghost { background: var(--surface-strong); color: var(--text); border-color: var(--border); backdrop-filter: blur(12px); }
.btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--surface); }
.btn-danger { background: rgba(255, 71, 87, 0.14); color: #ff6b81; border-color: rgba(255, 71, 87, 0.3); }
.btn-danger:hover { background: rgba(255, 71, 87, 0.24); }
.btn-sm { padding: 8px 15px; font-size: 0.85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 10px; width: 40px; height: 40px; border-radius: 12px; }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--surface-strong); border: 1px solid var(--border); color: var(--text-dim);
}
.badge-brand { background: color-mix(in srgb, var(--brand-primary) 22%, transparent); color: #fff; border-color: transparent; }
.badge-live { background: rgba(255, 71, 87, 0.18); color: #ff6b81; border-color: transparent; }
.badge-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff4757; box-shadow: 0 0 0 0 rgba(255,71,87,0.6); animation: pulse 1.6s infinite; }
.dot-w { color: #2ed573; } .dot-l { color: #ff4757; } .dot-d { color: #ffa502; }
.result-pill { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.82rem; }
.result-W { background: rgba(46,213,115,0.18); color: #2ed573; }
.result-L { background: rgba(255,71,87,0.18); color: #ff4757; }
.result-D { background: rgba(255,165,2,0.18); color: #ffa502; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,71,87,0.5);} 70% { box-shadow: 0 0 0 8px rgba(255,71,87,0);} 100% { box-shadow: 0 0 0 0 rgba(255,71,87,0);} }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg-0) 72%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px; object-fit: cover;
  background: var(--grad-brand); display: grid; place-items: center; color: #fff; font-weight: 800;
  box-shadow: var(--shadow-glow); flex-shrink: 0;
}
.brand small { display: block; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.18em; color: var(--text-faint); text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 15px; border-radius: 100px; font-size: 0.92rem; font-weight: 500; color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 44px; height: 44px; color: var(--text); font-size: 1.3rem; }

/* Mobile slide menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: color-mix(in srgb, var(--bg-0) 96%, transparent);
  backdrop-filter: blur(24px);
  padding: 24px; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.mobile-menu.open { display: flex; animation: fadeIn 0.3s var(--ease); }
.mobile-menu .mm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.mobile-menu a.mm-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px; border-radius: var(--radius); font-size: 1.2rem; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); margin-bottom: 12px;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.mobile-menu a.mm-link:hover { transform: translateX(6px); border-color: var(--border-strong); }
.mm-close { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 44px; height: 44px; color: var(--text); font-size: 1.4rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(60px, 10vw, 120px) 0 clamp(50px, 8vw, 90px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; object-fit: cover; width: 100%; height: 100%; opacity: 0.28; }
.hero-bg-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent, var(--bg-0) 92%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: 18px; }
.hero p.lead { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-dim); max-width: 48ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 28px; margin-top: 38px; flex-wrap: wrap; }
.hero-stat .n { font-family: var(--font-display); font-size: 2rem; font-weight: 800; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stat .l { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); }

/* ---------- Fixture / match cards ---------- */
.match-card { padding: 22px; position: relative; overflow: hidden; }
.match-card .comp { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); }
.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 18px 0; }
.team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.team-crest {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem; background: var(--surface-strong); border: 1px solid var(--border);
}
.team-crest.home { background: var(--grad-brand); color: #fff; border: none; }
.team-name { font-weight: 700; font-size: 0.95rem; }
.match-score { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; text-align: center; min-width: 70px; }
.match-vs { font-size: 0.9rem; color: var(--text-faint); font-weight: 700; }
.match-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-dim); font-size: 0.85rem; border-top: 1px solid var(--border); padding-top: 14px; }
.match-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Player cards ---------- */
.players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.player-card { position: relative; overflow: hidden; padding: 0; }
.player-card .pc-media {
  position: relative; aspect-ratio: 3/3.4; background: var(--grad-brand);
  display: grid; place-items: center; overflow: hidden;
}
.player-card .pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.player-card:hover .pc-media img { transform: scale(1.07); }
.player-card .pc-initials { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: rgba(255,255,255,0.9); }
.player-card .pc-placeholder,
.pc-media .pc-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 10%;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.14) 100%), var(--grad-brand);
}
.player-card .pc-silhouette,
.pc-media .pc-silhouette {
  width: 52%; max-width: 140px; height: auto;
  color: rgba(255,255,255,0.32);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}
.pc-media .pc-silhouette { width: 58%; max-width: 180px; }
.player-card .pc-number {
  position: absolute; top: 12px; right: 14px; font-family: var(--font-display); font-weight: 800;
  font-size: 2.4rem; color: rgba(255,255,255,0.85); line-height: 1; text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}
.player-card .pc-pos { position: absolute; top: 14px; left: 14px; }
.player-card .pc-body { padding: 16px 18px; }
.player-card .pc-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.player-card .pc-sub { font-size: 0.82rem; color: var(--text-faint); }
.player-card .pc-glow { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.55)); pointer-events: none; }
.pc-media { position: relative; overflow: hidden; }
.pc-media > img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sponsor strip ---------- */
.sponsor-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; justify-content: center; }
.sponsor-chip {
  display: grid; place-items: center; min-width: 220px; height: 150px; padding: 24px 32px;
  filter: grayscale(0.25); opacity: 0.92; transition: all 0.3s var(--ease);
}
.sponsor-chip:hover { filter: none; opacity: 1; transform: translateY(-4px); }
.sponsor-chip img { max-height: 110px; max-width: 100%; width: auto; object-fit: contain; }
.sponsor-chip .sp-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--text-dim); }

@media (max-width: 640px) {
  .sponsor-chip { min-width: 160px; height: 130px; padding: 18px 22px; }
  .sponsor-chip img { max-height: 92px; }
}

/* ---------- Gallery ---------- */
.gallery-grid { columns: 4 240px; column-gap: 16px; }
.gallery-item { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius); overflow: hidden; position: relative; border: 1px solid var(--border); }
.gallery-item img { width: 100%; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .gi-cap {
  position: absolute; inset: auto 0 0 0; padding: 22px 16px 14px; font-size: 0.85rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; opacity: 0; transition: opacity 0.3s;
}
.gallery-item:hover .gi-cap { opacity: 1; }

/* ---------- Forms ---------- */
.form-card { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 4px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="number"], .field input[type="password"], .field input[type="url"],
.field input[type="datetime-local"], .field input[type="date"], .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-strong); border: 1px solid var(--border); color: var(--text);
  font-size: 0.95rem; transition: border-color 0.2s, box-shadow 0.2s; font-family: inherit;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 22%, transparent);
}
.field input[type="color"] { width: 100%; height: 48px; padding: 4px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-strong); cursor: pointer; }

/* Dropdown option list: force readable colors (native lists ignore parent bg) */
select option,
select optgroup {
  background-color: var(--bg-2);
  color: var(--text);
}
select option:checked,
select option:hover { background-color: var(--brand-primary); color: #fff; }
.field select[multiple] { min-height: 160px; }
.field .hint { font-size: 0.76rem; color: var(--text-faint); }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-primary); }
.form-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* File input styling */
.file-drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center;
  background: var(--surface); transition: border-color 0.2s, background 0.2s; cursor: pointer;
}
.file-drop:hover { border-color: var(--brand-primary); background: var(--surface-strong); }
.file-drop input { display: none; }

/* ---------- Flash messages ---------- */
.flash-stack { position: fixed; top: calc(var(--nav-h) + 14px); right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.flash {
  padding: 14px 18px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 500;
  background: var(--surface-strong); border: 1px solid var(--border); backdrop-filter: blur(18px);
  box-shadow: var(--shadow); animation: slideIn 0.4s var(--ease); display: flex; gap: 10px; align-items: center;
}
.flash-success { border-left: 3px solid #2ed573; }
.flash-error { border-left: 3px solid #ff4757; }
.flash-info { border-left: 3px solid var(--brand-secondary); }
.flash-warning { border-left: 3px solid #ffa502; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 50px 0 110px; margin-top: 60px; background: color-mix(in srgb, var(--bg-1) 60%, transparent); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); }
.footer a { color: var(--text-dim); display: block; padding: 5px 0; transition: color 0.2s; }
.footer a:hover { color: var(--text); }
.footer-sponsors { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--text-faint); font-size: 0.85rem; }

/* ---------- Mobile bottom nav ---------- */
.bottom-nav { display: none; }

/* ---------- Stat tiles / dashboard ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-tile { padding: 20px; position: relative; overflow: hidden; }
.stat-tile .st-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grad-brand); margin-bottom: 14px; font-size: 1.2rem; }
.stat-tile .st-n { font-family: var(--font-display); font-size: 2.1rem; font-weight: 800; line-height: 1; }
.stat-tile .st-l { font-size: 0.82rem; color: var(--text-dim); margin-top: 6px; }

.dash-grid { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--nav-h) + 20px); }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 500; margin-bottom: 4px; transition: all 0.2s;
}
.side-nav a:hover { background: var(--surface); color: var(--text); }
.side-nav a.active { background: var(--surface-strong); color: var(--text); border: 1px solid var(--border); }
.side-nav .sn-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); padding: 16px 15px 8px; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; min-width: 540px; }
table.data th, table.data td { padding: 13px 16px; text-align: left; font-size: 0.9rem; }
table.data th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); border-bottom: 1px solid var(--border); }
table.data tbody tr { border-bottom: 1px solid var(--border); transition: background 0.2s; }
table.data tbody tr:hover { background: var(--surface); }
table.data tbody tr:last-child { border-bottom: none; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }

/* Avatar */
.avatar { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; background: var(--grad-brand); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: #fff; flex-shrink: 0; }
.avatar-lg { width: 110px; height: 110px; border-radius: 24px; font-size: 2rem; }

/* ---------- Game Day / pitch ---------- */
.gameday-hero { text-align: center; padding: 40px 0 10px; }
.countdown { display: flex; gap: 14px; justify-content: center; margin: 26px 0; flex-wrap: wrap; }
.cd-unit { min-width: 84px; padding: 16px 10px; text-align: center; }
.cd-unit .cd-n { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-unit .cd-l { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-faint); margin-top: 6px; }

/* Image-based pitch with absolutely positioned players */
.pitch-img {
  position: relative; max-width: 440px; margin: 0 auto; aspect-ratio: 546 / 819;
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--border-strong);
}
.pitch-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pitch-player {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 68px;
  animation: ppPop 0.5s var(--ease) both;
}
.pitch-player .pp-shirt {
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad-brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.75); box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  font-variant-numeric: tabular-nums;
}
.pitch-player .pp-shirt.gk { background: linear-gradient(135deg, #ffa502, #ff6348); }
.pitch-player .pp-name {
  font-size: 0.66rem; font-weight: 700; color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,0.9);
  text-align: center; max-width: 74px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(0,0,0,0.32); padding: 1px 6px; border-radius: 6px; backdrop-filter: blur(2px);
}
@keyframes ppPop { from { opacity: 0; transform: translate(-50%, -42%) scale(0.85); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.bench { display: flex; gap: 10px; flex-wrap: wrap; }
.bench-player { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 100px; background: var(--surface-strong); border: 1px solid var(--border); }

/* ---------- Result contribution rows (goals/assists counters) ---------- */
.counter-select {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-strong); border: 1px solid var(--border); color: var(--text);
  font-size: 0.95rem; font-family: inherit;
}
.counter-select:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 22%, transparent); }

.contrib-row {
  display: flex; align-items: center; gap: 16px; padding: 12px 14px; flex-wrap: wrap;
  border: 1px solid var(--border);
}
.cr-player { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 170px; }
.cr-stat { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cr-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); font-weight: 700; }
.counter { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-strong); border: 1px solid var(--border); border-radius: 100px; padding: 4px; }
.counter-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--surface);
  color: var(--text); font-size: 1.15rem; font-weight: 700; line-height: 1; display: grid; place-items: center;
  transition: background 0.2s, transform 0.15s;
}
.counter-btn:hover { background: var(--brand-primary); color: #fff; }
.counter-btn:active { transform: scale(0.9); }
.counter-val {
  width: 40px; text-align: center; background: transparent; border: none; color: var(--text);
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.counter-val:focus { outline: none; }
.counter-val::-webkit-outer-spin-button, .counter-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cr-toggles { display: flex; gap: 6px; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 10px; border-radius: 100px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-size: 0.9rem;
  opacity: 0.45; filter: grayscale(0.5); transition: all 0.2s var(--ease); user-select: none;
}
.chip-toggle input { display: none; }
.chip-toggle:hover { opacity: 0.8; }
.chip-toggle:has(input:checked) { opacity: 1; filter: none; border-color: var(--border-strong); background: var(--surface-strong); transform: scale(1.05); }
.cr-remove {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); display: grid; place-items: center; transition: all 0.2s; margin-left: auto;
}
.cr-remove:hover { background: rgba(255,71,87,0.18); color: #ff6b81; border-color: rgba(255,71,87,0.3); }

@media (max-width: 600px) {
  .contrib-row { gap: 12px; }
  .cr-player { flex: 1 0 100%; }
  .cr-remove { margin-left: 0; }
}

/* ---------- Lineup builder slots ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.slot-card { padding: 12px 14px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.slot-card .slot-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim);
}
.slot-card .slot-badge {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 0.7rem;
  background: var(--grad-brand); color: #fff; flex-shrink: 0;
}
.slot-card .slot-badge.gk { background: linear-gradient(135deg, #ffa502, #ff6348); }
.slot-card select { width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface-strong); border: 1px solid var(--border); color: var(--text); font-family: inherit; font-size: 0.9rem; }
.slot-card select:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 22%, transparent); }
.bench-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.bench-check { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: border-color 0.2s; }
.bench-check:has(input:checked) { border-color: var(--brand-secondary); background: var(--surface-strong); }
.bench-check input { width: 17px; height: 17px; accent-color: var(--brand-secondary); }
.bench-check.is-disabled { opacity: 0.4; cursor: not-allowed; }
.bench-check.is-disabled span { text-decoration: line-through; }
.beer-duty-card { border-color: #e0a226; background: linear-gradient(180deg, rgba(224, 162, 38, 0.12), transparent); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.empty .e-icon { font-size: 2.6rem; margin-bottom: 12px; opacity: 0.6; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; position: relative; }
.auth-card { width: 100%; max-width: 440px; padding: 36px; }
.auth-card.wide { max-width: 720px; }
.auth-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: float 14s ease-in-out infinite; }
.orb.o1 { width: 360px; height: 360px; background: var(--brand-primary); top: -80px; left: -60px; }
.orb.o2 { width: 320px; height: 320px; background: var(--brand-secondary); bottom: -90px; right: -50px; animation-delay: -5s; }
.orb.o3 { width: 240px; height: 240px; background: var(--brand-accent); top: 40%; left: 60%; animation-delay: -9s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(30px,-30px) scale(1.08); } }

/* Wizard steps */
.steps { display: flex; gap: 8px; margin-bottom: 26px; }
.step-dot { flex: 1; height: 5px; border-radius: 4px; background: var(--border); transition: background 0.3s; }
.step-dot.active { background: var(--grad-brand); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.divider { height: 1px; background: var(--border); margin: 22px 0; border: none; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.scroll-x { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.scroll-x > * { scroll-snap-align: start; flex: 0 0 auto; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
  .side-nav .sn-label { display: none; }
  .side-nav a { white-space: nowrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { columns: 3 200px; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-actions .desktop-only { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .footer { padding-bottom: 96px; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 2 140px; column-gap: 12px; }
  .hero-stats { gap: 20px; }
  .pitch-player { width: 56px; }
  .pitch-player .pp-shirt { width: 34px; height: 34px; font-size: 0.82rem; }
  .pitch-player .pp-name { font-size: 0.6rem; max-width: 62px; }

  /* Mobile bottom nav */
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
    background: color-mix(in srgb, var(--bg-0) 82%, transparent);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 4px; border-radius: 14px; color: var(--text-faint); font-size: 0.66rem; font-weight: 600;
    transition: color 0.2s, background 0.2s;
  }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--text); }
  .bottom-nav a.active .bn-ico { background: var(--surface-strong); }
  .bn-ico { width: 40px; height: 30px; display: grid; place-items: center; border-radius: 12px; transition: background 0.2s; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 18px; }
  .match-score { font-size: 1.5rem; }
  .hero-cta .btn { flex: 1; }
  .flash-stack { left: 14px; right: 14px; max-width: none; }
}

/* ---------- Fixtures: results marquee ---------- */
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.res-chip { flex: 0 0 auto; width: 190px; padding: 14px; display: flex; flex-direction: column; gap: 8px; border-radius: 16px; }
.res-chip-top { display: flex; align-items: center; justify-content: space-between; }
.res-chip-top .comp { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.res-chip-mid { display: flex; align-items: center; justify-content: center; gap: 12px; }
.res-score { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.res-score .faint { color: var(--text-faint); margin: 0 2px; }
.res-chip-foot { font-size: 0.74rem; text-align: center; }

/* ---------- Fixtures: expandable bars ---------- */
.fixture-bar { border-radius: 18px; overflow: hidden; transition: border-color 0.2s; }
.fixture-bar[open] { border-color: color-mix(in srgb, var(--brand-primary) 40%, var(--border)); }
.fixture-bar summary { list-style: none; cursor: pointer; position: relative; display: flex; align-items: center; padding: 16px 18px; }
.fixture-bar summary::-webkit-details-marker { display: none; }
/* Pill sits in the left gutter, out of flow, so the score stays centered on the card. */
.fb-date { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fb-day { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.fb-mon { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
/* Symmetric gutters keep the scoreline dead-centre regardless of the pill / actions widths. */
.fb-main { flex: 1 1 auto; min-width: 0; padding: 0 62px; }
.fb-teams { font-weight: 700; font-size: 1.02rem; }
.fb-teams .faint, .fb-teams .res-score-inline { color: var(--text-faint); font-weight: 600; }
.res-score-inline { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 800; padding: 0 6px; }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.8rem; margin-top: 5px; }
.fb-meta span { display: inline-flex; align-items: center; gap: 4px; }
.fb-actions { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; }
.fb-chevron { display: grid; place-items: center; color: var(--text-faint); transition: transform 0.25s var(--ease); }
.fb-chevron svg { transform: rotate(90deg); }
.fixture-bar[open] .fb-chevron { transform: rotate(180deg); }
.fb-body { padding: 4px 18px 20px; border-top: 1px solid var(--border); margin-top: 0; animation: fbReveal 0.3s var(--ease) both; }
@keyframes fbReveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.fb-lineup-head { margin: 14px 0 12px; }
.fb-lineup-head h4 { display: inline-flex; align-items: center; gap: 6px; font-size: 0.95rem; }
.lineup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.lineup-pos { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 12px; background: var(--surface); }
.lp-slot { flex: 0 0 auto; width: 40px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; color: var(--brand-primary); }
.lp-name { font-size: 0.88rem; font-weight: 600; }
.fb-tbd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; }

/* ---------- Results: stat breakdown ---------- */
.stat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; padding-top: 16px; }
.stat-col h4 { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin: 0 0 10px; }
.stat-line { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; padding: 4px 0; }
.match-notes { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.match-notes h4 { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin: 0 0 8px; }

/* ---------- Leaderboard ---------- */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.podium-card { position: relative; padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; border-radius: 18px; }
.podium-card.rank-1 { border-color: color-mix(in srgb, #ffd700 55%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, #ffd700 12%, transparent), transparent); }
.podium-rank { position: absolute; top: 10px; left: 12px; font-size: 0.8rem; font-weight: 800; color: var(--text-faint); }
.podium-name { font-weight: 700; font-size: 0.95rem; }
.podium-stat { font-size: 1.3rem; font-weight: 800; }
.podium-stat .faint { font-size: 0.8rem; font-weight: 600; }
table.data th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.data th.sortable:hover { color: var(--text); }
table.data th.sortable::after { content: "\2195"; opacity: 0.35; margin-left: 5px; font-size: 0.85em; }
table.data th.sort-asc::after { content: "\2191"; opacity: 1; }
table.data th.sort-desc::after { content: "\2193"; opacity: 1; }
table.data td.strong { font-weight: 800; color: var(--brand-primary); }
.lb-player { display: flex; align-items: center; gap: 10px; font-weight: 600; }

/* Nav login label collapses on small screens */
@media (max-width: 600px) {
  .nav-actions .btn-sm .btn-label { display: none; }
  .nav-actions .btn-sm { padding-left: 10px; padding-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none !important; }
}

/* ---------- Ladder ---------- */
.ladder-table { min-width: 720px; }
.ladder-table th.num, .ladder-table td.num { text-align: center; }
.ladder-table th:nth-child(2), .ladder-table td:nth-child(2) { text-align: left; }
.lad-pos {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px;
  padding: 0 7px; border-radius: 8px; background: var(--surface-strong);
  font-size: 0.82rem; font-weight: 800; color: var(--text-dim);
}
.lad-club { display: flex; align-items: center; gap: 11px; }
.lad-logo {
  width: 30px; height: 30px; border-radius: 8px; object-fit: contain;
  background: rgba(255, 255, 255, 0.92); padding: 2px; flex-shrink: 0;
}
.lad-name { font-weight: 700; white-space: nowrap; }
.lad-code {
  padding: 2px 8px; font-size: 0.68rem; letter-spacing: 0.06em; font-weight: 700;
  color: var(--text-faint);
}
.lad-pts { font-weight: 800; color: var(--brand-primary); font-size: 1.02rem; }

/* Form guide pills */
.form-guide { display: flex; gap: 5px; }
.fp {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 800; color: #fff;
}
.fp-w { background: #27c46e; }
.fp-d { background: color-mix(in srgb, var(--text-faint) 60%, transparent); }
.fp-l { background: #ff5e6c; }

/* Subtle green highlight for the club's own row */
.lad-tag {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.62rem;
  font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  background: #27c46e; color: #042a16; vertical-align: middle;
}
table.data tbody tr.mine { background: color-mix(in srgb, #27c46e 11%, transparent); }
table.data tbody tr.mine:hover { background: color-mix(in srgb, #27c46e 17%, transparent); }
table.data tbody tr.mine td:first-child { box-shadow: inset 3px 0 0 #27c46e; }
table.data tbody tr.mine .lad-name { color: #34d27a; }
table.data tbody tr.mine .lad-pos { background: color-mix(in srgb, #27c46e 22%, transparent); color: #34d27a; }

/* ---------- Fixtures ---------- */
.fx-record {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 30px;
}
.fx-rec-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center;
}
.fx-rec-item .n { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fx-rec-item .l { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-top: 2px; }

/* Crests */
.fx-crest {
  width: 38px; height: 38px; border-radius: 10px; object-fit: contain;
  background: rgba(255, 255, 255, 0.92); padding: 3px; flex-shrink: 0;
}
.fx-crest-ph {
  display: grid; place-items: center; background: var(--grad-brand); color: #fff;
  font-weight: 800; font-size: 1rem; padding: 0;
}

/* Featured next-match card */
.fx-feature {
  padding: 22px 24px; margin-bottom: 34px; border-radius: var(--radius-lg);
  border-color: color-mix(in srgb, var(--brand-primary) 30%, var(--border));
}
.fx-feature-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.fx-feature-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.fx-ft-team { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-weight: 700; }
.fx-ft-team .fx-crest { width: 64px; height: 64px; border-radius: 16px; }
.fx-ft-team.is-us { color: #34d27a; }
.fx-ft-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fx-ft-vs { font-size: 1.1rem; font-weight: 800; color: var(--text-faint); letter-spacing: 0.1em; }
.fx-ft-count {
  font-size: 0.78rem; font-weight: 700; color: var(--brand-secondary);
  background: var(--surface-strong); padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.fx-feature-meta { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 18px; color: var(--text-dim); font-size: 0.9rem; }
.fx-feature-meta span { display: inline-flex; align-items: center; gap: 7px; }

/* Fixture rows */
.fx-row {
  display: grid; grid-template-columns: 132px 1fr 200px; align-items: center; gap: 16px;
  padding: 14px 18px; border-radius: var(--radius);
}
.fx-rnd { display: flex; flex-direction: column; gap: 2px; }
.fx-rnd-no { font-weight: 800; font-size: 0.95rem; }
.fx-rnd-date { font-size: 0.78rem; color: var(--text-faint); }
.fx-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.fx-team { display: flex; align-items: center; gap: 11px; min-width: 0; }
.fx-team.home { justify-content: flex-end; text-align: right; }
.fx-team.away { justify-content: flex-start; text-align: left; }
.fx-team-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-team.is-us .fx-team-name { color: #34d27a; }
.fx-mid { min-width: 64px; text-align: center; }
.fx-score { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fx-time { font-weight: 800; font-variant-numeric: tabular-nums; }
.fx-vs { font-weight: 700; color: var(--text-faint); letter-spacing: 0.08em; }
.fx-ppd { color: #f5a623; }
.fx-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.fx-venue { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.fx-row.res-W { box-shadow: inset 4px 0 0 #27c46e; }
.fx-row.res-L { box-shadow: inset 4px 0 0 #ff5e6c; }
.fx-row.res-D { box-shadow: inset 4px 0 0 var(--text-faint); }

@media (max-width: 760px) {
  .fx-record { grid-template-columns: repeat(3, 1fr); }
  .fx-row { grid-template-columns: 1fr; gap: 12px; }
  .fx-rnd { flex-direction: row; align-items: center; gap: 10px; }
  .fx-foot { justify-content: space-between; }
  .fx-team-name { white-space: normal; }
  .fx-feature-teams { gap: 8px; }
  .fx-ft-team .fx-crest { width: 52px; height: 52px; }
}

/* Home match cards: highlight our club */
.match-teams .team-name.is-us { color: #34d27a; }

/* Results: team line inside fixture bars */
.res-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.res-side { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; }
.res-side.home { justify-content: flex-end; text-align: right; }
.res-side.away { justify-content: flex-start; text-align: left; }
.res-side .rt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-side.is-us .rt-name { color: #34d27a; }
.res-score { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-score .faint { margin: 0 6px; }
.fixture-bar.res-W { box-shadow: inset 4px 0 0 #27c46e; }
.fixture-bar.res-L { box-shadow: inset 4px 0 0 #ff5e6c; }
.fixture-bar.res-D { box-shadow: inset 4px 0 0 var(--text-faint); }

@media (max-width: 680px) {
  /* Drop the absolute left/right gutters and let the pill, teams and actions
     reflow so nothing sits on top of the scoreline. */
  .fixture-bar summary,
  .fb-static { flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 12px; padding: 14px 40px 14px 14px; }
  .fb-date { position: static; transform: none; flex: 0 0 auto; }
  .fb-main { padding: 0; flex: 1 1 auto; }
  /* Edit / Add details drops onto its own full-width row instead of
     overlapping the team names. */
  .fb-actions { position: static; transform: none; width: 100%; justify-content: flex-end; gap: 8px; }
  .fb-actions form { margin: 0; }
  /* Keep the expand chevron tucked in the corner beside the teams. */
  .fb-chevron { position: absolute; right: 12px; top: 22px; }

  /* Stack the two teams vertically so long names read in full. */
  .res-teams { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .res-side { gap: 8px; font-size: 0.92rem; min-width: 0; }
  .res-side.home { grid-column: 1; grid-row: 1; justify-content: flex-start; text-align: left; }
  .res-side.home .fx-crest { order: 0; }
  .res-side.home .rt-name { order: 1; }
  .res-side.home .pos-badge { order: 2; }
  .res-side.away { grid-column: 1; grid-row: 2; justify-content: flex-start; text-align: left; }
  .res-side .pos-badge { margin-left: auto; }
  .res-side .rt-name { white-space: normal; overflow: visible; }
  .res-side .fx-crest { width: 30px; height: 30px; }
  .res-score { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* Neutral "full time" pill for matches not viewed from a club's perspective */
.result-FT { background: var(--surface-strong); color: var(--text-faint); font-size: 0.66rem !important; letter-spacing: 0.06em; }

/* Ladder position + movement badge on each team in a result */
.pos-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 800; line-height: 1;
  border: 1px solid var(--border); background: var(--surface);
  white-space: nowrap; flex: 0 0 auto;
}
.pos-badge .pos-num { color: var(--text); font-variant-numeric: tabular-nums; }
.pos-badge .pos-arrow { font-size: 0.74rem; letter-spacing: -0.02em; }
.pos-up { border-color: transparent; background: rgba(46,213,115,0.16); }
.pos-up .pos-arrow { color: #2ed573; }
.pos-down { border-color: transparent; background: rgba(255,71,87,0.16); }
.pos-down .pos-arrow { color: #ff4757; }
.pos-same { border-color: transparent; background: rgba(255,165,2,0.18); }
.pos-same .pos-num { color: #ffa502; }

@media (max-width: 680px) {
  /* Keep the scoreline readable on phones — drop the arrow, keep the place. */
  .pos-badge { padding: 2px 6px; font-size: 0.7rem; }
  .pos-badge .pos-arrow { display: none; }
}

/* Static (non-expandable) result bars keep the card padding without a summary */
.fb-static { position: relative; display: flex; align-items: center; padding: 16px 18px; }

/* ---------- Results: club filter ---------- */
.club-filter { padding: 16px 18px; border-radius: 18px; margin-bottom: 16px; }
.cf-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.cf-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--text-faint); }
.cf-quick { display: flex; gap: 8px; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.club-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; user-select: none; font-size: 0.85rem; font-weight: 600;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}
.club-chip:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.club-chip input { display: none; }
.club-chip .fx-crest { width: 24px; height: 24px; border-radius: 7px; }
.club-chip .cc-name { white-space: nowrap; }
.club-chip .cc-tag {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800;
  padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--brand-primary) 22%, transparent); color: #fff;
}
.club-chip:has(input:checked) {
  border-color: transparent;
  background: color-mix(in srgb, var(--brand-primary) 20%, var(--surface));
  box-shadow: 0 0 0 1.5px var(--brand-primary) inset;
}
.club-chip.is-us:has(input:checked) {
  background: color-mix(in srgb, #34d27a 18%, var(--surface));
  box-shadow: 0 0 0 1.5px #34d27a inset;
}
.cf-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Results: summary band ---------- */
.results-summary {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px;
  padding: 16px 20px; border-radius: 18px; margin-bottom: 6px;
}
.rs-club { display: flex; align-items: center; gap: 13px; }
.rs-club .fx-crest { width: 46px; height: 46px; border-radius: 12px; }
.rs-name { font-weight: 800; font-size: 1.05rem; }
.rs-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.rs-stat { display: flex; flex-direction: column; align-items: center; min-width: 40px; }
.rs-stat .v { font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.rs-stat .l { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-top: 5px; }

/* ---------- Results: match-day groups ---------- */
.day-group { position: relative; }
.day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.day-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.day-head::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad-brand); flex: 0 0 auto; }
.day-head .day-count {
  font-size: 0.72rem; font-weight: 700; color: var(--text-faint);
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap;
}
.day-head::after { content: ""; flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

@media (max-width: 680px) {
  .results-summary { justify-content: center; text-align: center; }
  .rs-stats { gap: 16px; justify-content: center; }
  .fb-static { gap: 10px; padding: 14px; }
}

/* ---------- Clerk account gate ---------- */
.clerk-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 18px;
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(108, 92, 231, 0.18), transparent 70%),
    var(--bg-0);
}
.clerk-gate-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px 26px;
  text-align: center;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
}
.clerk-gate-head { margin-bottom: 22px; }
.clerk-gate-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  margin: 0 auto 14px;
  display: block;
}
.clerk-gate-logo-fallback {
  display: grid;
  place-items: center;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
  background: var(--grad-brand);
}
.clerk-gate-head h1 { font-size: 1.5rem; margin: 0 0 6px; }
.clerk-gate-head p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }
.clerk-gate-widget { display: flex; justify-content: center; min-height: 360px; }
.clerk-gate-loading { color: var(--text-faint); padding: 40px 0; }
.clerk-gate-warning {
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.35);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  text-align: left;
}
.clerk-gate-warning code {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.85em;
}
.clerk-gate-back {
  display: inline-block;
  margin-top: 18px;
  color: var(--text-faint);
  font-size: 0.88rem;
  text-decoration: none;
}
.clerk-gate-back:hover { color: var(--text-dim); }

/* First-login member onboarding form */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-top: 8px;
}
.profile-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-form .field-row {
  display: flex;
  gap: 14px;
}
.profile-form .field-row .field { flex: 1; }
.profile-form .field-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}
.profile-form .field-label em {
  color: var(--brand-primary);
  font-style: normal;
}
.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  color: inherit;
  font-size: 0.95rem;
  font-family: inherit;
}
.profile-form textarea { resize: vertical; min-height: 64px; }
.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
}
.profile-form .file-drop { width: 100%; }
.profile-form button { margin-top: 6px; }
.clerk-gate-card.clerk-gate-card-wide { max-width: 560px; }
@media (max-width: 460px) {
  .profile-form .field-row { flex-direction: column; gap: 14px; }
}

/* First-login consent / agreement gate */
.consent-body {
  text-align: left;
  max-height: 46vh;
  overflow-y: auto;
  padding: 4px 14px 4px 2px;
  margin: 0 0 4px;
}
.consent-body p { color: var(--text-dim); font-size: 0.92rem; margin: 0 0 12px; }
.consent-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.consent-list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}
.consent-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-primary);
  font-weight: 700;
}
.consent-subhead {
  font-size: 0.95rem;
  margin: 18px 0 10px;
  color: var(--text);
}
.consent-note {
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
}
.consent-fineprint { font-size: 0.88rem; }
.consent-fineprint a { color: var(--brand-primary); text-decoration: underline; }
.consent-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  text-align: left;
}
.consent-disagree { color: var(--text-dim); }
.consent-cancel-hint {
  color: var(--text-faint);
  font-size: 0.8rem;
  text-align: center;
  margin: 12px 0 0;
}

/* =============================================================
   MOBILE POLISH — Game Day + Coach Dashboard
   Desktop layouts are untouched; everything here is gated behind
   mobile breakpoints (or hidden by default and shown on mobile).
   ============================================================= */

/* Game Day responsive grid (replaces former inline styles) */
.gameday-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  margin-top: 20px;
  align-items: start;
}

/* Coach mobile view: hidden on desktop, the full dashboard shows instead */
.coach-mobile { display: none; }

.coach-hero { display: flex; align-items: center; gap: 14px; }
.coach-crest { width: 58px; height: 58px; border-radius: 15px; object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow-glow); }
.coach-crest-ph {
  display: grid; place-items: center; background: var(--grad-brand); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem;
}
.coach-next {
  display: block; position: relative; overflow: hidden;
  border-color: color-mix(in srgb, var(--brand-primary) 32%, var(--border));
}
.coach-next::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.5; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--brand-primary) 22%, transparent), transparent 60%);
}
.coach-next > * { position: relative; z-index: 1; }
.coach-next .cn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.coach-next .cn-team { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1.2; }
.coach-next .cn-team .faint { font-weight: 600; color: var(--text-faint); }
.coach-next .cn-meta { color: var(--text-dim); font-size: 0.85rem; margin-top: 4px; }

.coach-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.coach-tile {
  display: flex; flex-direction: column; gap: 12px; padding: 18px 16px;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.coach-tile:active { transform: scale(0.97); }
.coach-tile .ct-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-brand); color: #fff; }
.coach-tile .ct-label { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }

/* ---------- Admin fixtures list rows ---------- */
.admin-fx {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 16px;
}
.admin-fx-main { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 260px; }
.admin-fx-crests { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.admin-fx-crests .vs { font-size: 0.8rem; font-weight: 700; color: var(--text-faint); }
.admin-fx-info { min-width: 0; }
.admin-fx-title {
  font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  overflow-wrap: anywhere;
}
.admin-fx-meta { font-size: 0.82rem; }
.admin-fx-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.admin-fx-actions form { display: flex; }

@media (max-width: 640px) {
  .admin-fx { flex-direction: column; align-items: stretch; gap: 12px; }
  .admin-fx-crests .team-crest { width: 40px !important; height: 40px !important; }
  .admin-fx-actions { width: 100%; }
  /* Primary/lineup actions grow to fill; icon-only buttons stay compact */
  .admin-fx-actions .btn { flex: 1 1 auto; justify-content: center; }
  .admin-fx-actions .btn-icon { flex: 0 0 auto; }
  .admin-fx-actions form { flex: 1 1 auto; }
  .admin-fx-actions form .btn { width: 100%; }
}

@media (max-width: 900px) {
  .gameday-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  /* --- Coach dashboard: show focused mobile view, hide desktop clutter --- */
  .coach-mobile { display: flex; flex-direction: column; gap: 16px; }
  .dash-desktop { display: none; }

  /* --- Game Day: stack everything into one clean column --- */
  .gameday-hero { padding: 18px 0 4px; }
  .gameday-grid { gap: 16px; margin-top: 16px; }
  .pitch-img { max-width: 100%; }

  /* Roomier pitch = give players back their breathing space */
  .pitch-player { width: 60px; }
  .pitch-player .pp-shirt { width: 38px; height: 38px; font-size: 0.9rem; }
  .pitch-player .pp-name { font-size: 0.62rem; max-width: 70px; }

  /* Countdown: four compact units that fit one row */
  .countdown { gap: 8px; margin: 18px 0; flex-wrap: nowrap; }
  .cd-unit { min-width: 0; flex: 1; padding: 12px 4px; }
  .cd-unit .cd-n { font-size: 1.7rem; }
  .cd-unit .cd-l { font-size: 0.58rem; letter-spacing: 0.1em; }
}
