/* ============================================================
   BFA PORTAL — DESIGN SYSTEM v4 (Premier League Slate Theme)
   Colors: Deep Purple #1a0533  Pink #e91e8c  White #ffffff
   Style: Deep purple sidebar + white content area, hot pink accents
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f7f7f8; color: #0a0a0a; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── CSS Variables ── */
:root {
  --navy:    #1a0533;
  --navy-2:  #2d0a52;
  --navy-3:  #3d1266;
  --navy-light: rgba(26,5,51,0.08);
  --pink:    #f048a8;
  --pink-2:  #e91e8c;
  --pink-3:  #f9a8d4;
  --white:   #ffffff;
  --black:   #0a0a0a;
  --bg:      #f7f7f8;
  --bg-2:    #f0f0f2;
  --text-1:  #0a0a0a;
  --text-2:  #3a3a3a;
  --text-3:  #6b6b6b;
  --text-4:  #9b9b9b;
  --border:  #e5e5e7;
  --border-2:#d0d0d3;
  --shadow:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius:  8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --sidebar-w: 240px;
  --sidebar-collapsed-w: 60px;
  --topbar-h: 56px;
  --transition: 0.15s ease;
  /* Sidebar dark theme tokens */
  --sb-bg:        #1a0533;
  --sb-border:    rgba(255,255,255,0.08);
  --sb-text:      rgba(255,255,255,0.65);
  --sb-text-hover:rgba(255,255,255,0.95);
  --sb-active-bg: rgba(233,30,140,0.18);
  --sb-active-text: #f9a8d4;
  --sb-active-border: #e91e8c;
  --sb-label:     rgba(255,255,255,0.3);
  /* Legacy aliases */
  --muted:   #9b9b9b;
  --danger:  #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --blue:    #7c3aed;
  --text:    #0a0a0a;
  --light:   #f7f7f8;
  --card-bg: #ffffff;
  --input-border: #e5e5e7;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 700; }
h4 { font-size: 0.9375rem; font-weight: 700; }
p  { color: var(--text-2); }
.muted { color: var(--text-4); font-size: 0.8125rem; }
.label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-4); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }

/* ============================================================
   PUBLIC SITE NAVBAR  (class: site-nav)
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--border);
  height: 60px;
}
.site-nav .container { height: 100%; }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}
.nav-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  overflow: hidden;
}
.nav-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}
.nav-title { font-size: 0.9375rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.nav-sub   { font-size: 0.6875rem; color: var(--text-4); }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active { background: var(--bg-2); color: var(--text-1); }
.btn-nav-login {
  background: var(--navy) !important;
  color: #fff !important;
  padding: 0.4rem 1rem !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}
.btn-nav-login:hover { background: var(--navy-2) !important; }

/* ── Admin page topbar nav (dark navy variant) ── */
.site-nav.admin-dark {
  background: var(--sb-bg) !important;
  border-bottom: 1px solid var(--sb-border) !important;
}
.site-nav.admin-dark .nav-title { color: rgba(255,255,255,0.95); }
.site-nav.admin-dark .nav-sub   { color: rgba(255,255,255,0.45); }
.site-nav.admin-dark .nav-user-name { color: rgba(255,255,255,0.9); }
.site-nav.admin-dark .nav-user-role { color: rgba(255,255,255,0.5); }
.site-nav.admin-dark .btn-signout {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.75);
}
.site-nav.admin-dark .btn-signout:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.site-nav.admin-dark .nav-avatar {
  background: rgba(233,30,140,0.2);
  color: var(--pink-3);
  border: 1.5px solid rgba(233,30,140,0.35);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-user-info { text-align: right; }
.nav-user-name { font-size: 0.875rem; font-weight: 600; color: var(--text-1); }
.nav-user-role { font-size: 0.6875rem; color: var(--text-4); text-transform: capitalize; }
.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  flex-shrink: 0;
}
.btn-signout {
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-2);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-signout:hover { background: var(--bg-2); color: var(--text-1); }

/* Also support .navbar class for admin pages */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  justify-content: space-between;
}
.navbar-brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; }
.navbar-brand img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.navbar-brand-text .brand-name { font-size: 0.9375rem; font-weight: 700; color: var(--navy); }
.navbar-brand-text .brand-sub  { font-size: 0.6875rem; color: var(--text-4); }
.navbar-links { display: flex; align-items: center; gap: 0.25rem; }
.navbar-links a { padding: 0.375rem 0.875rem; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; color: var(--text-2); transition: all var(--transition); }
.navbar-links a:hover, .navbar-links a.active { background: var(--bg-2); color: var(--text-1); }
.navbar-cta { display: flex; align-items: center; gap: 0.5rem; }
.navbar-user { display: flex; align-items: center; gap: 0.75rem; }
.navbar-user-info { text-align: right; }
.navbar-user-name { font-size: 0.875rem; font-weight: 600; color: var(--text-1); }
.navbar-user-role { font-size: 0.6875rem; color: var(--text-4); text-transform: capitalize; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   HERO SECTIONS — Pink/Navy Gradient
   ============================================================ */
/* Public page hero (class: page-hero) */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d0a52 45%, #7c1a5a 80%, var(--pink-2) 100%);
  padding: 3rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(233,30,140,0.2) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero .eyebrow { margin-bottom: 0.75rem; }
.page-hero .eyebrow span {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink-3);
}
.page-hero h1 { color: #fff; font-size: 2.25rem; margin-bottom: 0.75rem; }
.page-hero p  { color: rgba(255,255,255,0.75); font-size: 1rem; max-width: 520px; margin: 0 auto; }

/* Home page hero (class: hero) */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d0a52 40%, #7c1a5a 75%, var(--pink-2) 100%);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 65% 40%, rgba(233,30,140,0.25) 0%, transparent 60%);
  pointer-events: none;
}
.hero .eyebrow { color: var(--pink-3); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.hero h1 { color: #fff; font-size: 3rem; max-width: 700px; margin: 0 auto 1rem; }
.hero p  { color: rgba(255,255,255,0.75); font-size: 1.0625rem; max-width: 520px; margin: 0 auto 2rem; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.hero-btn-primary { background: var(--pink-2); color: #fff; padding: 0.75rem 1.75rem; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9375rem; transition: background var(--transition); border: none; }
.hero-btn-primary:hover { background: var(--pink); }
.hero-btn-outline { background: transparent; color: #fff; padding: 0.75rem 1.75rem; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9375rem; border: 1.5px solid rgba(255,255,255,0.4); transition: all var(--transition); }
.hero-btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   STATS STRIP
   ============================================================ */
.stats-strip { background: #fff; border-bottom: 1.5px solid var(--border); }
.stats-strip .container { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-item { padding: 1.5rem 1.25rem; border-right: 1.5px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-4); margin-top: 0.25rem; }

/* Stats strip inner alias */
.stats-strip-inner { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-strip-item { padding: 1.5rem 1.25rem; border-right: 1.5px solid var(--border); }
.stat-strip-item:last-child { border-right: none; }
.stat-strip-item .num { font-size: 1.75rem; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-strip-item .lbl { font-size: 0.75rem; color: var(--text-4); margin-top: 0.25rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 1.125rem 1.25rem 0.875rem;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 1.25rem; }
.card-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-1); }
.card-subtitle { font-size: 0.75rem; color: var(--text-4); margin-top: 0.125rem; }
.card-sub   { font-size: 0.75rem; color: var(--text-4); margin-top: 0.125rem; }

/* Stat cards */
.stat-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.stat-card.navy::before  { background: var(--navy); }
.stat-card.pink::before  { background: var(--pink-2); }
.stat-card.amber::before { background: #f59e0b; }
.stat-card.green::before { background: #22c55e; }
.stat-card.red::before   { background: #ef4444; }
.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.stat-card.navy  .stat-card-icon { background: rgba(26,5,51,0.08); }
.stat-card.pink  .stat-card-icon { background: rgba(232,160,180,0.15); }
.stat-card.amber .stat-card-icon { background: rgba(245,158,11,0.1); }
.stat-card.green .stat-card-icon { background: rgba(34,197,94,0.1); }
.stat-card.red   .stat-card-icon { background: rgba(239,68,68,0.1); }
.stat-card-body { flex: 1; min-width: 0; }
.stat-card-value { font-size: 1.625rem; font-weight: 800; color: var(--text-1); line-height: 1; }
.stat-card-label { font-size: 0.75rem; color: var(--text-4); margin-top: 0.25rem; }
.stat-card-trend { font-size: 0.6875rem; color: var(--text-4); margin-top: 0.375rem; }

/* stat-card shorthand aliases used in dashboard-admin */
.stat-card .stat-label { font-size: 0.75rem; color: var(--text-4); }
.stat-card .stat-value { font-size: 1.625rem; font-weight: 800; color: var(--text-1); line-height: 1; }
.stat-card .stat-sub   { font-size: 0.6875rem; color: var(--text-4); margin-top: 0.25rem; }

/* stat-grid used in dashboard-admin */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary   { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-pink      { background: var(--pink-2); color: #fff; border: none; padding: 0.5rem 1.125rem; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: background var(--transition); }
.btn-pink:hover { background: var(--pink); }
.btn-outline   { background: transparent; color: var(--text-1); border: 1.5px solid var(--border-2); }
.btn-outline:hover { background: var(--bg-2); }
.btn-ghost     { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-danger    { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.btn-success   { background: #dcfce7; color: #16a34a; }
.btn-success:hover { background: #bbf7d0; }
.btn-sm { padding: 0.3125rem 0.625rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.375rem; }
.form-label .required { color: #ef4444; margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-1);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--pink-2); box-shadow: 0 0 0 3px rgba(233,30,140,0.1); }
.form-control::placeholder { color: var(--text-4); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.25rem; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.75rem; color: var(--text-4); margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.form-section { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1.5px solid var(--border); }
.form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.form-section-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 1.25rem; padding-bottom: 0.625rem; border-bottom: 2px solid var(--pink-3); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-4);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  background: #fff;
}
tbody td {
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }

/* Admin tables — slightly tinted header */
.dash-content thead th { background: var(--bg-2); color: var(--text-3); }
/* Standings table */
.standings-table thead th { background: var(--navy); color: rgba(255,255,255,0.85); border-bottom: none; }
.standings-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.standings-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.standings-table tbody tr.top-4 td:first-child { border-left: 3px solid var(--navy); }
.standings-table tbody tr.relegation td:first-child { border-left: 3px solid #ef4444; }

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.1875rem 0.5rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-navy    { background: rgba(26,5,51,0.1);  color: var(--navy); }
.badge-pink    { background: rgba(232,160,180,0.2); color: var(--pink-2); }
.badge-green   { background: #dcfce7; color: #16a34a; }
.badge-amber   { background: #fef3c7; color: #d97706; }
.badge-yellow  { background: #fef3c7; color: #d97706; }
.badge-red     { background: #fee2e2; color: #dc2626; }
.badge-grey    { background: var(--bg-2); color: var(--text-3); }
.badge-gray    { background: var(--bg-2); color: var(--text-3); }
.badge-blue    { background: #ede9fe; color: #7c3aed; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-neutral { background: var(--bg-2); color: var(--text-3); }

/* Filter pills */
.filter-bar { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.filter-pill {
  padding: 0.3125rem 0.875rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-2);
  transition: all var(--transition);
  cursor: pointer;
}
.filter-pill:hover { border-color: var(--pink-2); color: var(--pink-2); }
.filter-pill.active { background: var(--pink-2); color: #fff; border-color: var(--pink-2); }

/* ============================================================
   FIXTURE CARDS (public pages)
   ============================================================ */
.fixtures-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.fixture-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.fixture-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.fixture-card-comp { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pink-2); margin-bottom: 0.875rem; }
.fixture-teams { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 0.875rem; }
.fixture-team { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.fixture-vs { font-size: 0.75rem; color: var(--text-4); font-weight: 600; }
.fixture-score { font-size: 1.375rem; font-weight: 800; color: var(--navy); text-align: center; margin: 0.5rem 0; }
.fixture-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.fixture-meta span { font-size: 0.75rem; color: var(--text-4); display: flex; align-items: center; gap: 0.25rem; }

/* Result cards */
.result-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.result-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.result-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; text-align: center; }
.result-team-name { font-size: 1rem; font-weight: 700; }
.result-score { font-size: 2rem; font-weight: 800; color: var(--navy); white-space: nowrap; }
.result-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.875rem; padding-top: 0.875rem; border-top: 1px solid var(--border); }
.result-meta span { font-size: 0.75rem; color: var(--text-4); }

/* Match cards */
.match-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.match-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.match-card-comp { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pink-2); margin-bottom: 0.875rem; }
.match-teams { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 0.875rem; }
.match-team { display: flex; align-items: center; justify-content: space-between; }
.match-team-name { font-size: 1rem; font-weight: 700; color: var(--text-1); }
.match-score { font-size: 1.375rem; font-weight: 800; color: var(--navy); }
.match-vs { font-size: 0.75rem; color: var(--text-4); font-weight: 600; text-align: center; }
.match-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.match-meta span { font-size: 0.75rem; color: var(--text-4); display: flex; align-items: center; gap: 0.25rem; }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
.section-title { font-size: 1.125rem; font-weight: 700; }
.section-sub   { font-size: 0.8125rem; color: var(--text-4); margin-top: 0.125rem; }
.result-count  { font-size: 0.8125rem; color: var(--text-4); margin-bottom: 0.75rem; }

/* Search box */
.search-box {
  display: flex; align-items: center; gap: 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.75rem;
  background: #fff;
}
.search-box input { border: none; outline: none; font-size: 0.875rem; color: var(--text-1); background: transparent; width: 200px; }
.search-box input::placeholder { color: var(--text-4); }

/* ============================================================
   SECTION VARIANTS
   ============================================================ */
.section { padding: 3rem 0; }
.section-alt { padding: 3rem 0; background: var(--bg-2); }

/* ============================================================
   DASHBOARD LAYOUT (admin pages) — Stripe/Vercel Dark Theme
   ============================================================ */
.dash-wrap {
  display: flex;
  min-height: 100vh;
  padding-top: 60px; /* site-nav height */
}

/* ── COLLAPSIBLE NAVY SIDEBAR (bfa-sidebar) ── */
.bfa-sidebar {
  position: fixed;
  top: 60px; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sb-bg);
  overflow-y: auto; overflow-x: hidden;
  z-index: 100;
  display: flex; flex-direction: column;
  transition: width 0.22s cubic-bezier(0.4,0,0.2,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.bfa-sidebar::-webkit-scrollbar { width: 3px; }
.bfa-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }
.bfa-sidebar.collapsed { width: var(--sidebar-collapsed-w); }
/* Toggle button */
.sb-toggle {
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0.75rem 0.875rem;
  background: none; border: none;
  color: rgba(255,255,255,0.4); cursor: pointer;
  transition: color var(--transition); flex-shrink: 0;
}
.sb-toggle:hover { color: rgba(255,255,255,0.9); }
.sb-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }
.bfa-sidebar.collapsed .sb-toggle { justify-content: center; padding: 0.75rem; }
/* User info */
.sb-user {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 1rem 0.875rem;
  border-bottom: 1px solid var(--sb-border);
  overflow: hidden; flex-shrink: 0;
}
.sb-avatar {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(233,30,140,0.2);
  color: var(--pink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 700;
  border: 1.5px solid rgba(233,30,140,0.35);
}
.sb-user-info { overflow: hidden; transition: opacity 0.15s; min-width: 0; }
.sb-user-name { font-size: 0.8125rem; font-weight: 700; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: 0.6875rem; color: var(--sb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bfa-sidebar.collapsed .sb-user-info { opacity: 0; width: 0; pointer-events: none; }
/* Navigation */
.sb-nav { flex: 1; padding: 0.5rem 0; overflow: hidden; }
.sb-section {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sb-label);
  white-space: nowrap; overflow: hidden;
  transition: opacity 0.15s, padding 0.22s, height 0.22s;
}
.bfa-sidebar.collapsed .sb-section { opacity: 0; height: 0; padding: 0; pointer-events: none; }
.sb-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5625rem 1rem;
  font-size: 0.8125rem; font-weight: 500;
  color: var(--sb-text);
  transition: all var(--transition);
  border-left: 2.5px solid transparent;
  white-space: nowrap; overflow: hidden;
  position: relative;
}
.sb-link:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.95); border-left-color: rgba(255,255,255,0.25); }
.sb-link.active { background: rgba(232,160,180,0.18); color: var(--pink-3); border-left-color: var(--pink-2); font-weight: 600; }
.sb-icon { width: 18px; height: 18px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sb-icon svg { width: 18px; height: 18px; }
.sb-label { transition: opacity 0.15s; overflow: hidden; }
.bfa-sidebar.collapsed .sb-label { opacity: 0; width: 0; pointer-events: none; }
/* Tooltip on collapsed */
.bfa-sidebar.collapsed .sb-link:hover::after {
  content: attr(title);
  position: absolute; left: calc(var(--sidebar-collapsed-w) + 8px); top: 50%; transform: translateY(-50%);
  background: var(--navy); color: #fff; font-size: 0.75rem; font-weight: 600;
  padding: 0.3rem 0.625rem; border-radius: 4px; white-space: nowrap;
  pointer-events: none; z-index: 999; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
/* Footer */
.sb-footer { padding: 0.75rem; border-top: 1px solid var(--sb-border); flex-shrink: 0; }

/* BFACortex Connect status indicator */
.bfa-cortex-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  transition: opacity 0.3s;
}
.bfa-sidebar.collapsed .bfa-cortex-status .cortex-label,
.bfa-sidebar.collapsed .bfa-cortex-status .cortex-state { display: none; }
.cortex-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b7280;
  flex-shrink: 0;
  transition: background 0.4s;
}
.cortex-dot.connected {
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.7);
  animation: cortex-pulse 1.6s ease-in-out infinite;
}
.cortex-dot.disconnected {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,0.7);
  animation: cortex-pulse-red 1.6s ease-in-out infinite;
}
@keyframes cortex-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
@keyframes cortex-pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.cortex-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.cortex-state {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  margin-left: auto;
  white-space: nowrap;
}
.sb-signout {
  display: flex; align-items: center; gap: 0.75rem;
  width: 100%; padding: 0.5rem 0.25rem;
  background: none; border: none;
  color: var(--sb-text); font-size: 0.8125rem; font-weight: 500;
  cursor: pointer; border-radius: var(--radius-sm);
  transition: all var(--transition); overflow: hidden; white-space: nowrap;
}
.sb-signout:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.sb-signout .sb-icon { flex-shrink: 0; }
/* Legacy sidebar — hidden (replaced by bfa-sidebar) */
.dash-sidebar { display: none !important; }
/* Main content area */
.dash-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  transition: margin-left 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* Topbar inside dash-main */
.dash-topbar {
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.dash-topbar h1 { font-size: 1.375rem; font-weight: 800; color: var(--text-1); }
.dash-topbar p  { font-size: 0.875rem; color: var(--text-4); margin-top: 0.125rem; }
.dash-topbar-left .eyebrow { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-2); margin-bottom: 0.25rem; }
.dash-topbar-right { display: flex; gap: 0.625rem; flex-wrap: wrap; }

/* Content area */
.dash-content { padding: 2rem; flex: 1; }

/* ============================================================
   SUMMARY/STATS CARDS (admin pages)
   ============================================================ */
.summary-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.5rem 2rem;
  background: #fff;
  border-bottom: 1.5px solid var(--border);
}
.summary-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  position: relative;
  overflow: hidden;
}
.summary-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
}
.summary-card.blue-accent::before  { background: #7c3aed; }
.summary-card.navy-accent::before  { background: var(--navy); }
.summary-card.green-accent::before { background: #22c55e; }
.summary-card.pink-accent::before  { background: var(--pink-2); }
.summary-card.amber-accent::before { background: #f59e0b; }
.summary-card.red-accent::before   { background: #ef4444; }
.summary-card .val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1;
}
.summary-card .val.blue  { color: #7c3aed; }
.summary-card .val.pink  { color: var(--pink-2); }
.summary-card .val.green { color: #22c55e; }
.summary-card .val.amber { color: #f59e0b; }
.summary-card .val.red   { color: #ef4444; }
.summary-card .lbl {
  font-size: 0.75rem;
  color: var(--text-4);
  margin-top: 0.25rem;
}

/* Stats grid (admin pages) */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-box {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}
.stat-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.stat-box.navy::before  { background: var(--navy); }
.stat-box.pink::before  { background: var(--pink-2); }
.stat-box.amber::before { background: #f59e0b; }
.stat-box.green::before { background: #22c55e; }
.stat-box.red::before   { background: #ef4444; }
.stat-box .stat-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.stat-box .stat-value { font-size: 1.625rem; font-weight: 800; color: var(--text-1); line-height: 1; }
.stat-box .stat-label { font-size: 0.75rem; color: var(--text-4); margin-top: 0.25rem; }

/* ============================================================
   PAGE HEADER (inside dash-content)
   ============================================================ */
.page-header { margin-bottom: 2rem; }
.page-header-inner { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.page-eyebrow { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-2); margin-bottom: 0.25rem; }
.page-title { font-size: 1.625rem; font-weight: 800; color: var(--text-1); }
.page-sub   { font-size: 0.875rem; color: var(--text-4); margin-top: 0.25rem; }
.page-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  transform: translateY(8px);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 960px; }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.modal-title { font-size: 1.0625rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg-2);
  color: var(--text-2);
  font-size: 1.125rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--border); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end; gap: 0.625rem;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: var(--text-1);
  color: #fff;
  padding: 0.75rem 1.125rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 0.5rem;
  animation: toast-in 0.2s ease;
  max-width: 320px;
}
.toast.success, .toast.toast-success { background: #16a34a; }
.toast.error,   .toast.toast-danger  { background: #dc2626; }
.toast.warning, .toast.toast-warning { background: #d97706; }
.toast.info,    .toast.toast-info    { background: #1d4ed8; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page { min-height: 100vh; display: flex; }
.login-left {
  width: 42%;
  background: linear-gradient(160deg, var(--navy) 0%, #2d0a52 40%, #7c1a5a 75%, var(--pink-2) 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 30%, rgba(233,30,140,0.2) 0%, transparent 60%);
  pointer-events: none;
}
.login-left-logo { display: flex; align-items: center; gap: 0.75rem; position: relative; }
.login-left-logo img { width: 44px; height: 44px; object-fit: contain; }
.login-left-logo-text .name { font-size: 1rem; font-weight: 700; color: #fff; }
.login-left-logo-text .sub  { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.login-left-content { position: relative; }
.login-left-content h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 1rem; }
.login-left-content p  { color: rgba(255,255,255,0.7); font-size: 0.9375rem; margin-bottom: 2rem; }
.login-features { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.login-features li { display: flex; align-items: center; gap: 0.625rem; font-size: 0.875rem; color: rgba(255,255,255,0.8); }
.login-features li::before { content: '●'; color: var(--pink-3); font-size: 0.5rem; }
.login-left-footer { font-size: 0.75rem; color: rgba(255,255,255,0.4); position: relative; }
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: #fff;
}
.login-form-wrap { width: 100%; max-width: 380px; }
.login-form-wrap h1 { font-size: 1.625rem; font-weight: 800; margin-bottom: 0.375rem; }
.login-form-wrap .sub { font-size: 0.875rem; color: var(--text-4); margin-bottom: 2rem; }
.demo-accounts { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 0.875rem; margin-bottom: 1.5rem; }
.demo-accounts-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); margin-bottom: 0.625rem; }
.demo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; }
.demo-btn {
  padding: 0.4375rem 0.625rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.demo-btn:hover { border-color: var(--pink-2); color: var(--pink-2); background: rgba(233,30,140,0.04); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0f0120;
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.875rem; }
.footer-brand .logo { width: 32px; height: 32px; overflow: hidden; flex-shrink: 0; }
.footer-brand .logo img { width: 32px; height: 32px; object-fit: contain; }
.footer-brand .name { font-size: 0.9375rem; font-weight: 700; color: #fff; }
.footer-brand .sub  { font-size: 0.75rem; }
.footer-brand-text .name { font-size: 0.9375rem; font-weight: 700; color: #fff; }
.footer-brand-text .sub  { font-size: 0.75rem; }
.footer-col-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 0.875rem; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.75rem; }

/* ============================================================
   UPLOAD / FILE INPUT
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--pink-2); background: rgba(233,30,140,0.04); }
.upload-zone-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.upload-zone-text { font-size: 0.875rem; color: var(--text-3); }
.upload-zone-hint { font-size: 0.75rem; color: var(--text-4); margin-top: 0.25rem; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; border-bottom: 1.5px solid var(--border); gap: 0; margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-3);
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1.5px;
  transition: all var(--transition);
  cursor: pointer;
}
.tab-btn:hover { color: var(--text-1); }
.tab-btn.active { color: var(--pink-2); border-bottom-color: var(--pink-2); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.divider { height: 1.5px; background: var(--border); margin: 1.5rem 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-navy   { color: var(--navy); }
.text-pink   { color: var(--pink-2); }
.text-muted  { color: var(--text-4); }
.text-success { color: #16a34a; }
.text-danger  { color: #dc2626; }
.text-warning { color: #d97706; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-0  { padding: 0 !important; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-4); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state-text { font-size: 0.9375rem; font-weight: 600; color: var(--text-3); }
.empty-state-sub  { font-size: 0.8125rem; margin-top: 0.25rem; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--pink-2); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-row td { text-align: center; padding: 2.5rem; color: var(--text-4); }
.loading { text-align: center; padding: 2rem; color: var(--text-4); }

/* Alert boxes */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; margin-bottom: 1rem; }
.alert-danger  { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-warning { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }

/* ============================================================
   VIDEO HERO (home page)
   ============================================================ */
.hero-video {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #1a0533;
  padding: 0;
}
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,5,51,0.85) 0%, rgba(26,5,51,0.65) 50%, rgba(233,30,140,0.3) 100%);
  z-index: 1;
}
.hero-video-content {
  position: relative;
  z-index: 2;
  padding: 5rem 0 4rem;
  text-align: left;
}
.hero-video-content .eyebrow {
  color: rgba(255,255,255,0.75);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero-video-content h1 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.hero-video-content p {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.80);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.hero-video-content .hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-video-content .hero-btn-primary {
  background: #e91e8c;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.hero-video-content .hero-btn-primary:hover { background: #c4177a; transform: translateY(-1px); }
.hero-video-content .hero-btn-outline {
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 2rem;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.55);
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.2s, background 0.2s;
}
.hero-video-content .hero-btn-outline:hover { border-color: #ffffff; background: rgba(255,255,255,0.08); }

/* ============================================================
   APP LAYOUT (admin pages using app-layout + sidebar)
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--topbar-h);
}
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sb-bg);
  border-right: none;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--sb-border);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.sidebar-logo img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.sidebar-logo-text .name { font-size: 0.875rem; font-weight: 700; color: rgba(255,255,255,0.9); }
.sidebar-logo-text .sub  { font-size: 0.6875rem; color: var(--sb-text); }
.sidebar-section {
  padding: 0.875rem 1rem 0.375rem;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sb-label);
}
.sidebar nav { flex: 1; padding: 0.75rem 0; }

/* ============================================================
   DASH HERO (inside admin pages)
   ============================================================ */
.dash-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d0a52 45%, #7c1a5a 80%, var(--pink-2) 100%);
  padding: 1.75rem 2rem;
  position: relative;
  overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(233,30,140,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.dash-hero-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; position: relative; }
.dash-hero-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-3); margin-bottom: 0.25rem; }
.dash-hero h1 { color: #fff; font-size: 1.625rem; font-weight: 800; }
.dash-hero p  { color: rgba(255,255,255,0.7); font-size: 0.875rem; margin-top: 0.25rem; }
.dash-hero-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .dash-sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .page-hero h1 { font-size: 1.875rem; }
  .login-left { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-strip-inner { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .fixtures-grid { grid-template-columns: 1fr; }
  .stats-strip .container { grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: none; border-bottom: 1.5px solid var(--border); }
  .stat-item:nth-child(odd) { border-right: 1.5px solid var(--border); }
  .stat-item:last-child, .stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr !important; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE HAMBURGER MENU  (public site-nav)
   ============================================================ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--bg-2); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.25s ease;
  transform-origin: center;
}
.site-nav.admin-dark .nav-hamburger span { background: rgba(255,255,255,0.8); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  z-index: 190;
  padding: 0.75rem 1.5rem 1.25rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  animation: slideDown 0.2s ease;
}
.site-nav.admin-dark ~ .nav-drawer,
.nav-drawer.admin-dark {
  background: var(--sb-bg);
  border-bottom-color: var(--sb-border);
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-drawer.open { display: block; }
.nav-drawer a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.9375rem; font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.nav-drawer.admin-dark a { color: rgba(255,255,255,0.75); border-bottom-color: var(--sb-border); }
.nav-drawer a:last-child { border-bottom: none; }
.nav-drawer a:hover, .nav-drawer a.active { color: var(--navy); }
.nav-drawer.admin-dark a:hover { color: #fff; }
.nav-drawer .btn-nav-login {
  display: block; text-align: center;
  margin-top: 0.75rem;
  background: var(--navy) !important;
  color: #fff !important;
  padding: 0.75rem !important;
  border-radius: var(--radius-sm) !important;
}

/* ============================================================
   ADMIN SIDEBAR MOBILE OVERLAY
   ============================================================ */
.sb-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
  backdrop-filter: blur(2px);
}
.sb-overlay.visible, .sb-overlay.active { display: block; }
/* Mobile sidebar toggle button in topbar */
.sb-mobile-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: none; border: none;
  color: rgba(255,255,255,0.75);
  cursor: pointer; border-radius: var(--radius-sm);
  transition: all var(--transition);
  flex-shrink: 0;
}
.sb-mobile-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sb-mobile-toggle svg { width: 20px; height: 20px; }

/* ============================================================
   RESPONSIVE — 900px (tablet)
   ============================================================ */
@media (max-width: 900px) {
  /* Admin sidebar: slide in as overlay */
  .bfa-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), width 0.22s cubic-bezier(0.4,0,0.2,1);
    width: var(--sidebar-w) !important; /* always full width on mobile */
  }
  .bfa-sidebar.mobile-open { transform: translateX(0); }
  .bfa-sidebar.collapsed { width: var(--sidebar-w) !important; } /* no icon-only on mobile */
  .bfa-sidebar.collapsed .sb-label { opacity: 1; width: auto; pointer-events: auto; }
  .bfa-sidebar.collapsed .sb-section { opacity: 1; height: auto; padding: 0.75rem 1rem 0.25rem; pointer-events: auto; }
  .bfa-sidebar.collapsed .sb-user-info { opacity: 1; width: auto; pointer-events: auto; }
  /* Main content: full width */
  .dash-main { margin-left: 0 !important; }
  /* Show mobile toggle in topbar */
  .sb-mobile-toggle { display: flex; }
  /* Hide desktop collapse toggle */
  .sb-toggle { display: none; }
  /* Topbar: show hamburger, hide user info text on small screens */
  .nav-user-info { display: none; }
  /* Cards */
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .page-hero h1 { font-size: 1.875rem; }
  .login-left { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-strip-inner { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr !important; }
  /* Dash hero */
  .dash-hero { padding: 1.25rem 1rem; }
  .dash-hero h1 { font-size: 1.25rem; }
  .dash-hero-inner { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  /* Modal full-screen on tablet */
  .modal { padding: 0.75rem; }
  .modal-box { max-width: 100%; margin: 0; }
}

/* ============================================================
   RESPONSIVE — 640px (mobile)
   ============================================================ */
@media (max-width: 640px) {
  /* Public nav: hamburger */
  .nav-hamburger { display: flex; }
  .nav-links { display: none; }
  .nav-user { display: none; } /* hide topbar user info on mobile public pages */

  /* Container padding */
  .container { padding: 0 1rem; }

  /* Typography */
  .hero h1 { font-size: 1.75rem; }
  .page-hero { padding: 2rem 0 1.5rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .page-hero p { font-size: 0.9375rem; }

  /* Grids */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .fixtures-grid { grid-template-columns: 1fr; }
  .match-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr !important; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-strip-inner { grid-template-columns: 1fr 1fr; }

  /* Stats strip items */
  .stat-item { border-right: none; border-bottom: 1.5px solid var(--border); }
  .stat-item:nth-child(odd) { border-right: 1.5px solid var(--border); }
  .stat-item:last-child, .stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }

  /* Tables: horizontal scroll with sticky first column */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 480px; }
  .table-wrap table td:first-child,
  .table-wrap table th:first-child {
    position: sticky; left: 0;
    background: #fff; z-index: 1;
    box-shadow: 2px 0 4px rgba(0,0,0,0.06);
  }
  .standings-table thead th:first-child { background: var(--navy); color: rgba(255,255,255,0.85); }

  /* Cards */
  .card { border-radius: var(--radius-sm); }
  .card-header { padding: 0.875rem 1rem; }
  .card-body   { padding: 1rem; }

  /* Forms */
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .form-group { margin-bottom: 0.875rem; }
  .form-control { font-size: 16px; } /* prevent iOS zoom */
  select.form-control { font-size: 16px; }
  textarea.form-control { font-size: 16px; }

  /* Buttons: full width on mobile for primary actions */
  .btn-block-mobile { width: 100%; justify-content: center; }
  .dash-hero-actions { width: 100%; }
  .dash-hero-actions .btn-primary,
  .dash-hero-actions .btn-outline { flex: 1; justify-content: center; text-align: center; }

  /* Section headers */
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .section-header select { width: 100%; }

  /* Login page */
  .login-wrap { padding: 1.5rem 1rem; }
  .login-card  { padding: 1.5rem 1.25rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid > div:last-child { grid-template-columns: 1fr 1fr; }

  /* Dash hero */
  .dash-hero { padding: 1rem; }
  .dash-hero h1 { font-size: 1.125rem; }
  .dash-hero p  { font-size: 0.8125rem; }

  /* Admin topbar: compact */
  .site-nav.admin-dark .nav-user-info { display: none; }
  .site-nav.admin-dark .btn-signout span { display: none; } /* icon only */

  /* Summary cards stack */
  .summary-grid { grid-template-columns: 1fr 1fr !important; }

  /* Modal: full screen */
  .modal { padding: 0; align-items: flex-end; }
  .modal-box {
    max-width: 100%; width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    max-height: 90vh; overflow-y: auto;
  }

  /* Tabs: scroll horizontally */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tab-btn { white-space: nowrap; }

  /* Badges in tables: smaller */
  .badge { font-size: 0.625rem; padding: 0.125rem 0.375rem; }

  /* Player stat cards */
  .stat-card { padding: 0.875rem; }
  .stat-card-icon { width: 32px; height: 32px; font-size: 1rem; }
  .stat-card-value { font-size: 1.5rem; }

  /* Section padding */
  .section { padding: 2rem 0; }
  .section-alt { padding: 2rem 0; }
}

/* ============================================================
   RESPONSIVE — 400px (small phones)
   ============================================================ */
@media (max-width: 400px) {
  .summary-grid { grid-template-columns: 1fr !important; }
  .stat-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero-video-content h1 { font-size: 1.75rem; }
  .hero-video-content p { font-size: 0.9375rem; }
  .hero-cta { flex-direction: column; }
  .hero-btn-primary, .hero-btn-outline { text-align: center; }
  .nav-title { font-size: 0.875rem; }
  .nav-sub { display: none; }
}
