/* ==============================================================================
   HALOVE WEB APP - STYLING & DESIGN SYSTEM
   Modern Athletic Aesthetic: Crisp Light Mode (Primary) & Sleek Dark Mode
   ============================================================================== */

/* 1. DEFAULT THEME: HALOVE BRAND NAVY (OFFICIAL #0F172A + #FA681D + #F8FAFC) */
:root {
  --theme-mode: 'light';
  --bg-primary: #F8FAFC;          /* Official Brand Light Neutral */
  --bg-surface: #FFFFFF;          /* Pure crisp white surface */
  --bg-card: #FFFFFF;             /* Elevated white cards */
  --bg-card-subtle: #EEF2F6;      /* Light contrasting container */
  --border-color: rgba(15, 23, 42, 0.10);
  --border-hover: rgba(15, 23, 42, 0.22);
  --border-focus: #FA681D;

  --brand-navy: #0F172A;
  --brand-orange: #FA681D;        /* Official Halove Orange (6.00:1 with #0F172A) */
  --brand-orange-hover: #E85D15;  /* 5.11:1 with #0F172A */
  --brand-bright-orange: #FF7833; /* Official Bright Orange on dark nav (6.79:1 with #0F172A) */
  --accent-text: #B83B07;         /* Accessible small-text orange on light surfaces (5.18:1) */
  --accent-soft: #FFF1E8;

  --primary-brand: #FA681D;       /* Official Halove Brand Orange */
  --primary: #B83B07;
  --primary-ink: #0F172A;         /* WCAG AA 6.00:1 on #FA681D */
  --primary-glow: rgba(250, 104, 29, 0.22);
  --primary-gradient: #FA681D;

  --accent-amber: #B83B07;
  --accent-amber-glow: rgba(250, 104, 29, 0.22);
  --accent-amber-light: #FFF1E8;

  /* Sport badges: restrained, WCAG-verified, ZERO violet */
  --accent-volleyball: #0F172A;
  --accent-volleyball-light: #EEF2F6;

  --accent-padel: #0F7652;
  --accent-padel-light: #E6F6EF;

  --accent-tennis: #0F7652;
  --accent-tennis-light: #E6F6EF;

  --accent-badminton: #0F172A;
  --accent-badminton-light: #EEF2F6;

  --accent-futsal: #0F172A;
  --accent-futsal-light: #EEF2F6;

  --accent-green: #0F7652;        /* 5.03:1 on #E6F6EF */
  --accent-green-light: #E6F6EF;

  --accent-red: #B91C1C;
  --accent-red-light: #FEE2E2;

  --accent-yellow: #B45309;       /* 4.51:1 on #FEF3C7 */
  --accent-yellow-light: #FEF3C7;

  --text-main: #0F172A;           /* Official Halove Navy — 17.06:1 on #F8FAFC */
  --text-muted: #475569;          /* 7.24:1 on #F8FAFC */
  --text-tertiary: #64748B;

  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 26px -4px rgba(15, 23, 42, 0.10), 0 4px 10px -2px rgba(15, 23, 42, 0.05);

  --map-tile-filter: brightness(1.0) contrast(1.02) saturate(0.95);

  /* Aliases for backward compatibility across all modals */
  --bg-dark: var(--bg-primary);
  --surface-dark: var(--bg-surface);
  --card-dark: var(--bg-card);
  --card-border: var(--border-color);
  --primary-cyan: var(--accent-text);
  --secondary-amber: var(--accent-amber);
  --amber-glow: var(--accent-amber-glow);
  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);
}

/* 2. DARK THEME: OFFICIAL HALOVE DARK (#0F172A NAVY + #FF7833 BRIGHT ORANGE @ 6.79:1) */
[data-theme="dark"] {
  --theme-mode: 'dark';
  --bg-primary: #0F172A;          /* Official Halove Navy Dark Surface */
  --bg-surface: #162033;
  --bg-card: #162033;
  --bg-card-subtle: #1E293B;
  --border-color: rgba(248, 250, 252, 0.11);
  --border-hover: rgba(248, 250, 252, 0.24);
  --border-focus: #FF7833;

  --brand-orange: #FF7833;
  --brand-orange-hover: #FF8A4C;
  --brand-bright-orange: #FF7833;
  --accent-text: #FF7833;         /* 6.20:1 on #162033, 6.79:1 on #0F172A */
  --accent-soft: rgba(255, 120, 51, 0.15);

  --primary-brand: #FF7833;
  --primary: #FF7833;
  --primary-ink: #0F172A;         /* 6.79:1 on #FF7833 */
  --primary-glow: rgba(255, 120, 51, 0.28);
  --primary-gradient: #FF7833;

  --accent-amber: #FF7833;
  --accent-amber-glow: rgba(255, 120, 51, 0.28);
  --accent-amber-light: rgba(255, 120, 51, 0.15);

  --accent-volleyball: #F8FAFC;
  --accent-volleyball-light: #1E293B;

  --accent-padel: #34D399;
  --accent-padel-light: rgba(52, 211, 153, 0.14);

  --accent-tennis: #34D399;
  --accent-tennis-light: rgba(52, 211, 153, 0.14);

  --accent-badminton: #F8FAFC;
  --accent-badminton-light: #1E293B;

  --accent-futsal: #F8FAFC;
  --accent-futsal-light: #1E293B;

  --accent-green: #34D399;
  --accent-green-light: rgba(52, 211, 153, 0.14);

  --accent-red: #F87171;
  --accent-red-light: rgba(248, 113, 113, 0.15);

  --accent-yellow: #FBBF24;
  --accent-yellow-light: rgba(251, 191, 36, 0.15);

  --text-main: #FFFFFF;
  --text-muted: #94A3B8;          /* 6.36:1 on #162033 */
  --text-tertiary: #94A3B8;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.32);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.42);
  --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.55);

  --map-tile-filter: brightness(0.68) invert(1) contrast(1.12) hue-rotate(200deg) saturate(0.32);
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==============================================================================
   NAVIGATION & HEADER
   ============================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-surface);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(12, 20, 33, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
}

.brand-container:hover .brand-logo-wrap {
  transform: scale(1.05);
}

.brand-title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.brand-title-ha {
  color: var(--text-main);
  font-weight: 600;
}

.brand-title-love {
  color: #FA681D;
  font-weight: 600;
  margin-left: 0.5px;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.1px;
  margin-top: 1px;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  height: 32px;
  box-sizing: border-box;
}

.nav-tab:hover {
  color: var(--primary-brand);
  background-color: var(--bg-card-subtle);
}

.nav-tab.active {
  background-color: var(--accent-volleyball-light);
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-actions .btn {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  height: 32px;
  gap: 5px;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.nav-guest-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Theme Switcher Button (☀️ / 🌙) */
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  box-sizing: border-box;
}

.theme-toggle-btn:hover {
  border-color: var(--primary-brand);
  transform: rotate(15deg);
  background-color: var(--bg-surface);
  box-shadow: 0 2px 8px var(--primary-glow);
}

[data-theme="dark"] .theme-icon-dark {
  display: inline-block;
}
[data-theme="dark"] .theme-icon-light {
  display: none;
}

:root:not([data-theme="dark"]) .theme-icon-dark {
  display: none;
}
:root:not([data-theme="dark"]) .theme-icon-light {
  display: inline-block;
}

/* ==============================================================================
   BUTTONS & BADGES
   ============================================================================== */
.btn {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
  filter: brightness(1.06);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-brand);
  color: var(--primary-brand);
  background-color: var(--bg-card-subtle);
}

.btn-amber {
  background: linear-gradient(135deg, var(--accent-amber), #DC2626);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 14px var(--accent-amber-glow);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-reputation {
  background-color: var(--accent-green-light);
  color: var(--accent-green);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-volleyball {
  background-color: var(--accent-volleyball-light);
  color: var(--accent-volleyball);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.badge-basketball {
  background-color: var(--accent-amber-light);
  color: var(--accent-amber);
  border: 1px solid rgba(234, 88, 12, 0.25);
}

.badge-padel {
  background-color: var(--accent-padel-light);
  color: var(--accent-padel);
  border: 1px solid rgba(13, 148, 136, 0.25);
}

.badge-tennis {
  background-color: var(--accent-tennis-light);
  color: var(--accent-tennis);
  border: 1px solid rgba(21, 128, 61, 0.25);
}

.badge-badminton {
  background-color: var(--accent-badminton-light);
  color: var(--accent-badminton);
  border: 1px solid var(--border-color);
}

.badge-futsal {
  background-color: var(--accent-futsal-light);
  color: var(--accent-futsal);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-paid {
  background-color: var(--accent-green-light);
  color: var(--accent-green);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-pending {
  background-color: var(--accent-yellow-light);
  color: var(--accent-yellow);
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-unpaid {
  background-color: var(--accent-red-light);
  color: var(--accent-red);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* ==============================================================================
   MAIN CONTAINER & SECTIONS
   ============================================================================== */
.main-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.section-view {
  display: none;
  flex: 1;
}

.section-view.active {
  display: flex;
  flex-direction: column;
}

/* ==============================================================================
   MAP VIEW STYLES
   ============================================================================== */
#map-section {
  position: relative;
  height: calc(100vh - 65px);
  width: 100%;
}

#halove-map {
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
}

/* OpenStreetMap Dynamic Theme Filter */
.leaflet-tile-pane {
  filter: var(--map-tile-filter);
  transition: filter 0.3s ease;
}

/* Map Floating Overlays */
.map-filter-bar {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.map-filter-controls {
  pointer-events: auto;
  background-color: var(--bg-surface);
  backdrop-filter: blur(14px);
  padding: 8px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.filter-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill.active {
  background-color: var(--accent-volleyball-light);
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

.radius-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.map-bottom-tray {
  position: absolute;
  bottom: 38px;
  left: 20px;
  right: 20px;
  z-index: 500;
  pointer-events: none;
}

.games-carousel {
  pointer-events: auto;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.games-carousel::-webkit-scrollbar {
  display: none;
}

.game-preview-card {
  flex: 0 0 320px;
  background-color: var(--bg-surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.game-preview-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-brand);
  box-shadow: var(--shadow-hover);
}

/* Custom OpenStreetMap Markers */
.venue-pin {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--surface-dark);
  border: 2.5px solid var(--primary-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px var(--primary-glow);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease;
}

.venue-pin:hover {
  transform: scale(1.15);
}

.venue-pin-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--secondary-amber);
  color: #000;
  font-size: 11px;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leaflet-popup-content-wrapper {
  background-color: var(--surface-dark) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--card-border) !important;
  padding: 4px !important;
  box-shadow: var(--shadow-card) !important;
}

.leaflet-popup-tip {
  background-color: var(--surface-dark) !important;
}

/* ==============================================================================
   GAMES LIST SECTION
   ============================================================================== */
.content-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 80px 20px;
  width: 100%;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr));
  gap: 18px;
}

.game-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

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

.game-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.game-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.game-card-meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.game-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.game-card-footer > div:first-child {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.game-card-footer > div:last-child {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ==============================================================================
   SPORTS CARDS BANNER
   ============================================================================== */
.sports-card-banner {
  background-color: var(--accent-amber-light);
  border: 1.5px solid rgba(234, 88, 12, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.sports-card-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sports-card-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-amber);
}

.sports-card-policy-box {
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  border: 1px solid var(--border-color);
}

/* ==============================================================================
   PAYMENT LEDGER
   ============================================================================== */
.smart-ledger-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.smart-ledger-alert {
  background-color: var(--accent-red-light);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--accent-red);
  margin-bottom: 18px;
  line-height: 1.4;
}

.roster-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roster-item {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.roster-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary-brand);
  flex-shrink: 0;
}

/* ==============================================================================
   PROFILE & ATHLETE CARD
   ============================================================================== */
.profile-hero-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.profile-cover {
  height: 220px;
  position: relative;
  background-size: cover;
  background-position: center;
}

.profile-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, var(--bg-surface) 100%);
}

.profile-info-row {
  padding: 0 24px 20px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.profile-avatar-big {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--bg-surface);
  box-shadow: 0 4px 18px var(--primary-glow);
  object-fit: cover;
}

#profile-fullname {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-main) !important;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 0;
}

#profile-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted) !important;
  margin-top: 2px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 24px;
  background-color: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
}

.profile-stat-box {
  text-align: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* ==============================================================================
   CHAT & GIPHY MODAL
   ============================================================================== */
.chat-window {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 600px;
  box-shadow: var(--shadow-card);
}

.chat-messages {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.chat-bubble.me {
  align-self: flex-end;
  background-color: var(--accent-volleyball-light);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: var(--text-main);
  border-bottom-right-radius: 3px;
}

.chat-bubble.other {
  align-self: flex-start;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-bottom-left-radius: 3px;
}

.chat-bubble.system {
  align-self: center;
  background-color: var(--bg-card-subtle);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  text-align: center;
  line-height: 1.35;
}

.chat-input-bar {
  flex-shrink: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-card-subtle);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  position: relative;
  z-index: 10;
}

.gif-picker-modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 3500;
  align-items: center;
  justify-content: center;
}

.gif-picker-modal.active {
  display: flex;
}

.gif-picker-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 520px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
}

.gif-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
}

.gif-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s;
}

.gif-grid img:hover {
  transform: scale(1.03);
}

/* ==============================================================================
   MODALS (Add Venue / Create Game / Edit Profile / Supabase Config)
   ============================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 2500;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* Layered Sub-modals (e.g. Quick Add Venue opened on top of Create Game) */
#modal-add-venue {
  z-index: 2600 !important;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: min(560px, calc(100vw - 24px));
  min-width: 0;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  color: var(--text-main);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h3 {
  color: var(--text-main) !important;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 14px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: normal;
  transition: all 0.2s;
}

.form-textarea {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  transition: all 0.2s;
}

.form-row-datetime {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-brand);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Bottom Nav Bar for Mobile Screens */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px)) 10px;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.12);
  min-height: calc(66px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.mobile-bottom-nav .nav-tab {
  flex-direction: column;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 10px;
  background: transparent;
  border: none;
  gap: 3px;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-width: 58px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .nav-tab:active {
  transform: scale(0.92);
}

.mobile-bottom-nav .nav-tab.active {
  color: var(--primary-brand);
  background: rgba(37, 99, 235, 0.08);
  font-weight: 600;
}

.mobile-bottom-nav .bottom-nav-icon {
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-tab.active .bottom-nav-icon {
  transform: translateY(-1px);
}

.mobile-bottom-nav .bottom-nav-text {
  font-size: 11.5px;
  letter-spacing: -0.2px;
}

.mobile-bottom-nav-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: 3.5px solid var(--bg-surface);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px var(--primary-glow);
  cursor: pointer;
  margin-top: -24px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav-play:active {
  transform: scale(0.90);
}

@media (max-width: 1100px) {
  .nav-links .nav-tab {
    padding: 5px 9px;
    font-size: 11.5px;
    gap: 4px;
  }
  .nav-actions .btn {
    padding: 5px 9px;
    font-size: 11.5px;
    gap: 4px;
  }
  .brand-tagline {
    font-size: 10px;
  }
}

@media (max-width: 960px) {
  .nav-links {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
  }
  .legal-footer-links {
    display: none !important;
  }
  .map-bottom-tray {
    bottom: 72px;
    left: 12px;
    right: 12px;
  }
  .navbar {
    padding: 7px 14px;
  }
}

@media (max-width: 768px) {
  /* 1. Header & Navigation Bar on Mobile */
  .navbar {
    padding: 7px 12px;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .brand-container {
    gap: 8px;
    flex-shrink: 0;
  }
  .brand-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .brand-title {
    font-size: 19px;
  }
  .brand-tagline {
    display: none !important;
  }
  #btn-open-add-venue {
    display: none !important;
  }
  #nav-play-wrap {
    display: none !important;
  }
  .nav-guest-actions {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .nav-guest-actions .btn {
    padding: 5px 9px;
    font-size: 11.5px;
    height: 30px;
  }
  .theme-toggle-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 12px;
  }

  /* 2. Matchday Ticker Bar on Mobile */
  .matchday-ticker-bar {
    padding: 5px 12px;
    font-size: 11px;
  }
  .ticker-badge {
    font-size: 9.5px;
    padding: 2px 5px;
  }

  /* 3. Explorer Sticky Toolbar on Mobile */
  .explorer-toolbar {
    padding: 8px 10px;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
    top: 44px;
    position: sticky;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .explorer-toolbar-left {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* Sport Chips: Smooth horizontal scrolling */
  .sport-switch-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 2px 2px;
    border-radius: var(--radius-full);
    scrollbar-width: none;
  }
  .sport-switch-group::-webkit-scrollbar {
    display: none;
  }
  .sport-tab-btn {
    padding: 5px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Filter Controls: Row of pills beneath sports */
  .map-filter-controls {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 2px 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .map-filter-controls::-webkit-scrollbar {
    display: none;
  }
  .filter-dropdown-btn {
    padding: 5px 10px;
    font-size: 11.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Hide Desktop Layout Switcher Bar on Mobile */
  .layout-switch-bar {
    display: none !important;
  }

  /* Feed & Games Grid on Mobile */
  .explorer-main {
    padding: 10px 10px 85px 10px;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .explorer-feed {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 0;
  }
  .explorer-map-pane {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 320px;
  }
  .feed-header-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .feed-heading {
    font-size: 17px;
  }
  .games-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    width: 100%;
    max-width: 100%;
  }
  .content-container {
    padding: 14px 12px 85px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 360px) {
  .navbar {
    padding: 6px 8px;
    gap: 4px;
  }
  .brand-title {
    font-size: 17px;
  }
  .nav-guest-actions .btn {
    padding: 4px 6px;
    font-size: 10.5px;
  }
  .sport-tab-btn {
    padding: 4px 9px;
    font-size: 11px;
  }
  .filter-dropdown-btn {
    padding: 4px 7px;
    font-size: 10.5px;
  }
}

/* ==============================================================================
   FILTER DROPDOWNS (Miasto / Dyscyplina / Promień)
   ============================================================================== */
.filter-dropdown-container {
  position: relative;
  display: inline-block;
}

.filter-dropdown-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.filter-dropdown-btn:hover, .filter-dropdown-btn.active {
  border-color: var(--primary-brand);
  background: var(--bg-surface);
  color: var(--primary-brand);
}

.filter-dropdown-btn strong {
  color: var(--text-main);
}

.dropdown-chevron {
  font-size: 10px;
  color: var(--text-muted);
}

.filter-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 175px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  padding: 6px;
  z-index: 1000;
  flex-direction: column;
  gap: 4px;
}

.filter-dropdown-menu.show {
  display: flex;
}

.dropdown-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
}

.dropdown-item.active {
  background-color: var(--accent-volleyball-light);
  color: var(--primary-brand);
  font-weight: 600;
}

/* User Navbar Profile Pill & Menu */
.nav-user-container {
  position: relative;
}

.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 3px 10px 3px 5px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  height: 32px;
  box-sizing: border-box;
}

.nav-user-pill:hover {
  border-color: var(--primary-brand);
  box-shadow: 0 2px 10px var(--primary-glow);
  background-color: var(--bg-surface);
}

.nav-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  padding: 6px;
  z-index: 1000;
}

.nav-user-dropdown.show {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Stepped registration styles */
.reg-step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.reg-step-bar {
  flex: 1;
  height: 4px;
  background: var(--border-color);
  border-radius: 4px;
  transition: all 0.25s ease;
}

.reg-step-bar.active {
  background: var(--primary-brand);
}

.avatar-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px;
  margin-bottom: 14px;
}

.avatar-opt {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  object-fit: cover;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.avatar-opt:hover {
  transform: scale(1.08);
}

.avatar-opt.selected {
  border-color: var(--primary-brand);
  transform: scale(1.12);
  box-shadow: 0 0 14px var(--primary-glow);
}

.positions-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.position-chip {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.position-chip:hover {
  border-color: var(--primary-brand);
  color: var(--text-main);
  background: var(--bg-surface);
}

.position-chip.selected {
  background: var(--accent-volleyball-light);
  border-color: var(--primary-brand);
  color: var(--primary-brand);
  font-weight: 600;
}

/* ==============================================================================
   NAV DROPDOWN (Mecze: Mapa / Lista)
   ============================================================================== */
.nav-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.nav-tab-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 210px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  padding: 6px;
  z-index: 1100;
  flex-direction: column;
  gap: 4px;
}

/* Invisible bridge so cursor never drops hover between button and dropdown */
.nav-sub-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -10px;
  right: -10px;
  height: 20px;
  background: transparent;
  pointer-events: auto;
}

@media (hover: hover) {
  .nav-dropdown-wrap:hover .nav-sub-menu,
  .nav-dropdown-wrap.hover-active .nav-sub-menu {
    display: flex;
  }
}

.nav-dropdown-wrap.open .nav-sub-menu {
  display: flex;
}

.nav-sub-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  font-family: var(--font-family);
  white-space: nowrap;
}

.nav-sub-item:hover {
  background-color: var(--bg-card-subtle);
  color: var(--primary-brand);
}

.nav-sub-item.active {
  background-color: var(--accent-volleyball-light);
  color: var(--primary-brand);
}

/* ==============================================================================
   LIST VIEW FILTER BAR
   ============================================================================== */
.list-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ==============================================================================
   MESSENGER: MOJE DRUŻYNY I CZATY
   ============================================================================== */
.messenger-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: 680px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.messenger-sidebar {
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card-subtle);
  overflow: hidden;
}

.messenger-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.messenger-sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.messenger-filter-pills {
  display: flex;
  gap: 4px;
  background-color: var(--bg-card-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.messenger-pill {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messenger-pill.active {
  background-color: var(--bg-surface);
  color: var(--primary-brand);
  box-shadow: var(--shadow-sm);
}

.messenger-conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.messenger-conv-card {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--bg-surface);
  text-align: left;
}

.messenger-conv-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.messenger-conv-card.active {
  background-color: var(--accent-volleyball-light);
  border-color: var(--primary-brand);
}

.messenger-conv-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.messenger-conv-details {
  flex: 1;
  min-width: 0;
}

.messenger-conv-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.messenger-conv-snippet {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messenger-conv-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.messenger-chat-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background-color: var(--bg-surface);
  min-width: 0;
  overflow: hidden;
}

.messenger-chat-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: var(--bg-surface);
}

.messenger-conv-info {
  flex: 1;
  min-width: 0;
}

.messenger-conv-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.messenger-conv-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-brand);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messenger-conv-last-msg {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-games-banner {
  background-color: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.team-games-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.team-game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.team-games-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.team-games-pill:hover {
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

.game-card-date-row {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 6px 0 4px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge-unread {
  background: var(--primary-brand);
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 2px 7px;
  line-height: 1.2;
}

@media (max-width: 960px) {
  #section-teams {
    padding: 0;
    margin: 0;
  }
  #section-teams .content-container {
    padding: 6px 8px calc(76px + env(safe-area-inset-bottom, 0px)) 8px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  .messenger-layout {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 105px - 76px - env(safe-area-inset-bottom, 0px));
    min-height: 380px;
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .messenger-layout.chat-open .messenger-sidebar {
    display: none !important;
  }
  .messenger-layout:not(.chat-open) .messenger-chat-main {
    display: none !important;
  }
  .messenger-sidebar {
    flex: 1 1 0%;
    min-height: 0;
    height: 100%;
    width: 100%;
    border-right: none;
    overflow-y: auto;
  }
  .messenger-chat-main {
    flex: 1 1 0%;
    min-height: 0;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .messenger-chat-header {
    flex-shrink: 0;
    padding: 10px 12px;
  }
  .team-games-banner {
    flex-shrink: 0;
    padding: 8px 12px;
    max-height: 125px;
    overflow-y: auto;
  }
  .team-games-banner .team-game-item {
    padding: 6px 10px;
    gap: 8px;
  }
  .team-games-banner .team-game-item .btn {
    font-size: 11px;
    padding: 4px 10px;
    white-space: nowrap;
  }
  .chat-messages {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 10px;
    gap: 8px;
  }
  .chat-bubble {
    max-width: 86%;
    font-size: 13.5px;
  }
  .messenger-layout.chat-open #btn-messenger-back-to-list {
    display: inline-flex !important;
  }
  .chat-input-bar {
    flex-shrink: 0;
    padding: 8px 10px;
    gap: 8px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    position: relative;
    z-index: 10;
  }
  .chat-input-bar .form-input {
    font-size: 15px;
    padding: 8px 12px;
  }
  .chat-input-bar .btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
  }
}

@media (max-width: 768px) {

  /* Prevent iOS Safari auto-zoom on input focus (minimum 16px) */
  .form-input, .form-select, .form-textarea {
    font-size: 16px;
  }

  /* Improved Mobile Modal Box Spacing & Touch targets */
  .modal-overlay {
    padding: 10px;
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-box {
    width: 100%;
    max-width: 100%;
    margin: auto 0;
    padding: 16px 14px;
    border-radius: var(--radius-md);
    max-height: calc(100dvh - 20px);
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .modal-header {
    gap: 10px;
    margin-bottom: 14px;
  }
  .modal-header h3 {
    font-size: 18px !important;
    min-width: 0;
    word-break: break-word;
  }

  .form-input, .form-select, .form-textarea {
    max-width: 100%;
    min-width: 0;
  }
  .form-select {
    text-overflow: ellipsis;
  }

  .form-row-datetime {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .roster-item {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
}

/* ==============================================================================
   SOCIAL AUTH BUTTONS
   ============================================================================== */
.btn-google-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.btn-google-login:hover {
  background-color: var(--bg-card-subtle);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 10px;
}

/* ==============================================================================
   PROTECTED BLIK PAYMENT COMPONENT
   ============================================================================== */
.blik-payment-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-left: 4px solid #E6007E;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.blik-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.blik-logo-pill {
  background: #E6007E;
  color: #fff;
  font-weight: 600;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.blik-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-surface);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.blik-phone-number {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-main);
  font-family: monospace, sans-serif;
  user-select: all;
  transition: all 0.2s ease;
}

.blik-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.blik-locked-box {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 16px;
}

/* ==============================================================================
   LEGAL & RODO MODAL
   ============================================================================== */
.legal-modal-box {
  max-width: 800px;
  width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.legal-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 20px 0 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.legal-tab-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.legal-tab-btn.active {
  color: var(--primary-brand);
  border-bottom-color: var(--primary-brand);
}

.legal-content-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.6;
}

.legal-content-body h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 18px;
  margin-bottom: 8px;
}

.legal-content-body h3:first-child {
  margin-top: 0;
}

.legal-content-body p {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.legal-content-body ul {
  margin-left: 20px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.legal-content-body li {
  margin-bottom: 4px;
}

.legal-footer-links {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.legal-footer-links::-webkit-scrollbar {
  display: none;
}

.legal-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}

.legal-footer-links a:hover {
  color: var(--primary-brand);
  text-decoration: underline;
}

/* ==============================================================================
   HTMLBURGER LAYOUT SYSTEM: BESPOKE ATHLETIC ARCHITECTURE
   #4 Split-Screen • #6 Bento Boxes • #9 Magazine Typography • #10 Asymmetrical Hero
   ============================================================================== */

/* --- 1. URGENT MATCHES TICKER --- */
.matchday-ticker-bar {
  background: linear-gradient(90deg, #0F172A 0%, #1E293B 100%);
  border-bottom: 2px solid var(--accent-amber);
  color: #FFFFFF;
  padding: 6px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  overflow: hidden;
  position: relative;
  z-index: 900;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.matchday-ticker-bar:hover {
  background: linear-gradient(90deg, #1E293B 0%, #293548 100%);
}

[data-theme="dark"] .matchday-ticker-bar {
  background: #080C14;
  border-bottom: 2px solid var(--primary-brand);
}

[data-theme="dark"] .matchday-ticker-bar:hover {
  background: #0D1524;
}

.matchday-ticker-content {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  animation: tickerFade 0.4s ease;
  width: 100%;
  min-width: 0;
}

.ticker-badge {
  background-color: var(--accent-amber);
  color: #000;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

[data-theme="dark"] .ticker-badge {
  background-color: var(--primary-brand);
  color: #000;
}

.ticker-text {
  color: #E2E8F0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.ticker-radar-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.matchday-ticker-bar:hover .ticker-radar-pill {
  background: var(--accent-amber);
  color: #000000;
  border-color: transparent;
  transform: scale(1.04);
}

/* Matchday Live Modal Cards & Urgency Indicators */
.matchday-live-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.matchday-live-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.matchday-urgency-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
}

.matchday-urgency-pill.critical {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  animation: urgentPulse 1.8s infinite;
}

[data-theme="dark"] .matchday-urgency-pill.critical {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
  border-color: rgba(220, 38, 38, 0.4);
}

.matchday-urgency-pill.high {
  background: #FFEDD5;
  color: #EA580C;
  border: 1px solid #FDBA74;
}

[data-theme="dark"] .matchday-urgency-pill.high {
  background: rgba(234, 88, 12, 0.2);
  color: #FB923C;
  border-color: rgba(234, 88, 12, 0.4);
}

.matchday-urgency-pill.moderate {
  background: var(--accent-soft);
  color: var(--accent-text);
  border: 1px solid rgba(250, 104, 29, 0.25);
}

[data-theme="dark"] .matchday-urgency-pill.moderate {
  background: rgba(255, 120, 51, 0.16);
  color: #60A5FA;
  border-color: rgba(37, 99, 235, 0.4);
}

@keyframes urgentPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.02); opacity: 0.75; }
  100% { transform: scale(1); opacity: 1; }
}

/* --- 2. ATHLETIC SPLIT-SCREEN EXPLORER CONTAINER --- */
.explorer-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: calc(100vh - 100px);
  background-color: var(--bg-primary);
}

.explorer-toolbar {
  padding: 10px 16px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 49px;
  z-index: 400;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.explorer-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

/* Sport Quick Switcher Group */
.sport-switch-group {
  display: flex;
  background-color: var(--bg-card-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  gap: 2px;
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sport-switch-group::-webkit-scrollbar {
  display: none;
}

.sport-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.sport-tab-btn:hover {
  color: var(--text-main);
}

.sport-tab-btn.active {
  background-color: var(--bg-surface);
  color: var(--primary-brand);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.sport-tab-btn[data-sport="volleyball"].active {
  color: var(--accent-volleyball);
}

.sport-tab-btn[data-sport="basketball"].active {
  color: var(--accent-amber);
}

.sport-tab-btn[data-sport="padel"].active {
  color: var(--accent-padel);
}

.sport-tab-btn[data-sport="tennis"].active {
  color: var(--accent-tennis);
}

.sport-tab-btn[data-sport="badminton"].active {
  color: var(--accent-badminton);
}

.sport-tab-btn[data-sport="futsal"].active {
  color: var(--accent-futsal);
}

/* Layout Mode Switcher (#4 Split vs #1 Full vs #5 List) */
.layout-switch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.layout-switch-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}

.layout-switch-group {
  display: flex;
  background-color: var(--bg-card-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 2px;
}

.layout-btn {
  background: transparent;
  border: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.layout-btn:hover {
  color: var(--text-main);
}

.layout-btn.active {
  background-color: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* --- 3. SPLIT MAIN STAGE --- */
.explorer-main {
  display: flex;
  gap: 20px;
  padding: 16px 20px 48px 20px;
  width: 100%;
  box-sizing: border-box;
  align-items: flex-start;
}

.explorer-feed {
  flex: 1 1 56%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding-right: 6px;
}

.explorer-feed::-webkit-scrollbar {
  width: 6px;
}
.explorer-feed::-webkit-scrollbar-track {
  background: transparent;
}
.explorer-feed::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.explorer-map-pane {
  flex: 1 1 44%;
  height: calc(100vh - 130px);
  position: sticky;
  top: 110px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  background-color: var(--bg-card-subtle);
  display: flex;
  flex-direction: column;
}

.explorer-map-pane #halove-map {
  width: 100%;
  height: 100%;
}

/* Layout Modifiers */
.explorer-container.layout-list .explorer-feed {
  flex: 1 1 100%;
  max-width: 1120px;
  margin: 0 auto;
  max-height: none;
  overflow-y: visible;
}
.explorer-container.layout-list .explorer-map-pane {
  display: none !important;
}

.explorer-container.layout-map .explorer-feed {
  display: none !important;
}
.explorer-container.layout-map .explorer-main {
  padding: 0;
}
.explorer-container.layout-map .explorer-map-pane {
  flex: 1 1 100%;
  height: calc(100vh - 110px);
  border-radius: 0;
  border: none;
  top: 100px;
}
.explorer-container.layout-map .map-bottom-tray {
  display: flex !important;
}

/* Hide bottom carousel in split mode to avoid duplicate clutter */
.explorer-container.layout-split .map-bottom-tray {
  display: none;
}

/* --- 4. ASYMMETRICAL BENTO HERO CARD: MECZ DNIA --- */
.featured-bento-card {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.07) 0%, rgba(2, 132, 199, 0.05) 50%, var(--bg-surface) 100%);
  border: 1.5px solid rgba(234, 88, 12, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -4px rgba(234, 88, 12, 0.12), var(--shadow-card);
  transition: all 0.25s ease;
}

[data-theme="dark"] .featured-bento-card {
  background: linear-gradient(135deg, rgba(255, 145, 0, 0.12) 0%, rgba(0, 229, 255, 0.06) 60%, var(--bg-surface) 100%);
  border-color: rgba(255, 145, 0, 0.35);
}

.featured-bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-amber), var(--primary-brand));
}

/* Court lines watermark effect */
.featured-bento-watermark {
  position: absolute;
  right: -20px;
  bottom: -20px;
  font-size: 110px;
  opacity: 0.06;
  pointer-events: none;
  line-height: 1;
}

.bento-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.bento-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent-amber);
  color: #000;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
}

[data-theme="dark"] .bento-hero-pill {
  background-color: var(--accent-amber);
  color: #000;
}

.bento-countdown-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-amber);
  background-color: var(--accent-amber-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(234, 88, 12, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bento-hero-title {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.bento-hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.bento-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Spots Visualizer Progress Bar */
.spots-visualizer-bar {
  background-color: var(--bg-card-subtle);
  border-radius: var(--radius-full);
  height: 10px;
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
}

.spots-visualizer-fill {
  background: linear-gradient(90deg, #10B981 0%, #059669 100%);
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.spots-visualizer-fill.nearly-full {
  background: linear-gradient(90deg, #F59E0B 0%, #EA580C 100%);
}

.spots-visualizer-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.bento-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- 5. MATCH CARDS ENHANCED (Athletic Pass / Ticket Design) --- */
.feed-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 2px 0;
  padding: 0 4px;
}

.feed-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.feed-subheading {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1px;
}

/* Match ticket card styling */
.game-card {
  position: relative;
  overflow: hidden;
  border-inline-start: 4px solid var(--primary-brand);
  background-color: var(--bg-surface);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.game-card.sport-volleyball {
  border-inline-start-color: var(--accent-volleyball);
}

.game-card.sport-basketball {
  border-inline-start-color: var(--accent-amber);
}

.game-card.sport-padel {
  border-inline-start-color: var(--accent-padel);
}

.game-card.sport-tennis {
  border-inline-start-color: var(--accent-tennis);
}

.game-card.sport-badminton {
  border-inline-start-color: var(--accent-badminton);
}

.game-card.sport-futsal {
  border-inline-start-color: var(--accent-futsal);
}

.card-ticket-notch {
  position: absolute;
  top: 12px;
  right: -6px;
  font-family: monospace;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 4px 0 0 4px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* --- 6. ASYMMETRICAL BENTO ATHLETE PROFILE (#10 + #6) --- */
.profile-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.profile-badge-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-amber);
  background-color: var(--accent-amber-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  letter-spacing: 0.6px;
}

.profile-page-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.profile-page-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 2-Column Asymmetrical Grid */
.profile-bento-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* LEFT: Physical Athlete ID Card */
.athlete-identity-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px -6px rgba(15, 23, 42, 0.1), var(--shadow-card);
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.25s ease;
}

[data-theme="dark"] .athlete-identity-card {
  background: #131A26;
  border-color: #2D3A4F;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}

.athlete-identity-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent-amber) 0%, var(--primary-brand) 50%, #10B981 100%);
}

.athlete-card-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.athlete-card-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.athlete-league-stamp {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.athlete-league-stamp.status-new {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.25);
}
.athlete-league-stamp.status-new .league-dot {
  background-color: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.athlete-league-stamp.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #F59E0B;
  border-color: rgba(245, 158, 11, 0.25);
}
.athlete-league-stamp.status-pending .league-dot {
  background-color: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.athlete-league-stamp.status-verified {
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary-brand);
  border-color: rgba(0, 102, 255, 0.25);
}
.athlete-league-stamp.status-verified .league-dot {
  background-color: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.league-dot {
  width: 7px;
  height: 7px;
  background-color: #10B981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}



/* Avatar Halo Gauge */
.athlete-avatar-center {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.avatar-halo-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}

.reputation-ring-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}

.reputation-ring-svg .ring-bg {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 6;
}

.reputation-ring-svg .ring-progress {
  fill: none;
  stroke: var(--accent-amber);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s ease;
}

.athlete-avatar-img {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-surface);
}

.verified-pill {
  position: absolute;
  bottom: 2px;
  right: 4px;
  background-color: var(--primary-brand);
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

.athlete-name-center {
  text-align: center;
  margin-bottom: 10px;
}

.athlete-card-fullname {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.athlete-card-username {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.athlete-primary-role {
  display: inline-block;
  background-color: var(--accent-volleyball-light);
  color: var(--primary-brand);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.athlete-bio-box {
  background-color: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
}

.athlete-bio-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.athlete-bio-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.athlete-fairplay-shield {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-surface) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.shield-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.shield-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-green);
  letter-spacing: 0.3px;
}

.shield-subtitle {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Contact Tray (BLIK & Phone) */
.athlete-contact-tray {
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.contact-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
}

.contact-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.contact-masked-number {
  font-family: var(--font-family);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
  min-width: 140px;
  display: inline-block;
}

.contact-actions {
  display: flex;
  gap: 4px;
}

.btn-micro {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-micro:hover {
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

/* RIGHT: Bento Performance Grid */
.profile-bento-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  max-width: 100%;
}

.bento-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.bento-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.bento-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-brand);
  letter-spacing: 0.2px;
  display: block;
  margin-bottom: 2px;
}

.bento-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.bento-badge-auto {
  background-color: var(--accent-green-light);
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.bento-season-wrap {
  display: flex;
  align-items: center;
}

.bento-season-select {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.bento-season-select:hover {
  border-color: var(--primary-brand);
  background-color: var(--bg-surface);
}

.bento-season-select:focus {
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2);
}

.bento-season-tag {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.bento-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

/* Dynamic Profile Sports Cards Grid */
.profile-sports-container {
  width: 100%;
}

.profile-sports-container.sports-grid-single {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-sports-container.sports-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (max-width: 640px) {
  .profile-sports-container.sports-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* 1 Sport: Standard Full-Width Card */
.profile-sport-card-single {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.profile-sport-card-single:hover {
  border-color: var(--border-hover);
}

.profile-sport-card-single .sport-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.profile-sport-card-single .sport-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-sport-card-single .positions-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-sport-card-single .pos-badge {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* > 1 Sport: Smaller Compact Cards in 2-Column Grid */
.profile-sport-card-compact {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s ease;
}

.profile-sport-card-compact:hover {
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.profile-sport-card-compact .sport-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-sport-card-compact .sport-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-sport-card-compact .sport-title .sport-icon {
  font-size: 14px;
}

.profile-sport-card-compact .sport-skill-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.profile-sport-card-compact .positions-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.profile-sport-card-compact .pos-badge {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  line-height: 1.3;
}

/* Scoreboard Matrix */
.athletic-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.score-tile {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  transition: transform 0.15s ease;
}

.score-tile:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.score-number {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.1;
}

.score-number.score-clean {
  color: var(--accent-green);
}

.score-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.score-sub {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Badges Filter Tabs, Sections, Tiers & Progress */
.badge-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.badge-filter-btn {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.badge-filter-btn:hover {
  border-color: var(--primary-brand);
  color: var(--text-main);
}

.badge-filter-btn.active {
  background-color: var(--primary-brand);
  border-color: var(--primary-brand);
  color: var(--primary-ink);
}

.badge-section-group {
  margin-bottom: 18px;
}

.badge-section-group:last-child {
  margin-bottom: 0;
}

.badge-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-color);
}

.badge-section-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.2px;
}

.badge-section-counter {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* Badges Row */
.athlete-badges-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 10px;
}

.badge-item {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.badge-item:hover {
  border-color: var(--primary-brand);
  background-color: var(--bg-surface);
}

.badge-item.badge-locked {
  opacity: 0.72;
  background-color: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
}

.badge-item.badge-locked:hover {
  opacity: 0.95;
  border-color: var(--border-hover);
}

.badge-item.badge-unlocked {
  background-color: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.badge-item.badge-unlocked:hover {
  border-color: #10B981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.16);
}

.badge-item.badge-unlocked.tier-bronze {
  border-color: rgba(205, 127, 50, 0.55);
  box-shadow: 0 2px 10px rgba(205, 127, 50, 0.12);
}

.badge-item.badge-unlocked.tier-silver {
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: 0 2px 10px rgba(148, 163, 184, 0.15);
}

.badge-item.badge-unlocked.tier-gold {
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.18);
}

.badge-item.badge-unlocked.tier-platinum {
  border-color: rgba(6, 182, 212, 0.65);
  box-shadow: 0 3px 12px rgba(6, 182, 212, 0.18);
}

.badge-item.badge-unlocked.tier-elite {
  border-color: var(--brand-orange);
  box-shadow: 0 3px 14px var(--primary-glow);
}

.badge-item.badge-unlocked.tier-legend {
  border-color: rgba(250, 104, 29, 0.75);
  background: linear-gradient(145deg, rgba(250, 104, 29, 0.09), rgba(245, 158, 11, 0.06) 60%, var(--bg-surface));
  box-shadow: 0 4px 16px rgba(250, 104, 29, 0.22);
}

.badge-tier-pill {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-bottom: 5px;
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.badge-unlocked .badge-tier-pill.tier-bronze { color: #B45309; background: rgba(217, 119, 6, 0.12); border-color: rgba(217, 119, 6, 0.3); }
.badge-unlocked .badge-tier-pill.tier-silver { color: #64748B; background: rgba(148, 163, 184, 0.16); border-color: rgba(148, 163, 184, 0.35); }
.badge-unlocked .badge-tier-pill.tier-gold { color: #D97706; background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.35); }
.badge-unlocked .badge-tier-pill.tier-platinum { color: #0F7652; background: rgba(15, 118, 82, 0.12); border-color: rgba(15, 118, 82, 0.30); }
.badge-unlocked .badge-tier-pill.tier-elite { color: #0F172A; background: rgba(15, 23, 42, 0.10); border-color: rgba(15, 23, 42, 0.28); }
.badge-unlocked .badge-tier-pill.tier-legend { color: #B83B07; background: rgba(250, 104, 29, 0.16); border-color: rgba(250, 104, 29, 0.45); }

[data-theme="dark"] .badge-unlocked .badge-tier-pill.tier-bronze { color: #FBBF24; }
[data-theme="dark"] .badge-unlocked .badge-tier-pill.tier-silver { color: #CBD5E1; }
[data-theme="dark"] .badge-unlocked .badge-tier-pill.tier-gold { color: #FCD34D; }
[data-theme="dark"] .badge-unlocked .badge-tier-pill.tier-platinum { color: #22D3EE; }
[data-theme="dark"] .badge-unlocked .badge-tier-pill.tier-elite { color: #C4B5FD; }
[data-theme="dark"] .badge-unlocked .badge-tier-pill.tier-legend { color: #FB923C; }

.badge-icon-wrap {
  font-size: 24px;
  margin-bottom: 4px;
}

.badge-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.badge-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.3;
}

.badge-progress-wrap {
  width: 100%;
  margin-top: 8px;
}

.badge-progress-bar {
  width: 100%;
  height: 5px;
  background-color: var(--border-color);
  border-radius: 9999px;
  overflow: hidden;
}

.badge-progress-fill {
  height: 100%;
  background: var(--brand-orange);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.badge-progress-label {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-top: 3px;
}

@media (max-width: 640px) {
  .bento-box {
    padding: 16px 14px;
  }
  .badge-filter-tabs {
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .badge-filter-tabs::-webkit-scrollbar {
    display: none;
  }
  .athlete-badges-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .athlete-badges-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .athletic-scoreboard {
    grid-template-columns: minmax(0, 1fr);
  }
  .profile-commendations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Teams List in Profile */
.profile-teams-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

/* ==============================================================================
   MY GAMES MODAL (Command Center for Active Matches)
   ============================================================================== */
.my-games-tab-btn.active {
  background-color: var(--primary-brand) !important;
  color: var(--primary-ink) !important;
  border-color: var(--primary-brand) !important;
}

.my-game-card {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.my-game-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-surface);
}

.my-game-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.my-game-card-body {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.my-game-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.profile-team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-team-card > div:first-child {
  min-width: 0;
  flex: 1 1 160px;
}

.profile-team-card:hover {
  border-color: var(--primary-brand);
  background-color: var(--bg-surface);
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .explorer-main {
    flex-direction: column;
    padding: 12px 14px 48px 14px;
  }
  .explorer-feed {
    max-height: none;
    overflow-y: visible;
  }
  .explorer-map-pane {
    height: 380px;
    position: relative;
    top: 0;
  }
  .profile-bento-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .athlete-identity-card {
    position: static;
  }
  .athletic-scoreboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Status Banners in Game Details */
.game-cancelled-banner {
  background: var(--accent-red-light);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-left: 5px solid var(--accent-red);
  color: var(--text-main);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.5;
}

.game-disputed-banner {
  background: #FFFBEB;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-left: 5px solid #D97706;
  color: #92400E;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.5;
}

[data-theme="dark"] .game-disputed-banner {
  background: rgba(217, 119, 6, 0.15);
  color: #FCD34D;
}

/* Cookie & Local Storage Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)) 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 2000;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
  flex-wrap: wrap;
  animation: slideUpBanner 0.3s ease-out;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 260px;
}

@keyframes slideUpBanner {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* PWA Floating Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  left: 14px;
  right: 14px;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 2500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: slideUpBanner 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 961px) {
  .pwa-install-banner {
    bottom: 24px;
    right: 24px;
    left: auto;
    width: 400px;
  }
}

.pwa-install-banner-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.pwa-install-badge-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.pwa-install-text-wrap {
  min-width: 0;
}

.pwa-install-title {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.25;
}

.pwa-install-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-pwa-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.btn-pwa-close:hover {
  color: var(--text-main);
}

/* PWA Platform Tabs */
.pwa-platform-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  background: var(--bg-card-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.pwa-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pwa-tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* PWA Steps */
.pwa-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.pwa-step-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.pwa-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  flex-shrink: 0;
}

.pwa-step-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-step-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
  flex: 1;
}

.pwa-ios-add-btn {
  background: #007AFF;
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
}

.pwa-notice-box {
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==============================================================================
   HALOVE TOAST NOTIFICATIONS (Non-blocking Modern Athletic UI)
   ============================================================================== */
.halove-toast-container {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  max-width: 92vw;
  width: auto;
}

.halove-toast {
  pointer-events: auto;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.4), 0 6px 12px -2px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
  animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
  line-height: 1.35;
  user-select: none;
}

.halove-toast .toast-icon {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  font-weight: 600;
}

.halove-toast.toast-success {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), var(--bg-surface));
}
.halove-toast.toast-success .toast-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22C55E;
}

.halove-toast.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), var(--bg-surface));
}
.halove-toast.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

.halove-toast.toast-warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), var(--bg-surface));
}
.halove-toast.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
}

.halove-toast.toast-info {
  border-color: rgba(250, 104, 29, 0.5);
  background: linear-gradient(135deg, rgba(250, 104, 29, 0.16), var(--bg-surface));
}
.halove-toast.toast-info .toast-icon {
  background: rgba(250, 104, 29, 0.2);
  color: #FA681D;
}

@keyframes toastSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.halove-toast.toast-hiding {
  opacity: 0;
  transform: translateY(-15px) scale(0.95);
}

@media (max-width: 640px) {
  .halove-toast-container {
    top: 50px;
    width: calc(100vw - 24px);
    max-width: 420px;
  }
  .halove-toast {
    max-width: 100%;
    font-size: 12px;
    padding: 8px 14px;
    gap: 8px;
    border-radius: var(--radius-md);
  }
}

/* ==============================================================================
   GUEST CONTAINERS (Unauthenticated state for Teams & Profile)
   ============================================================================== */
.guest-card-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
  padding: 40px 16px;
  width: 100%;
}

.guest-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-card);
  animation: fadeIn 0.3s ease;
}

.guest-card-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 102, 255, 0.1);
  color: var(--primary-brand);
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  border: 1px solid rgba(0, 102, 255, 0.2);
}

.guest-card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.guest-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.guest-card-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==============================================================================
   VENUE AUTOCOMPLETE SEARCH & QUICK ADD DROPDOWN
   ============================================================================== */
.venue-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  max-height: 230px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
  z-index: 1050;
  padding: 4px;
}

.venue-search-item {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  border-bottom: 1px solid var(--border-color);
  max-width: 100%;
  box-sizing: border-box;
}

.venue-search-item:last-child {
  border-bottom: none;
}

.venue-search-item:hover,
.venue-search-item.highlighted {
  background-color: var(--bg-card-subtle);
}

.venue-search-item-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 2px;
}

.venue-search-item-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.3;
  min-width: 0;
  word-break: break-word;
}

.venue-search-item-city {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(255, 90, 0, 0.1);
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.venue-search-item-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.venue-search-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==============================================================================
   PLAYER COMMENDATIONS (POST-MATCH PRAISE & PROFILE DISPLAY)
   ============================================================================== */
#modal-give-commendation {
  z-index: 2650 !important;
}

.commendation-banner {
  background: linear-gradient(135deg, rgba(250, 104, 29, 0.09) 0%, rgba(16, 185, 129, 0.06) 100%);
  border: 1px solid rgba(250, 104, 29, 0.35);
  border-left: 4px solid var(--primary-brand);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.commendation-banner.closed {
  background: var(--bg-card-subtle);
  border-color: var(--border-color);
  border-left-color: var(--text-muted);
}

.commendation-banner-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.commendation-banner-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.commendation-quota-pill {
  background: rgba(250, 104, 29, 0.14);
  color: var(--primary-brand);
  border: 1px solid rgba(250, 104, 29, 0.3);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.roster-commendation-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.roster-comm-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(250, 104, 29, 0.1);
  border: 1px solid rgba(250, 104, 29, 0.25);
  color: var(--text-main);
  border-radius: var(--radius-full);
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 600;
}

.roster-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-commend-player {
  color: var(--primary-brand) !important;
  border-color: rgba(250, 104, 29, 0.4) !important;
  background: rgba(250, 104, 29, 0.08) !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  padding: 4px 9px !important;
}

.btn-commend-player:hover {
  background: rgba(250, 104, 29, 0.18) !important;
  border-color: var(--primary-brand) !important;
}

.commended-done-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.commendation-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.commendation-cat-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 12px;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  width: 100%;
}

.commendation-cat-card:hover {
  border-color: var(--primary-brand);
  background: var(--bg-surface);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(250, 104, 29, 0.14);
}

.commendation-cat-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.commendation-cat-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.commendation-cat-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.profile-commendations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.commendation-stat-tile {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.commendation-stat-tile.has-count {
  background: var(--bg-surface);
  border-color: rgba(250, 104, 29, 0.45);
  box-shadow: 0 3px 10px rgba(250, 104, 29, 0.1);
}

.commendation-stat-icon {
  font-size: 22px;
  line-height: 1;
}

.commendation-stat-count {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.1;
}

.commendation-stat-tile.has-count .commendation-stat-count {
  color: var(--primary-brand);
}

.commendation-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.commendation-received-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.commendation-received-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.commendation-received-sender {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.commendation-received-sender-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
}

.commendation-received-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.commendation-received-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(250, 104, 29, 0.12);
  border: 1px solid rgba(250, 104, 29, 0.28);
  color: var(--primary-brand);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .commendation-picker-grid {
    grid-template-columns: 1fr;
  }
  .profile-commendations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .roster-right-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==============================================================================
   TEAM ROSTER, SEARCH, INVITATIONS INBOX & GAME-TEAM LINK MODALS
   ============================================================================== */
#modal-team-roster,
#modal-link-game-team {
  z-index: 2650 !important;
}

.nav-invite-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.nav-invite-badge.mobile {
  position: absolute;
  top: 2px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9.5px;
  box-shadow: 0 0 0 2px var(--bg-surface);
}

.teams-invites-inbox {
  background: linear-gradient(135deg, rgba(250, 104, 29, 0.08) 0%, rgba(2, 132, 199, 0.06) 100%), var(--bg-surface);
  border: 1px solid rgba(250, 104, 29, 0.35);
  border-inline-start: 4px solid var(--accent-amber);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.teams-invite-inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.teams-invite-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.team-invite-inbox-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.team-invite-inbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-roster-modal-box {
  max-width: min(580px, calc(100vw - 24px));
  width: 100%;
}

.team-roster-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 14px;
}

.team-roster-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.team-roster-tab-btn:hover {
  color: var(--text-main);
}

.team-roster-tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary-brand);
  box-shadow: var(--shadow-sm);
}

.team-invite-code-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-brand);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.team-invite-code-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.team-invite-code-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-brand);
  letter-spacing: 0.2px;
}

.team-invite-code-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.team-invite-code-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 1px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px dashed var(--primary-brand);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.team-invite-code-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.team-search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 2px;
}

.team-player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.team-player-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

.team-player-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.team-player-info {
  min-width: 0;
  flex: 1;
}

.team-player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
}

.team-username-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-brand);
  background: var(--accent-volleyball-light);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.team-played-together-pill {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-green);
  background: var(--accent-green-light);
  border: 1px solid rgba(5, 150, 105, 0.25);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.team-captain-pill {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-amber);
  background: var(--accent-amber-light);
  border: 1px solid rgba(234, 88, 12, 0.25);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.team-player-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.team-player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.team-roster-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  margin-bottom: 8px;
}

.link-game-team-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 2px;
}

.link-game-team-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.link-game-team-option:hover {
  border-color: var(--primary-brand);
  background: var(--bg-surface);
}

.link-game-team-option.active {
  border-color: var(--primary-brand);
  background: var(--accent-volleyball-light);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.username-feedback {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.35;
}

.username-feedback.valid {
  color: var(--accent-green);
  font-weight: 600;
}

.username-feedback.invalid {
  color: var(--accent-red);
  font-weight: 600;
}

.username-feedback.checking {
  color: var(--primary-brand);
  font-weight: 600;
}

@media (max-width: 640px) {
  .messenger-chat-header {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .messenger-sidebar-title {
    flex-wrap: wrap;
    gap: 8px;
  }
  .team-player-card {
    flex-wrap: wrap;
  }
  .team-player-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .team-invite-inbox-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .team-invite-inbox-actions {
    width: 100%;
  }
  .team-invite-inbox-actions .btn {
    flex: 1;
  }
}

/* ==============================================================================
   NOTIFICATION CENTER (Cross-Device Seen/Read, Pinned Action Items & Game Invite Modal)
   ============================================================================== */
#modal-invite-game-player {
  z-index: 2650 !important;
}

.nav-notifications-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-bell-btn {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
  padding: 0;
  box-sizing: border-box;
}

.nav-bell-btn:hover,
.nav-bell-btn.active {
  border-color: var(--primary-brand);
  background-color: var(--bg-surface);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.nav-notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.notifications-panel {
  display: none;
  position: fixed;
  top: 58px;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 82px);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.24);
  z-index: 2200;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.16s ease;
}

.notifications-panel.open {
  display: flex;
}

.notifications-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

.notifications-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.notifications-panel-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.notifications-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.notifications-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.notifications-close-btn:hover {
  color: var(--text-main);
  border-color: var(--primary-brand);
  background: var(--bg-surface);
}

.notifications-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.notifications-filter-bar::-webkit-scrollbar {
  display: none;
}

.notifications-filter-pill {
  padding: 5px 11px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.notifications-filter-pill:hover {
  color: var(--text-main);
  background-color: var(--bg-surface);
}

.notifications-filter-pill.active {
  background-color: var(--bg-surface);
  color: var(--primary-brand);
  border-color: var(--primary-brand);
  box-shadow: var(--shadow-sm);
}

.notifications-panel-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
}

.notifications-pinned-section {
  background: linear-gradient(135deg, rgba(250, 104, 29, 0.08) 0%, rgba(2, 132, 199, 0.05) 100%);
  border-bottom: 2px solid rgba(250, 104, 29, 0.35);
}

.notifications-pinned-label {
  padding: 8px 14px 5px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-amber);
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notifications-section-label {
  padding: 8px 14px 4px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  background-color: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.15s ease;
  position: relative;
}

.notification-item:hover {
  background-color: var(--bg-card-subtle);
}

.notification-item.unread {
  background-color: rgba(2, 132, 199, 0.08);
}

[data-theme="dark"] .notification-item.unread {
  background-color: rgba(0, 229, 255, 0.08);
}

.notification-item.pinned {
  border-left: 4px solid var(--accent-amber);
}

.notification-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notification-content {
  min-width: 0;
  flex: 1;
}

.notification-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.notification-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-brand);
  flex-shrink: 0;
  margin-top: 4px;
}

.notification-body {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.notification-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.notification-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.notification-actions-row .btn {
  padding: 4px 10px;
  font-size: 11px;
  height: auto;
  border-radius: var(--radius-sm);
}

.notification-resolved-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.notification-resolved-pill.accepted {
  background: var(--accent-green-light);
  border-color: rgba(5, 150, 105, 0.3);
  color: var(--accent-green);
}

.notification-resolved-pill.declined,
.notification-resolved-pill.cancelled {
  background: var(--accent-red-light);
  border-color: rgba(220, 38, 38, 0.25);
  color: var(--accent-red);
}

.notification-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .nav-bell-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 13.5px;
  }
  .notifications-panel {
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    z-index: 3000;
  }
}

@media (max-width: 420px) {
  .nav-user-name {
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* --- Add Venue Geocoding & Mini-Map Preview --- */
.venue-address-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.venue-address-row .form-input {
  flex: 1;
  min-width: 0;
}
.venue-geocode-status {
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
  color: var(--text-muted);
  line-height: 1.4;
}
.venue-geocode-status.is-success {
  color: var(--accent-green);
  font-weight: 600;
}
.venue-geocode-status.is-warning {
  color: var(--accent-amber);
  font-weight: 600;
}
.venue-geocode-status.is-error {
  color: var(--accent-red);
  font-weight: 600;
}
.venue-preview-map-wrap {
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  overflow: hidden;
  background: var(--bg-card-subtle);
}
.venue-preview-map {
  width: 100%;
  height: 190px;
  z-index: 1;
}
.venue-preview-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

/* --- Unified In-App Confirm / Prompt Dialog (#modal-app-dialog) --- */
.app-dialog-overlay {
  z-index: 3200;
}
.app-dialog-box {
  max-width: 440px;
  width: 92%;
}
.app-dialog-message {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  white-space: pre-line;
  margin-bottom: 14px;
}
.app-dialog-error {
  font-size: 12px;
  color: var(--accent-red);
  font-weight: 600;
  margin-top: 6px;
  display: none;
}
.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.btn-danger-solid {
  background: #DC2626;
  color: #FFFFFF;
  border: 1px solid #DC2626;
}
.btn-danger-solid:hover {
  background: #B91C1C;
  border-color: #B91C1C;
}

.skill-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-brand);
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.skill-guide-btn:hover {
  background: rgba(2, 132, 199, 0.14);
  border-color: var(--primary-brand);
}
[data-theme="dark"] .skill-guide-btn {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.28);
}

.skill-guide-panel {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
  max-height: 300px;
  overflow-y: auto;
}
.skill-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 12.5px;
}
.skill-guide-section + .skill-guide-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}
.skill-guide-section-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--primary-brand);
  margin-bottom: 6px;
}
.skill-guide-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.skill-guide-row {
  color: var(--text-muted);
}
.skill-guide-row strong {
  color: var(--text-main);
  font-weight: 600;
}

/* ==============================================================================
   RECURRING OPTIONS GRID & MATCHDAY BALANCED SQUAD DRAW
   ============================================================================== */
.game-recurring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.game-recurring-grid > .form-group {
  min-width: 0;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .game-recurring-grid {
    grid-template-columns: 1fr;
  }
}

.squad-draw-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.squad-draw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.squad-draw-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.squad-draw-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.squad-draw-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.squad-draw-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.squad-draw-balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-green);
}

.squad-draw-updated-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(250, 104, 29, 0.14);
  color: var(--primary-brand);
}

.squad-draw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .squad-draw-grid {
    grid-template-columns: 1fr;
  }
}

.squad-draw-team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-width: 0;
}

.squad-draw-team-card.team-a {
  border-top: 3px solid var(--primary-brand);
}

.squad-draw-team-card.team-b {
  border-top: 3px solid #3B82F6;
}

.squad-draw-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.squad-draw-team-avg {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.squad-draw-player-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.squad-draw-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--bg-card-subtle);
}

.squad-draw-player-name {
  font-weight: 600;
  color: var(--text-main);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-draw-player-skill {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--primary-brand);
  background: rgba(250, 104, 29, 0.1);
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.squad-draw-locked {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  line-height: 1.45;
}

.edit-profile-sports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.edit-profile-sports-grid .position-chip {
  text-align: center;
  justify-content: center;
  padding: 7px 6px;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .edit-profile-sports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .messenger-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

/* ============================================================================
   USER SETTINGS MODAL (Theme, Push Notifications, Radar km & Sports)
   ============================================================================ */
.settings-section {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-theme-segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px;
}

.settings-theme-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.settings-theme-btn.active {
  background: var(--primary-brand);
  color: var(--primary-ink);
  box-shadow: 0 2px 8px rgba(250, 104, 29, 0.28);
}

.settings-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.settings-toggle-info {
  min-width: 0;
  flex: 1;
}

.settings-toggle-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.settings-toggle-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 2px;
}

/* iOS-style toggle switch */
.halove-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.halove-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.halove-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border-color);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.halove-switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.halove-switch input:checked + .halove-switch-slider {
  background: var(--primary-brand);
}

.halove-switch input:checked + .halove-switch-slider::before {
  transform: translateX(20px);
}

.settings-quiet-hours-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.settings-quiet-hours-row input[type="time"] {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  padding: 4px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}

.settings-sports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.settings-sport-chip {
  appearance: none;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.settings-sport-chip.active {
  background: rgba(250, 104, 29, 0.14);
  border-color: var(--primary-brand);
  color: var(--primary-brand);
}

.settings-radar-slider {
  width: 100%;
  accent-color: var(--primary-brand);
  cursor: pointer;
  margin: 6px 0;
}

@media (max-width: 480px) {
  .settings-sports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-theme-btn {
    font-size: 11px;
    padding: 8px 4px;
  }
}

/* ============================================================================
   PWA AUTO-UPDATE AVAILABLE BANNER (Non-intrusive when user has open form)
   ============================================================================ */
.halove-update-banner {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 3600;
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid rgba(250, 104, 29, 0.45);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3);
  max-width: calc(100vw - 24px);
  backdrop-filter: blur(12px);
}

.halove-update-banner.visible {
  display: flex;
}

.halove-update-banner-text {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .halove-update-banner {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}

/* ============================================================================
   UI HARDENING: 320px containment, overflow-wrap, tabular-nums, dark canvas
   ============================================================================ */
html {
  background-color: var(--bg-primary);
}

.content-container,
.section-view,
.featured-bento-card,
.sports-card-banner,
.sports-card-policy-box,
.smart-ledger-box,
.roster-item,
.roster-user-info,
.my-game-card,
.matchday-live-card,
.messenger-layout,
.messenger-sidebar,
.messenger-chat-area,
.messenger-chat-header,
.team-invite-inbox-card,
.athlete-id-card,
.profile-bento-layout > *,
.team-player-card,
.commendation-received-item {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.roster-user-info > div,
.team-invite-inbox-card > div:first-child,
.commendation-received-sender > div,
.my-game-card-body > div {
  min-width: 0;
  flex: 1 1 160px;
  overflow-wrap: anywhere;
}

.team-invite-inbox-actions {
  flex-shrink: 0;
}

.athlete-card-fullname,
.athlete-card-username,
.bento-hero-title,
#section-game-details h1 {
  overflow-wrap: anywhere;
  max-width: 100%;
}

.stat-value,
.athlete-stat-val,
.commendation-stat-count,
.badge-progress-label,
.badge-section-counter,
.nav-notifications-badge,
.badge-unread {
  font-variant-numeric: tabular-nums;
}

.chat-gif-fallback {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  font-size: 11.5px;
  margin-top: 4px;
}

.games-load-more-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 12px !important;
  }
  .modal-box {
    padding: 16px !important;
    max-width: calc(100vw - 24px) !important;
  }
  .nav-user-name {
    max-width: 68px;
  }
  .navbar {
    gap: 6px;
  }
}

/* ==========================================================================
   Sport-specific skill levels & positions styling
   ========================================================================== */
.edit-sport-config-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}

.edit-sport-config-card:hover {
  border-color: var(--border-hover);
}

.edit-sport-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.edit-sport-config-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-main);
}

.edit-sport-icon {
  font-size: 15px;
}

.sport-skill-badge--clickable {
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: inherit;
  font-family: inherit;
  line-height: inherit;
}

.sport-skill-badge--clickable:hover {
  transform: translateY(-1px);
  filter: brightness(1.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.sport-skill-badge--clickable:active {
  transform: translateY(0);
}

/* Quick Sport Skill Modal Options */
.quick-skill-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-skill-option:hover {
  border-color: var(--primary-brand);
  background: var(--bg-surface);
}

.quick-skill-option.active {
  border-color: var(--primary-brand);
  background: rgba(250, 104, 29, 0.08);
}

.quick-skill-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary-brand);
}

.quick-skill-option-content {
  flex: 1;
}

.quick-skill-option-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-skill-option-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
}

.quick-skill-option-hint {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-brand);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
}

.quick-skill-option-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}








