/* ============================================================
   Footy Addis — Premium Light Mode UI
   Font: Inter (Google Fonts)  |  Icons: Lucide CDN
   Designed for ultimate clarity, professional look & mobile-first
============================================================ */

/* === Design Tokens === */
:root {
  /* Backgrounds — premium soft canvas */
  --bg:           #F6F8FB;
  --bg-deep:      #EDF1F7;
  --surface:      #FFFFFF;
  --surface-hover:#F4F7FA;
  --surface-2:    #F9FAFC;
  --surface-3:    #EEF2F7;

  /* Borders */
  --border:       #E5EAF1;
  --border-2:     #D8E0EA;
  --border-focus: #CBD5E1;

  /* Brand — Footy Addis Green (refined emerald) */
  --green:        #00A859;
  --green-deep:   #008C4A;
  --green-bright: #10B981;
  --green-soft:   #E6F7EF;
  --green-dim:    rgba(0,168,89,0.10);
  --green-glow:   rgba(0,168,89,0.22);
  --gradient-green: linear-gradient(135deg, #00A859 0%, #00C97A 100%);
  --gradient-hero:  linear-gradient(135deg, #064E3B 0%, #00A859 50%, #34D399 100%);
  --gradient-sheen: linear-gradient(135deg, rgba(0,168,89,0.08), rgba(16,185,129,0.02));

  --gold:         #F59E0B;
  --gold-soft:    #FEF3C7;
  --gold-dim:     rgba(245,158,11,0.10);

  --red:          #EF4444;
  --red-soft:     #FEE2E2;
  --red-dim:      rgba(239,68,68,0.10);

  --blue:         #3B82F6;
  --blue-soft:    #DBEAFE;
  --blue-dim:     rgba(59,130,246,0.10);

  --purple:       #8B5CF6;
  --purple-soft:  #EDE9FE;
  --purple-dim:   rgba(139,92,246,0.10);

  --orange:       #F97316;
  --orange-soft:  #FFEDD5;
  --orange-dim:   rgba(249,115,22,0.10);

  /* Typography */
  --text-1:       #0B1220;
  --text-2:       #475569;
  --text-3:       #64748B;
  --text-4:       #94A3B8;

  /* Dimensions */
  --sidebar-w:    272px;
  --topbar-h:     72px;
  --bottom-nav-h: 70px;

  /* Border Radii */
  --r-xs:         6px;
  --r-sm:         10px;
  --r-md:         14px;
  --r-lg:         18px;
  --r-xl:         24px;
  --r-2xl:        32px;
  --r-pill:       9999px;

  /* Shadows — soft, layered, premium */
  --shadow-xs:    0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm:    0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.03);
  --shadow-md:    0 4px 16px rgba(15,23,42,0.06), 0 1px 3px rgba(15,23,42,0.04);
  --shadow-lg:    0 16px 40px rgba(15,23,42,0.08), 0 4px 12px rgba(15,23,42,0.05);
  --shadow-xl:    0 24px 60px rgba(15,23,42,0.12), 0 8px 20px rgba(15,23,42,0.06);
  --shadow-green: 0 10px 30px rgba(0,168,89,0.28);
  --shadow-ring:  0 0 0 4px rgba(0,168,89,0.12);

  /* Formerly frosted glass — now plain solid surfaces for clarity */
  --glass:        #FFFFFF;
  --glass-border: #E5EAF1;

  /* Motion */
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

/* === Dark theme === */
/* Only the neutral canvas flips: brand greens, hero gradients, and the
   pastel *-soft accent chips stay vivid so badges still pop on dark. */
html[data-theme="dark"] {
  --bg:           #0B1220;
  --bg-deep:      #060A12;
  --surface:      #131C2B;
  --surface-hover:#1B2536;
  --surface-2:    #0F1726;
  --surface-3:    #1C2740;

  --border:       #243044;
  --border-2:     #2E3A50;
  --border-focus: #3C4C66;

  --green-soft:   rgba(0,168,89,0.16);
  --green-dim:    rgba(0,168,89,0.18);

  --text-1:       #EAF0F8;
  --text-2:       #AAB7C9;
  --text-3:       #8493A8;
  --text-4:       #5E6D84;

  --glass:        #131C2B;
  --glass-border: #243044;

  --shadow-xs:    0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.35);
  --shadow-lg:    0 16px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.4);
  --shadow-xl:    0 24px 60px rgba(0,0,0,0.6), 0 8px 20px rgba(0,0,0,0.45);

  color-scheme: dark;
}

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

/* Plain, calm canvas — no background photo, no grid overlay. */
body {
  font-family: 'Inter', 'Noto Sans Ethiopic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-1);
  line-height: 1.5;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-1);
  font-weight: 700;
  line-height: 1.2;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* === Layout === */
.layout-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
}

.page-content {
  padding: 40px 48px;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* === Sidebar (Desktop) === */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease);
}

.sidebar-logo {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
}

.logo-ball {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--gradient-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 6px 16px rgba(0,168,89,0.35), inset 0 1px 0 rgba(255,255,255,0.4);
}

.logo-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.logo-top {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-1);
}
.logo-top span { color: var(--green); }
.logo-sub-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-3);
}

.sidebar-nav {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.18s var(--ease);
  position: relative;
}

.nav-link i {
  width: 19px;
  height: 19px;
  stroke-width: 2px;
  color: var(--text-3);
  transition: color 0.18s var(--ease);
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text-1);
}
.nav-link:hover i { color: var(--text-1); }

.nav-link.active {
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 700;
}

.nav-link.active i {
  color: var(--green);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--green);
  border-radius: 0 3px 3px 0;
}

.sidebar-user {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.sidebar-user:hover { background: var(--surface-2); }

.user-info-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name-sidebar {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta-sidebar {
  font-size: 12px;
  color: var(--text-3);
}

/* === Sidebar Overlay === */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* === Topbar === */
.topbar {
  height: var(--topbar-h);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text-1);
  margin-right: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r-sm);
}

.topbar-menu:hover { background: var(--surface-hover); }

.topbar-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.3px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.install-app-button,
.viewport-toggle,
.topbar-weather {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.install-app-button,
.viewport-toggle {
  padding: 0 14px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}

.install-app-button:hover,
.viewport-toggle:hover {
  transform: translateY(-1px);
  color: var(--green-deep);
  box-shadow: var(--shadow-md);
}

.install-app-button {
  background: var(--green-soft);
  border-color: rgba(0,168,89,0.22);
  color: var(--green-deep);
}

.install-app-button[hidden] { display: none; }

.viewport-toggle[aria-pressed="true"] {
  background: var(--green-soft);
  border-color: rgba(0,168,89,0.2);
  color: var(--green-deep);
}

.install-app-button i,
.viewport-toggle i,
.topbar-weather i {
  width: 17px;
  height: 17px;
  stroke-width: 2.2px;
}

.topbar-weather {
  padding: 0 13px;
  color: #B45309;
  background: rgba(255,251,235,0.82);
  border-color: rgba(245,158,11,0.18);
}
html[data-theme="dark"] .topbar-weather {
  color: #FCD34D;
  background: rgba(245,158,11,0.14);
  border-color: rgba(245,158,11,0.28);
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.topbar-search i {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}

.topbar-search input {
  padding: 10px 16px 10px 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 14px;
  font-weight: 500;
  width: 280px;
  transition: all 0.25s var(--ease);
  outline: none;
}

.topbar-search input::placeholder { color: var(--text-3); }
.topbar-search input:focus {
  background: var(--surface);
  border-color: var(--green);
  box-shadow: var(--shadow-ring);
  width: 340px;
}

.topbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,168,89,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
  cursor: pointer;
  border: 2px solid var(--surface);
  transition: transform 0.2s var(--ease);
}
.topbar-avatar:hover { transform: scale(1.05); }

.session-current {
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--green-soft);
  color: var(--green-deep);
  margin-bottom: 18px;
}

.session-current strong,
.session-current span { display: block; }
.session-current span { margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.demo-login-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.demo-login-card { display: grid; gap: 5px; justify-items: start; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-lg); padding: 14px; cursor: pointer; font: inherit; text-align: left; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.demo-login-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.demo-login-card i { width: 19px; height: 19px; color: var(--green); }
.demo-login-card span { color: var(--text-3); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.demo-login-card strong { color: var(--text-1); font-size: 14px; }
.account-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.account-tab { border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--r-md); padding: 11px 14px; font: inherit; font-weight: 800; color: var(--text-2); cursor: pointer; }
.account-tab.active { background: var(--green-soft); color: var(--green-deep); border-color: rgba(0,168,89,0.22); }
.auth-helper-copy { margin-bottom: 16px; color: var(--text-3); font-size: 13px; line-height: 1.6; }
.account-switch-line { margin-top: 14px; color: var(--text-3); font-size: 13px; }
.account-link-button { appearance: none; border: 0; background: none; padding: 0; color: var(--green-deep); font: inherit; font-weight: 800; cursor: pointer; }
.session-actions { justify-content: space-between; }

/* === Bottom Nav (Mobile) === */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 80;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.bottom-nav-item {
  background: none;
  border: none;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  flex: 1;
  border-radius: var(--r-md);
  margin: 0 2px;
}

.bottom-nav-item i { width: 22px; height: 22px; stroke-width: 2px; }
.bottom-nav-item span { font-size: 11px; font-weight: 600; }

.bottom-nav-item.active { color: var(--green); }
.bottom-nav-item:active { background: var(--surface-hover); }

/* === UI Components === */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: inherit;
  box-shadow: var(--shadow-xs);
  letter-spacing: -0.1px;
  white-space: nowrap;
}

.btn i { width: 17px; height: 17px; stroke-width: 2.2px; }

.btn-primary {
  background: var(--gradient-green);
  color: white;
  box-shadow: 0 6px 16px rgba(0,168,89,0.28), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,168,89,0.36), inset 0 1px 0 rgba(255,255,255,0.3);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); filter: brightness(0.95); }

.btn-danger { background: var(--red); color: white; box-shadow: 0 4px 12px rgba(239,68,68,0.25); }
.btn-danger:hover { background: #DC2626; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(239,68,68,0.32); }

.btn-gold { background: var(--gold); color: white; box-shadow: 0 4px 12px rgba(245,158,11,0.25); }
.btn-gold:hover { background: #D97706; transform: translateY(-1px); }

.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text-1); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-ghost { background: transparent; color: var(--green-deep); box-shadow: none; border-color: transparent; }
.btn-ghost:hover { background: var(--green-soft); }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: var(--r-lg); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-ring); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border: 1px solid transparent;
  line-height: 1.4;
}

.badge-open, .badge-active, .badge-confirmed, .badge-beginner {
  background: var(--green-soft);
  color: var(--green-deep);
  border-color: rgba(0,168,89,0.18);
}
.badge-open::before { content:''; width:6px; height:6px; border-radius:50%; background: var(--green); box-shadow: 0 0 0 3px rgba(0,168,89,0.18); }
.badge-full, .badge-intermediate {
  background: var(--orange-soft);
  color: #B45309;
  border-color: rgba(249,115,22,0.18);
}
.badge-cancelled, .badge-danger, .badge-advanced {
  background: var(--red-soft);
  color: #B91C1C;
  border-color: rgba(239,68,68,0.18);
}
.badge-completed {
  background: var(--purple-soft);
  color: #6D28D9;
  border-color: rgba(139,92,246,0.18);
}
.badge-default, .badge-any {
  background: var(--surface-2);
  color: var(--text-2);
  border-color: var(--border);
}
.badge-5aside, .badge-7aside, .badge-11aside {
  background: var(--blue-soft);
  color: #1D4ED8;
  border-color: rgba(59,130,246,0.18);
}

/* Avatars */
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  width: 40px;
  height: 40px;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  border: 2px solid white;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }

.avatar-0 { background: #3B82F6; }
.avatar-1 { background: #EF4444; }
.avatar-2 { background: #10B981; }
.avatar-3 { background: #F59E0B; }
.avatar-4 { background: #8B5CF6; }
.avatar-5 { background: #EC4899; }
.avatar-6 { background: #06B6D4; }
.avatar-7 { background: #64748B; }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-1);
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}
.form-control::placeholder { color: var(--text-3); }
select.form-control { appearance: none; cursor: pointer; background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>'); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }

/* === Dashboard & Sections === */

/* Home header — plain greeting + a couple of actions */
.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.home-head h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Weather card — one quiet row, nothing covering it */
.weather-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  margin-bottom: 28px;
}
.weather-card > i {
  width: 28px;
  height: 28px;
  color: var(--gold);
  flex: 0 0 auto;
}
.weather-card-main { flex: 1; min-width: 0; }
.weather-card-main strong {
  display: block;
  font-size: 15px;
  color: var(--text-1);
}
.weather-card-main span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}
.weather-card-side {
  text-align: right;
  flex: 0 0 auto;
}
.weather-card-side span {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 700;
}

/* Clickable booking rows (home + venue modal) */
.booking-item-click { cursor: pointer; }
.booking-item-click:hover { background: var(--surface-2); }

/* Games page search box */
.games-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.games-search i {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}
.games-search input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
  font-size: 14.5px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.games-search input:focus {
  border-color: var(--green);
  box-shadow: var(--shadow-ring);
}

.matchday-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.matchday-row:last-child { border-bottom: 0; padding-bottom: 0; }
.matchday-row span { color: var(--text-3); font-size: 13px; font-weight: 700; }
.matchday-row strong { color: var(--text-1); font-size: 13px; text-align: right; }

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow: hidden;
}
.stat-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,168,89,0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.stat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
}
.stat-tile:hover::after { opacity: 1; }
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
}
.stat-icon i { width: 22px; height: 22px; stroke-width: 2.2px; }
.stat-icon-green { background: var(--green-soft); color: var(--green-deep); box-shadow: inset 0 0 0 1px rgba(0,168,89,0.12); }
.stat-icon-gold  { background: var(--gold-soft);  color: #B45309;     box-shadow: inset 0 0 0 1px rgba(245,158,11,0.15); }
.stat-icon-blue  { background: var(--blue-soft);  color: #1D4ED8;     box-shadow: inset 0 0 0 1px rgba(59,130,246,0.15); }
.stat-icon-purple{ background: var(--purple-soft);color: #6D28D9;     box-shadow: inset 0 0 0 1px rgba(139,92,246,0.15); }

.stat-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 6px;
  line-height: 1;
  letter-spacing: -1px;
  font-feature-settings: 'tnum';
}
.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Next Game Card (Featured booking) */
.next-game-card {
  background: linear-gradient(135deg, var(--surface) 0%, #FAFAFA 100%);
  border: 1px solid var(--green-glow);
  border-left: 4px solid var(--green);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}
.next-game-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--green);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.next-game-label i { width: 14px; height: 14px; }
.next-game-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 16px;
}
.next-game-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.next-game-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 14px;
  background: var(--surface-2);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.next-game-detail i { width: 16px; height: 16px; color: var(--text-3); }
.next-game-detail strong { color: var(--text-1); font-weight: 600; }

/* Section Headers */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.5px;
}
.section-sub {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 24px;
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
  filter: grayscale(1);
}
.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}
.empty-state-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 400px;
  margin: 0 auto;
}

/* === Game Cards Pipeline === */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow: hidden;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-green);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}
.game-card.status-open::before { opacity: 1; }
.game-card.status-full::before { opacity: 1; background: linear-gradient(90deg, var(--orange), var(--gold)); }
.game-card.status-completed::before { opacity: 1; background: linear-gradient(90deg, var(--purple), #A78BFA); }
.game-card.status-cancelled::before { opacity: 1; background: linear-gradient(90deg, var(--red), #FCA5A5); }

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-2);
}

.game-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.game-format-icon {
  width: 48px;
  height: 48px;
  background: var(--green-soft);
  border: 1px solid rgba(0,168,89,0.15);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

.game-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.game-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 16px;
  line-height: 1.3;
}

.game-card-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.game-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}
.game-info-row i {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  stroke-width: 2px;
}
.game-info-row strong {
  color: var(--text-1);
  font-weight: 600;
}

/* Spots Bar embedded in Card */
.game-card-spots {
  margin-top: auto;
  background: var(--surface-2);
  padding: 16px;
  border-radius: var(--r-md);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.spots-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}

.spots-bar {
  height: 8px;
  background: var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.spots-fill {
  height: 100%;
  background: var(--green);
  border-radius: var(--r-pill);
  transition: width 0.4s ease;
}
.spots-fill.almost-full { background: var(--gold); }
.spots-fill.full { background: var(--red); }

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.game-joined-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
}
.game-joined-label i { width: 18px; height: 18px; }

.game-card-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.game-share-btn { flex: 0 0 auto; }
.game-share-btn i { color: var(--green); }

/* Pulse the card a friend lands on from a shared link */
@keyframes sharedPulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,168,89,0.40); }
  100% { box-shadow: 0 0 0 16px rgba(0,168,89,0); }
}
.game-card.shared-highlight {
  border-color: var(--green);
  animation: sharedPulse 1.3s var(--ease) 2;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-bar select {
  padding: 10px 36px 10px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-1);
  font-weight: 500;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.filter-bar select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* === Tables === */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 16px 24px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.5px;
}

td {
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-hover); }

/* Secondary pages */
.venues-grid,
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.venue-card,
.player-card,
.card,
.booking-item,
.search-result-item,
.feedback-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.venue-card,
.player-card { padding: 22px; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.venue-card:hover,
.player-card:hover,
.search-result-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.venue-card-button { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.venue-card-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.venue-card-header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.venue-card-name { font-size: 17px; font-weight: 800; color: var(--text-1); letter-spacing: -0.3px; }
.venue-card-address,
.venue-facilities,
.venue-game-count { display: flex; gap: 9px; align-items: flex-start; color: var(--text-2); font-size: 14px; font-weight: 600; margin-top: 12px; }
.venue-card-address i,
.venue-facilities i,
.venue-game-count i { width: 16px; height: 16px; color: var(--green); flex: 0 0 auto; margin-top: 2px; }
.venue-game-count { padding: 11px 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.venue-game-count.has-games { background: var(--green-soft); color: var(--green-deep); border-color: rgba(0,168,89,0.15); }
.venue-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; color: var(--text-3); font-size: 13px; font-weight: 700; }
.venue-card-link { display: inline-flex; align-items: center; gap: 6px; color: var(--green-deep); }
.venue-card-link i { width: 14px; height: 14px; }
.venue-inactive { opacity: 0.7; }

.player-card { text-align: center; position: relative; overflow: hidden; }
.player-card::before { content: ''; position: absolute; inset: 0; background: var(--gradient-sheen); opacity: 0; transition: opacity 0.25s var(--ease); pointer-events: none; }
.player-card:hover::before { opacity: 1; }
.player-card .avatar { margin: 0 auto 14px; }
.player-card-name { font-size: 17px; font-weight: 800; color: var(--text-1); }
.player-card-location { margin-top: 6px; color: var(--text-3); font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.player-card-badges { margin: 14px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.player-card-foot { color: var(--text-2); font-size: 13px; font-weight: 600; }
.me-chip { display: inline-flex; padding: 2px 7px; border-radius: var(--r-pill); background: var(--green-soft); color: var(--green-deep); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; vertical-align: middle; }

.card { overflow: hidden; margin-bottom: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.card-title { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }
.card-body { padding: 24px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-role-grid { display: contents; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-2); font-size: 13px; font-weight: 800; }
.form-group input,
.form-group select,
.form-group textarea,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-1);
  font: inherit;
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-group textarea,
textarea { min-height: 104px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
textarea:focus { border-color: var(--green); box-shadow: var(--shadow-ring); }
.manager-fields[hidden],
.account-role-grid[hidden] { display: none; }
.venue-modal-summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 16px; }
.venue-modal-summary strong { display: block; color: var(--text-1); }
.venue-modal-summary span { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--text-3); font-size: 13px; font-weight: 700; }
.venue-modal-summary i { width: 14px; height: 14px; color: var(--green); }
.venue-modal-notes { display: grid; gap: 10px; margin-bottom: 18px; }
.empty-state-inline { display: grid; gap: 6px; padding: 18px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px dashed var(--border); color: var(--text-2); }
.empty-state-inline strong { color: var(--text-1); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }

.bookings-section-title { margin: 24px 0 14px; color: var(--text-1); font-size: 17px; font-weight: 800; }
.bookings-list { display: grid; gap: 14px; }
.booking-item { display: grid; grid-template-columns: 68px 1fr auto; gap: 18px; align-items: center; padding: 18px; }
.booking-date-block { border-radius: var(--r-md); background: var(--green-soft); color: var(--green-deep); text-align: center; padding: 10px 8px; }
.booking-date-day { font-size: 24px; font-weight: 800; line-height: 1; }
.booking-date-month { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px; margin-top: 4px; }
.booking-title { font-size: 16px; font-weight: 800; color: var(--text-1); }
.booking-meta { margin-top: 6px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.booking-meta-sep { color: var(--text-4); }
.booking-actions { display: flex; gap: 8px; }
.btn-xs { padding: 6px 10px; font-size: 12px; border-radius: var(--r-sm); }

.search-hero { position: relative; margin-bottom: 22px; }
.search-icon-lg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; color: var(--text-3); }
.search-input-lg { width: 100%; height: 68px; padding: 0 24px 0 62px; border-radius: var(--r-xl); border: 1px solid var(--glass-border); background: var(--glass); box-shadow: var(--shadow-md); font: inherit; font-size: 18px; font-weight: 700; outline: none; }
.search-input-lg:focus { border-color: rgba(0,168,89,0.45); box-shadow: var(--shadow-ring), var(--shadow-lg); }
.search-results { display: grid; gap: 14px; }
.search-result-item { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.sri-icon { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--green-soft); color: var(--green-deep); }
.sri-icon i { width: 20px; height: 20px; }
.sri-title { font-weight: 800; color: var(--text-1); }
.sri-sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.sri-info { flex: 1; min-width: 0; }
.sri-type { padding: 5px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; }

.star-rating { display: flex; gap: 6px; font-size: 28px; color: #CBD5E1; }
.star { cursor: pointer; transition: transform 0.15s var(--ease), color 0.15s var(--ease); }
.star:hover,
.star.active { color: var(--gold); transform: translateY(-1px); }
.feedback-list { display: grid; gap: 14px; }
.feedback-item { padding: 18px; }
.feedback-item-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.feedback-reviewer { display: flex; align-items: center; gap: 12px; }
.feedback-reviewer-name { font-weight: 800; color: var(--text-1); }
.feedback-game-name,
.feedback-date { color: var(--text-3); font-size: 12px; font-weight: 600; }
.feedback-stars { color: var(--gold); font-weight: 800; letter-spacing: 1px; }
.feedback-comment { color: var(--text-2); line-height: 1.65; font-weight: 500; }

/* Pitch booking + owner hub */
.slot-filter-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: var(--r-xl);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.slot-filter-panel select {
  min-width: 220px;
  padding: 12px 38px 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
  font: inherit;
  font-weight: 700;
  outline: none;
}

.slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.slot-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-sm); backdrop-filter: blur(18px); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.slot-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.slot-photo { min-height: 170px; background-size: cover; background-position: center; position: relative; padding: 14px; display: flex; align-items: flex-start; justify-content: space-between; }
.slot-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.18), rgba(0,0,0,0.02)); pointer-events: none; }
.slot-status-pill,
.verified-pill { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: var(--r-pill); color: white; background: rgba(11,18,32,0.58); backdrop-filter: blur(12px); font-size: 12px; font-weight: 800; }
.verified-pill { background: rgba(0,168,89,0.82); }
.verified-pill i { width: 14px; height: 14px; }
.slot-body { padding: 20px; }
.slot-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.slot-venue { font-size: 18px; font-weight: 800; color: var(--text-1); letter-spacing: -0.4px; }
.slot-area,
.slot-rating { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-size: 13px; font-weight: 700; margin-top: 5px; }
.slot-area i,
.slot-rating i { width: 14px; height: 14px; }
.slot-rating { color: #B45309; margin-top: 0; padding: 6px 9px; border-radius: var(--r-pill); background: var(--gold-soft); }
.slot-time { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 12px; color: var(--text-2); font-size: 14px; font-weight: 700; }
.slot-time i { width: 16px; height: 16px; color: var(--green); }
.slot-time strong { color: var(--text-1); }
.slot-trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.slot-trust-row > span:not(.badge) { padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 12px; font-weight: 800; }
.slot-facilities { color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.55; }
.slot-policy { display: flex; gap: 7px; align-items: flex-start; color: var(--green-deep); background: var(--green-soft); border-radius: var(--r-md); padding: 10px; margin-top: 14px; font-size: 12px; font-weight: 700; }
.slot-policy i { width: 15px; height: 15px; flex: 0 0 auto; }
.slot-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--border); }
.slot-booking-note { color: var(--text-3); font-size: 12px; font-weight: 700; }
.slot-card.status-booked,
.slot-card.status-blocked,
.slot-card.status-pending { opacity: 0.82; }

.slot-modal-summary { display: flex; justify-content: space-between; gap: 16px; padding: 16px; border-radius: var(--r-lg); background: var(--green-soft); color: var(--green-deep); margin-bottom: 18px; }
.slot-modal-summary strong { display: block; color: var(--green-deep); }
.slot-modal-summary span { display: block; margin-top: 4px; font-size: 13px; color: var(--text-2); font-weight: 700; }

.owner-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.owner-slot-list { display: grid; gap: 12px; }
.owner-slot-row,
.owner-panel { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); backdrop-filter: blur(18px); }
.owner-slot-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 16px; }
.owner-slot-row.status-available { border-left: 4px solid var(--green); }
.owner-slot-row.status-pending { border-left: 4px solid var(--gold); }
.owner-slot-row.status-booked { border-left: 4px solid var(--blue); }
.owner-slot-row.status-blocked { border-left: 4px solid var(--red); }
.owner-slot-title { font-size: 15px; font-weight: 800; color: var(--text-1); }
.owner-slot-meta { margin-top: 5px; color: var(--text-3); font-size: 13px; font-weight: 700; }
.owner-slot-status { padding: 7px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 800; }
.owner-slot-actions { display: flex; gap: 8px; }
.owner-panel { padding: 18px; margin-bottom: 18px; }
.owner-panel-title { font-size: 16px; font-weight: 800; color: var(--text-1); margin-bottom: 14px; }
.owner-empty-mini { color: var(--text-3); font-size: 13px; font-weight: 700; }
.owner-booking-row,
.notification-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.owner-booking-row:last-child,
.notification-row:last-child { border-bottom: 0; }
.owner-booking-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.owner-booking-row strong,
.notification-row strong { display: block; color: var(--text-1); font-size: 14px; }
.owner-booking-row span,
.notification-row span { display: block; margin-top: 4px; color: var(--text-3); font-size: 12px; font-weight: 700; }
.owner-booking-row small,
.notification-row small { display: block; margin-top: 5px; color: var(--text-4); font-size: 11px; font-weight: 700; }
.owner-booking-actions { display: flex; align-items: center; gap: 8px; }
.notification-row.unread { padding-left: 12px; border-left: 3px solid var(--green); }

/* Laptop demo mobile preview */
body.mobile-preview {
  display: block;
  min-height: 100vh;
  padding: 24px 0;
  overflow: hidden;
  background-color: var(--bg-deep);
}

body.mobile-preview .sidebar,
body.mobile-preview .sidebar-overlay { display: none; }

body.mobile-preview .layout-main {
  width: min(414px, calc(100vw - 32px));
  height: calc(100vh - 48px);
  min-height: 720px;
  max-height: 900px;
  margin: 0 auto;
  border: 10px solid #0B1220;
  border-radius: 42px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 36px 100px rgba(3,7,18,0.45), inset 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
}

body.mobile-preview .layout-main::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 24px;
  border-radius: 0 0 18px 18px;
  background: #0B1220;
  z-index: 200;
}

body.mobile-preview .topbar {
  height: 64px;
  padding: 0 16px;
  background: rgba(255,255,255,0.9);
}

body.mobile-preview .topbar-menu,
body.mobile-preview .topbar-search,
body.mobile-preview .topbar-avatar,
body.mobile-preview .install-app-button,
body.mobile-preview .topbar-weather { display: none; }
body.mobile-preview .topbar-title { font-size: 18px; }
body.mobile-preview .topbar-right { gap: 8px; }
body.mobile-preview .viewport-toggle { width: 38px; height: 38px; padding: 0; justify-content: center; }
body.mobile-preview .viewport-toggle span { display: none; }

body.mobile-preview .page-content {
  max-width: none;
  height: calc(100% - 64px);
  padding: 16px;
  padding-bottom: calc(var(--bottom-nav-h) + 58px);
  overflow-y: auto;
}

body.mobile-preview .bottom-nav {
  display: flex;
  left: 50%;
  right: auto;
  bottom: 40px;
  width: min(394px, calc(100vw - 54px));
  transform: translateX(-50%);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 42px rgba(15,23,42,0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.mobile-preview .home-head { flex-direction: column; align-items: flex-start; }
body.mobile-preview .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body.mobile-preview .stat-tile { padding: 16px; }
body.mobile-preview .stat-num { font-size: 26px; }
body.mobile-preview .games-grid,
body.mobile-preview .venues-grid,
body.mobile-preview .players-grid,
body.mobile-preview .slot-grid { grid-template-columns: 1fr; gap: 14px; }
body.mobile-preview .game-card,
body.mobile-preview .venue-card,
body.mobile-preview .player-card { padding: 18px; }
body.mobile-preview .slot-filter-panel { flex-direction: column; }
body.mobile-preview .slot-filter-panel select { width: 100%; min-width: 0; }
body.mobile-preview .owner-layout { grid-template-columns: 1fr; }
body.mobile-preview .owner-slot-row { grid-template-columns: 1fr; }
body.mobile-preview .owner-slot-actions { justify-content: flex-start; }
body.mobile-preview .owner-booking-row { grid-template-columns: 1fr; }
body.mobile-preview .game-card-top { flex-direction: column; gap: 12px; }
body.mobile-preview .game-card-badges { justify-content: flex-start; }
body.mobile-preview .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
body.mobile-preview .section-title { font-size: 22px; }
body.mobile-preview .filter-bar,
body.mobile-preview .form-grid { grid-template-columns: 1fr; flex-direction: column; width: 100%; }
body.mobile-preview .filter-bar select { width: 100%; }
body.mobile-preview .booking-item { grid-template-columns: 56px 1fr; }
body.mobile-preview .booking-actions { grid-column: 2; justify-content: flex-start; }
body.mobile-preview .search-input-lg { height: 58px; font-size: 15px; }

/* === Modal === */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 18, 32, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
  padding: 16px;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--surface);
  width: 100%;
  max-width: 520px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.35s var(--ease);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }

.modal-overlay.show .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.modal-header h2 {
  font-size: 18px;
  margin: 0;
}

.modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--surface-hover);
  color: var(--text-1);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--surface);
  color: var(--text-1);
  padding: 16px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.3s ease 2.7s forwards;
  border-left: 4px solid var(--green);
}

.toast.toast-error { border-left-color: var(--red); }
.toast.error { border-left-color: var(--red); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* === Loading Spinner === */
.page-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Page entrance animation === */
.page-content > * { animation: fadeUp 0.4s var(--ease) both; }
.page-content > *:nth-child(2) { animation-delay: 0.05s; }
.page-content > *:nth-child(3) { animation-delay: 0.1s; }
.page-content > *:nth-child(4) { animation-delay: 0.15s; }
.page-content > *:nth-child(5) { animation-delay: 0.2s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Responsive Media Queries === */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
  }
  .layout-main {
    margin-left: 0;
  }
  .topbar-menu {
    display: block;
  }
  .bottom-nav {
    display: flex;
  }
  .page-content {
    padding: 20px;
    padding-bottom: calc(var(--bottom-nav-h) + 20px);
  }
  .topbar-search input {
    width: 200px;
  }
  .topbar-search input:focus {
    width: 200px;
  }
  /* The home page shows weather in its own card; the topbar chip just gets
     squeezed/covered on small screens, so hide it there. */
  .topbar-weather { display: none; }
  .install-app-button,
  .viewport-toggle {
    width: 40px;
    padding: 0;
    justify-content: center;
  }
  .install-app-button span,
  .viewport-toggle span {
    display: none;
  }
}

@media (max-width: 480px) {
  .topbar-search { display: none; }
  .stats-row { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .filter-bar { flex-direction: column; width: 100%; }
  .filter-bar select { width: 100%; }
}

/* === Public policy pages === */
body.legal-doc,
body.offline-doc {
  display: block;
  min-height: 100vh;
  overflow-y: auto;
}

.legal-shell,
.offline-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.legal-card,
.offline-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 34px;
}

.legal-back,
.offline-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--green-deep);
  font-weight: 800;
  text-decoration: none;
}

.legal-eyebrow {
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.legal-card h1,
.offline-card h1 {
  margin-top: 8px;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -1px;
}

.legal-card h2 {
  margin-top: 28px;
  font-size: 20px;
}

.legal-card p,
.legal-card li,
.offline-card p {
  color: var(--text-2);
  font-weight: 600;
}

.legal-card p,
.offline-card p {
  margin-top: 12px;
}

.legal-card ul {
  margin-top: 12px;
  padding-left: 22px;
}

.legal-card li + li {
  margin-top: 8px;
}

.legal-meta {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 560px) {
  .legal-shell,
  .offline-shell {
    padding: 24px 0;
  }

  .legal-card,
  .offline-card {
    padding: 24px;
    border-radius: var(--r-lg);
  }

  .demo-login-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================================
   Settings / account drawer
============================================================ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 1050;
}
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

.settings-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(404px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
.settings-drawer.show { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.drawer-head h2 {
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.drawer-head h2 i { width: 19px; height: 19px; color: var(--green); }
.drawer-close {
  background: var(--surface);
  border: 1px solid var(--border);
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.drawer-close:hover { background: var(--surface-hover); color: var(--text-1); }

.drawer-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Account block */
.settings-account {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.settings-account .avatar { width: 50px; height: 50px; font-size: 18px; flex-shrink: 0; }
.settings-account-info { min-width: 0; flex: 1; }
.settings-account-info strong {
  display: block;
  font-size: 15px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settings-account-info span { display: block; font-size: 13px; color: var(--text-3); }

.settings-account-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--green-soft);
  border: 1px solid var(--green-dim);
}
.settings-account-cta strong { font-size: 15px; color: var(--text-1); }
.settings-account-cta span { font-size: 13px; color: var(--text-2); }

/* Sections + rows */
.settings-section { display: flex; flex-direction: column; gap: 8px; }
.settings-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-4);
  padding: 0 4px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.12s;
}
.settings-row:hover { background: var(--surface-hover); border-color: var(--border-2); }
.settings-row:active { transform: scale(0.99); }
.settings-row-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text-2);
}
.settings-row-icon i { width: 18px; height: 18px; }
.settings-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.settings-row-text strong { font-size: 14px; font-weight: 700; color: var(--text-1); }
.settings-row-text span { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.settings-row-chevron { width: 18px; height: 18px; color: var(--text-4); flex-shrink: 0; }

.settings-row-stack { flex-direction: column; align-items: stretch; gap: 12px; }

/* Active state for the mobile-preview toggle */
.settings-row-action[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); }
.settings-row-action[aria-pressed="true"] .settings-row-icon { background: var(--green); color: #fff; }

/* Segmented theme control */
.seg-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 4px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.seg-btn i { width: 15px; height: 15px; }
.seg-btn:hover { color: var(--text-1); }
.seg-btn.active { background: var(--surface); color: var(--green); box-shadow: var(--shadow-sm); }

/* Danger (log out) */
.settings-danger { color: var(--red); }
.settings-danger .settings-row-text strong { color: var(--red); }
.settings-danger .settings-row-icon { background: var(--red-soft); color: var(--red); }

/* About footer */
.settings-about {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px 4px;
}
.settings-about .logo-ball { width: 34px; height: 34px; font-size: 16px; }
.settings-about strong { display: block; font-size: 13px; color: var(--text-2); }
.settings-about span { display: block; font-size: 11.5px; color: var(--text-4); }

/* ============================================================
   Game card roster preview + game detail modal
============================================================ */
.avatar-xs { width: 28px; height: 28px; font-size: 10px; }

.game-card-clickable { cursor: pointer; }
.game-card-clickable:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.game-card-roster {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.roster-avatars { display: flex; }
.roster-avatars .avatar { margin-left: -8px; border-color: var(--surface); }
.roster-avatars .avatar:first-child { margin-left: 0; }
.roster-count { font-size: 12.5px; font-weight: 700; color: var(--text-3); }

/* Game detail modal */
.gd-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }

.gd-facts { display: grid; gap: 10px; margin-bottom: 4px; }
.gd-fact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.gd-fact > i, .gd-fact > svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; }
.gd-fact-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.gd-fact-text span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-4); }
.gd-fact-text strong { font-size: 14px; color: var(--text-1); }
.gd-fact-text small { font-size: 12px; color: var(--text-3); }

.gd-section-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-4);
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gd-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  text-transform: none;
  letter-spacing: 0;
}
.gd-description { font-size: 14px; color: var(--text-2); line-height: 1.6; }
.gd-muted { color: var(--text-4); font-style: italic; }

.gd-roster { display: flex; flex-direction: column; gap: 8px; }
.gd-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.gd-player-info { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.gd-player-info strong { font-size: 14px; color: var(--text-1); }
.gd-player-info span { font-size: 12px; color: var(--text-3); }
.gd-host-chip {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--gold-soft);
  color: #B45309;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
}
.gd-empty { font-size: 13px; color: var(--text-3); padding: 10px 0; }
.gd-actions { margin-top: 22px; }

/* Degraded-mode banner — shown when the backend's database is offline */
.persist-banner {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 1500;
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: #B45309;
  color: #FFF7ED;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.18);
}
.persist-banner i { width: 17px; height: 17px; flex-shrink: 0; }
@media (min-width: 1024px) {
  .persist-banner { bottom: 24px; }
}

/* ============================================================
   Social layer — reliability, RSVP, attendance, friends
============================================================ */

/* Reliability badge */
.rel-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px 1px 5px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}
.rel-badge i { width: 12px; height: 12px; }
.rel-high { background: var(--green-soft); color: var(--green-deep); }
.rel-mid  { background: var(--gold-soft);  color: #B45309; }
.rel-low  { background: var(--red-soft);   color: #B91C1C; }

/* RSVP chips (roster) */
.rsvp-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.rsvp-chip i { width: 12px; height: 12px; }
.rsvp-in   { background: var(--green-soft); color: var(--green-deep); }
.rsvp-out  { background: var(--red-soft);   color: #B91C1C; }
.rsvp-none { background: var(--surface-3);  color: var(--text-4); }

/* RSVP prompt (game detail, your own upcoming game) */
.gd-rsvp-prompt {
  margin: 18px 0 2px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--green-soft);
  border: 1px solid var(--green-dim);
}
.gd-rsvp-q {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 10px;
}
.gd-rsvp-q i { width: 17px; height: 17px; color: var(--green); }
.gd-rsvp-btns { display: flex; gap: 10px; }
.gd-rsvp-btns .btn { flex: 1; }

/* RSVP mini toggle (my games rows) */
.rsvp-mini { display: inline-flex; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); }
.rsvp-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 28px;
  border: none;
  background: var(--surface);
  color: var(--text-4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rsvp-mini-btn + .rsvp-mini-btn { border-left: 1px solid var(--border); }
.rsvp-mini-btn i { width: 14px; height: 14px; }
.rsvp-mini-in.active  { background: var(--green); color: #fff; }
.rsvp-mini-out.active { background: var(--red);   color: #fff; }

/* Game-detail player row right-hand actions */
.gd-player-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gd-player-sub { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Attendance toggle (host on a completed game) */
.att-toggle { display: inline-flex; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--border); }
.att-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 28px;
  border: none; background: var(--surface); color: var(--text-4); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.att-btn + .att-btn { border-left: 1px solid var(--border); }
.att-btn i { width: 14px; height: 14px; }
.att-yes.active { background: var(--green); color: #fff; }
.att-no.active  { background: var(--red);   color: #fff; }

/* "N friends are playing" line */
.gd-friends-line {
  display: flex; align-items: center; gap: 8px;
  margin: -2px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-deep);
}
.gd-friends-line i { width: 15px; height: 15px; }

/* Friend button + chips */
.friend-btn { white-space: nowrap; }
.friend-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.friend-chip i { width: 13px; height: 13px; }
.friend-chip.friend-pending { background: var(--surface-3); color: var(--text-3); }

/* Friend requests strip (players page) */
.friend-requests {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.friend-requests-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-3);
  margin-bottom: 12px;
}
.friend-requests-title i { width: 16px; height: 16px; color: var(--green); }
.friend-requests-list { display: flex; flex-direction: column; gap: 8px; }
.friend-request-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.friend-request-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.friend-request-info strong { font-size: 14px; color: var(--text-1); }
.friend-request-info span { font-size: 12px; color: var(--text-3); }
.friend-request-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* Player card additions */
.player-card-rel { margin-top: 8px; }
.player-card-friend { margin-top: 10px; }
.player-card-friend .friend-btn,
.player-card-friend .friend-chip { width: 100%; justify-content: center; }

/* ============================================================
   Notifications bell + waitlist + admin
============================================================ */
.notif-bell {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  position: relative;
  font: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.notif-bell i { width: 17px; height: 17px; stroke-width: 2.2px; }
.notif-bell:hover {
  transform: translateY(-1px);
  color: var(--green-deep);
  box-shadow: var(--shadow-md);
}
.notif-bell[hidden] { display: none; }

.notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239,68,68,0.4);
}
.notif-count[hidden] { display: none; }

.notif-list { display: flex; flex-direction: column; }

/* Waitlist badge (game cards + My Games) */
.badge-waitlisted {
  background: var(--gold-soft);
  color: #B45309;
  border-color: rgba(245,158,11,0.25);
}
.badge-waitlisted i { width: 12px; height: 12px; }

/* ─── Live scores (settings drawer pull-down) ─────────────── */
.scores-chevron { transition: transform 0.2s ease; }
#liveScoresToggle[aria-expanded="true"] .scores-chevron { transform: rotate(180deg); }

.live-scores-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.live-scores-panel[hidden] { display: none; }

.scores-loading { display: flex; justify-content: center; padding: 18px 0; }

.scores-league { padding: 4px 0 8px; }
.scores-league + .scores-league { border-top: 1px solid var(--border); padding-top: 10px; }
.scores-league-name {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
}
.score-team { color: var(--text-2); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-home { text-align: right; }
.score-away { text-align: left; }
.score-row.is-live .score-team { color: var(--text-1); }
.score-num { font-weight: 800; color: var(--text-1); font-variant-numeric: tabular-nums; }
.score-vs { font-weight: 700; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

.score-chip {
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 20px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.score-ft { background: var(--surface-hover); color: var(--text-3); }
.score-live { background: rgba(239,68,68,0.12); color: var(--red); }

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.scores-updated {
  font-size: 11px;
  color: var(--text-4);
  text-align: right;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.scores-empty { font-size: 13px; color: var(--text-3); padding: 10px 2px; }

/* Amharic: Ethiopic glyphs sit a touch larger than Latin at the same size,
   so relax letter-spacing where the UI squeezes it. */
html.lang-am .scores-league-name,
html.lang-am .settings-label { letter-spacing: 0.02em; }
