/* Grassroots Friendly Hub - Modern Sports Tech Styling & Admin Portal */

:root {
  --bg-primary: #0a0f0d;
  --bg-secondary: #121a15;
  --bg-card: #18221c;
  --bg-card-hover: #1e2c24;
  --bg-accent: #22352b;
  --bg-elevated: #283e33;

  --pitch-green: #10b981;
  --pitch-green-glow: rgba(16, 185, 129, 0.25);
  --pitch-green-light: #34d399;
  --pitch-green-dark: #059669;

  --gold-admin: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --border-subtle: #24352b;
  --border-focus: #10b981;

  --status-open-bg: rgba(16, 185, 129, 0.15);
  --status-open-text: #34d399;
  --status-open-border: #10b981;

  --status-confirmed-bg: rgba(59, 130, 246, 0.15);
  --status-confirmed-text: #60a5fa;
  --status-confirmed-border: #3b82f6;

  --status-completed-bg: rgba(139, 92, 246, 0.15);
  --status-completed-text: #a78bfa;
  --status-completed-border: #8b5cf6;

  --host-home-bg: rgba(245, 158, 11, 0.15);
  --host-home-text: #fbbf24;

  --host-away-bg: rgba(168, 85, 247, 0.15);
  --host-away-text: #c084fc;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.55);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Compliance Banner */
.compliance-banner {
  background: linear-gradient(90deg, #132219 0%, #1e3a2b 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #d1fae5;
  display: block;
}

.banner-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-tag {
  background: var(--pitch-green-dark);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.banner-text {
  flex: 1;
}

.banner-dismiss {
  background: transparent;
  border: none;
  color: #a7f3d0;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
}

/* App Header */
.app-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4), 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.brand-logo-img:hover {
  transform: scale(1.08) rotate(3deg);
}

.modal-header-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.35);
  flex-shrink: 0;
}

.brand-icon {
  font-size: 1.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.15);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.version-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  display: inline-block;
  vertical-align: middle;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.auth-bar-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* User Pill & Profile Button */
.user-pill, .user-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  color: inherit;
}

.user-pill-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--pitch-green);
  box-shadow: 0 0 10px var(--pitch-green-glow);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: #194d33;
  color: #a7f3d0;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-details-mini {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: white;
  line-height: 1.1;
}

.user-handle {
  font-size: 0.68rem;
  color: #38bdf8;
  font-family: monospace;
}

.user-role-badge {
  font-size: 0.62rem;
  color: var(--pitch-green-light);
  font-weight: 600;
  text-transform: uppercase;
}

/* Profile Modal Elements */
.modal-md { max-width: 580px; }

.profile-summary-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 6px;
}

.profile-avatar-large {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  background: #133a27;
  color: var(--pitch-green-light);
  border: 2px solid var(--pitch-green);
  font-size: 1.35rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--pitch-green-glow);
}

.profile-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-meta-text h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--pitch-green);
  color: #042416;
  box-shadow: 0 2px 8px var(--pitch-green-glow);
}

.btn-primary:hover {
  background-color: var(--pitch-green-light);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--pitch-green);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  background-color: var(--bg-card);
  border-color: var(--text-muted);
}

.btn-admin {
  background: linear-gradient(135deg, #78350f 0%, #b45309 100%);
  color: #fef3c7;
  border: 1px solid #d97706;
  box-shadow: 0 2px 8px var(--gold-glow);
  position: relative;
}

.btn-admin:hover {
  background: linear-gradient(135deg, #92400e 0%, #d97706 100%);
  color: white;
}

.admin-flag-badge {
  background: #ef4444;
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  padding: 1px 5px;
  font-weight: 800;
  margin-left: 2px;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid #ef4444;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: #dc2626;
  color: white;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.78rem;
}

/* Privacy Notice */
.privacy-notice {
  background: #11281c;
  border: 1px solid #1a4a2f;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #d1fae5;
}

.privacy-icon {
  font-size: 1.25rem;
}

.privacy-text a {
  color: #34d399;
  font-weight: 700;
  text-decoration: underline;
}

/* Main Content Area */
.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px;
  flex: 1;
  width: 100%;
}

/* Age Group Section */
.age-group-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
}

.section-badge {
  background: var(--bg-accent);
  color: var(--pitch-green-light);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.73rem;
  font-weight: 600;
}

.age-summary-card {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 5px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-highlight {
  color: #a7f3d0;
  font-weight: 600;
}

.spec-divider {
  color: var(--text-dim);
}

/* Age Group Tabs */
.age-tabs-container {
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.age-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.age-group-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-subtle);
  margin: 0 4px;
}

.age-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  transition: all 0.18s ease;
  position: relative;
}

.age-tab:hover {
  background: var(--bg-card-hover);
  color: white;
  border-color: var(--pitch-green-dark);
}

.age-tab.active {
  background: linear-gradient(135deg, #133a27 0%, #1e5237 100%);
  border-color: var(--pitch-green);
  color: white;
  box-shadow: 0 2px 10px var(--pitch-green-glow);
}

.tab-label {
  font-size: 0.82rem;
  font-weight: 700;
}

.tab-sub {
  font-size: 0.65rem;
  color: var(--pitch-green-light);
  font-weight: 500;
}

.tab-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--pitch-green);
  color: #042416;
  font-size: 0.65rem;
  font-weight: 800;
  border-radius: var(--radius-full);
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-secondary);
}

/* Controls Panel */
.controls-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-dim);
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-box input:focus {
  border-color: var(--pitch-green);
  box-shadow: 0 0 0 2px var(--pitch-green-glow);
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: flex-end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-item label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-select, .form-input, .form-textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: white;
  padding: 8px 10px;
  font-size: 0.84rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
  border-color: var(--pitch-green);
  box-shadow: 0 0 0 2px var(--pitch-green-glow);
}

.highlight-select {
  border-color: var(--pitch-green);
  background-color: #0d1e15;
}

.field-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.filter-reset-item {
  display: flex;
  justify-content: flex-end;
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
}

.results-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.results-actions {
  display: flex;
  gap: 8px;
}

/* Fixtures Grid */
.fixtures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

/* Fixture Card */
.fixture-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.fixture-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.card-top-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.age-badge {
  background: #113422;
  color: #34d399;
  border: 1px solid #10b981;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.76rem;
}

.girls-badge {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid #db2777;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.72rem;
}

.status-badge {
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-open {
  background: var(--status-open-bg);
  color: var(--status-open-text);
  border: 1px solid var(--status-open-border);
}

.status-confirmed {
  background: var(--status-confirmed-bg);
  color: var(--status-confirmed-text);
  border: 1px solid var(--status-confirmed-border);
}

.status-completed {
  background: var(--status-completed-bg);
  color: var(--status-completed-text);
  border: 1px solid var(--status-completed-border);
}

.card-team-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.team-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-accent);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--pitch-green-light);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.team-info {
  flex: 1;
}

.team-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: white;
  line-height: 1.25;
}

.club-name {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.team-affiliation-id {
  font-size: 0.72rem;
  color: #38bdf8;
  font-family: monospace;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Match Key Details Chips */
.match-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chip {
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-host-home {
  background: var(--host-home-bg);
  color: var(--host-home-text);
  border-color: rgba(245, 158, 11, 0.3);
  font-weight: 600;
}

.chip-host-away {
  background: var(--host-away-bg);
  color: var(--host-away-text);
  border-color: rgba(168, 85, 247, 0.3);
  font-weight: 600;
}

.chip-opposition-range {
  background: #142838;
  color: #7dd3fc;
  border-color: #0284c7;
  font-weight: 600;
}

.chip-surface {
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.3);
}

.chip-tier {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

/* Match Meta Box */
.match-meta-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.79rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.meta-row strong {
  color: var(--text-main);
}

.meta-icon {
  width: 16px;
  text-align: center;
  font-size: 0.85rem;
}

.venue-address {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Completed Match Outcome Box */
.card-outcome-box {
  background: #1a162b;
  border: 1px solid #5b21b6;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.outcome-score {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e9d5ff;
}

.outcome-respect {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.respect-3 { background: rgba(16, 185, 129, 0.25); color: #34d399; }
.respect-2 { background: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.respect-1 { background: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.respect-0 { background: rgba(239, 68, 68, 0.25); color: #f87171; border: 1px solid #ef4444; }

/* Notes callout */
.card-notes {
  font-size: 0.77rem;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.4);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--pitch-green);
  line-height: 1.4;
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  flex-wrap: wrap;
}

.btn-card-action {
  flex: 2;
  padding: 7px 10px;
  font-size: 0.8rem;
  min-width: 140px;
}

.btn-card-score {
  background: #4c1d95;
  color: #f3e8ff;
  border-color: #6d28d9;
}

.btn-card-score:hover {
  background: #5b21b6;
}

.btn-card-util {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-card-util:hover {
  background: var(--bg-card);
  color: white;
  border-color: var(--text-dim);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-top: 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 10px;
  opacity: 0.7;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.empty-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 16px auto;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 16px;
}

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

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-sm { max-width: 480px; }
.modal-lg { max-width: 900px; }

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: white;
}

.modal-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: white;
}

.modal-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-body {
  padding: 20px;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 6px;
  margin-top: 6px;
  margin-bottom: 2px;
}

.section-num {
  background: var(--pitch-green);
  color: #042416;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-section-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
}

.section-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.matchmaking-range-row {
  align-items: center;
}

.matchmaking-range-arrow {
  color: var(--pitch-green-light);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flex-1 { flex: 1; min-width: 150px; }
.flex-2 { flex: 2; min-width: 220px; }

.form-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-label.required::after {
  content: " *";
  color: #ef4444;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

/* Quick Logins Box */
.quick-login-box {
  background: var(--bg-primary);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-login-label {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quick-login-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Match outcome score inputs */
.score-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg-primary);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.score-box label {
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}

.score-input {
  width: 70px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
}

.score-sep {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dim);
}

/* Behavior Rating Selector 0 to 3 */
.behavior-rating-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rating-option input {
  display: none;
}

.rating-card {
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-primary);
}

.rating-option input:checked + .rating-card {
  transform: scale(1.02);
}

.rating-option input:checked + .rating-3 {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}

.rating-option input:checked + .rating-2 {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

.rating-option input:checked + .rating-1 {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
}

.rating-option input:checked + .rating-0 {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.rating-num {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.rating-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: white;
}

.rating-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* My Teams Grid */
.my-teams-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

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

.my-team-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
}

.my-team-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.add-team-subbox {
  background: rgba(16, 185, 129, 0.08);
  border: 1px dashed var(--pitch-green);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.add-team-subbox h4 {
  font-size: 0.9rem;
  color: var(--pitch-green-light);
  margin-bottom: 4px;
}

.subbox-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Admin Portal Specifics */
.admin-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-crown-icon {
  font-size: 1.8rem;
  background: #78350f;
  border: 1px solid #d97706;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-body {
  padding: 16px 20px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.admin-tab {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-tab:hover {
  color: white;
  background: var(--bg-card);
}

.admin-tab.active {
  background: #78350f;
  border-color: #d97706;
  color: #fef3c7;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-toolbar-filters {
  display: flex;
  gap: 8px;
}

.admin-select {
  width: auto;
  min-width: 140px;
}

.admin-search {
  max-width: 320px;
}

.admin-banner-warning {
  background: #361515;
  border: 1px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fecaca;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.admin-banner-info {
  background: #172554;
  border: 1px solid #3b82f6;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #bfdbfe;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.admin-table th {
  background: var(--bg-primary);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-subtle);
  color: var(--pitch-green-light);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: #e5e7eb;
  vertical-align: middle;
}

.admin-table tr:hover {
  background: var(--bg-card-hover);
}

.admin-badge-redflag {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid #ef4444;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

/* Date Picker Wrap & Calendar Trigger */
.date-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.date-input-clickable {
  cursor: pointer;
  padding-right: 42px !important;
}

.btn-calendar-trigger {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  padding: 4px;
}

.btn-calendar-trigger:hover {
  transform: scale(1.15);
}

/* Squad Age Group Lock Banner */
.age-lock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 78, 59, 0.35));
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 16px;
  color: #d1fae5;
  font-size: 0.88rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.locked-age-pill {
  background: var(--pitch-green);
  color: #042416;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 9999px;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}

/* Main View Mode Switcher */
.main-view-switcher {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.view-switch-btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-switch-btn:hover {
  border-color: #38bdf8;
  color: white;
}

.view-switch-btn.active {
  background: #0f3d24;
  border-color: var(--pitch-green);
  color: var(--pitch-green-light);
  box-shadow: 0 0 12px var(--pitch-green-glow);
}

/* History Section & Cards */
.history-section {
  margin-top: 10px;
}

.history-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.history-banner-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
}

.history-banner-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.history-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.history-score-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #09121d;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: center;
}

.history-score-num {
  font-size: 1.55rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 2px;
}

.history-respect-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.respect-3-bg {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid #10b981;
}

.respect-2-bg {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border: 1px solid #38bdf8;
}

.respect-1-bg {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid #f59e0b;
}

.respect-0-bg {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid #ef4444;
}

/* Report Issue & Button Accents */
.btn-report-issue {
  border-color: #f59e0b !important;
  color: #fde68a !important;
  font-weight: 700;
}

.btn-report-issue:hover {
  background: rgba(245, 158, 11, 0.2) !important;
}

.btn-outline-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  border: 1px solid #f59e0b !important;
  color: #fde68a !important;
}

.btn-outline-warning:hover {
  background: rgba(245, 158, 11, 0.25) !important;
}

.btn-outline-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid #ef4444 !important;
  color: #fca5a5 !important;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
}

.admin-badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid #f59e0b;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-badge-resolved {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border: 1px solid #10b981;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-badge-urgent {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid #ef4444;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  animation: pulse 2s infinite;
}

/* Governance & Admin Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid #ef4444;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid #f59e0b;
}

.badge-secondary {
  background: rgba(100, 116, 139, 0.25);
  color: #cbd5e1;
  border: 1px solid #64748b;
}

/* Direct WhatsApp Manager Button */
.btn-whatsapp-direct {
  background: linear-gradient(135deg, #25D366, #128C7E) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: 1px solid #16a34a !important;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-whatsapp-direct:hover {
  background: linear-gradient(135deg, #1ebe5d, #0d7063) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.45);
}

/* Register Interest & Matchmaking Workflows */
.btn-interest {
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: white !important;
  font-weight: 700 !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.btn-interest:hover {
  background: linear-gradient(135deg, #0369a1, #075985) !important;
  transform: translateY(-1px);
}

.incoming-interest-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #38bdf8;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 12px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.incoming-interest-header {
  font-size: 0.85rem;
  font-weight: 800;
  color: #7dd3fc;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.incoming-interest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.interest-item-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interest-club-title {
  font-size: 0.88rem;
  color: white;
  font-weight: 700;
}

.interest-club-meta {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.3;
}

.interest-club-note {
  font-size: 0.76rem;
  color: #cbd5e1;
  font-style: italic;
  background: rgba(30, 41, 59, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 2px solid #38bdf8;
}

.btn-confirm-match {
  width: 100%;
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: white !important;
  font-weight: 700 !important;
  border: 1px solid #10b981 !important;
  padding: 8px 12px !important;
  font-size: 0.82rem !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-confirm-match:hover {
  background: linear-gradient(135deg, #047857, #065f46) !important;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.interest-declined-notice {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #fca5a5;
  margin-top: 10px;
  line-height: 1.4;
}

.interest-accepted-notice {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #a7f3d0;
  margin-top: 10px;
  line-height: 1.4;
}

.confirmed-fixture-banner {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.6), rgba(15, 23, 42, 0.95));
  border: 1px solid #10b981;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #d1fae5;
  font-size: 0.86rem;
  margin-top: 10px;
}

/* Toast Notifications */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #113824;
  color: white;
  border: 1px solid var(--pitch-green);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.88rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    padding: 10px 14px;
  }
  
  .brand-title {
    font-size: 1.1rem;
  }
  
  .app-main {
    padding: 14px 10px;
  }

  .fixtures-grid {
    grid-template-columns: 1fr;
  }

  .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .behavior-rating-selector {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }

  .app-header, .compliance-banner, .privacy-notice, .age-group-section, .controls-panel, .results-actions, .app-footer, .card-actions, .btn-card-util {
    display: none !important;
  }

  .print-header {
    display: block !important;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid black;
  }

  .admin-table {
    color: black !important;
  }

  .admin-table th {
    background: #f0f0f0 !important;
    color: black !important;
  }

  .admin-table td {
    color: black !important;
    border-bottom: 1px solid #ccc !important;
  }
}
