/* =========================================
   GOLSTALGIA – Premium Retro Football 80s/90s
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Bebas+Neue&display=swap');

:root {
  --verde-cesped: #1b8a3e;
  --verde-oscuro: #0a2e16;
  --verde-vivo:   #2ecc71;
  --amarillo-retro: #f1c40f;
  --amarillo-brillo: #feca57;
  --rojo-pasion:  #e74c3c;
  --blanco-vintage: #f5f6fa;
  --negro-carbon: #1e272e;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-retro: 6px 6px 0px rgba(0,0,0,0.8);
  --font-display: 'Bebas Neue', cursiva;
  --font-main: 'Outfit', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background: var(--verde-oscuro);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(27, 138, 62, 0.2) 0%, transparent 80%),
    url("https://www.transparenttextures.com/patterns/carbon-fibre.png");
  color: var(--blanco-vintage);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── HEADER ─────────────────────────── */
.site-header {
  background: rgba(10, 46, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--amarillo-retro);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  position: sticky;
  top: 0;
  z-index: 1100;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px; /* Un poco más alto para el logo */
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: var(--transition);
  padding: 5px 0;
}

.logo:hover { transform: scale(1.02); }

.logo-img {
  height: 65px;
  width: 65px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--amarillo-retro);
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.4);
  background: white;
  flex-shrink: 0;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--amarillo-retro);
  letter-spacing: 3px;
  text-shadow: 3px 3px 0 var(--negro-carbon);
}

.logo-sub {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--blanco-vintage);
  opacity: 0.7;
  letter-spacing: 4px;
  margin-top: -5px;
}

.main-nav { display: flex; gap: 1rem; }

.nav-link {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 1.5px;
  color: var(--blanco-vintage);
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-transform: uppercase;
}

.nav-link:hover, .nav-link.active {
  background: var(--amarillo-retro);
  color: var(--negro-carbon);
  box-shadow: 4px 4px 0 var(--negro-carbon);
}

.header-actions { display: flex; align-items: center; }
.header-user { display: flex; align-items: center; gap: 1.5rem; }
.user-name { font-weight: 600; color: var(--amarillo-retro); }

.btn-logout {
  padding: 0.5rem 1rem;
  border: 2px solid var(--rojo-pasion);
  color: var(--rojo-pasion);
  text-decoration: none;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-logout:hover {
  background: var(--rojo-pasion);
  color: white;
  box-shadow: 4px 4px 0 var(--negro-carbon);
}

/* ─── AUTH PAGES ─────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--verde-oscuro) 0%, #000 100%);
  position: relative;
  overflow: hidden;
}

.login-wrap::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(255,255,255,0.03) 1px, rgba(255,255,255,0.03) 2px);
  pointer-events: none;
}

.login-box {
  width: 100%;
  max-width: 450px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 2px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.6s ease-out;
}

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

.login-header .logo {
  justify-content: center;
  margin-bottom: 2rem;
}

.login-header .logo-img {
  height: 120px;
}

.login-header .logo-text {
  font-size: 3rem;
}

.login-subtitle {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--verde-vivo);
  letter-spacing: 3px;
  opacity: 0.9;
}

.login-body { padding: 0 3rem 3rem; }

.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--amarillo-retro);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 2px solid var(--glass-border);
  padding: 1rem;
  color: white;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--verde-vivo);
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.3);
  background: rgba(0,0,0,0.5);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 2px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--verde-vivo);
  color: var(--verde-oscuro);
  font-weight: 800;
  box-shadow: 0 4px 0 #24a159;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #24a159;
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 0px 0 #24a159;
}

.btn-rojo {
  background: var(--rojo-pasion);
  color: white;
  box-shadow: 0 4px 0 #c0392b;
}
.btn-rojo:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #c0392b; filter: brightness(1.1); }
.btn-rojo:active { transform: translateY(2px); box-shadow: 0 0px 0 #c0392b; }

.btn-verde {
  background: var(--verde-vivo);
  color: var(--verde-oscuro);
  box-shadow: 0 4px 0 #27ae60;
}
.btn-verde:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #27ae60; filter: brightness(1.1); }
.btn-verde:active { transform: translateY(2px); box-shadow: 0 0px 0 #27ae60; }

.btn-dark {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 0 rgba(0,0,0,0.5);
}
.btn-dark:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0,0,0,0.5); }
.btn-dark:active { transform: translateY(2px); box-shadow: 0 0px 0 rgba(0,0,0,0.5); }

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-radius: 6px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.badge-verde   { background: var(--verde-vivo); color: var(--verde-oscuro); }
.badge-rojo    { background: var(--rojo-pasion); color: #fff; }
.badge-amarillo { background: var(--amarillo-retro); color: var(--negro-carbon); }
.badge-gris     { background: rgba(255,255,255,0.1); color: #aaa; }

.login-separator {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.login-separator::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--glass-border);
}

.login-separator span {
  background: #111;
  padding: 0 15px;
  position: relative;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gris);
  letter-spacing: 2px;
}

.btn-google {
  background: white;
  color: var(--negro-carbon);
  display: flex;
  gap: 15px;
  font-size: 1rem;
  box-shadow: 0 4px 0 #ddd;
}

.btn-google:hover {
  background: #f1f1f1;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #ddd;
}

.login-footer-links {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--gris-claro);
}

.login-footer-links a {
  color: var(--amarillo-retro);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.login-footer-links a:hover { text-shadow: 0 0 10px var(--amarillo-retro); opacity: 0.8; }

/* ─── DASHBOARD & CARDS ──────────────── */
.main-content {
  max-width: 1300px;
  margin: 1rem auto;
  padding: 0 2rem;
  flex: 1;
}

.main-content.is-fullwidth {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  transition: var(--transition);
}

.card:hover { transform: translateY(-5px); border-color: var(--verde-vivo); }

.card-header {
  background: rgba(0,0,0,0.2);
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--amarillo-retro);
  letter-spacing: 2px;
}

/* ─── MATCH LIST ROW DESIGN ─────────── */
.match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.02);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  gap: 1rem;
}

.match-row:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--amarillo-retro);
}

.match-team {
  font-weight: 600;
  font-size: 1.1rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-team.right { text-align: right; }

.match-score, .match-vs {
  background: var(--amarillo-retro);
  color: var(--negro-carbon);
  font-weight: 800;
  text-align: center;
  padding: 0.3rem 0;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
  width: 80px;
  flex-shrink: 0;
}

/* New Schedule Styling */
.match-schedule {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  min-width: 110px;
  transition: var(--transition);
}

.match-schedule-link {
  transition: 0.2s;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.match-schedule-link:hover {
  background: rgba(46, 204, 113, 0.1);
  transform: translateY(-2px);
}

.match-row:hover .match-schedule {
  border-color: var(--amarillo-retro);
  background: rgba(0, 0, 0, 0.6);
}

.schedule-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--amarillo-retro);
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}

.schedule-time {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  line-height: 1;
  letter-spacing: 1px;
}

.schedule-none {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── TABLES ─────────────────────────── */
table { border-collapse: separate; border-spacing: 0 8px; width: 100%; }
th { font-family: var(--font-display); text-transform: uppercase; color: var(--verde-vivo); padding: 1rem; text-align: left; }
td { background: rgba(255,255,255,0.02); padding: 1rem; border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); }
td:first-child { border-left: 1px solid var(--glass-border); border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
td:last-child { border-right: 1px solid var(--glass-border); border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

tr:hover td { background: rgba(46, 204, 113, 0.1); border-color: var(--verde-vivo); }

tr.row-me td {
  background: rgba(241, 196, 15, 0.15) !important;
  border-color: var(--amarillo-retro) !important;
}
tr.row-me td:first-child { border-left: 3px solid var(--amarillo-retro); }

/* ─── STATS ──────────────────────────── */
.stat-box {
  background: linear-gradient(135deg, var(--verde-cesped) 0%, var(--verde-oscuro) 100%);
  border: 2px solid var(--amarillo-retro);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-retro);
}

.stat-number { font-family: var(--font-display); font-size: 3.5rem; color: var(--amarillo-retro); line-height: 1; }
.stat-label { font-family: var(--font-display); opacity: 0.7; letter-spacing: 3px; font-size: 0.9rem; }

/* ─── FLASH ──────────────────────────── */
.flash {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  z-index: 10000;
  animation: slideInRight 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  box-shadow: 5px 5px 15px rgba(0,0,0,0.4);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.flash-success { background: var(--verde-vivo); color: var(--verde-oscuro); }
.flash-error { background: var(--rojo-pasion); color: white; }

/* ─── HAMBURGER ──────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--amarillo-retro);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 8px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -8px); }

/* Hide mobile-only auth block by default (ALWAYS hidden on desktop) */
.mobile-auth-links { display: none !important; }

/* ─── RESPONSIVE ─────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

@media (max-width: 900px) {
  /* Grid */
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Nav */
  .hamburger { display: flex; }
  .header-user { display: none; }

  .header-inner {
    height: 70px;
    padding: 0 0.8rem;
    position: relative;
    max-width: 100vw;
    overflow: hidden; /* Prevent horizontal scroll */
  }

  .logo-text { font-size: 1.6rem; }
  .logo-sub  { font-size: 0.7rem; }
  .logo-img  { height: 48px; width: 48px; }

  .main-nav {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 320px);
    height: 100vh;
    background: rgba(10, 46, 22, 0.98);
    backdrop-filter: blur(20px);
    border-left: 3px solid var(--amarillo-retro);
    padding: 90px 1.5rem 2rem;
    gap: 0.3rem;
    overflow-y: auto;
    z-index: 1200;
    box-shadow: -10px 0 40px rgba(0,0,0,0.6);
  }

  .main-nav.open { display: flex; }

  .main-nav .nav-link {
    font-size: 1.3rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-bottom: 1px solid var(--glass-border);
  }

  .mobile-auth-links {
    display: flex !important;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--amarillo-retro);
  }

  /* Nav overlay — below header so nav links remain clickable */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
  }
  .nav-overlay.open { display: block; }

  /* Notification dropdown adjustments for very small screens */
  .notif-dropdown {
    width: 90vw;
    right: 5vw;
    left: 5vw;
    max-width: none;
  }
}

@media (max-width: 768px) {
  /* Grids */
  .grid-2, .grid-4 { grid-template-columns: 1fr; gap: 1rem; }

  /* Match Row Mobile */
  .match-row {
    padding: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap; /* Allow wrapping if needed */
  }
  .match-team {
    font-size: 0.95rem;
    white-space: normal; /* Allow wrapping */
    line-height: 1.2;
    overflow: visible;
    text-overflow: clip;
  }
  .match-score, .match-vs, .match-schedule {
    margin: 0 auto; /* Center items if wrapped */
  }

  /* Table Compact Responsive */
  .table-compact th:nth-child(3), 
  .table-compact td:nth-child(3),
  .table-compact th:nth-child(4), 
  .table-compact td:nth-child(4),
  .table-compact th:nth-child(5), 
  .table-compact td:nth-child(5),
  .table-compact th:nth-child(6), 
  .table-compact td:nth-child(6),
  .table-compact th:nth-child(7), 
  .table-compact td:nth-child(7) {
    display: none; /* Hide V, E, D, GF, GC on mobile */
  }

  /* Auth pages */
  .login-wrap { align-items: flex-start; padding-top: 2rem; }
  .login-box { max-width: 95%; margin: 0 auto; border-radius: 12px; }
  .login-body { padding: 0 1.2rem 2rem; }
  .login-header { padding: 1.5rem 1.2rem 0.5rem; }
  .login-header .logo-img { height: 80px; }
  .login-header .logo-text { font-size: 2rem; }

  /* Forms */
  .form-group { margin-bottom: 1rem; }
  .input-field { font-size: 16px; } /* Prevents zoom on iOS */
  .btn:not(.btn-sm) { width: 100%; justify-content: center; }
  .btn-google { width: 100%; }

  /* Table Actions specifically for Admin */
  .table-wrap td:last-child {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 150px;
  }
  .table-wrap td:last-child form { display: inline-flex; }


@media (max-width: 600px) {
  /* Match Row: Vertical Stack */
  .match-row {
    flex-direction: column !important;
    text-align: center;
    padding: 1.2rem 0.5rem;
    gap: 1rem;
    height: auto !important;
  }
  .match-team {
    width: 100% !important;
    text-align: center !important;
    font-size: 1.1rem;
    font-weight: 800;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.3;
  }
  .match-score-wrap, .match-vs, .match-schedule {
    order: 2;
    margin: 0.2rem auto;
    width: auto !important;
    min-width: 120px;
  }
  .match-team.right {
    order: 3;
    text-align: center !important;
  }
  
  /* Admin Match Card specific fixes for mobile */
  .admin-main .match-card {
    flex-wrap: wrap;
    justify-content: center;
  }
}
  /* Stats */
  .stat-box { padding: 1rem; }
  .stat-number { font-size: 2.5rem; }

  /* Cards */
  .card-header { font-size: 1rem; padding: 0.75rem 1rem; }
  .card-body { padding: 0.75rem; }

  /* Tables */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 450px; }
  th, td { padding: 0.6rem 0.5rem; font-size: 0.85rem; }

  /* Dashboard */
  .page-title { font-size: 1.8rem; }

  /* Main content padding */
  .main-content { padding: 0 0.5rem; }

  /* Hero */
  .hero-section { padding: 1rem 1rem 0.8rem; }
  .hero-section h1 { font-size: 1.4rem; }
  .hero-section p  { font-size: 0.85rem; }

  /* Calendar */
  .calendar-page h1 { font-size: 2.2rem; }

  /* Rules page */
  .rules-body { padding: 1.5rem 1rem; }
  .rules-header { font-size: 1.6rem; padding: 1.5rem 1rem; }
  .rules-title { font-size: 1.5rem; }
  .rules-scenario-grid { grid-template-columns: 1fr; }
  .rules-summary-box { font-size: 1.1rem; padding: 1.5rem; }
  .rules-highlight-box { padding: 1.2rem; }
}

.site-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  color: var(--blanco-vintage);
  opacity: 0.6;
  font-size: 0.9rem;
}


/* ─── RULES PAGE (REGLAMENTO) ───────── */
.rules-container {
  width: 100%;
}

.rules-card {
  width: 100%;
  margin: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

.rules-header {
  text-align: center;
  font-size: 2.5rem;
  padding: 3rem 2rem;
  background: rgba(0, 0, 0, 0.4);
  font-family: var(--font-display);
  color: var(--blanco-vintage);
  border-bottom: 2px solid var(--amarillo-retro);
}

.rules-body {
  padding: 4rem;
  line-height: 1.8;
  font-size: 1.15rem;
}

.rules-section {
  margin-bottom: 3.5rem;
}

.rules-title {
  color: var(--amarillo-retro);
  font-family: var(--font-display);
  font-size: 2.2rem;
  border-bottom: 2px solid var(--glass-border);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rules-highlight-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 2.5rem;
  border-radius: 12px;
  margin: 2rem 0 4rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.rules-highlight-title {
  color: var(--verde-vivo);
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  text-align: center;
}

.rules-summary-box {
  background: var(--amarillo-retro);
  color: var(--negro-carbon);
  padding: 3rem;
  border-radius: 15px;
  text-align: center;
  font-weight: 800;
  font-size: 1.5rem;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 2rem;
}

.rules-summary-detail {
  font-weight: 400;
  font-size: 1.2rem;
  margin-top: 1rem;
  opacity: 0.9;
}

.rules-download-area {
  text-align: center;
  margin-top: 5rem;
}

.rules-example-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rules-example-list li {
  padding-left: 1.5rem;
  position: relative;
}

.rules-example-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--amarillo-retro);
  font-weight: bold;
}

/* Escenarios específicos */
.rules-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  text-align: center;
}

.rules-scenario-card {
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}

.rules-scenario-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--verde-vivo);
  transform: translateY(-5px);
}

.rules-scenario-title {
  font-size: 1.3rem;
  color: var(--amarillo-retro);
  margin-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.5rem;
  font-family: var(--font-display);
}

/* ─── NOTIFICATIONS ─────────────────── */
.notifications-wrapper {
  position: relative;
  margin-right: -0.5rem;
}

.notif-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border-radius: 50%;
}

.notif-btn:hover { background: rgba(255,255,255,0.1); transform: scale(1.1); }

.bell-icon { font-size: 1.4rem; }

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--rojo-pasion);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid var(--verde-oscuro);
  min-width: 18px;
  text-align: center;
}

.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: #111;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  margin-top: 15px;
  display: none;
  z-index: 2000;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

.notif-dropdown.show { display: block; }

.notif-header {
  padding: 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  letter-spacing: 1px;
}

.notif-body { max-height: 400px; overflow-y: auto; }

.notif-empty { padding: 2rem; text-align: center; opacity: 0.5; font-size: 0.9rem; }

.notif-item {
  padding: 1rem;
  display: flex;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
  cursor: default;
}

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

.notif-item.is-unread { background: rgba(46, 204, 113, 0.05); }

.notif-item:hover { background: rgba(255,255,255,0.05); }

.notif-type {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.notif-type-propuesta { background: #8e44ad; box-shadow: 0 0 10px #8e44ad; }
.notif-type-confirmacion { background: var(--verde-vivo); box-shadow: 0 0 10px var(--verde-vivo); }
.notif-type-cancelacion { background: var(--rojo-pasion); box-shadow: 0 0 10px var(--rojo-pasion); }

.notif-content p { font-size: 0.9rem; margin-bottom: 4px; line-height: 1.4; color: #ddd; }
.notif-content small { font-size: 0.75rem; color: #666; }

.btn-text {
  background: none;
  border: none;
  color: var(--amarillo-retro);
  font-size: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-text:hover { color: white; }
/* ─── ADMIN LAYOUT ──────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 100px);
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-sidebar {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem;
  height: sticky;
  top: 100px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--amarillo-retro);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 1.2rem;
  text-decoration: none;
  color: white;
  font-family: var(--font-display);
  border-radius: 10px;
  transition: var(--transition);
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--amarillo-retro);
  transform: translateX(5px);
}

.sidebar-link.active {
  background: var(--amarillo-retro);
  color: var(--negro-carbon);
  font-weight: 700;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.22rem;
  margin: 0;
  color: white;
  letter-spacing: 2px;
}

.page-title span { color: var(--amarillo-retro); }

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
    padding: 1rem 0.5rem; /* Reduced horizontal padding */
    gap: 1rem;
    width: 100%;
    margin: 0;
  }
  .admin-main {
    width: 100%;
    padding: 0 0.25rem;
  }
  .admin-sidebar {
    position: sticky;
    top: 70px; /* Aligned with mobile header height */
    z-index: 100;
    margin-bottom: 0.5rem;
    padding: 0.6rem;
    border-radius: 0;
    width: calc(100% + 1rem); /* Full width including offset */
    margin-left: -0.5rem; 
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
  }
  /* ... previous sidebar styles ... */
  .sidebar-title { display: none !important; }
  .sidebar-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    gap: 0.4rem;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-link {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    flex-shrink: 0;
  }
  /* ... Admin Grid & Table column hiding ... */
  .admin-grid-2 { grid-template-columns: 1fr !important; }
  .admin-flex-form { flex-direction: column !important; align-items: stretch !important; }
  .admin-flex-form > * { width: 100% !important; }
  
  .table-wrap th:nth-child(1), .table-wrap td:nth-child(1),
  .table-wrap th:nth-child(3), .table-wrap td:nth-child(3),
  .table-wrap th:nth-child(6), .table-wrap td:nth-child(6) {
    display: none;
  }
  
  /* Action alignment in mobile tables */
  .table-wrap td:last-child {
    justify-content: center;
    padding: 0.5rem;
    min-width: 120px;
  }
}

/* Global Table Wrap */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}
.table-wrap table {
  min-width: 600px; /* Force scroll on small screens */
}

/* ─── HERO & HOME REFINEMENTS ────────── */
.hero-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem 0 2rem;
  border-bottom: 2px solid var(--glass-border);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--amarillo-retro);
  text-shadow: 3px 3px 0 #000;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero-section { padding: 1.5rem 1rem; margin-bottom: 1.5rem; }
  .hero-title { font-size: 1.5rem; letter-spacing: 1px; line-height: 1.2; }
  .hero-subtitle { font-size: 0.9rem; padding: 0; line-height: 1.5; }
  .main-content { padding: 0 0.8rem; }
  
  /* Tables responsiveness */
  .table-compact { min-width: 600px; }
  .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Home Grid specific adjustment */
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ─── SLOT SELECTION TILES ─────────── */
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.8rem; }
.slot-checkbox { 
    display: flex; flex-direction: column; align-items: center; padding: 0.8rem; 
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; cursor: pointer; transition: 0.2s;
    background: rgba(255,255,255,0.03);
    position: relative;
    text-align: center;
}
.slot-checkbox:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }

.slot-checkbox.is-selected { 
    background: #f1c40f; 
    border-color: #f1c40f; 
    color: #000; 
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
.slot-checkbox.is-selected .slot-day { color: rgba(0,0,0,0.6); }

.slot-checkbox.is-rival { background: #8e44ad; border-color: #8e44ad; color: #fff; }
.slot-checkbox.is-rival .slot-day { color: rgba(255,255,255,0.7); }

/* Para el panel de admin que sí los quiere verdes siempre */
.slot-checkbox.is-admin-active { background: var(--verde-vivo); border-color: var(--verde-vivo); color: var(--negro-carbon); }
.slot-checkbox.is-admin-active .slot-day { color: rgba(0,0,0,0.6); }

.slot-checkbox.is-agreement { background: var(--verde-vivo); border-color: var(--verde-vivo); color: var(--negro-carbon); }
.slot-checkbox.is-occupied { opacity: 0.3; pointer-events: none; filter: grayscale(1); }
.slot-checkbox input { display: none; }
.slot-day { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; margin-bottom: 4px; letter-spacing: 0.5px; opacity: 0.8; }
.slot-time { font-size: 1.2rem; font-family: var(--font-display); font-weight: 900; line-height: 1; }

/* ─── DASHBOARD ACTION BUTTONS ─────────── */
.btn-save-dispo {
  background: var(--verde-vivo);
  color: var(--negro-carbon);
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.6rem;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
  transition: 0.15s;
}
.btn-save-dispo:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 4px 5px 0 rgba(0,0,0,0.5);
}
.btn-save-dispo:active { transform: translateY(1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.5); }

.btn-propose {
  background: transparent;
  color: var(--verde-vivo);
  border: 1px solid var(--verde-vivo);
  border-radius: 4px;
  padding: 0.4rem 1rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.15s;
}
.btn-propose:hover { background: var(--verde-vivo); color: var(--negro-carbon); }

.btn-reschedule {
  background: transparent;
  color: var(--rojo-tarjeta);
  border: 1px solid var(--rojo-tarjeta);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s;
}
.btn-reschedule:hover { background: var(--rojo-tarjeta); color: #fff; }

/* Slot badges */
.slot-badge {
  font-size: 0.5rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: 1px; padding: 2px 5px; border-radius: 3px; margin-top: 4px;
}
.badge-agreement { background: var(--verde-vivo); color: var(--negro-carbon); }
.badge-rival { background: #8e44ad; color: #fff; }
.badge-occupied { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }

/* ─── NOTIFICACIONES ─────────── */
.notifications-wrapper { position: relative; margin-right: 1.5rem; }
.notif-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; transition: 0.2s;
  font-size: 1.2rem;
}
.notif-btn:hover { background: rgba(255,255,255,0.1); transform: scale(1.05); }

.notif-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--rojo-tarjeta); color: white;
  font-size: 0.65rem; font-weight: 900;
  min-width: 18px; height: 18px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--negro-carbon);
}

.notif-dropdown {
  position: absolute; top: calc(100% + 15px); right: 0;
  width: 320px; max-height: 450px;
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: none; flex-direction: column;
  z-index: 1000; overflow: hidden;
}
.notif-dropdown.show { display: flex; }

.notif-header {
  padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-head); font-weight: 900; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 1px; color: var(--amarillo-retro);
}
.notif-header .btn-text {
  background: none; border: none; color: white; font-size: 0.6rem;
  opacity: 0.6; cursor: pointer; text-decoration: underline;
}
.notif-header .btn-text:hover { opacity: 1; }

.notif-body { overflow-y: auto; flex: 1; }
.notif-empty { padding: 2rem; text-align: center; opacity: 0.4; font-size: 0.8rem; }

.notif-item {
  padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.03);
  display: flex; gap: 0.8rem; transition: 0.2s; cursor: pointer;
}
.notif-item:hover { background: rgba(255,255,255,0.03); }
.notif-item.is-unread { background: rgba(46, 204, 113, 0.05); }

.notif-type { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.notif-type-propuesta { background: #f1c40f; }
.notif-type-acuerdo { background: var(--verde-vivo); }
.notif-type-cancelacion { background: var(--rojo-tarjeta); }

.notif-content p { margin: 0; font-size: 0.85rem; line-height: 1.4; }
.notif-content small { display: block; margin-top: 4px; opacity: 0.4; font-size: 0.7rem; }

@media (max-width: 768px) {
  .notif-dropdown { position: fixed; top: 70px; left: 10px; right: 10px; width: auto; max-height: 70vh; }
  .notifications-wrapper { margin-right: 0.8rem; }
  
  /* Clasificación completa scrollable */
  .table-full-stats {
    min-width: 700px;
  }
  .table-compact {
    min-width: 650px;
  }
}

/* ─── ADMIN COMPONENTS & LAYOUT FIXES ────────── */

/* Match Cards (Admin Jornadas) */
.match-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 0.8rem;
  transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.match-card:hover { 
  border-color: rgba(251, 196, 15, 0.3); 
  background: rgba(255, 255, 255, 0.05); 
  transform: translateY(-2px);
}

.match-team {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.match-team.right { justify-content: flex-end; text-align: right; }

.match-score {
  background: #000;
  color: var(--amarillo-retro);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--amarillo-retro);
  min-width: 110px;
  text-align: center;
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.1);
}

.match-vs { text-align: center; min-width: 150px; }

/* Admin Grid & Forms */
.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.admin-flex-form {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .admin-grid-2 { grid-template-columns: 1fr; gap: 1rem; }
  
  .match-card {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    text-align: center;
    padding: 1rem;
  }
  .match-team, .match-team.right { justify-content: center; text-align: center; font-size: 1rem; }
  .match-score { margin: 0.5rem auto; width: fit-content; }
  .match-vs { min-width: 100%; margin-top: 0.5rem; }
  
  .top-bar { flex-direction: column; align-items: flex-start; }
  .page-title { font-size: 1.8rem; }
}
