/* ============================================================
   OLIMPIADAS DEPORTIVAS MULTIROBLE — Estilos Principales
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --olympic-blue:   #003087;
  --olympic-gold:   #FFD700;
  --olympic-red:    #E63946;
  --olympic-green:  #2DC653;
  --olympic-dark:   #0D1B2A;
  --bg-light:       #F4F6FA;
  --text-main:      #1A1A2E;
  --text-muted:     #6c757d;
  --card-shadow:    0 8px 32px rgba(0,48,135,.12);
  --card-shadow-lg: 0 16px 48px rgba(0,48,135,.18);
  --border-radius:  12px;
  --sidebar-width:  270px;
  --transition:     all .3s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-main);
  background: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  line-height: 1.25;
}
a { color: var(--olympic-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: #0052cc; }

/* ── Utilidades ── */
.text-olympic    { color: var(--olympic-blue) !important; }
.text-gold       { color: var(--olympic-gold) !important; }
.bg-olympic      { background-color: var(--olympic-blue) !important; }
.bg-gold         { background-color: var(--olympic-gold) !important; }
.fw-black        { font-weight: 900 !important; }
.rounded-xl      { border-radius: var(--border-radius) !important; }
.shadow-olympic  { box-shadow: var(--card-shadow) !important; }

/* ── Gradients ── */
.gradient-olympic {
  background: linear-gradient(135deg, var(--olympic-blue) 0%, #0052cc 60%, #1a237e 100%);
}
.gradient-gold {
  background: linear-gradient(135deg, #f5a623 0%, var(--olympic-gold) 100%);
}

/* ═══════════════════════════════════════════════
   NAVBAR PÚBLICA
   ═══════════════════════════════════════════════ */
.navbar-olimpiadas {
  background: rgba(13,27,42,.96) !important;
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--olympic-gold);
  padding: 12px 0;
  transition: var(--transition);
}
.navbar-olimpiadas .navbar-brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--olympic-gold) !important;
  letter-spacing: -0.5px;
}
.navbar-olimpiadas .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .3px;
  padding: .5rem 1rem !important;
  border-radius: 6px;
  transition: var(--transition);
}
.navbar-olimpiadas .nav-link:hover {
  color: var(--olympic-gold) !important;
  background: rgba(255,215,0,.1);
}
.btn-nav-inscribete {
  background: linear-gradient(135deg, var(--olympic-gold), #ff9f00) !important;
  color: var(--olympic-blue) !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  padding: .45rem 1.4rem !important;
  border: none !important;
  font-size: .875rem;
  transition: var(--transition);
}
.btn-nav-inscribete:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,215,0,.4);
  color: var(--olympic-blue) !important;
}

/* ═══════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--olympic-dark) 0%, #001a4d 50%, #0d1b2a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
#particles-js {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,215,0,.15);
  border: 1px solid rgba(255,215,0,.4);
  color: var(--olympic-gold);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  line-height: 1.1;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--olympic-gold), #ff9f00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .lead {
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  max-width: 560px;
}
.btn-hero-primary {
  background: linear-gradient(135deg, var(--olympic-gold), #ff9f00);
  color: var(--olympic-blue);
  border: none;
  border-radius: 50px;
  padding: 14px 36px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .3px;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(255,215,0,.35);
}
.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(255,215,0,.45);
  color: var(--olympic-blue);
}
.btn-hero-secondary {
  background: rgba(255,255,255,.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 50px;
  padding: 13px 32px;
  font-weight: 600;
  font-size: 1rem;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
  transform: translateY(-2px);
}
.olympic-rings {
  display: flex;
  gap: 6px;
  margin: 2rem 0;
  align-items: center;
}
.ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid;
  animation: ringPulse 2s ease-in-out infinite;
}
.ring:nth-child(1) { border-color: #4fc3f7; animation-delay: 0s; }
.ring:nth-child(2) { border-color: #ef5350; animation-delay: .2s; }
.ring:nth-child(3) { border-color: var(--olympic-gold); animation-delay: .4s; }
.ring:nth-child(4) { border-color: #66bb6a; animation-delay: .6s; }
.ring:nth-child(5) { border-color: #fff; animation-delay: .8s; }
@keyframes ringPulse {
  0%,100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat .num {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--olympic-gold);
  line-height: 1;
}
.hero-stat .lbl {
  display: block;
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════
   SECCIÓN DISCIPLINAS (landing)
   ═══════════════════════════════════════════════ */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title .pre-title {
  display: inline-block;
  background: rgba(0,48,135,.08);
  color: var(--olympic-blue);
  border-radius: 50px;
  padding: 4px 16px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .75rem;
}
.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--olympic-dark);
  margin: 0;
}
.section-title p { color: var(--text-muted); font-size: 1rem; margin-top: .75rem; }

.disc-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px 20px;
  text-align: center;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: var(--transition);
  cursor: default;
  height: 100%;
}
.disc-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-lg);
  border-color: var(--olympic-gold);
}
.disc-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.6rem;
  color: #fff;
  animation: iconFloat 3s ease-in-out infinite;
}
.disc-card h6 {
  font-weight: 700;
  font-size: .875rem;
  color: var(--text-main);
  margin: 0;
}

/* ═══════════════════════════════════════════════
   FORMULARIO DE INSCRIPCIÓN
   ═══════════════════════════════════════════════ */
.form-olimpiadas {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: var(--card-shadow-lg);
  max-width: 780px;
  margin: 0 auto;
}
@media (max-width: 576px) {
  .form-olimpiadas { padding: 28px 20px; }
}
.form-header {
  background: linear-gradient(135deg, var(--olympic-blue) 0%, #0052cc 60%, #1a237e 100%);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.form-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='28' fill='none' stroke='rgba(255,255,255,.05)' stroke-width='2'/%3E%3C/svg%3E") repeat;
  opacity: .3;
}
.form-header h2 {
  color: var(--olympic-gold);
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0;
  position: relative;
}
.form-header p {
  color: rgba(255,255,255,.8);
  margin: 8px 0 0;
  font-size: .95rem;
  position: relative;
}
.form-section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: var(--olympic-blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--olympic-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-control, .form-select {
  border: 1.5px solid #e0e7ef;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .9rem;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--olympic-blue);
  box-shadow: 0 0 0 3px rgba(0,48,135,.12);
  outline: none;
}
.form-label {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-label .required { color: var(--olympic-red); }

/* Disciplinas grid en formulario */
.disc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.disc-checkbox {
  display: none;
}
.disc-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 2px solid #e0e7ef;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: #f8faff;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-main);
  height: 100%;
  user-select: none;
}
.disc-label .disc-ico {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  transition: var(--transition);
}
.disc-label:hover {
  border-color: var(--olympic-blue);
  background: #f0f5ff;
}
.disc-checkbox:checked + .disc-label {
  border-color: var(--olympic-blue);
  background: linear-gradient(135deg, #e8efff, #f0f5ff);
  box-shadow: 0 4px 12px rgba(0,48,135,.15);
}
.disc-checkbox:checked + .disc-label .disc-ico {
  animation: iconPop .45s cubic-bezier(.36,.07,.19,.97) forwards;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.disc-checkbox.maxed + .disc-label:not(.selected-disc) {
  opacity: .45;
  cursor: not-allowed;
}
#disc-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,48,135,.08);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--olympic-blue);
  margin-bottom: 12px;
}
#disc-counter .count { color: var(--olympic-red); }

/* Upload area */
.upload-area {
  border: 2px dashed #c8d6e8;
  border-radius: 10px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: #f8faff;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--olympic-blue);
  background: #eef3ff;
}
.upload-area i { font-size: 2.5rem; color: #c8d6e8; margin-bottom: 8px; }
.upload-area p { color: var(--text-muted); margin: 0; font-size: .875rem; }
.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f0fff4;
  border: 1.5px solid #2DC653;
  border-radius: 8px;
  margin-top: 10px;
}
.upload-preview .file-icon { font-size: 1.5rem; }
.upload-preview .file-name { font-size: .85rem; font-weight: 600; color: #1a7a3c; }
.upload-preview .file-size { font-size: .75rem; color: var(--text-muted); }
.upload-preview .remove-file { margin-left: auto; cursor: pointer; color: var(--olympic-red); }

/* Submit button */
.btn-submit {
  background: linear-gradient(135deg, var(--olympic-blue) 0%, #0052cc 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 48px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .3px;
  transition: var(--transition);
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,48,135,.3);
}
.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,48,135,.4);
  color: #fff;
}
.btn-submit:disabled { opacity: .7; cursor: not-allowed; }

/* ── Spinner Modal ── */
.spinner-overlay {
  position: fixed; inset: 0;
  background: rgba(10,14,26,.88);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
}

/* Anillo giratorio */
.sp-ring {
  position: relative; width: 150px; height: 150px;
  display: flex; align-items: center; justify-content: center;
}
.sp-ring-track {
  position: absolute; inset: 0; border-radius: 50%;
  border: 5px solid rgba(255,215,0,.12);
}
.sp-ring-arc {
  position: absolute; inset: 0; border-radius: 50%;
  border: 5px solid transparent;
  border-top-color: #FFD700;
  border-right-color: rgba(255,215,0,.5);
  animation: sp-spin 0.9s cubic-bezier(.45,.05,.55,.95) infinite;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }

/* Emoji rebotando */
.sp-emoji-wrap { display: flex; align-items: center; justify-content: center; }
.sp-emoji {
  font-size: 3.8rem; line-height: 1;
  display: block;
  animation: sp-bounce 0.7s cubic-bezier(.36,.07,.19,.97) infinite alternate;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.6));
  transition: opacity .1s ease, transform .1s ease;
  will-change: transform;
}
@keyframes sp-bounce {
  0%   { transform: translateY(6px) scale(.95); }
  100% { transform: translateY(-16px) scale(1.08); }
}
.sp-emoji.sp-out {
  opacity: 0;
  transform: scale(.35) translateY(12px) !important;
  transition: opacity .1s ease, transform .1s ease;
}

/* Dots ola */
.sp-dots { display: flex; gap: 8px; align-items: center; }
.sp-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #FFD700; opacity: .4;
  animation: sp-wave 1.4s ease-in-out infinite;
}
.sp-dots span:nth-child(2) { animation-delay: .18s; }
.sp-dots span:nth-child(3) { animation-delay: .36s; }
.sp-dots span:nth-child(4) { animation-delay: .54s; }
@keyframes sp-wave {
  0%, 65%, 100% { transform: scale(.55); opacity: .3; }
  32%            { transform: scale(1.35); opacity: 1; }
}

.spinner-text {
  color: #fff; font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem; font-weight: 700; text-align: center; letter-spacing: .3px;
}
.spinner-sub { color: rgba(255,255,255,.5); font-size: .83rem; margin-top: -10px; text-align: center; }

/* ═══════════════════════════════════════════════
   PANEL ADMINISTRADOR — SIDEBAR
   ═══════════════════════════════════════════════ */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--olympic-dark) 0%, #001a4d 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1040;
  transition: transform .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.sidebar-logo {
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.sidebar-logo .logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--olympic-gold), #ff9f00);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.sidebar-logo .logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.sidebar-logo .logo-sub {
  font-size: .7rem;
  color: rgba(255,255,255,.5);
  font-weight: 400;
}

.sidebar-section {
  padding: 20px 16px 8px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.35);
}
.sidebar-nav { padding: 8px 12px; flex: 1; }
.sidebar-nav-item { margin-bottom: 2px; }
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,.7);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}
.sidebar-nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  opacity: .8;
}
.sidebar-nav-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.sidebar-nav-link.active {
  background: linear-gradient(135deg, rgba(255,215,0,.2), rgba(0,82,204,.4));
  color: var(--olympic-gold);
  border-left: 3px solid var(--olympic-gold);
}
.sidebar-nav-link .badge-sidebar {
  margin-left: auto;
  background: var(--olympic-red);
  color: #fff;
  border-radius: 50px;
  font-size: .65rem;
  padding: 2px 7px;
  font-weight: 700;
}
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}
.sidebar-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--olympic-gold), #ff9f00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--olympic-blue);
  font-size: .9rem;
  flex-shrink: 0;
}
.sidebar-username { font-size: .8rem; font-weight: 600; color: #fff; }
.sidebar-userrole { font-size: .7rem; color: rgba(255,255,255,.45); }
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
  font-size: .75rem;
  text-decoration: none;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--transition);
}
.sidebar-logout:hover { background: rgba(230,57,70,.2); color: #ff6b6b; }

/* ── Admin Main Content ── */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.topbar-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--olympic-dark);
}
.topbar-breadcrumb {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.btn-topbar {
  background: none;
  border: 1.5px solid #e0e7ef;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: .8rem;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-topbar:hover { border-color: var(--olympic-blue); color: var(--olympic-blue); }
.btn-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--olympic-dark);
  cursor: pointer;
  padding: 4px;
}

.admin-content { padding: 28px; flex: 1; }

/* ── Stats Cards ── */
.stat-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: var(--transition);
  border: 1.5px solid transparent;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-lg);
  border-color: var(--olympic-gold);
}
.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
}
.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--olympic-dark);
  line-height: 1;
}
.stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.stat-trend { font-size: .75rem; font-weight: 600; margin-top: 2px; }
.stat-trend.up { color: var(--olympic-green); }
.stat-trend.neutral { color: var(--text-muted); }

/* ── Table Card ── */
.table-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.table-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.table-card-header h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--olympic-dark);
  margin: 0;
}
.table-card-body { padding: 0 }
.table-olimpiadas {
  width: 100% !important;
  font-size: .875rem;
}
.table-olimpiadas thead th {
  background: var(--bg-light);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-bottom: 1.5px solid #e9ecef;
  padding: 12px 16px;
  white-space: nowrap;
}
.table-olimpiadas tbody td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f5f7fa;
  color: var(--text-main);
}
.table-olimpiadas tbody tr:hover { background: #f8faff; }
.table-olimpiadas tbody tr:last-child td { border-bottom: none; }

/* ── Form Card ── */
.form-card {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.form-card-header {
  background: linear-gradient(135deg, var(--olympic-blue), #0052cc);
  padding: 20px 28px;
  color: #fff;
}
.form-card-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.form-card-body { padding: 28px; }

/* ── Badges ── */
.badge { border-radius: 50px !important; font-weight: 600 !important; }
.badge-pendiente  { background: #fff8e1 !important; color: #b84000 !important; border: 1px solid #ffcc02; }
.badge-aceptado   { background: #e8f5e9 !important; color: #1b5e20 !important; border: 1px solid #81c784; }
.badge-rechazado  { background: #fce4ec !important; color: #b71c1c !important; border: 1px solid #ef9a9a; }

/* ── Medallas ── */
.medalla-oro    { color: #ff9f00; font-weight: 700; }
.medalla-plata  { color: #9e9e9e; font-weight: 700; }
.medalla-bronce { color: #8B4513; font-weight: 700; }

/* ── Botones Admin ── */
.btn-olympic {
  background: linear-gradient(135deg, var(--olympic-blue), #0052cc);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: .85rem;
  padding: 8px 18px;
  transition: var(--transition);
}
.btn-olympic:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,48,135,.3);
  color: #fff !important;
}
.btn-gold {
  background: linear-gradient(135deg, var(--olympic-gold), #ff9f00);
  color: var(--olympic-blue) !important;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .85rem;
  padding: 8px 18px;
  transition: var(--transition);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255,215,0,.35);
  color: var(--olympic-blue) !important;
}

/* ── Disciplinas chips ── */
.disc-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 50px;
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
  margin: 2px;
}

/* ── Avatar Usuario ── */
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--olympic-blue), #0052cc);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

/* ── Detail Overlay / Modal ── */
.detail-modal .modal-header {
  background: linear-gradient(135deg, var(--olympic-blue), #0052cc);
  color: #fff;
  border-bottom: none;
}
.detail-modal .modal-header .modal-title { color: #fff; font-weight: 700; }
.detail-modal .modal-header .btn-close { filter: invert(1); }
.detail-row { display: flex; margin-bottom: 10px; font-size: .875rem; }
.detail-row .detail-key { min-width: 160px; font-weight: 600; color: var(--text-muted); }
.detail-row .detail-val { color: var(--text-main); flex: 1; }

/* ═══════════════════════════════════════════════
   PORTAL DEPORTISTA
   ═══════════════════════════════════════════════ */
.deportista-hero {
  background: linear-gradient(135deg, var(--olympic-dark) 0%, #001a4d 100%);
  padding: 40px 0 60px;
  position: relative;
  overflow: hidden;
}
.deportista-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,0,.12) 0%, transparent 70%);
}
.deportista-greeting { color: rgba(255,255,255,.7); font-size: .9rem; }
.deportista-name {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 4px 0;
}
.deportista-code { color: var(--olympic-gold); font-size: .85rem; font-weight: 600; }

.disc-card-deportista {
  background: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  text-decoration: none;
  display: block;
  height: 100%;
}
.disc-card-deportista:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-lg);
}
.disc-card-banner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.disc-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.3));
}
.disc-card-body { padding: 16px; }
.disc-card-name { font-size: .9rem; font-weight: 700; color: var(--olympic-dark); margin: 0 0 4px; }
.disc-card-meta { font-size: .75rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* ── Scoreboard ── */
.scoreboard { background: #fff; border-radius: var(--border-radius); overflow: hidden; box-shadow: var(--card-shadow); }
.scoreboard-header {
  background: linear-gradient(135deg, var(--olympic-blue), #0052cc);
  padding: 18px 24px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
.score-row {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #f5f7fa;
  transition: var(--transition);
}
.score-row:hover { background: #f8faff; }
.score-pos {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: .85rem;
  margin-right: 14px;
  flex-shrink: 0;
}
.pos-1 { background: var(--olympic-gold); color: var(--olympic-dark); }
.pos-2 { background: #e0e0e0; color: #333; }
.pos-3 { background: #cd7f32; color: #1a0a00; }
.pos-n { background: var(--bg-light); color: var(--text-muted); }

/* ── Login Page ── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--olympic-dark) 0%, #001a4d 100%);
  position: relative;
  overflow: hidden;
}
.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  z-index: 2;
}
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  z-index: 2;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--olympic-blue);
  margin: 12px 0 4px;
}
.login-logo p { color: var(--text-muted); font-size: .85rem; margin: 0; }
.login-rings {
  font-size: 2rem;
  letter-spacing: -4px;
  display: block;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .login-left { display: none; }
  .login-card { padding: 32px 24px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .btn-sidebar-toggle { display: block; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1039;
  }
  .sidebar-overlay.show { display: block; }
}

/* ── DataTables overrides ── */
div.dataTables_wrapper { padding: 0; }
div.dataTables_filter input {
  border: 1.5px solid #e0e7ef;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .85rem;
}
div.dataTables_length select {
  border: 1.5px solid #e0e7ef;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: .85rem;
}
.dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  font-size: .8rem !important;
  padding: 4px 10px !important;
}
.dataTables_paginate .paginate_button.current {
  background: var(--olympic-blue) !important;
  border-color: var(--olympic-blue) !important;
  color: #fff !important;
}
.dataTables_paginate .paginate_button:hover:not(.current) {
  background: var(--bg-light) !important;
  border-color: #e0e7ef !important;
  color: var(--text-main) !important;
}

/* ── Toasts ── */
.toast-container { z-index: 9999; }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease forwards; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.pulse { animation: pulse 1.5s infinite; }
@keyframes shimmer {
  0%  { background-position: -200% center; }
  100%{ background-position: 200% center; }
}
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% auto;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  color: transparent;
  pointer-events: none;
}

/* ── Animaciones de iconos de disciplinas ── */
@keyframes iconWiggle {
  0%,100% { transform: rotate(0deg) scale(1); }
  20%     { transform: rotate(-12deg) scale(1.1); }
  40%     { transform: rotate(10deg) scale(1.12); }
  60%     { transform: rotate(-8deg) scale(1.08); }
  80%     { transform: rotate(6deg) scale(1.05); }
}
@keyframes iconPop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35) rotate(-5deg); }
  55%  { transform: scale(.9) rotate(3deg); }
  75%  { transform: scale(1.15) rotate(-2deg); }
  100% { transform: scale(1.1) rotate(0deg); }
}
@keyframes iconFloat {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-5px); }
}
@keyframes iconSpin {
  0%   { transform: scale(1) rotate(0deg); }
  50%  { transform: scale(1.2) rotate(180deg); }
  100% { transform: scale(1.1) rotate(360deg); }
}

/* Formulario — hover sobre tarjeta de disciplina */
.disc-label:hover .disc-ico {
  animation: iconWiggle .5s ease forwards;
}

/* Landing — hover sobre tarjeta de disciplina */
.disc-card:hover .disc-icon {
  animation: iconWiggle .5s ease forwards;
}

/* Portal deportista — icono en banner */
.disc-card-deportista:hover .disc-card-banner i,
.disc-card-deportista:hover .disc-card-banner .fa {
  animation: iconPop .4s cubic-bezier(.36,.07,.19,.97) forwards;
  display: inline-block;
}

/* ── Scrollbar global ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,48,135,.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,48,135,.4); }

/* ── Footer público ── */
.footer-olimpiadas {
  background: var(--olympic-dark);
  color: rgba(255,255,255,.6);
  padding: 40px 0 24px;
  font-size: .875rem;
}
.footer-olimpiadas a { color: var(--olympic-gold); }
.footer-olimpiadas .footer-copy { color: rgba(255,255,255,.3); font-size: .8rem; margin-top: 24px; }
