/* MOBL - Modern Baseball Management System
   Modern Responsive Design
   ============================================ */

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue: #1e3a8a;
  --blue-dark: #152a64;
  --blue-light: #2a4fa8;
  --red: #c41e3a;
  --red-dark: #a01830;
  --red-light: #e8344f;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #64748b;
  --gray-800: #1e293b;
  --light-border: #d1d5db;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--off-white);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--red); }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--blue);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  background: var(--blue);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  padding: 1px;
  background: white;
  border-radius: 3px;
  margin-right: 0.75rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  overflow: hidden;
}

.nav-logo img {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 2px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  flex: 1;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
  display: block;
  padding: 0.9rem 0.8rem;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li:hover > a {
  background: var(--red);
  color: var(--white);
}

.nav-login {
  background: rgba(255,255,255,0.15) !important;
  border-radius: 4px;
  margin-left: 0.25rem;
}

/* Dropdown */
.nav-menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 220px;
  list-style: none;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  z-index: 100;
}

.nav-menu li:hover > ul { display: block; }

.nav-menu li ul li a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--gray-800);
  font-size: 0.875rem;
  transition: all var(--transition);
  border-bottom: 1px solid var(--gray-100);
}

.nav-menu li ul li a:hover {
  background: var(--blue);
  color: var(--white);
  padding-left: 1.5rem;
}

/* Nav Search */
.nav-search {
  margin-left: auto;
  flex-shrink: 0;
}

.nav-search form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border-radius: 50px;
  overflow: hidden;
  transition: background var(--transition);
}

.nav-search form:focus-within {
  background: rgba(255,255,255,0.25);
}

.nav-search input {
  background: transparent;
  border: none;
  color: var(--white);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  width: 160px;
  outline: none;
}

.nav-search input::placeholder { color: rgba(255,255,255,0.6); }

.nav-search button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-search button:hover { color: var(--white); }

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
  margin-left: auto;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(196, 30, 58, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(30, 58, 138, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, var(--blue) 0%, #1a2d6b 40%, #2a1530 70%, var(--red-dark) 100%);
  padding: 3.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.95) contrast(1.08);
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 24% 45%, rgba(30, 58, 138, 0.18) 0%, transparent 45%),
    linear-gradient(90deg, rgba(12, 25, 56, 0.86) 0%, rgba(14, 26, 58, 0.76) 42%, rgba(91, 16, 36, 0.82) 100%);
}

/* Subtle pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

/* Decorative diagonal stripe */
.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 3;
  background: var(--off-white);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0 100%);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  padding: 1rem 0;
  position: relative;
  z-index: 2;
}

.hero-logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 1.5rem;
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.6;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-video {
    display: none;
  }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Slider - contained in right column */
.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
  border: 3px solid rgba(255,255,255,0.15);
  aspect-ratio: 4 / 3;
}

.slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  display: none;
  position: absolute;
  inset: 0;
}

.slide.active {
  display: block;
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slider-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all var(--transition);
}

.slider-dot.active {
  background: var(--white);
  border-color: var(--white);
  transform: scale(1.2);
}

/* ============================================
   QUICK ACTION CARDS
   ============================================ */
.quick-actions {
  background: transparent;
  padding: 2rem 0 0;
  position: relative;
  z-index: 10;
}

/* Home page background texture */
.home-bg {
  background:
    linear-gradient(180deg, #edf1f8 0%, #e4e9f3 8%, #eef2f8 25%, #f8f9fc 45%, #eef2f8 65%, #e4e9f3 85%, #eaeff6 100%);
  position: relative;
  overflow: hidden;
}
/* Color washes — red/blue blobs for patriotic feel */
.home-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 500px at 0% 5%, rgba(196,30,58,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 500px 600px at 100% 0%, rgba(30,58,138,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 700px 500px at 95% 45%, rgba(196,30,58,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 700px at 5% 60%, rgba(30,58,138,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 50% 100%, rgba(196,30,58,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
/* Baseball stitching seam curves */
.home-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500' viewBox='0 0 500 500'%3E%3Cpath d='M100 0 C100 140,200 250,350 250 S600 360,600 500' fill='none' stroke='rgba(196,30,58,0.055)' stroke-width='3' stroke-dasharray='12,16'/%3E%3Cpath d='M-100 0 C-100 140,0 250,150 250 S400 360,400 500' fill='none' stroke='rgba(196,30,58,0.055)' stroke-width='3' stroke-dasharray='12,16'/%3E%3C/svg%3E");
  background-size: 500px 500px;
  pointer-events: none;
  z-index: 0;
}
.home-bg > * {
  position: relative;
  z-index: 1;
}
.home-bg > .section-white {
  background: transparent;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--gray-800);
  border: 1px solid var(--gray-200);
}

.action-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
  color: var(--gray-800);
}

.action-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
}

.action-field-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: block;
  overflow: visible;
}

.field-shadow {
  fill: rgba(0,0,0,0.16);
  transform: translate(0, 1px);
}

.field-grass { fill: #2fa75c; }
.field-stripe { fill: rgba(255,255,255,0.15); }
.field-dirt { fill: #c9955d; }
.field-lines {
  fill: none;
  stroke: rgba(255,255,255,0.88);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.field-mound { fill: #f3d7a6; }
.field-base { fill: #fff8e8; }
.field-home { fill: #ffffff; }

.action-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--blue);
}

.action-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 4rem 0;
}

.section-white { background: var(--white); }
.section-gray { background: var(--gray-100); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.section-line {
  width: 60px;
  height: 4px;
  background: var(--red);
  margin: 0 auto;
  border-radius: 2px;
}

.section-subheader {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
}

.section-subheader h3 {
  color: var(--gray-600);
  font-size: 1.25rem;
}

/* ============================================
   HOME PAGE — INFO BAR (Dates + Sponsors)
   ============================================ */
.home-info-bar {
  padding: 1.5rem 0;
}

/* Two-column dates + announcements */
.info-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.info-col-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
}

.info-col-card .misc-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
  overflow-wrap: break-word;
  word-break: break-word;
}
.info-col-card .misc-item:last-child { border-bottom: none; }
.info-col-card .misc-item strong {
  display: block;
  color: var(--blue);
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}
.info-col-card .misc-item div {
  font-size: 0.85rem;
  color: var(--gray-800);
  line-height: 1.5;
}
.info-col-card .misc-item img { max-width: 100%; height: auto; }

.home-news-section {
  padding-top: 2.5rem;
}

.home-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.home-news-main {
  min-width: 0;
  width: 100%;
}

.home-news-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  min-width: 0;
}

.home-news-summary .info-col-card {
  position: relative;
  overflow: hidden;
}

.home-news-summary .info-col-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--red));
}

.home-news-summary .info-bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-news-summary .info-bar-list li {
  width: 100%;
}

@media (max-width: 768px) {
  .info-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .home-news-summary {
    grid-template-columns: 1fr;
  }
}

.info-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
  align-items: start;
}

.info-bar-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

/* Dates side */
.info-bar-dates {
  min-width: 0;
}

.info-bar-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.info-bar-list li {
  background: var(--gray-100);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  border-left: 3px solid var(--red);
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--gray-800);
}

.info-bar-list li strong {
  display: block;
  font-size: 0.75rem;
  color: var(--blue);
}

.info-bar-list li span {
  color: var(--gray-600);
  font-size: 0.7rem;
}

.info-bar-list li span img { max-width: 100%; height: auto; }

.info-bar-empty {
  font-size: 0.75rem;
  color: var(--gray-600);
}

/* Sponsors side */
.info-bar-sponsors {
  border-left: 1px solid var(--gray-200);
  padding-left: 1.5rem;
  min-width: 140px;
}

.info-bar-sponsor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.info-bar-sponsor-item {
  text-align: center;
}

.info-bar-sponsor-item img {
  max-height: 40px;
  max-width: 120px;
  object-fit: contain;
}

/* --- League News Header --- */
.news-header {
  text-align: left;
  margin-bottom: 2rem;
}

.news-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.news-header .section-line {
  margin: 0;
}

/* --- League News --- */
.news-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--red));
}

.news-card h3 {
  font-size: 1.25rem;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-right: 1rem;
}

.news-content {
  color: var(--gray-800);
  line-height: 1.7;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.news-content h2 { font-size: 1.1rem; margin: 1rem 0 0.5rem; color: var(--blue); }
.news-content p { margin-bottom: 0.75rem; }
.news-content hr { border: none; border-top: 1px solid var(--gray-200); margin: 1.25rem 0; }
.news-content img { max-width: 100%; height: auto; }
.news-content video { display: block; max-width: 100%; width: 100%; height: auto; border-radius: 8px; }
.news-content table { max-width: 100%; overflow-x: auto; display: block; }
.news-content pre, .news-content code { overflow-x: auto; max-width: 100%; }

/* ============================================
   SPONSORS / ADVERTISEMENTS ROW
   ============================================ */
.sponsors-section {
  padding: 3rem 0;
}

.sponsors-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.sponsor-card {
  padding: 1.25rem 2rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-align: center;
}

.sponsor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sponsor-card img {
  max-width: 150px;
  max-height: 80px;
  object-fit: contain;
}

/* ============================================
   QUICK LINKS & MISC
   ============================================ */
.links-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.link-block {
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.link-block h3 {
  font-size: 1.25rem;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--red);
}

.quick-links {
  list-style: none;
}

.quick-links li {
  margin-bottom: 0.5rem;
}

.quick-links li a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  color: var(--gray-800);
  font-weight: 500;
  transition: all var(--transition);
  border-bottom: 1px solid var(--gray-200);
}

.quick-links li a::before {
  content: ">";
  margin-right: 0.75rem;
  color: var(--red);
  font-weight: 700;
}

.quick-links li a:hover {
  color: var(--red);
  padding-left: 0.5rem;
}

/* Sponsors + Quick Links side-by-side */
.sponsors-links-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.misc-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
  overflow-wrap: break-word;
  word-break: break-word;
}
.misc-item img { max-width: 100%; height: auto; }

.misc-item:last-child { border-bottom: none; }

.misc-item strong {
  display: block;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.sponsors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.sponsor-item {
  padding: 0.75rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.sponsor-item img { max-width: 120px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--blue);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-logo {
  max-width: 140px;
  background: white;
  padding: 0.35rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-location {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--red);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li { margin-bottom: 0.6rem; }

.footer-col ul li a,
.footer-col p a {
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
  font-size: 0.9rem;
}

.footer-col ul li a:hover,
.footer-col p a:hover {
  color: var(--white);
  padding-left: 0.25rem;
}

.footer-social {
  margin: 1rem 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 1.1rem;
  transition: all var(--transition);
  margin-right: 0.5rem;
}

.footer-social a:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.footer .btn-outline {
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  margin-top: 0.5rem;
}

.footer .btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-section {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(196, 30, 58, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(30, 58, 138, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--gray-100) 0%, var(--off-white) 50%, var(--gray-100) 100%);
  padding: 3rem 1.25rem;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  border: 1px solid var(--gray-200);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  max-width: 120px;
  height: auto;
  margin-bottom: 1.25rem;
}

.login-header h1 {
  font-size: 1.75rem;
  color: var(--blue);
  margin-bottom: 0.35rem;
}

.login-header p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-error strong {
  display: block;
  margin-bottom: 0.15rem;
}

.login-form .form-group {
  margin-bottom: 1.25rem;
}

.login-form label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-800);
  margin-bottom: 0.4rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: var(--off-white);
  color: var(--gray-800);
  transition: all var(--transition);
  outline: none;
}

.login-form input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.btn-login {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.login-footer {
  text-align: center;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.login-footer a {
  color: var(--blue);
  font-weight: 500;
  font-size: 0.9rem;
}

.login-footer a:hover {
  color: var(--red);
}

.login-footer p {
  margin-top: 0.75rem;
  color: var(--gray-600);
  font-size: 0.85rem;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 768px) {
  /* Global mobile overflow prevention */
  .container { padding: 0 0.75rem; max-width: 100%; overflow: hidden; }
  .section { overflow: hidden; }
  .news-card { padding: 1rem; max-width: 100%; }
  .news-card h3 { font-size: 1.05rem; padding-right: 0; }
  .news-content { font-size: 0.85rem; line-height: 1.5; max-width: 100%; }
  .news-content * { max-width: 100% !important; box-sizing: border-box !important; }
  .news-content p { font-size: inherit !important; font-family: inherit !important; }
  .info-bar {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .info-bar-sponsors {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--gray-200);
    padding-top: 0.75rem;
  }
  .sponsors-links-row { grid-template-columns: 1fr; }
  .link-block { overflow: hidden; overflow-wrap: break-word; }

  /* Nav */
  .nav-logo img { height: 38px; }

  .mobile-menu-toggle { display: block; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue-dark);
    flex-direction: column;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active { display: flex; }

  .nav-menu > li > a {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-menu li ul {
    position: static;
    box-shadow: none;
    border-radius: 0;
    background: rgba(0,0,0,0.15);
  }

  .nav-menu li ul li a { color: rgba(255,255,255,0.85); }
  .nav-menu li ul li a:hover { background: var(--red); color: var(--white); }

  .nav-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: var(--blue-dark);
    display: none;
  }

  .nav-menu.active ~ .nav-search { display: block; }

  .nav-search input { width: 100%; }

  /* Hero - video background on mobile */
  .hero {
    padding: 0.75rem 0 3rem;
    position: relative;
  }

  .hero::after {
    height: 30px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }

  .hero-logo {
    max-width: 130px;
    margin: 0 auto 0.5rem;
    padding: 0.3rem;
  }

  .hero-content {
    padding: 0;
    position: relative;
    z-index: 3;
  }

  .hero-title { font-size: 1.75rem; margin-bottom: 0.5rem; }

  .hero-subtitle { font-size: 0.85rem; margin-bottom: 1rem; }

  .hero-actions { justify-content: center; }

  .hero-slider {
    display: none;
  }

  /* Action Cards */
  .quick-actions { padding: 1.5rem 0 0; }

  .action-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .action-card { padding: 1.25rem 1rem; }

  .action-icon { font-size: 2rem; }

  .action-card h3 { font-size: 0.95rem; }

  /* Sections */
  .section { padding: 2.5rem 0; }

  .section-header h2 { font-size: 1.5rem; }

  .section-header { margin-bottom: 2rem; }

  .links-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-logo { margin: 0 auto 1rem; }

  .footer-col h4 {
    border-bottom: none;
    display: inline-block;
  }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-menu > li > a {
    padding: 0.9rem 0.6rem;
    font-size: 0.8rem;
  }

  .nav-search input { width: 120px; }

  .hero { padding: 2.5rem 0 4rem; }

  .hero-layout {
    grid-template-columns: 1fr 1.1fr;
    gap: 2rem;
  }

  .hero-logo { max-width: 180px; }

  .hero-title { font-size: 2.25rem; }

  .action-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; }

  .action-card { padding: 1.5rem 1rem; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   RESPONSIVE - MID SCREENS
   ============================================ */
@media (min-width: 1024px) and (max-width: 1280px) {
  .nav-menu > li > a {
    padding: 0.9rem 0.65rem;
    font-size: 0.82rem;
  }

  .nav-search input { width: 140px; }
}

/* ============================================
   RESPONSIVE - NAV COLLAPSE
   ============================================ */
@media (max-width: 1100px) {
  .nav-container {
    position: relative;
    overflow: visible;
  }

  .nav-logo img { height: 38px; }

  .mobile-menu-toggle { display: block; }

  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 56px);
    left: 0;
    right: 0;
    background: var(--blue-dark);
    flex-direction: column;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active { display: flex; }

  .nav-menu > li > a {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-menu > li.has-submenu > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .nav-menu > li.has-submenu > a::after {
    content: "⌄";
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.8;
    transition: transform var(--transition);
  }

  .nav-menu > li.submenu-open > a {
    background: rgba(255,255,255,0.08);
  }

  .nav-menu > li.submenu-open > a::after {
    transform: rotate(180deg);
  }

  .nav-menu li ul {
    display: none;
    position: static;
    box-shadow: none;
    border-radius: 0;
    background: rgba(0,0,0,0.15);
  }

  .nav-menu li:hover > ul {
    display: none;
  }

  .nav-menu li.submenu-open > ul {
    display: block;
  }

  .nav-menu li ul li a { color: rgba(255,255,255,0.85); }
  .nav-menu li ul li a:hover { background: var(--red); color: var(--white); }

  .nav-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: var(--blue-dark);
    display: none;
  }

  .nav-menu.active ~ .nav-search { display: block; }

  .nav-search input { width: 100%; }
}

/* ============================================
   PUBLIC PAGES - SHARED
   ============================================ */
.page-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 2.5rem 0;
  color: var(--white);
  position: relative;
}
.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}
.page-header p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
}
.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
}
.back-link:hover { color: var(--white); }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-600);
  font-size: 1.05rem;
}
.empty-state .btn { margin-top: 1rem; }

.empty-state-sm {
  color: var(--gray-600);
  font-size: 0.9rem;
  padding: 1rem 0;
}

.btn-dark {
  color: var(--gray-800) !important;
  border-color: var(--gray-300) !important;
}
.btn-dark:hover {
  background: var(--gray-800) !important;
  color: var(--white) !important;
  border-color: var(--gray-800) !important;
}

.result-count {
  color: var(--gray-600);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   STANDINGS
   ============================================ */
.standings-agegroup {
  margin-bottom: 2.5rem;
}
.standings-ag-title {
  font-size: 1.5rem;
  color: var(--blue);
  border-bottom: 3px solid var(--red);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.standings-division {
  margin-bottom: 2rem;
}
.standings-div-title {
  font-size: 1.1rem;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--blue-light);
}
.standings-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.standings-table th {
  background: var(--blue);
  color: var(--white);
  padding: 0.6rem 0.75rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  white-space: nowrap;
}
.standings-table th[rowspan] {
  vertical-align: middle;
}
.standings-table .standings-group-heading {
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  letter-spacing: 0.75px;
}
.standings-table th.col-team,
.standings-table td.col-team { text-align: left; }
.standings-table th.col-rank,
.standings-table td.col-rank { text-align: center; width: 40px; }

.standings-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
}
.standings-table td.col-team {
  text-align: left;
  font-weight: 500;
}
.standings-team-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.standings-team-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  padding: 2px;
}
.standings-team-copy {
  min-width: 0;
}
.standings-table td.col-team a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.standings-table td.col-team a:hover { color: var(--red); }

.standings-table .col-pts { font-weight: 700; }
.standings-table .col-secondary { color: var(--gray-600); font-size: 0.85rem; }

.standings-leader td {
  background: rgba(30, 58, 138, 0.04);
}
.standings-leader td.col-team a { color: var(--blue-dark); }

.team-color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid rgba(0,0,0,0.15);
}
.coach-name {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 400;
}

/* ============================================
   PUBLIC SCHEDULE
   ============================================ */
.schedule-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.month-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.month-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blue);
  min-width: 180px;
  text-align: center;
}
.schedule-filter-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.filter-select {
  padding: 0.45rem 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--white);
  color: var(--gray-800);
}
.filter-select:focus {
  border-color: var(--blue);
  outline: none;
}

/* Calendar grid */
.pub-calendar { margin-bottom: 2rem; overflow-x: clip; overflow-y: visible; }
.cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-day-name {
  padding: 0.5rem;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--white);
  background: var(--blue);
  text-transform: uppercase;
}
.cal-day-name:first-child { border-radius: var(--radius) 0 0 0; }
.cal-day-name:last-child { border-radius: 0 var(--radius) 0 0; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.cal-cell {
  min-height: 100px;
  border-right: 1px solid var(--gray-200);
  border-top: 1px solid var(--gray-200);
  padding: 0.35rem;
  background: var(--white);
  position: relative;
}
.cal-empty { background: var(--gray-100); }
.cal-has-games { background: #fafcff; }

.cal-date {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gray-600);
  padding: 0 0.15rem 0.15rem;
}
.cal-events { display: flex; flex-direction: column; gap: 2px; }

.cal-event {
  background: var(--blue);
  color: var(--white);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 0.65rem;
  line-height: 1.3;
  overflow: hidden;
}
.cal-event-league {
  background: var(--blue);
}
.cal-event-practice {
  background: #16a34a;
}
.cal-event-tournament {
  background: #7c3aed;
}
.cal-event-ool {
  background: #b45309;
}
.cal-event-final {
  opacity: 0.8;
}
.cal-event-time {
  font-weight: 700;
  margin-right: 3px;
}
.cal-event-teams {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.cal-event-score {
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  padding: 0 3px;
  border-radius: 2px;
  margin-left: 3px;
}
.cal-event-field {
  display: block;
  font-size: 0.6rem;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.league-game-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.25rem;
  font-size: 0.8rem;
  line-height: 1;
  vertical-align: -0.08em;
}
.calendar-team-link,
.calendar-field-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.calendar-team-link:hover,
.calendar-field-link:hover {
  color: inherit;
  text-decoration-thickness: 2px;
}
.game-field .calendar-field-link {
  color: var(--blue);
}

/* Schedule list view (mobile-friendly) */
.schedule-list { display: none; }
.schedule-day-group { margin-bottom: 1.25rem; }
.schedule-day-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue);
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--blue);
  margin-bottom: 0.5rem;
}
.schedule-game-row {
  display: grid;
  grid-template-columns: 70px 1fr 150px;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--gray-100);
  align-items: center;
  font-size: 0.9rem;
}
.game-time {
  font-weight: 600;
  color: var(--blue);
  font-size: 0.85rem;
}
.game-matchup .vs {
  color: var(--gray-600);
  margin: 0 0.35rem;
  font-weight: 400;
  font-size: 0.8rem;
}
.game-score-badge {
  display: inline-block;
  background: var(--blue);
  color: var(--white);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}
.game-field {
  color: var(--gray-600);
  font-size: 0.8rem;
  text-align: right;
}

/* ============================================
   TEAM DIRECTORY
   ============================================ */
.directory-controls {
  margin-bottom: 2rem;
}
.filter-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.team-group-title {
  font-size: 1.2rem;
  color: var(--blue);
  border-bottom: 2px solid var(--red);
  padding-bottom: 0.35rem;
  margin: 2rem 0 1rem;
}
.team-group-title:first-of-type { margin-top: 0; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.team-card {
  display: flex;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--gray-800);
}
.team-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--blue-light);
  color: var(--gray-800);
}
.team-card-color {
  width: 6px;
  flex-shrink: 0;
}
.team-card-logo {
  width: 72px;
  flex: 0 0 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0 0.75rem 0.75rem;
}
.team-card-logo img {
  width: 54px;
  height: 54px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  padding: 3px;
}
.team-card-body {
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 0;
}
.team-card-name {
  font-size: 1rem;
  margin-bottom: 0.15rem;
  color: var(--blue);
}
.team-card:hover .team-card-name { color: var(--red); }

.team-card-mascot {
  font-size: 0.8rem;
  color: var(--gray-600);
}
.team-card-meta {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.team-card-division,
.team-card-coach {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* ============================================
   TEAM DETAIL
   ============================================ */
.team-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
}
.detail-card h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}
.detail-card-full {
  grid-column: 1 / -1;
}
.detail-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.detail-label {
  font-weight: 600;
  color: var(--gray-600);
}
.roster-table {
  width: 100%;
  border-collapse: collapse;
}
.roster-table th {
  background: var(--gray-100);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--gray-600);
}
.roster-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}
.roster-actions-cell {
  min-width: 12rem;
}
.roster-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.roster-remove-form {
  display: flex;
  margin: 0;
}
.roster-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  min-height: 2.25rem;
  line-height: 1.2;
  white-space: nowrap;
}
.roster-edit-btn {
  background: transparent;
  color: var(--gray-800);
  border-color: var(--gray-300);
}
.roster-edit-btn:hover {
  background: var(--gray-800);
  color: var(--white);
  border-color: var(--gray-800);
}
.roster-remove-btn {
  background: transparent;
  color: var(--red);
  border-color: rgba(196, 30, 58, 0.45);
}
.roster-remove-btn:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.jersey-num {
  width: 40px;
  font-weight: 700;
  color: var(--blue);
}
.team-page-content {
  max-width: 960px;
}
.team-page-html {
  padding: 0.5rem 0;
  line-height: 1.65;
}
.team-page-html h2,
.team-page-html h3,
.team-page-html h4 {
  font-family: var(--font-heading);
  color: var(--blue);
  margin: 1.25rem 0 0.6rem;
}
.team-page-html p,
.team-page-html ul,
.team-page-html ol,
.team-page-html blockquote,
.team-page-html table,
.team-page-html figure {
  margin-bottom: 1rem;
}
.team-page-html img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.team-page-html figure {
  max-width: 100%;
}
.team-page-html figcaption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.team-page-html table {
  width: 100%;
  border-collapse: collapse;
}
.team-page-html th,
.team-page-html td {
  border: 1px solid var(--gray-200);
  padding: 0.5rem;
  vertical-align: top;
}
.game-result {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}
.game-result-w { background: #dcfce7; color: #166534; }
.game-result-l { background: #fef2f2; color: #991b1b; }
.game-result-t { background: #fef9c3; color: #854d0e; }

/* ============================================
   TEAM HUB PAGE
   ============================================ */

/* Hero Section */
.team-hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 2.5rem 0 2rem;
  color: var(--white);
}
.team-hero .back-link {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.team-hero .back-link:hover { color: #fff; }
.team-hero-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.team-hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,0.3);
}
.team-hero-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.team-hero-info h1 {
  font-size: 2rem;
  margin-bottom: 0.1rem;
  line-height: 1.15;
}
.team-hero-mascot {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  margin: 0;
}
.team-hero-meta {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.team-hero-record { margin-top: 0.5rem; }
.record-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.team-hero-coach {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-top: 0.35rem;
}

/* Tab Navigation */
.team-tabs {
  display: flex;
  gap: 0;
  border-bottom: 3px solid var(--gray-200);
  margin-bottom: 1.5rem;
}
.team-tab {
  padding: 0.75rem 1.25rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-600);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.team-tab:hover {
  color: var(--blue);
}
.team-tab-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* Tab Content Panels */
.team-tab-content { display: none; }
.team-tab-content-active { display: block; }
.show-mobile-only { display: none; }
.ical-subscribe-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.ical-subscribe-link::before { content: "\1F4C5 "; }
.ical-subscribe-link:hover { text-decoration: underline; }

/* Schedule Row Game Types */
.sched-league { background: rgba(37, 99, 235, 0.06); }
.sched-event { background: rgba(22, 163, 74, 0.08); }
.sched-tournament { background: rgba(124, 58, 237, 0.06); }

/* Game Upcoming Badge */
.game-upcoming {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
}

/* Mobile Game Field Action Links */
.game-field-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.field-link-btn {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  background: var(--blue);
  color: var(--white);
}
.field-link-btn:hover {
  opacity: 0.85;
}
button.field-notes-btn {
  border: none;
  cursor: pointer;
}
.game-field-notes {
  margin-top: 0.4rem;
  padding: 0.5rem 0.65rem;
  background: var(--gray-100);
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--gray-700, #374151);
}

/* Team Calendar Overrides */
.team-calendar .cal-event {
  border-left-color: var(--blue);
}

/* Calendar Event Popup */
.cal-event-wrap {
  position: relative;
}
.cal-popup {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  background: var(--blue-dark, #1e3a5f);
  color: var(--white);
  border-radius: 8px;
  padding: 0.85rem 1rem 0.85rem;
  margin-bottom: 8px;
  width: max-content;
  min-width: 220px;
  max-width: min(300px, 90vw);
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
}
/* Keep popup from overflowing viewport edges */
.cal-cell:last-child .cal-popup,
.cal-cell:nth-child(7n) .cal-popup {
  left: auto;
  right: 0;
  transform: none;
}
.cal-cell:first-child .cal-popup,
.cal-cell:nth-child(7n+1) .cal-popup {
  left: 0;
  right: auto;
  transform: none;
}
/* Invisible bridge to keep hover alive across the gap */
.cal-popup::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 16px;
}
.cal-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--blue-dark, #1e3a5f);
}
.cal-event-wrap:hover .cal-popup {
  display: block;
}
.cal-popup-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.cal-popup-row {
  margin: 0.3rem 0;
  font-size: 0.85rem;
}
.cal-popup-links {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.cal-popup-links a {
  color: #93c5fd;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.cal-popup-links a:hover {
  color: #fff;
  text-decoration: underline;
}
/* Flip popup below when in top two rows of calendar */
.cal-grid > .cal-cell:nth-child(-n+14) .cal-popup {
  bottom: auto;
  top: 100%;
  margin-bottom: 0;
  margin-top: 8px;
}
.cal-grid > .cal-cell:nth-child(-n+14) .cal-popup::before {
  top: auto;
  bottom: 100%;
  height: 16px;
}
.cal-grid > .cal-cell:nth-child(-n+14) .cal-popup::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--blue-dark, #1e3a5f);
}

/* Team Roster Count */
.team-roster-count {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--gray-600);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* Team Page Content */
.team-page-content h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}

/* Team Ads Bar */
.team-ads-bar {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.team-ad-link { display: block; max-width: 300px; }
.team-ad-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.team-ad-link:hover .team-ad-img { box-shadow: var(--shadow-md); }

/* Team Calendar: hide mobile list by default, show calendar */
.team-schedule-list { display: none; }

/* ============================================
   FIELDS PAGE
   ============================================ */
/* Fields search bar */
.fields-search-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.fields-search-bar .filter-input {
  flex: 1;
  max-width: 400px;
}
.fields-count {
  font-size: 0.85rem;
  color: var(--gray-500);
  white-space: nowrap;
}

/* Fields table */
.fields-table th.sortable { user-select: none; }
.fields-table th.sortable:hover { color: var(--blue); }
.sort-arrow {
  font-size: 0.65rem;
  margin-left: 0.25rem;
  opacity: 0.6;
}
.field-name-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.field-notes-toggle {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 3px;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
}
.field-notes-toggle:hover,
.field-notes-toggle.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.field-notes-row td {
  background: var(--gray-50);
  padding: 0.75rem 1rem !important;
}
.field-notes-content {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}
.fields-no-results {
  text-align: center;
  color: var(--gray-500);
  padding: 2rem 0;
}
.field-row-highlight {
  animation: fieldHighlight 2s ease;
}
@keyframes fieldHighlight {
  0%, 30% { background: rgba(37, 99, 235, 0.1); }
  100% { background: transparent; }
}

/* ============================================
   TRYOUTS PAGE
   ============================================ */
.tryout-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.tryout-groups {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.tryout-age-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tryout-age-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 3px solid var(--red);
  padding-bottom: 0.6rem;
}
.tryout-age-header h2 {
  font-size: 1.55rem;
  color: var(--blue);
  margin: 0;
}
.tryout-age-header span {
  color: var(--gray-600);
  font-weight: 700;
  white-space: nowrap;
}
.tryout-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.tryout-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.tryout-card-header h3 {
  font-size: 1.1rem;
  color: var(--blue);
}
.tryout-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tryout-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--blue);
  color: var(--white);
}
.tryout-tag-ag {
  background: var(--red);
}
.tryout-card-body {
  padding: 1.25rem 1.5rem;
}
.tryout-detail {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--gray-800);
}
.tryout-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.5rem 1rem;
  font-size: 0.92rem;
  color: var(--gray-800);
}
.tryout-content {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--gray-800);
}
.tryout-card-footer {
  padding: 0.75rem 1.5rem;
  background: var(--gray-100);
  font-size: 0.85rem;
  color: var(--gray-600);
}
.tryout-card-footer a { font-weight: 500; }

/* ============================================
   TOURNAMENTS PAGE
   ============================================ */
.tournament-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}
.tournament-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.tournament-card-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.tournament-card-header h3 {
  font-size: 1rem;
  color: var(--white);
}
.tournament-card-body {
  padding: 1rem 1.25rem;
}
.tournament-details {
  margin-bottom: 0.75rem;
}
.tournament-detail {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--gray-800);
}
.tournament-link {
  display: inline-block;
}

/* ============================================
   STATIC CONTENT PAGES
   ============================================ */
.static-content {
  max-width: 800px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-800);
}
.static-content h3 {
  font-size: 1.2rem;
  color: var(--blue);
  margin: 1.5rem 0 0.5rem;
}
.static-content h4 {
  font-size: 1rem;
  color: var(--gray-800);
  margin: 1.25rem 0 0.35rem;
}
.static-content ul {
  margin: 0.5rem 0 1rem 1.5rem;
}
.static-content ul li {
  margin-bottom: 0.35rem;
}
.static-content p {
  margin-bottom: 0.75rem;
}
.static-content a { font-weight: 500; }

/* FAQ items */
.faq-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

/* Affiliations grid */
.affiliations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.affiliation-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.affiliation-item h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--blue);
}

/* Article list */
.article-list { display: flex; flex-direction: column; gap: 1rem; }
.article-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.article-item h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--blue);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.contact-card h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 1rem;
}
.contact-card h4 {
  font-size: 0.95rem;
  color: var(--gray-800);
  margin: 1rem 0 0.35rem;
}
.contact-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.contact-card ul {
  margin: 0.5rem 0 0 1.25rem;
  font-size: 0.9rem;
}
.contact-card ul li { margin-bottom: 0.3rem; }
.contact-detail {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}
.contact-detail svg {
  flex-shrink: 0;
  color: var(--blue);
  margin-top: 2px;
}
.contact-routing {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-routing li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}

.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.contact-form-wrap h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 1.25rem;
}
.contact-form .form-group {
  margin-bottom: 1rem;
}
.contact-form label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-800);
  margin-bottom: 0.3rem;
}
.contact-form .required { color: var(--red); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: var(--off-white);
  color: var(--gray-800);
  transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  outline: none;
  background: var(--white);
}
.contact-form textarea { resize: vertical; }
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Flash messages */
.flash {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.flash-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.flash-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ============================================
   REGISTRATION PAGE
   ============================================ */
.registration-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2rem;
}
.registration-info { display: flex; flex-direction: column; gap: 1.25rem; }
.registration-form-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.registration-form-wrap h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 1.25rem;
}

/* Penalties public page */
.penalty-badge {
  display: inline-block;
  background: #fef2f2;
  color: #991b1b;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ============================================
   STORE & CART
   ============================================ */
.store-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.store-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.store-card-body {
  padding: 1.25rem;
  flex: 1;
}
.store-card-body h3 {
  font-size: 1.05rem;
  color: var(--blue);
  margin-bottom: 0.35rem;
}
.store-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 0.5rem;
}
.store-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}
.store-card-footer {
  padding: 0.75rem 1.25rem;
  background: var(--gray-100);
  border-top: 1px solid var(--gray-200);
}
.store-add-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.qty-input {
  width: 60px;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  text-align: center;
}
.qty-input:focus {
  border-color: var(--blue);
  outline: none;
}

/* Cart */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
.cart-item-info { flex: 1; }
.cart-item-info h4 {
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 0.15rem;
}
.cart-item-price {
  font-size: 0.85rem;
  color: var(--gray-600);
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-qty-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-remove {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--gray-600);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.btn-remove:hover { color: var(--red); }
.cart-item-total {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #166534;
  min-width: 80px;
  text-align: right;
}
.cart-summary-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 80px;
}
.cart-summary-card h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 1rem;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  margin-top: 0.5rem;
  border-top: 2px solid var(--gray-200);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}
.cart-checkout-btn {
  width: 100%;
  margin-top: 1rem;
}
.cart-note {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.75rem;
  line-height: 1.4;
}
.cart-note p {
  margin: 0;
}

/* Orders list */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.order-row {
  display: grid;
  grid-template-columns: 120px 1fr 100px 100px;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--gray-800);
  align-items: center;
  transition: all var(--transition);
}
.order-row:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow-sm);
  color: var(--gray-800);
}
.order-id {
  font-weight: 700;
  color: var(--blue);
}
.order-date {
  color: var(--gray-600);
  font-size: 0.9rem;
}
.order-total {
  font-weight: 700;
  color: #166534;
  text-align: right;
}
.order-status { text-align: right; }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.status-paid { background: #dcfce7; color: #166534; }
.status-unpaid { background: #fef9c3; color: #854d0e; }

/* Order detail */
.order-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
.order-items-card,
.order-status-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.order-items-card h3,
.order-status-card h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 1rem;
}
.order-status-badge {
  margin-bottom: 1rem;
}
.order-status-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-top: 0.5rem;
}

/* ============================================
   PUBLIC PAGES RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .page-header { padding: 1.5rem 0; }
  .page-header h1 { font-size: 1.5rem; }

  .schedule-controls { flex-direction: column; align-items: stretch; }
  .month-nav { justify-content: center; }
  .schedule-filter-form { justify-content: center; }

  .pub-calendar { display: none; }
  .schedule-list { display: block; }
  .schedule-game-row {
    grid-template-columns: 60px 1fr;
    gap: 0.5rem;
  }
  .game-field { text-align: left; grid-column: 1 / -1; }

  .team-detail-grid { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
  .detail-card { padding: 1rem; }
  .detail-card h3 { font-size: 1rem; margin-bottom: 0.75rem; }
  .detail-card-full { margin-bottom: 0.5rem; }
  .detail-row { font-size: 0.85rem; }
  .roster-table th, .roster-table td { padding: 0.35rem 0.5rem; font-size: 0.85rem; }

  /* Team Hub Mobile */
  .team-hero { padding: 1.5rem 0 1.25rem; }
  .team-hero-content { flex-direction: column; text-align: center; gap: 1rem; }
  .team-hero-logo { width: 80px; height: 80px; border-radius: 12px; }
  .team-hero-info h1 { font-size: 1.4rem; }
  .record-badge { font-size: 0.9rem; }
  .team-tabs { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .team-tab { padding: 0.6rem 0.9rem; font-size: 0.8rem; }
  .team-calendar { display: none; }
  .team-schedule-list { display: block; }
  .team-ads-bar { gap: 0.75rem; }
  .team-ad-link { max-width: 200px; }
  .game-upcoming { font-size: 0.7rem; padding: 0.1rem 0.35rem; }
  .standings-table-wrap { margin: 0 -1rem; width: calc(100% + 2rem); }
  .standings-table th { padding: 0.5rem 0.5rem; font-size: 0.7rem; }
  .standings-table td { padding: 0.45rem 0.5rem; font-size: 0.8rem; }
  .standings-team-cell { gap: 0.45rem; }
  .standings-team-logo {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 7px;
  }
  .team-card-logo {
    width: 60px;
    flex-basis: 60px;
    padding-left: 0.6rem;
  }
  .team-card-logo img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }
  .col-hide-mobile { display: none; }
  .show-mobile-only { display: inline; }
  .team-schedule-mobile-field {
    display: block;
    margin-top: 0.25rem;
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
  }
  .team-schedule-mobile-field a {
    font-weight: 600;
  }
  .game-result { font-size: 0.7rem; padding: 0.1rem 0.35rem; white-space: nowrap; }

  .team-grid { grid-template-columns: 1fr; }
  .fields-search-bar { flex-direction: column; align-items: stretch; }
  .fields-search-bar .filter-input { max-width: 100%; }
  .field-name-cell { flex-wrap: wrap; }
  .tournament-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .registration-layout { grid-template-columns: 1fr; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .affiliations-grid { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: 1fr 1fr; }
  .order-detail-layout { grid-template-columns: 1fr; }

  .standings-table .col-secondary { display: none; }
}

/* ============================================
   COACH DASHBOARD
   ============================================ */

.coach-dashboard-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 2.5rem 0 3rem;
}

.coach-dashboard-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 170px;
}

.coach-dashboard-logo {
  flex: 0 0 auto;
  width: 160px;
  height: 160px;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.35);
  border-radius: 20px;
  background: rgba(255,255,255,0.14);
}

.coach-dashboard-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.coach-dashboard-info {
  min-width: 0;
}

.coach-dashboard-info h1,
.coach-dashboard-info p {
  overflow-wrap: anywhere;
}

.coach-dashboard-info h1 {
  font-size: 3rem;
  line-height: 1.05;
  margin-bottom: 0.65rem;
}

.coach-dashboard-meta {
  color: rgba(255,255,255,0.72);
  font-size: 1.25rem;
  margin: 0 0 0.65rem;
}

.coach-dashboard-record {
  margin: 0 0 0.9rem;
}

.coach-dashboard-record .record-badge {
  background: rgba(255,255,255,0.18);
  border-radius: 7px;
  font-size: 1.4rem;
  padding: 0.45rem 0.9rem;
}

.coach-dashboard-coach {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  margin: 0;
}

/* Team Picker */
.coach-team-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.coach-team-picker label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

/* Coach Dashboard Calendar */
.coach-calendar-section {
  margin-bottom: 2rem;
}

.coach-calendar-titlebar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-border);
}

.coach-calendar-titlebar h2 {
  border-bottom: none;
  margin-bottom: 0.15rem;
  padding-bottom: 0;
}

.coach-calendar-titlebar p {
  color: var(--medium-gray);
  font-size: 0.9rem;
  margin: 0;
}

.coach-calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.coach-calendar-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.coach-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.coach-calendar-nav h3 {
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  min-width: 13rem;
  text-align: center;
}

.coach-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--gray-200);
}

.coach-calendar-dayname {
  background: var(--blue);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.25rem;
  text-align: center;
  text-transform: uppercase;
}

.coach-calendar-day {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  min-height: 8rem;
  min-width: 0;
  padding: 0.4rem;
}

.coach-calendar-day:nth-child(7n + 14) {
  border-right: none;
}

.coach-calendar-day.empty {
  background: var(--gray-100);
}

.coach-calendar-day.has-items {
  background: #f8fbff;
}

.coach-calendar-daytop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.coach-calendar-date {
  color: var(--gray-700);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
}

.coach-calendar-day-actions {
  display: flex;
  gap: 0.25rem;
}

.coach-calendar-day-actions a {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  color: var(--blue);
  display: inline-flex;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  height: 1.25rem;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 1.25rem;
}

.coach-calendar-day-actions a:hover,
.coach-calendar-day-actions a:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  outline: none;
}

.coach-calendar-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.coach-calendar-event,
.coach-calendar-more {
  border-radius: 4px;
  color: var(--white);
  display: block;
  font-size: 0.66rem;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  padding: 0.25rem 0.35rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coach-calendar-event span {
  font-weight: 800;
  margin-right: 0.25rem;
}

.coach-calendar-event strong {
  background: rgba(255, 255, 255, 0.24);
  border-radius: 3px;
  margin-left: 0.25rem;
  padding: 0 0.25rem;
}

.coach-calendar-event.game {
  background: var(--blue);
}

.coach-calendar-event.event {
  background: #15803d;
}

.coach-calendar-event.ool {
  background: #b45309;
}

.coach-calendar-more {
  background: var(--gray-200);
  color: var(--gray-700);
  font-weight: 700;
}

.coach-calendar-agenda {
  display: none;
  padding: 1rem;
}

.coach-calendar-agenda p {
  color: var(--medium-gray);
  margin: 0;
}

.coach-calendar-agenda-item {
  align-items: flex-start;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  padding: 0.75rem 0;
  text-decoration: none;
}

.coach-calendar-agenda-item:last-child {
  border-bottom: none;
}

.coach-calendar-agenda-date {
  color: var(--blue);
  font-family: var(--font-heading);
  font-weight: 800;
}

.coach-calendar-agenda-item strong {
  display: block;
  font-size: 0.92rem;
}

.coach-calendar-agenda-item small {
  color: var(--medium-gray);
  display: block;
  margin-top: 0.15rem;
}

/* Requirements Checklist */
.coach-section {
  margin-bottom: 2rem;
}
.coach-section h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-border);
}
.req-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.req-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #fef3f3;
  border: 1px solid #f5c6c6;
  font-size: 0.95rem;
}
.req-item.req-done {
  background: #f0faf0;
  border-color: #b8e6b8;
}
.req-icon {
  font-size: 1.2rem;
  font-weight: 700;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.req-item.req-done .req-icon { color: #2d8a2d; }
.req-item.req-pending .req-icon { color: #cc3333; }
.req-label {
  flex: 1;
  min-width: 0;
}
.req-item .btn { margin-left: auto; flex-shrink: 0; }

/* Team Logo Section */
.team-logo-section {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}
.team-logo-preview {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 2px solid var(--light-border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}
.team-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.team-logo-placeholder {
  color: #aaa;
  font-size: 0.85rem;
  font-weight: 600;
}
.team-logo-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.logo-upload-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.logo-upload-form input[type="file"] {
  font-size: 0.85rem;
  max-width: 100%;
}
.team-logo-display {
  max-width: 200px;
  margin: 1rem auto;
  text-align: center;
}
.team-logo-display img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* Quick Links Grid */
.coach-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.coach-link-card {
  display: block;
  background: var(--white);
  border: 2px solid var(--light-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--dark-gray);
  transition: all 0.2s;
}
.coach-link-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.coach-link-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.coach-link-card h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--primary);
}
.coach-link-card p {
  font-size: 0.85rem;
  color: var(--medium-gray);
  margin: 0;
}

/* Coach Forms */
.coach-form {
  max-width: 800px;
}
.form-section {
  margin-bottom: 2rem;
}
.form-section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-gray);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-border);
}
.form-heading-note {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--medium-gray);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.form-grid[hidden] {
  display: none !important;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark-gray);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--light-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 26,54,93), 0.1);
}

.form-group input.field-format-invalid,
input.field-format-invalid {
  border-color: var(--red, #cf1f3f);
  box-shadow: 0 0 0 3px rgba(207, 31, 63, 0.12);
}

.field-format-message {
  color: var(--red, #cf1f3f);
  font-size: 0.78rem;
  line-height: 1.3;
  margin-top: 0.25rem;
}

.fp-editor-shell {
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.fp-editor-shell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.fp-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.fp-editor-toolbar button,
.fp-editor-toolbar select,
.fp-color-control {
  min-height: 34px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: var(--white);
  color: var(--gray-800);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.82rem;
}

.fp-editor-toolbar button {
  min-width: 34px;
  padding: 0.35rem 0.55rem;
  line-height: 1;
  cursor: pointer;
}

.fp-editor-toolbar button:hover,
.fp-editor-toolbar button.is-active {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef2ff;
}

.fp-editor-toolbar select {
  width: auto !important;
  max-width: none;
  flex: 0 1 auto;
  padding: 0.35rem 0.6rem;
}

.fp-editor-toolbar .fp-font-family-select {
  min-width: 170px;
  flex-basis: 220px;
}

.fp-editor-toolbar .fp-font-size-select {
  min-width: 90px;
  flex-basis: 110px;
}

.fp-color-control {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.25rem 0.45rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-800);
  font-weight: 600;
}

.form-group .fp-color-control {
  text-transform: none;
  letter-spacing: 0;
  color: var(--gray-800);
}

.fp-color-control input {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
}

.fp-align-icon {
  display: grid;
  gap: 3px;
  width: 18px;
}

.fp-align-icon i {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.fp-align-left i:nth-child(2) { width: 70%; }
.fp-align-left i:nth-child(3) { width: 45%; }
.fp-align-center i:nth-child(2) { width: 70%; margin-inline: auto; }
.fp-align-center i:nth-child(3) { width: 45%; margin-inline: auto; }
.fp-align-right i:nth-child(2) { width: 70%; margin-left: auto; }
.fp-align-right i:nth-child(3) { width: 45%; margin-left: auto; }
.fp-align-justify i { width: 100%; }

.fp-editor-content {
  min-height: 360px;
  padding: 1rem;
  color: var(--gray-800);
  line-height: 1.7;
}

.fp-editor-content .ProseMirror {
  min-height: 330px;
  outline: none;
}

.fp-editor-content p {
  margin: 0 0 0.75rem;
}

.fp-editor-content img,
.fp-editor-content video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.75rem 0;
}

.fp-editor-status {
  min-height: 1.2rem;
  margin: 0;
  padding: 0 1rem 0.75rem;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.fp-editor-status-ok { color: #15803d; }
.fp-editor-status-error { color: var(--red); }
.fp-editor-status-pending { color: var(--blue); }

textarea.fp-editor-source {
  display: none;
}
.form-group-wide {
  grid-column: span 2;
}
.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--light-border);
}

.coach-password-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-top: 2rem;
  padding: 1.5rem;
}

.coach-password-card .form-section {
  margin-bottom: 0;
}

.coach-password-card .form-actions {
  margin-top: 1rem;
}

.coach-password-grid {
  grid-template-columns: 1fr 1fr;
}

.team-page-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}

.team-page-editor-card {
  max-width: none;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.team-page-editor-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.team-page-help-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.team-page-help-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--blue);
}

.team-page-help-card p {
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.45;
}

.team-page-logo-card .team-logo-section {
  flex-direction: column;
  gap: 1rem;
}

.team-page-logo-card .team-logo-preview {
  width: 100%;
  max-width: 180px;
  height: auto;
  aspect-ratio: 1;
}

.team-page-logo-card .logo-upload-form {
  align-items: flex-start;
}

.team-page-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem 0.5rem;
}

.team-page-image-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.35rem;
}

.team-page-image-thumb {
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 1;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  overflow: hidden;
  background: var(--gray-100);
  cursor: pointer;
  appearance: none;
}

.team-page-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-page-image-thumb:focus-visible {
  outline: 3px solid rgba(35, 64, 145, 0.35);
  outline-offset: 2px;
}

.team-page-image-delete-form {
  margin: 0;
}

.team-page-image-delete {
  width: 100%;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  background: #fff1f2;
  color: var(--red);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.25rem;
}

.team-page-image-delete:hover,
.team-page-image-delete:focus-visible {
  background: var(--red);
  color: var(--white);
  outline: none;
}

/* Coach note/help text */
.coach-note {
  background: #f0f4f8;
  border: 1px solid #d0dbe8;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--dark-gray);
}
.coach-note p { margin: 0; }

.coach-dashboard-notices {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.coach-dashboard-notice {
  position: relative;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  color: var(--gray-800);
  padding: 1rem 3rem 1rem 1.25rem;
}

.coach-dashboard-notice h3 {
  color: var(--blue);
  font-size: 1rem;
  margin: 0 0 0.45rem;
}

.coach-dashboard-notice-body {
  font-size: 0.95rem;
  line-height: 1.55;
}

.coach-dashboard-notice-body p:last-child {
  margin-bottom: 0;
}

.coach-dashboard-notice-close {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(30, 58, 138, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--blue);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.coach-dashboard-notice-close:hover,
.coach-dashboard-notice-close:focus-visible {
  background: var(--blue);
  color: var(--white);
  outline: none;
}

.coach-background-page .form-section {
  margin-bottom: 2rem;
}

.background-status-card {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 5px solid var(--red);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
}

.background-status-card.is-complete {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: #16a34a;
}

.background-status-card.is-missing {
  background: #fff7f7;
  border-color: #fecaca;
  border-left-color: var(--red);
}

.background-status-label {
  color: var(--gray-600);
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.background-status-card strong {
  color: var(--dark);
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1.2;
}

.background-status-card p {
  color: var(--gray-600);
  margin: 0.35rem 0 0;
}

.background-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.background-base-logo {
  display: block;
  margin: 0 auto 1.5rem;
  max-width: 500px;
  width: 100%;
}

.background-instructions {
  color: var(--dark);
  font-size: 0.98rem;
  line-height: 1.65;
}

.background-instructions p {
  margin-bottom: 1rem;
}

.background-instructions ol {
  margin: 0.75rem 0 1rem 1.25rem;
  padding-left: 1rem;
}

.background-instructions li {
  margin-bottom: 0.45rem;
}

/* Score Entry */
.score-entry-grid {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin: 1rem 0;
}
.score-team {
  text-align: center;
}
.score-team label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--dark-gray);
}
.score-input {
  width: 80px;
  height: 60px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border: 2px solid var(--light-border);
  border-radius: 8px;
}
.score-input:focus {
  border-color: var(--primary);
  outline: none;
}
.score-vs {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--medium-gray);
  padding-top: 1.5rem;
}

/* Pitching Rows */
.pitching-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.pitcher-select {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--light-border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: var(--font-body);
}
.pitch-count-input {
  width: 90px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--light-border);
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}

/* OOL Tag */
.ool-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: #6c757d;
  color: white;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.35rem;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Result Badge */
.result-badge {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
}
.result-W { background: #2d8a2d; }
.result-L { background: #cc3333; }
.result-T { background: #c9a800; }

/* Coach games: desktop table plus compact mobile game rows. */
.coach-games-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.coach-games-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  font-size: 0.86rem;
  word-break: normal;
}

.coach-games-table th {
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
}

.coach-games-table td {
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  border-bottom: 1px solid var(--gray-100);
}

.coach-games-table tbody tr:nth-child(even) {
  background: var(--off-white);
}

.coach-games-table tbody tr:hover {
  background: #eef2ff;
}

.coach-games-table .coach-game-date {
  min-width: 6.5rem;
}

.coach-games-table .coach-game-time {
  min-width: 4.75rem;
  font-variant-numeric: tabular-nums;
}

.coach-games-table .coach-game-opponent {
  min-width: 13rem;
  max-width: 17rem;
  white-space: normal;
  overflow-wrap: break-word;
}

.coach-games-table .coach-game-field {
  min-width: 12rem;
  max-width: 17rem;
  white-space: normal;
  overflow-wrap: break-word;
}

.coach-games-table .coach-game-score,
.coach-games-table .coach-game-result {
  min-width: 5rem;
  text-align: center;
}

.coach-games-table .coach-game-actions {
  min-width: 8.5rem;
  text-align: center;
}

.coach-games-table .btn {
  white-space: nowrap;
}

.coach-games-compact-list {
  display: none;
}

@media (max-width: 768px) {
  .coach-games-table-wrap {
    display: none;
  }

  .coach-games-compact-list {
    display: grid;
    gap: 0.55rem;
    margin: 0 -0.25rem;
  }

  .coach-game-compact-row {
    display: grid;
    grid-template-columns: 4.7rem minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    padding: 0.62rem 0.65rem;
  }

  .coach-game-compact-row:nth-child(even) {
    background: var(--off-white);
  }

  .coach-game-compact-when {
    color: var(--gray-700);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
  }

  .coach-game-compact-when strong,
  .coach-game-compact-when span {
    display: block;
    white-space: nowrap;
  }

  .coach-game-compact-when strong {
    font-size: 0.84rem;
    font-weight: 600;
  }

  .coach-game-compact-when span {
    color: var(--gray-600);
    font-size: 0.72rem;
    margin-top: 0.18rem;
  }

  .coach-game-compact-main {
    min-width: 0;
  }

  .coach-game-compact-opponent {
    color: var(--gray-800);
    font-size: 0.86rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .coach-game-compact-field {
    color: var(--gray-600);
    font-size: 0.72rem;
    line-height: 1.25;
    margin-top: 0.18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .coach-game-compact-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.32rem;
    min-width: 4.7rem;
  }

  .coach-game-compact-score {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    color: var(--gray-800);
    font-size: 0.78rem;
    line-height: 1;
    white-space: nowrap;
  }

  .coach-game-compact-score span:not(.result-badge) {
    color: var(--gray-600);
    font-size: 0.68rem;
    font-weight: 600;
  }

  .coach-game-compact-score .result-badge {
    width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 0.72rem;
  }

  .coach-game-compact-status .btn-sm {
    min-width: 4.4rem;
    padding: 0.34rem 0.55rem;
    font-size: 0.72rem;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .coach-game-compact-row {
    grid-template-columns: 4.35rem minmax(0, 1fr) 4.45rem;
    gap: 0.45rem;
    padding: 0.56rem 0.55rem;
  }

  .coach-game-compact-when strong,
  .coach-game-compact-opponent {
    font-size: 0.8rem;
  }

  .coach-game-compact-status {
    min-width: 0;
  }
}

/* Upload Inline */
.upload-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.upload-inline input[type="file"] {
  font-size: 0.8rem;
  max-width: 200px;
}
.doc-actions {
  min-width: 300px;
}

.insurance-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.insurance-upload-form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.insurance-upload-form input[type="file"] {
  max-width: 15rem;
  min-width: 0;
  font-size: 0.85rem;
}

.insurance-status-table td,
.insurance-orders-table td {
  vertical-align: middle;
}

.insurance-view-actions {
  margin-bottom: 1rem;
}

.insurance-viewer-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.insurance-proof-frame {
  border: 0;
  display: block;
  height: min(78vh, 900px);
  min-height: 520px;
  width: 100%;
}

.insurance-proof-image {
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
}

.document-view-actions {
  margin-bottom: 1rem;
}

.document-viewer-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.document-proof-frame {
  border: 0;
  display: block;
  height: min(78vh, 900px);
  min-height: 520px;
  width: 100%;
}

/* Coach document/certificate tables */
.coach-cert-page .coach-note {
  margin-bottom: 2rem;
}

.coach-cert-page .form-section {
  margin-bottom: 2.5rem;
}

.coach-cert-page .form-section h3 {
  margin-bottom: 1.25rem;
}

.coach-cert-table-wrap {
  overflow-x: auto;
}

.coach-cert-table {
  table-layout: fixed;
}

.coach-cert-table .cert-col-coach { width: 24%; }
.coach-cert-table .cert-col-status { width: 16%; }
.coach-cert-table .cert-col-date { width: 17%; }
.coach-cert-table .cert-col-actions { width: 43%; }

.coach-cert-table th,
.coach-cert-table td {
  vertical-align: middle;
}

.coach-cert-table td {
  padding: 0.9rem 1rem;
}

.coach-cert-table .cert-coach {
  text-align: left;
  padding-left: 3.5rem;
}

.coach-cert-table .cert-status,
.coach-cert-table .cert-date,
.coach-cert-table .cert-actions-cell {
  text-align: center;
}

.cert-actions {
  display: grid;
  grid-template-columns: 6.5rem minmax(15rem, 17rem) 7rem;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.4rem;
}

.cert-actions .btn {
  min-width: 6.5rem;
  justify-self: center;
}

.cert-upload-form {
  display: contents;
}

.cert-upload-form input[type="file"] {
  width: 100%;
  max-width: 17rem;
  justify-self: center;
  font-size: 0.85rem;
}

.cert-upload-form .btn {
  min-width: 7rem;
}

.cert-action-placeholder {
  display: block;
  width: 6.5rem;
  height: 1px;
}

.coach-contract-page .coach-note {
  margin: 0 0 1.5rem;
}

.coach-contract-head-table .contract-col-coach { width: 34%; }
.coach-contract-head-table .contract-col-status { width: 33%; }
.coach-contract-head-table .contract-col-action { width: 33%; }

.coach-contract-assistant-table .contract-col-assistant { width: 32%; }
.coach-contract-assistant-table .contract-col-email { width: 34%; }
.coach-contract-assistant-table .contract-col-status-sm { width: 18%; }
.coach-contract-assistant-table .contract-col-code { width: 16%; }

.coach-contract-page .contract-action-cell,
.coach-contract-page .contract-email,
.coach-contract-page .contract-code {
  text-align: center;
}

.coach-contract-page .contract-email {
  overflow-wrap: anywhere;
}

.coach-contract-page .contract-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.contract-complete {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  color: var(--gray-800);
}

@media (max-width: 1200px) {
  .coach-cert-page .coach-cert-table-wrap {
    overflow: visible;
  }
  .coach-cert-page .coach-cert-table,
  .coach-cert-page .coach-contract-head-table,
  .coach-cert-page .coach-contract-assistant-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
  }
  .coach-cert-page .coach-cert-table colgroup,
  .coach-cert-page .coach-cert-table thead {
    display: none;
  }
  .coach-cert-page .coach-cert-table tbody,
  .coach-cert-page .coach-cert-table tr,
  .coach-cert-page .coach-cert-table td {
    display: block;
    width: 100%;
  }
  .coach-cert-page .coach-cert-table tr {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    overflow: hidden;
  }
  .coach-cert-page .coach-cert-table td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 35%) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
  }
  .coach-cert-page .coach-cert-table td:last-child {
    border-bottom: none;
  }
  .coach-cert-page .coach-cert-table td::before {
    content: attr(data-label);
    color: var(--gray-600);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
  }
  .coach-cert-page .coach-cert-table .cert-coach,
  .coach-cert-page .coach-cert-table .cert-status,
  .coach-cert-page .coach-cert-table .cert-date,
  .coach-cert-page .coach-cert-table .cert-actions-cell,
  .coach-cert-page.coach-contract-page .contract-action-cell,
  .coach-cert-page.coach-contract-page .contract-email,
  .coach-cert-page.coach-contract-page .contract-code {
    text-align: left;
    padding-left: 1rem;
  }
  .coach-cert-page .cert-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.65rem;
    min-width: 0;
    width: 100%;
  }
  .coach-cert-page .cert-actions .btn,
  .coach-cert-page .cert-upload-form .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .coach-cert-page .cert-upload-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    width: 100%;
  }
  .coach-cert-page .cert-upload-form input[type="file"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 0.85rem;
  }
  .coach-cert-page .cert-action-placeholder {
    display: none;
  }
  .coach-contract-page .contract-complete {
    justify-content: flex-start;
    min-height: 0;
  }
}

/* Contract Progress */
.contract-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contract-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--light-border);
  border-radius: 5px;
  overflow: hidden;
}
.contract-progress-fill {
  height: 100%;
  background: #2d8a2d;
  border-radius: 5px;
  transition: width 0.3s;
}
.contract-progress span {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.player-contract-email-form {
  margin-top: 1.5rem;
}

.player-contract-table .contract-recipient-list {
  display: grid;
  gap: 0.45rem;
}

.contract-recipient {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.35;
}

.contract-recipient input {
  margin-top: 0.2rem;
}

.contract-email-panel {
  margin-top: 1.5rem;
  border: 1px solid var(--light-border);
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
}

.contract-email-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contract-email-panel h2 {
  font-family: var(--font-heading);
  color: var(--primary-blue);
  margin: 0 0 0.25rem;
}

.contract-email-panel p {
  margin: 0;
  color: var(--gray-600);
}

.contract-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  white-space: nowrap;
}

.contract-email-body {
  width: 100%;
  min-height: 280px;
  font-family: var(--font-body);
  line-height: 1.5;
}

.contract-custom-message {
  min-height: 120px;
}

.contract-standard-message {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.5;
}

.contract-standard-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-body);
  margin: 0;
}

.contract-standard-html {
  white-space: normal;
}

.contract-standard-html p,
.contract-standard-html ul,
.contract-standard-html ol {
  margin: 0 0 0.75rem;
}

.contract-standard-html p:last-child,
.contract-standard-html ul:last-child,
.contract-standard-html ol:last-child {
  margin-bottom: 0;
}

.contract-email-help {
  margin-top: 0.5rem !important;
  font-size: 0.85rem;
}

.muted {
  color: var(--gray-600);
  font-style: italic;
}

@media (max-width: 700px) {
  .contract-email-panel {
    padding: 1rem;
  }

  .contract-email-panel-header {
    display: grid;
  }

  .contract-select-all {
    white-space: normal;
  }
}

/* Contract Text */
.contract-text {
  background: #fafafa;
  border: 1px solid var(--light-border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.contract-text h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.75rem;
}
.contract-text ul {
  padding-left: 1.5rem;
}
.contract-text li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Checkbox Label */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

/* Coach Cards (tryouts) */
.coach-card {
  border: 1px solid var(--light-border);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.coach-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid var(--light-border);
}
.coach-card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.coach-card-body {
  padding: 1rem;
}
.tryout-coach-title {
  font-size: 1.05rem;
  color: var(--dark-gray);
  margin: 0 0 0.45rem;
}
.tryout-form {
  max-width: 980px;
}
.tryout-info {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.tryout-contact {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--medium-gray);
}

/* Coach Dashboard Responsive */
@media (max-width: 768px) {
  .tryout-age-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .tryout-card-header,
  .coach-card-header {
    align-items: stretch;
    flex-direction: column;
  }
  .coach-card-actions {
    justify-content: flex-start;
  }
  .coach-dashboard-header {
    padding: 1.5rem 0 1.75rem;
  }
  .coach-dashboard-hero {
    align-items: center;
    gap: 1rem;
    min-height: 96px;
  }
  .coach-dashboard-logo {
    width: 92px;
    height: 92px;
    border-radius: 12px;
  }
  .coach-dashboard-info h1 {
    font-size: 1.75rem;
  }
  .coach-dashboard-meta {
    font-size: 1rem;
  }
  .coach-dashboard-record {
    margin-bottom: 0.55rem;
  }
  .coach-dashboard-record .record-badge {
    font-size: 1rem;
    padding: 0.3rem 0.65rem;
  }
  .coach-dashboard-coach {
    font-size: 0.9rem;
  }
  .coach-links-grid { grid-template-columns: 1fr; }
  .coach-calendar-titlebar {
    align-items: stretch;
    flex-direction: column;
  }
  .coach-calendar-actions {
    justify-content: stretch;
  }
  .coach-calendar-actions .btn {
    flex: 1 1 9rem;
    justify-content: center;
  }
  .coach-calendar-nav {
    padding: 0.85rem 0.75rem;
  }
  .coach-calendar-nav h3 {
    font-size: 1rem;
    min-width: 0;
  }
  .coach-calendar-grid {
    display: none;
  }
  .coach-calendar-agenda {
    display: block;
  }
  .team-page-editor-layout { grid-template-columns: 1fr; }
  .team-page-editor-card { padding: 1rem; }
  .team-page-image-grid { grid-template-columns: repeat(4, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-group-wide { grid-column: span 1; }
  .score-entry-grid { flex-direction: column; gap: 1rem; }
  .score-vs { padding-top: 0; }
  .pitching-row { flex-direction: column; }
  .upload-inline { flex-direction: column; align-items: flex-start; }
  .insurance-actions,
  .insurance-upload-form {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .insurance-actions .btn,
  .insurance-upload-form .btn,
  .insurance-upload-form input[type="file"] {
    width: 100%;
    max-width: 100%;
  }
  .insurance-view-actions .btn {
    justify-content: center;
    width: 100%;
  }
  .document-view-actions .btn {
    justify-content: center;
    width: 100%;
  }
  .insurance-proof-frame {
    height: 72vh;
    min-height: 420px;
  }
  .document-proof-frame {
    height: 72vh;
    min-height: 420px;
  }
  .background-status-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }
  .background-actions .btn {
    justify-content: center;
    width: 100%;
  }
  .background-instructions {
    font-size: 0.92rem;
  }
  .doc-actions { min-width: auto; }
  .coach-cert-table-wrap {
    overflow: visible;
  }
  .coach-cert-table,
  .coach-contract-head-table,
  .coach-contract-assistant-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
  }
  .coach-cert-table colgroup,
  .coach-cert-table thead {
    display: none;
  }
  .coach-cert-table tbody,
  .coach-cert-table tr,
  .coach-cert-table td {
    display: block;
    width: 100%;
  }
  .coach-cert-table tr {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    overflow: hidden;
  }
  .coach-cert-table td {
    display: grid;
    grid-template-columns: minmax(7.5rem, 35%) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
  }
  .coach-cert-table td:last-child {
    border-bottom: none;
  }
  .coach-cert-table td::before {
    content: attr(data-label);
    color: var(--gray-600);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
  }
  .coach-cert-table .cert-coach,
  .coach-cert-table .cert-status,
  .coach-cert-table .cert-date,
  .coach-cert-table .cert-actions-cell,
  .coach-contract-page .contract-action-cell,
  .coach-contract-page .contract-email,
  .coach-contract-page .contract-code {
    text-align: left;
    padding-left: 1rem;
  }
  .cert-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.65rem;
    min-width: 0;
    width: 100%;
  }
  .cert-actions .btn,
  .cert-upload-form .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
  .cert-upload-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
  }
  .cert-upload-form input[type="file"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 0.85rem;
  }
  .cert-action-placeholder {
    display: none;
  }
  .contract-complete {
    justify-content: flex-start;
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .coach-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .coach-dashboard-logo {
    width: 86px;
    height: 86px;
  }
}

/* Generic responsive table cards for coach/public tables that would overflow. */
.table-card-wrap {
  overflow: visible !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

.table-card-mode {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: separate !important;
}

.table-card-mode colgroup,
.table-card-mode thead {
  display: none !important;
}

.table-card-mode tbody,
.table-card-mode tr,
.table-card-mode td {
  display: block;
  width: 100%;
}

.table-card-mode tr {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}

.table-card-mode td {
  display: grid;
  grid-template-columns: minmax(7.5rem, 35%) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.85rem 1rem !important;
  border-bottom: 1px solid var(--gray-200);
  text-align: left !important;
  overflow-wrap: anywhere;
}

.table-card-mode td:last-child {
  border-bottom: none;
}

.table-card-mode td::before {
  content: attr(data-label);
  color: var(--gray-600);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.table-card-mode td:not([data-label])::before {
  content: '';
  display: none;
}

.table-card-mode .doc-actions,
.table-card-mode .upload-inline,
.table-card-mode .insurance-actions,
.table-card-mode .insurance-upload-form,
.table-card-mode .roster-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.table-card-mode .roster-actions {
  width: 100%;
}

.table-card-mode .roster-actions > .roster-action-btn,
.table-card-mode .roster-remove-form {
  flex: 1 1 7rem;
}

.table-card-mode .roster-remove-form .roster-action-btn {
  width: 100%;
}

.table-card-mode .upload-inline input[type="file"],
.table-card-mode .insurance-upload-form input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.table-card-mode .insurance-actions {
  align-items: stretch;
  flex-direction: column;
  width: 100%;
}

.table-card-mode .insurance-actions .btn,
.table-card-mode .insurance-upload-form .btn {
  width: 100%;
}

.table-card-mode .btn {
  white-space: normal;
}

@media (max-width: 520px) {
  .team-page-image-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .table-card-mode td {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* ============================================
   REGISTRATION WIZARD
   ============================================ */

/* Progress Bar */
.reg-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  padding: 1rem 0;
}
.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.reg-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--light-border);
  color: var(--medium-gray);
  transition: all 0.2s;
}
.reg-step-active .reg-step-num {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(26,54,93,0.3);
}
.reg-step-done .reg-step-num {
  background: #2d8a2d;
  color: white;
}
.reg-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.reg-step-active .reg-step-label { color: var(--primary); }
.reg-step-done .reg-step-label { color: #2d8a2d; }
.reg-step-line {
  width: 40px;
  height: 2px;
  background: var(--light-border);
  margin: 0 0.25rem;
  margin-bottom: 1rem;
}
.reg-step-line-done { background: #2d8a2d; }

/* Landing Page */
.reg-landing {
  display: flex;
  align-items: stretch;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}
.reg-landing-card {
  flex: 1;
  background: var(--white);
  border: 2px solid var(--light-border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.reg-landing-card:hover {
  border-color: var(--primary);
}
.reg-landing-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.reg-landing-card h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary);
}
.reg-landing-card p {
  font-size: 0.95rem;
  color: var(--dark-gray);
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex: 1;
}
.reg-landing-divider {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.reg-landing-divider span {
  font-weight: 700;
  color: var(--medium-gray);
  font-size: 0.9rem;
}

/* Returning Login Card */
.reg-login-card {
  max-width: 500px;
  margin: 0 auto;
  background: #fafafa;
  border: 1px solid var(--light-border);
  border-radius: 12px;
  padding: 2rem;
}
.reg-login-card p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--dark-gray);
}

/* Review Page */
.reg-review {
  max-width: 800px;
}
.reg-review-section {
  margin-bottom: 1.5rem;
  border: 1px solid var(--light-border);
  border-radius: 8px;
  overflow: hidden;
}
.reg-review-section h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--light-border);
}
.reg-edit-link {
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--primary);
}
.reg-review-grid {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.reg-review-grid div {
  line-height: 1.4;
}

.merge-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.merge-field-list code {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--light-border);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  font-size: 0.88rem;
}

/* Registration Cart Item */
.reg-cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light-border);
  font-size: 0.9rem;
}
.reg-cart-item:last-of-type { border-bottom: none; }

/* Success Page */
.reg-success {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.reg-success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #2d8a2d;
  color: white;
  font-size: 2rem;
  line-height: 60px;
  margin: 0 auto 1rem;
}
.reg-success h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.reg-success-details {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}
.reg-success .coach-note {
  text-align: left;
}

/* Registration Responsive */
@media (max-width: 768px) {
  .reg-landing { flex-direction: column; }
  .reg-landing-divider { justify-content: center; padding: 0.5rem 0; }
  .reg-review-grid { grid-template-columns: 1fr; }
  .reg-step-label { display: none; }
  .reg-step-line { width: 20px; }
}
