/* ============================================================
   NSGB HUB 2.0 — Global Stylesheet
   Bermuda Blue + Pink Gradient Theme
   ============================================================ */

:root {
  --blue:        #1e3799;
  --blue-dark:   #152a70;
  --blue-light:  #2d4fc4;
  --pink:        #e84393;
  --pink-light:  #f06ab5;
  --gradient:    linear-gradient(135deg, #1e3799 0%, #e84393 100%);
  --gradient-r:  linear-gradient(135deg, #e84393 0%, #1e3799 100%);
  --success:     #10b981;
  --danger:      #ef4444;
  --warning:     #f59e0b;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-300:    #cbd5e1;
  --gray-400:    #94a3b8;
  --gray-500:    #64748b;
  --gray-600:    #475569;
  --gray-700:    #334155;
  --gray-800:    #1e293b;
  --gray-900:    #0f172a;
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
  --shadow-xl:   0 16px 48px rgba(0,0,0,.18);
  --nav-h:       68px;
  --transition:  all .2s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(15,23,42,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

/* DSR logo image in navbar */
.nav-logo-img {
  height: 55px;
  width: auto;
  max-width: 290px;
  object-fit: contain;
  display: block;
}

.nav-logo {
  width: 38px;
  height: 38px;
  background: var(--gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: white;
  letter-spacing: -.02em;
}

.nav-brand-text { line-height: 1.1; }
.nav-brand-title { font-size: .95rem; font-weight: 800; color: white; letter-spacing: -.01em; }
.nav-brand-sub { font-size: .65rem; font-weight: 600; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .08em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  transition: var(--transition);
}

.nav-links a:hover { color: white; background: rgba(255,255,255,.08); }
.nav-links a.active { color: white; background: rgba(255,255,255,.12); }
.nav-links a svg { opacity: .7; }

.nav-login-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem !important;
  background: var(--gradient) !important;
  color: white !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
}

.nav-login-btn:hover { opacity: .9; transform: translateY(-1px); }

/* Nav user section */
.nav-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: .875rem;
  flex-shrink: 0;
}

.nav-user-info { line-height: 1.2; }
.nav-user-name { font-size: .8rem; font-weight: 600; color: white; }

.nav-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge-super { background: linear-gradient(135deg,#f59e0b,#ef4444); color: white; }
.badge-admin { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: white; }
.badge-org   { background: linear-gradient(135deg,#10b981,#059669); color: white; }

.nav-dash-btn, .nav-logout-btn {
  padding: .4rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.nav-dash-btn { background: rgba(255,255,255,.12); color: white; }
.nav-dash-btn:hover { background: rgba(255,255,255,.2); }
.nav-logout-btn { background: rgba(239,68,68,.2); color: #fca5a5; }
.nav-logout-btn:hover { background: rgba(239,68,68,.35); }

/* Mobile menu */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  padding: .4rem;
  margin-left: auto;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.mobile-nav.open { display: block; }

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--gray-900);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  margin-bottom: .5rem;
}

.mobile-nav-panel a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  font-weight: 500;
  transition: var(--transition);
}

.mobile-nav-panel a:hover, .mobile-nav-panel a.active {
  background: rgba(255,255,255,.1);
  color: white;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: var(--gradient);
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Video Hero ── */
.hero-video {
  background: #0a1628 !important; /* fallback while video loads — NO gradient */
}

/* Kill the base .hero gradient when video is active */
.hero-video::after {
  display: none !important;
}
.hero-video::before {
  display: none !important; /* hide SVG pattern too */
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  /* Natural brightness — let the video speak */
  filter: brightness(0.75) saturate(1.05);
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Brand gradient overlay — Bermuda blue to pink, semi-transparent so video shows through */
  background: linear-gradient(
    135deg,
    rgba(30, 55, 153, 0.72) 0%,
    rgba(99, 102, 241, 0.55) 40%,
    rgba(236, 72, 153, 0.65) 100%
  );
}

/* Ensure all hero text sits above the video */
.hero-video .container {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.9);
  padding: .4rem 1rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: white;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
}

.hero h1 span { color: var(--pink-light); }

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.hero-stat {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.hero-stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: white;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: .3rem;
}

.hero-stat-label {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: white;
  color: var(--blue);
}
.btn-primary:hover { background: var(--gray-100); transform: translateY(-1px); }

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,.5);
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: white; }

.btn-blue { background: var(--blue); color: white; }
.btn-blue:hover { background: var(--blue-dark); transform: translateY(-1px); }

.btn-gradient { background: var(--gradient); color: white; }
.btn-gradient:hover { opacity: .9; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-ghost { background: var(--gray-100); color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-200); }

.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-lg { padding: .8rem 1.75rem; font-size: 1rem; }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section { padding: 4rem 0; }
.section-sm { padding: 2rem 0; }

.section-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blue);
  margin-bottom: .75rem;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: .75rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--gray-500);
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================================
   SPORT CARDS
   ============================================================ */
.sports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.sport-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.sport-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.sport-card-header {
  background: var(--gradient);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sport-card-logo {
  width: 56px;
  height: 56px;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.sport-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.sport-card-logo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
}

.sport-card-title h3 {
  font-size: .95rem;
  font-weight: 700;
  color: white;
  line-height: 1.3;
  margin-bottom: .25rem;
}

.sport-type {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  color: rgba(255,255,255,.75);
  font-weight: 500;
}

.sport-card-body { padding: 1.25rem; flex: 1; }

.sport-card-about {
  font-size: .85rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sport-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}

.sport-card-stat { text-align: center; }
.sport-card-stat-num { font-size: 1.1rem; font-weight: 800; color: var(--blue); line-height: 1; }
.sport-card-stat-label { font-size: .65rem; color: var(--gray-500); font-weight: 500; margin-top: .2rem; }

.sport-card-meta { display: flex; flex-direction: column; gap: .3rem; }
.sport-card-meta-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--gray-500);
}

.sport-card-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sport-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.sport-tag {
  padding: .2rem .6rem;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 500;
}

.btn-view-details {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .85rem;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-view-details:hover { opacity: .9; transform: translateY(-1px); }

/* ============================================================
   SEARCH & FILTER
   ============================================================ */
.search-bar {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.search-input-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.search-input-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: .7rem 1rem .7rem 2.75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--gray-800);
  background: var(--gray-50);
  transition: var(--transition);
  outline: none;
}

.search-input:focus { border-color: var(--blue); background: white; box-shadow: 0 0 0 3px rgba(30,55,153,.1); }

.clear-btn {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gray-200);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-500);
  font-size: .75rem;
  transition: var(--transition);
}

.clear-btn:hover { background: var(--gray-300); }
.hidden { display: none !important; }

.filter-chips { display: flex; gap: .5rem; flex-wrap: wrap; }

.chip {
  padding: .35rem .85rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 500;
  border: 1.5px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--gradient); color: white; border-color: transparent; }

/* ============================================================
   LOADING & EMPTY STATES
   ============================================================ */
.loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  color: var(--gray-400);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.loading-text { font-size: .875rem; color: var(--gray-400); font-weight: 500; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-400);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--gray-400);
}

.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--gray-700); margin-bottom: .5rem; }
.empty-state p { font-size: .9rem; color: var(--gray-400); }

/* ============================================================
   STAT BARS
   ============================================================ */
.stat-bar { margin-bottom: 1rem; }
.stat-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; }
.stat-bar-label { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--gray-600); font-weight: 500; }
.stat-bar-value { font-size: .9rem; font-weight: 700; color: var(--gray-800); }
.stat-bar-track { height: 8px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }
.fill-blue   { background: var(--blue); }
.fill-indigo { background: #6366f1; }
.fill-pink   { background: var(--pink); }
.fill-green  { background: var(--success); }

.gender-bar { height: 10px; border-radius: 5px; overflow: hidden; display: flex; }
.gender-bar-male   { background: var(--blue); }
.gender-bar-female { background: var(--pink); }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-hero {
  background: var(--gradient);
  padding: 3rem 0 2.5rem;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.75);
  font-size: .85rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: var(--transition);
  padding: 0;
  text-decoration: none;
}

.detail-back:hover { color: white; }

.detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.detail-logo {
  width: 90px;
  height: 90px;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}

.detail-logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.detail-info h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  color: white;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}

.detail-sport-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  padding: .3rem .85rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
}

.detail-content { padding: 2.5rem 0; }

.detail-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
}

.detail-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.detail-card h2 {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gray-100);
}

.leadership-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.leadership-item {
  padding: .75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
}

.leadership-role { font-size: .72rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.leadership-name { font-size: .9rem; font-weight: 600; color: var(--gray-800); }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.contact-icon {
  width: 32px;
  height: 32px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  flex-shrink: 0;
}

.contact-label { font-size: .72rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.contact-value { font-size: .9rem; color: var(--gray-800); margin-top: .1rem; }
.contact-value a { color: var(--blue); }
.contact-value a:hover { text-decoration: underline; }

.doc-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  color: var(--blue);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}

.doc-link:hover { background: var(--blue); color: white; border-color: var(--blue); }

/* ============================================================
   STATISTICS PAGE
   ============================================================ */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stats-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.stats-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue   { background: rgba(30,55,153,.1); color: var(--blue); }
.icon-pink   { background: rgba(232,67,147,.1); color: var(--pink); }
.icon-green  { background: rgba(16,185,129,.1); color: var(--success); }
.icon-amber  { background: rgba(245,158,11,.1); color: var(--warning); }

.stats-card-num { font-size: 1.75rem; font-weight: 900; color: var(--gray-900); letter-spacing: -.02em; line-height: 1; }
.stats-card-label { font-size: .8rem; color: var(--gray-500); font-weight: 500; margin-top: .2rem; }

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chart-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gray-100);
}

.chart-wrap { position: relative; height: 260px; }

/* ============================================================
   LIBRARY PAGE
   ============================================================ */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.library-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.library-card:hover { border-color: var(--blue); box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.library-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--gray-100);
}

.library-card-body { padding: 1rem; }
.library-card-body h3 { font-size: .95rem; font-weight: 700; color: var(--gray-800); margin-bottom: .4rem; }
.library-card-body p { font-size: .8rem; color: var(--gray-500); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .2s ease;
}

.modal-lg { max-width: 820px; }

@keyframes modalIn { from { opacity: 0; transform: scale(.95) translateY(10px); } to { opacity: 1; transform: none; } }

.modal-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h2 { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--transition);
}

.modal-close:hover { background: var(--gray-200); color: var(--gray-800); }

.modal-body { padding: 1.5rem 1.75rem; }
.modal-footer { padding: 1rem 1.75rem 1.5rem; display: flex; gap: .75rem; justify-content: flex-end; border-top: 1px solid var(--gray-100); }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .4rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--gray-800);
  background: white;
  transition: var(--transition);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,55,153,.1);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-section-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  margin: 1.5rem 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: calc(100vh - var(--nav-h));
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.login-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.login-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.login-card h1 { font-size: 1.5rem; font-weight: 800; text-align: center; color: var(--gray-900); margin-bottom: .5rem; }
.login-card p { text-align: center; color: var(--gray-500); font-size: .9rem; margin-bottom: 2rem; }

.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 2.5rem; }

.input-toggle {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: .2rem;
  transition: var(--transition);
}

.input-toggle:hover { color: var(--gray-700); }

.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}

.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.login-features { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.5rem; }

.login-feature {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--gray-600);
}

.login-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--gray-50);
}

.admin-sidebar {
  width: 240px;
  background: var(--gray-900);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.admin-sidebar-header {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-brand { display: flex; align-items: center; gap: .6rem; }
.admin-brand-logo {
  width: 32px;
  height: 32px;
  background: var(--gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .85rem;
  color: white;
}

.admin-brand-text { line-height: 1.1; }
.admin-brand-title { font-size: .85rem; font-weight: 800; color: white; }
.admin-brand-sub { font-size: .65rem; color: rgba(255,255,255,.4); font-weight: 500; }

.admin-user-section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.admin-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}

.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name { font-size: .8rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-nav { padding: 1rem .75rem; flex: 1; }

.admin-nav-section { margin-bottom: 1.5rem; }

.admin-nav-section-title {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  padding: 0 .5rem;
  margin-bottom: .5rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.admin-nav-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.admin-nav-item.active { background: rgba(255,255,255,.12); color: white; }
.admin-nav-item svg { opacity: .7; flex-shrink: 0; }
.admin-nav-item.active svg { opacity: 1; }

.admin-sidebar-footer {
  padding: .75rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.admin-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.admin-topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }
.admin-topbar-actions { display: flex; gap: .75rem; align-items: center; }

.admin-content { padding: 2rem 1.5rem; flex: 1; }

/* Admin views */
.admin-view { display: none; }
.admin-view.active { display: block; }

/* Admin stat cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-stat-num { font-size: 1.75rem; font-weight: 900; color: var(--gray-900); letter-spacing: -.02em; line-height: 1; }
.admin-stat-label { font-size: .8rem; color: var(--gray-500); font-weight: 500; margin-top: .2rem; }

/* Data table */
.table-wrap {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}

.table-header h3 { font-size: .95rem; font-weight: 700; color: var(--gray-800); }

.table-search {
  position: relative;
  width: 240px;
}

.table-search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--gray-400); }

.table-search input {
  width: 100%;
  padding: .5rem .75rem .5rem 2.25rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .85rem;
  outline: none;
  transition: var(--transition);
}

.table-search input:focus { border-color: var(--blue); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: .875rem;
  color: var(--gray-700);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }

.org-logo-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--gray-100);
  padding: 2px;
}

.org-logo-placeholder-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}

/* Rank badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
}

.rank-1 { background: #fef3c7; color: #92400e; }
.rank-2 { background: #f1f5f9; color: #475569; }
.rank-3 { background: #fef3c7; color: #78350f; }
.rank-n { background: var(--gray-100); color: var(--gray-500); }

/* ============================================================
   ACCESS CODES
   ============================================================ */
.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  gap: 1rem;
  flex-wrap: wrap;
}

.code-row:last-child { border-bottom: none; }

.code-org-info { flex: 1; min-width: 160px; }
.code-org-name { font-size: .9rem; font-weight: 600; color: var(--gray-800); }
.code-org-sport { font-size: .78rem; color: var(--gray-500); margin-top: .1rem; }

.code-input-wrap { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.code-input {
  padding: .45rem .75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-family: 'Courier New', monospace;
  width: 180px;
  outline: none;
  transition: var(--transition);
}

.code-input:focus { border-color: var(--blue); }

.copy-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--transition);
}

.copy-btn:hover { background: var(--gray-200); color: var(--gray-700); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.1rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-800);
  border-left: 3px solid var(--gray-300);
  animation: toastIn .25s ease;
  pointer-events: all;
  min-width: 240px;
  max-width: 360px;
}

@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: none; } }

.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-info    { border-left-color: var(--blue); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.6);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-brand { margin-bottom: .75rem; }
.footer-brand-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.footer-logo {
  width: 32px;
  height: 32px;
  background: var(--gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .85rem;
  color: white;
}

.footer-brand-name { font-size: .95rem; font-weight: 800; color: white; }
.footer-desc { font-size: .85rem; line-height: 1.7; }

.footer-col h4 { font-size: .85rem; font-weight: 700; color: white; margin-bottom: .85rem; }

.footer-links { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { font-size: .85rem; color: rgba(255,255,255,.5); transition: var(--transition); }
.footer-links a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
}

/* ============================================================
   ABOUT SECTION (Home)
   ============================================================ */
.about-section {
  background: white;
  padding: 4rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-card {
  background: var(--gradient);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  color: white;
}

.about-card h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }
.about-card p { font-size: .9rem; line-height: 1.8; opacity: .9; }

.about-features { display: flex; flex-direction: column; gap: 1rem; }

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.about-feature:hover { border-color: var(--blue); box-shadow: var(--shadow); }

.about-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.about-feature h4 { font-size: .9rem; font-weight: 700; color: var(--gray-800); margin-bottom: .25rem; }
.about-feature p { font-size: .82rem; color: var(--gray-500); line-height: 1.6; }

/* ============================================================
   ORG DASHBOARD
   ============================================================ */
.org-hero {
  background: var(--gradient);
  padding: 2.5rem 0;
  color: white;
}

.org-hero-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.org-hero-logo {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.org-hero-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.org-hero-actions { margin-left: auto; display: flex; gap: .75rem; }

.org-content { padding: 2.5rem 0; }

.org-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }

.org-section {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.org-section h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gray-100);
}

/* ============================================================
   FADE IN ANIMATION
   ============================================================ */
.fade-in-up {
  animation: fadeInUp .4s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .org-grid { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-user { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .sports-grid { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .leadership-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: 1fr 1fr; }
  .code-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .library-grid { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: 1fr; }
}
