/* ==========================================================================
   TRAILFIT - 2026 DOPAMINE DESIGN SYSTEM
   Diseño de Alta Energía, Saturación Neón, Glassmorphism y Nostalgia Y2K
   Optimizado para Móvil, Tablet, PWA y Escritorio
   ========================================================================== */

:root {
  /* Fondo Espacial Obsidiana Profundo */
  --bg-dark: #060811;
  --bg-card: rgba(13, 20, 36, 0.78);
  --bg-card-hover: rgba(20, 31, 56, 0.9);
  --bg-surface: #10192d;
  --bg-surface-elevated: #16223e;
  --bg-input: #080d19;
  
  /* Bordes de Alto Contraste y Vidrio Esmerilado */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-focus: #00ff87;
  
  /* Paleta Dopamina Neón 2026 */
  --primary: #00ff87;               /* Electric Cyber Lime */
  --primary-hover: #10ff98;
  --primary-glow: rgba(0, 255, 135, 0.45);
  --primary-light: rgba(0, 255, 135, 0.12);
  
  --accent: #00f0ff;                /* Hyper Cyan */
  --accent-hover: #38f8ff;
  --accent-glow: rgba(0, 240, 255, 0.45);
  --accent-light: rgba(0, 240, 255, 0.12);
  
  --magenta: #ff007f;               /* Dopamine Fuchsia / Y2K Pink */
  --magenta-glow: rgba(255, 0, 127, 0.55);
  --magenta-light: rgba(255, 0, 127, 0.15);
  
  --warning: #ffb703;               /* Laser Amber / Gold */
  --warning-glow: rgba(255, 183, 3, 0.45);
  --warning-light: rgba(255, 183, 3, 0.15);
  
  --danger: #ff3366;                /* Neon Crimson */
  --danger-light: rgba(255, 51, 102, 0.15);
  
  --trail: #a855f7;                 /* Ultra Violet */
  --trail-glow: rgba(168, 85, 247, 0.45);
  --trail-light: rgba(168, 85, 247, 0.15);

  /* Texto */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  /* Radios y Sombras */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 25px rgba(0, 255, 135, 0.3);
  --shadow-neon-cyan: 0 0 25px rgba(0, 240, 255, 0.35);
  --shadow-neon-magenta: 0 0 25px rgba(255, 0, 127, 0.45);
  
  /* Tipografía */
  --font-main: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 95px; /* Espacio para el timer flotante */
  position: relative;
  overflow-x: hidden;
}

/* ==========================================================================
   ILUMINACIÓN DE AMBIENTE / NEON MESH GLOWS
   ========================================================================== */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
  animation: floatAmbient 18s ease-in-out infinite alternate;
}

.glow-cyan {
  top: -100px;
  left: 10%;
  width: 460px;
  height: 460px;
  background: #00f0ff;
}

.glow-fuchsia {
  bottom: 25%;
  right: -80px;
  width: 500px;
  height: 500px;
  background: #ff007f;
  animation-delay: -6s;
}

.glow-lime {
  top: 50%;
  left: -120px;
  width: 440px;
  height: 440px;
  background: #00ff87;
  animation-delay: -12s;
}

@keyframes floatAmbient {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
  100% { transform: translate(-20px, -20px) scale(0.95); }
}

/* Utilidades */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ==========================================================================
   HEADER & BRANDING
   ========================================================================== */
.app-header {
  background: rgba(6, 8, 17, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #00ff87 0%, #00f0ff 50%, #ff007f 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 255, 135, 0.45), 0 0 35px rgba(0, 240, 255, 0.25);
  transition: var(--transition);
}

.brand-icon:hover {
  transform: rotate(-3deg) scale(1.05);
  box-shadow: 0 0 28px rgba(0, 255, 135, 0.65), 0 0 45px rgba(255, 0, 127, 0.35);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
  stroke: #060811;
  stroke-width: 2.4;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: #ffffff;
}

.brand-title span,
.brand-title .neon-gradient-text {
  background: linear-gradient(135deg, #00ff87 0%, #00f0ff 50%, #ff007f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 255, 135, 0.5));
}

.brand-subtitle {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Selector Estilizado de Semanas */
.week-selector-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 3px 6px 3px 12px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.week-selector-wrapper:hover,
.week-selector-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.selector-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.6px;
  margin-right: 6px;
}

.styled-select {
  background: transparent;
  color: var(--text-main);
  border: none;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 8px;
  cursor: pointer;
  outline: none;
  border-radius: var(--radius-sm);
}

.styled-select option {
  background: #0d1424;
  color: var(--text-main);
  font-weight: 600;
}

/* ==========================================================================
   BOTONES CON DISEÑO DE DOPAMINA NEÓN
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

/* Botón Primario: Electric Cyber Lime & Cyan */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #00e5ff 100%);
  color: #040812;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 0 18px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.12);
  transform: translateY(-1.5px);
  box-shadow: 0 0 28px rgba(0, 255, 135, 0.65), 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Botón Acento: Dopamine Fuchsia & Sunset Amber */
.btn-accent {
  background: linear-gradient(135deg, var(--magenta) 0%, var(--warning) 100%);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 0 16px var(--magenta-glow);
}

.btn-accent:hover {
  filter: brightness(1.15);
  transform: translateY(-1.5px);
  box-shadow: 0 0 26px rgba(255, 0, 127, 0.65);
}

/* Botón Outline: Vidrio Esmerilado con Halo Hyper Cyan */
.btn-outline {
  background: rgba(16, 25, 45, 0.7);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(22, 35, 62, 0.9);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: translateY(-1.5px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-icon {
  padding: 0.6rem;
  background: rgba(16, 25, 45, 0.7);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.btn-icon:hover {
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-large {
  padding: 0.9rem 1.9rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(255, 51, 102, 0.4);
}

.btn-danger:hover {
  background: #ff1a53;
  box-shadow: 0 0 22px rgba(255, 51, 102, 0.6);
}

/* Badges con Saturación Dopamina */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(0, 255, 135, 0.4);
  box-shadow: 0 0 10px rgba(0, 255, 135, 0.2);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(255, 183, 3, 0.4);
  box-shadow: 0 0 10px rgba(255, 183, 3, 0.2);
}

.badge-timer {
  background: rgba(255, 183, 3, 0.18);
  color: var(--warning);
  font-family: var(--font-mono);
  font-weight: 800;
  border: 1px solid rgba(255, 183, 3, 0.45);
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   CONTENEDOR PRINCIPAL
   ========================================================================== */
.main-container {
  max-width: 1120px;
  width: 100%;
  margin: 1.75rem auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   BANNER DE FASE Y BARRA DE PROGRESO IRIDISCENTE
   ========================================================================== */
.phase-banner {
  background: linear-gradient(135deg, rgba(20, 31, 56, 0.85) 0%, rgba(13, 20, 36, 0.95) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 1.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.phase-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 50%, var(--magenta) 100%);
  box-shadow: 0 0 15px var(--primary-glow);
}

.phase-info h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0.5rem 0 0.35rem 0;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.phase-info p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 620px;
  line-height: 1.55;
}

.progress-ring-card {
  background: rgba(16, 25, 45, 0.8);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.session-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.6px;
}

.progress-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary);
  font-family: var(--font-mono);
  text-shadow: 0 0 12px var(--primary-glow);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Efecto Holográfico / Iridiscente en Progreso */
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff87 0%, #00f0ff 40%, #ff007f 80%, #00ff87 100%);
  background-size: 250% 100%;
  border-radius: 9999px;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.6);
  animation: shimmerGrad 5s linear infinite;
  transition: width 0.4s ease;
}

@keyframes shimmerGrad {
  0% { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}

.progress-counter {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ==========================================================================
   TARJETA GENERAL & GLASSMORPHISM
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* ==========================================================================
   MOVILIDAD PREVIA (5 MINUTOS)
   ========================================================================== */
.mobility-card {
  border-left: 4px solid var(--warning);
}

.card-header-toggle {
  padding: 1.15rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

.card-header-toggle:hover {
  background: rgba(255, 255, 255, 0.03);
}

.mobility-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobility-icon {
  width: 42px;
  height: 42px;
  background: var(--warning-light);
  border: 1px solid rgba(255, 183, 3, 0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
  box-shadow: 0 0 14px var(--warning-glow);
}

.mobility-title h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.mobility-toggle-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chevron {
  transition: transform 0.3s ease;
}

.mobility-card.open .chevron {
  transform: rotate(180deg);
}

.mobility-body {
  display: none;
  padding: 1.25rem 1.4rem 1.4rem;
  border-top: 1px solid var(--border-color);
  background: rgba(8, 13, 25, 0.6);
}

.mobility-card.open .mobility-body {
  display: block;
}

.mobility-timer-control {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.mobility-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Checkbox Personalizado Neón */
.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 22px;
  height: 22px;
  min-width: 22px;
  background-color: var(--bg-input);
  border: 2px solid var(--border-light);
  border-radius: 7px;
  margin-top: 2px;
  position: relative;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.custom-checkbox:hover input ~ .checkmark {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.custom-checkbox input:checked ~ .checkmark {
  background: linear-gradient(135deg, var(--primary) 0%, #00e5ff 100%);
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 11px;
  border: solid #040812;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
  display: block;
}

.custom-checkbox .label-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.45;
}

.custom-checkbox input:checked ~ .label-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ==========================================================================
   TABS DE DÍAS (DÍA 1 / DÍA 2)
   ========================================================================== */
.day-tabs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.day-tab {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.4rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.day-tab:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 240, 255, 0.25);
}

.day-tab.active {
  background: linear-gradient(135deg, rgba(16, 25, 45, 0.95) 0%, rgba(22, 35, 62, 0.9) 100%);
  border-color: var(--primary);
  box-shadow: 0 0 26px var(--primary-glow), inset 0 0 15px rgba(0, 255, 135, 0.08);
  transform: translateY(-2px);
}

.day-tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.tab-badge {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--accent);
  text-transform: uppercase;
}

.day-tab.active .tab-badge {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

.tab-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.tab-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   BANNER DE SUGERENCIA / SOBRECARGA PROGRESIVA
   ========================================================================== */
.advice-card {
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.12) 0%, rgba(13, 20, 36, 0.95) 100%);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 4px 18px rgba(0, 240, 255, 0.1);
  backdrop-filter: blur(12px);
}

.advice-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--accent-light);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.advice-content h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.25rem;
  letter-spacing: 0.2px;
}

.advice-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   TARJETAS DE EJERCICIOS
   ========================================================================== */
.exercises-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.exercise-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.exercise-card.completed {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(16, 25, 45, 0.95) 0%, rgba(0, 255, 135, 0.05) 100%);
  box-shadow: 0 0 28px rgba(0, 255, 135, 0.2);
}

.exercise-header {
  padding: 1.35rem 1.4rem;
  background: rgba(16, 25, 45, 0.5);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.exercise-title-group {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
}

.exercise-index {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--accent);
  font-family: var(--font-mono);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.exercise-card.completed .exercise-index {
  background: var(--primary);
  color: #040812;
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.exercise-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.exercise-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.exercise-quick-specs {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.spec-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.spec-chip strong {
  color: #ffffff;
  font-weight: 700;
}

/* Cuerpo del Ejercicio */
.exercise-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

/* Caja de Objetivo y Recomendación */
.purpose-box {
  background: rgba(8, 13, 25, 0.65);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.85rem 1.15rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.purpose-box strong {
  color: var(--accent);
}

.recommendation-strip {
  background: rgba(255, 183, 3, 0.08);
  border: 1px dashed rgba(255, 183, 3, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #fef08a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.progression-pill {
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(0, 255, 135, 0.2);
  color: var(--primary);
  border: 1px solid rgba(0, 255, 135, 0.4);
  padding: 2px 10px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Tabla de Series */
.sets-table-wrapper {
  overflow-x: auto;
}

.sets-table {
  width: 100%;
  border-collapse: collapse;
}

.sets-table th {
  text-align: left;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 0.6rem 0.85rem;
  letter-spacing: 0.6px;
}

.sets-table td {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.set-row {
  transition: var(--transition);
}

.set-row.completed-row {
  background: rgba(0, 255, 135, 0.06);
}

.set-label {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
}

.set-prev-weight {
  font-size: 0.76rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

/* Stepper de Peso y Repeticiones */
.stepper-input {
  display: inline-flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.stepper-input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.stepper-btn {
  background: var(--bg-surface);
  border: none;
  color: var(--text-main);
  width: 34px;
  height: 38px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  user-select: none;
}

.stepper-btn:hover {
  background: var(--primary);
  color: #040812;
  box-shadow: 0 0 10px var(--primary-glow);
}

.stepper-btn:active {
  transform: scale(0.92);
}

.stepper-value {
  width: 62px;
  height: 38px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 800;
  text-align: center;
  outline: none;
}

/* Botón Check Serie */
.btn-set-check {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: var(--transition);
  user-select: none;
}

.btn-set-check:hover {
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 12px var(--primary-glow);
}

.set-row.completed-row .btn-set-check {
  background: linear-gradient(135deg, var(--primary) 0%, #00e5ff 100%);
  border-color: var(--primary);
  color: #040812;
  font-weight: 800;
  box-shadow: 0 0 16px var(--primary-glow);
}

/* Selector de RIR / Esfuerzo */
.rir-select {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  outline: none;
  font-weight: 600;
  transition: var(--transition);
}

.rir-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   FLOATING REST TIMER WIDGET (CYBER PILL NEÓN)
   ========================================================================== */
.timer-float-widget {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(130px);
  z-index: 100;
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  width: 90%;
  max-width: 450px;
}

.timer-float-widget.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.timer-float-inner {
  background: rgba(13, 20, 36, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.65), 0 0 35px var(--primary-glow);
}

.timer-radial {
  position: relative;
  width: 48px;
  height: 48px;
  min-width: 48px;
}

.timer-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-circle-bg {
  fill: none;
  stroke: var(--bg-surface);
  stroke-width: 3.5;
}

.timer-circle-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-dasharray: 100.5;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px var(--primary));
  transition: stroke-dashoffset 0.5s linear;
}

.timer-seconds {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 900;
  color: #ffffff;
}

.timer-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.timer-exercise-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.timer-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.timer-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-close-timer {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.btn-close-timer:hover {
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

/* ==========================================================================
   PANEL DE FIN DE SESIÓN
   ========================================================================== */
.session-finish-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 1.75rem 0;
}

/* ==========================================================================
   CALENDARIO DE DÍAS CUMPLIDOS (TACHADO FLUORESCENTE 2026)
   ========================================================================== */
.calendar-card {
  border-left: 4px solid var(--accent);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.calendar-card.highlight-section {
  box-shadow: 0 0 35px var(--accent-glow);
  border-color: var(--accent);
}

.calendar-card-header {
  padding: 1.35rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(16, 25, 45, 0.5);
  border-bottom: 1px solid var(--border-color);
}

.calendar-title-group {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.calendar-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--accent-light);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.calendar-title-group h3 {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
}

.calendar-metrics {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.metric-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.metric-val {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--accent);
  line-height: 1.1;
  text-shadow: 0 0 12px var(--accent-glow);
}

.metric-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
}

.calendar-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.calendar-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cal-nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.calendar-month-label {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  min-width: 180px;
  text-align: center;
  text-transform: capitalize;
  letter-spacing: 0.2px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  text-align: center;
}

.calendar-weekdays span {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

/* Casilla de Día */
.calendar-day {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-height: 64px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  user-select: none;
}

.calendar-day:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: translateY(-2px);
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.calendar-day.today .cal-day-num {
  color: var(--accent);
  font-weight: 900;
}

.calendar-day.other-month {
  opacity: 0.25;
}

.cal-day-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  z-index: 1;
}

/* ==========================================================================
   EFECTO DE TACHADO ATLÉTICO NEÓN FLUORESCENTE
   Dopamine Magenta Cross-Off
   ========================================================================== */
.calendar-day.crossed-day {
  background: rgba(13, 20, 36, 0.95);
}

.calendar-day.crossed-day.status-day1 {
  border-color: rgba(0, 255, 135, 0.6);
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.15) 0%, rgba(13, 20, 36, 0.95) 100%);
}

.calendar-day.crossed-day.status-day2 {
  border-color: rgba(0, 240, 255, 0.6);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(13, 20, 36, 0.95) 100%);
}

.calendar-day.crossed-day.status-mobility {
  border-color: rgba(255, 183, 3, 0.6);
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.15) 0%, rgba(13, 20, 36, 0.95) 100%);
}

/* Doble aspa de tachado fluorescente magenta neón */
.calendar-day.crossed-day::before,
.calendar-day.crossed-day::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 8%;
  width: 84%;
  height: 3px;
  background: #ff007f;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 10px #ff007f, 0 0 20px rgba(255, 0, 127, 0.8);
  opacity: 0.95;
}

.calendar-day.crossed-day::before {
  transform: translateY(-50%) rotate(-42deg);
}

.calendar-day.crossed-day::after {
  transform: translateY(-50%) rotate(42deg);
}

.calendar-day.crossed-day .cal-day-num {
  text-decoration: line-through;
  opacity: 0.65;
}

.cal-day-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  width: 100%;
  margin-top: auto;
  z-index: 4;
}

/* Badges de Actividades con Colores Vivos */
.cal-day-tag {
  font-size: 0.64rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 5px;
  line-height: 1.25;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.cal-day-tag.tag-day1 {
  background: rgba(0, 255, 135, 0.25);
  color: #00ff87;
  border: 1px solid rgba(0, 255, 135, 0.6);
  box-shadow: 0 0 6px rgba(0, 255, 135, 0.3);
}

.cal-day-tag.tag-day2 {
  background: rgba(0, 240, 255, 0.25);
  color: #00f0ff;
  border: 1px solid rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.3);
}

.cal-day-tag.tag-mobility {
  background: rgba(255, 183, 3, 0.25);
  color: #ffb703;
  border: 1px solid rgba(255, 183, 3, 0.6);
  box-shadow: 0 0 6px rgba(255, 183, 3, 0.3);
}

.cal-day-tag.tag-trail {
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.3);
}

.calendar-day.crossed-day.has-day1.has-mobility {
  border-color: rgba(0, 255, 135, 0.7);
  background: linear-gradient(135deg, rgba(0, 255, 135, 0.2) 0%, rgba(255, 183, 3, 0.16) 100%);
}

.calendar-day.crossed-day.has-day2.has-mobility {
  border-color: rgba(0, 240, 255, 0.7);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2) 0%, rgba(255, 183, 3, 0.16) 100%);
}

/* Leyenda del Calendario */
.calendar-legend {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-day1 { background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.dot-day2 { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.dot-mobility { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.dot-trail { background: #a855f7; box-shadow: 0 0 8px #a855f7; }
.dot-empty { background: var(--text-subtle); }

.legend-cross {
  color: #ff007f;
  font-weight: 900;
  font-size: 1rem;
  text-shadow: 0 0 8px #ff007f;
}

.legend-hint {
  margin-left: auto;
  color: var(--text-subtle);
  font-size: 0.78rem;
}

/* Acciones Rápidas del Modal de Calendario */
.cal-quick-actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.cal-status-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0 1.25rem 0;
}

.cal-option-card {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  cursor: pointer;
  transition: var(--transition);
}

.cal-option-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.cal-option-card input[type="checkbox"] {
  accent-color: var(--primary);
  width: 20px;
  height: 20px;
  min-width: 20px;
  cursor: pointer;
}

.cal-option-card:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: rgba(0, 255, 135, 0.1);
  box-shadow: 0 0 16px var(--primary-glow);
}

.cal-option-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.cal-option-content strong {
  font-size: 0.95rem;
  color: #ffffff;
}

/* ==========================================================================
   INPUTS ESTILIZADOS
   ========================================================================== */
.styled-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.92rem;
  padding: 0.75rem 0.95rem;
  outline: none;
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.styled-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ==========================================================================
   MODALES (GLASSMORPHISM ELEVADO)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  animation: fadeIn 0.22s ease;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: linear-gradient(145deg, rgba(20, 31, 56, 0.95) 0%, rgba(10, 15, 28, 0.98) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  max-width: 590px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.15);
  overflow: hidden;
}

.modal-wide {
  max-width: 800px;
}

.modal-header {
  padding: 1.35rem 1.6rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-body {
  padding: 1.6rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.modal-footer {
  padding: 1.15rem 1.6rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  background: rgba(8, 13, 25, 0.6);
}

/* Cajas de Reglas dentro del Modal */
.rule-box {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rule-box h4 {
  font-size: 1.05rem;
  font-weight: 800;
}

.rule-box p, .rule-box ul {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.rule-box ul {
  padding-left: 1.35rem;
}

.rule-box li {
  margin-bottom: 0.4rem;
}

.rule-gold {
  background: rgba(255, 183, 3, 0.08);
  border: 1px solid rgba(255, 183, 3, 0.35);
  box-shadow: 0 0 15px rgba(255, 183, 3, 0.1);
}
.rule-gold h4 { color: #ffb703; }

.rule-silver {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}
.rule-silver h4 { color: #00f0ff; }

.rule-mountain {
  background: rgba(0, 255, 135, 0.08);
  border: 1px solid rgba(0, 255, 135, 0.35);
  box-shadow: 0 0 15px rgba(0, 255, 135, 0.1);
}
.rule-mountain h4 { color: #00ff87; }

.rule-note {
  font-size: 0.84rem;
  color: #fef08a !important;
  margin-top: 0.35rem;
}

/* Gráfico y Estadísticas */
.chart-container {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

#progressionChart {
  width: 100% !important;
  height: 220px !important;
}

.chart-empty {
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
  max-width: 340px;
  line-height: 1.5;
}

.history-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.history-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-weight: 800;
  text-align: left;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border-color);
}

.history-table td {
  padding: 0.75rem 0.95rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-main);
}

/* Settings Form */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-group:last-child {
  border-bottom: none;
}

.button-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.file-upload-btn {
  cursor: pointer;
}

/* Toast Neón */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(13, 20, 36, 0.96);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.4rem;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px var(--primary-glow);
  z-index: 2000;
  transform: translateY(-50px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  pointer-events: none;
  max-width: 380px;
  backdrop-filter: blur(12px);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   PWA INSTALL BUTTON & GUIDE
   ========================================================================== */
.pwa-install-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #00a8cc 100%);
  color: #040812;
  font-weight: 800;
  box-shadow: 0 0 18px var(--accent-glow);
}

.pwa-install-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1.5px);
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.65);
}

.pwa-steps-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.pwa-step {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pwa-badge {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-block;
  align-self: flex-start;
  padding: 2px 7px;
  border-radius: 4px;
}

/* ==========================================================================
   NUBE SUPABASE Y AUTENTICACIÓN
   ========================================================================== */
.cloud-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cloud-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  transition: var(--transition);
}

.dot-offline {
  background: #64748b;
}

.dot-synced {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.dot-syncing {
  background: var(--warning);
  box-shadow: 0 0 10px var(--warning);
  animation: pulseSync 0.9s infinite alternate;
}

.dot-error {
  background: var(--danger);
  box-shadow: 0 0 10px var(--danger);
}

@keyframes pulseSync {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.2); }
}

.modal-title-with-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(0, 255, 135, 0.25) 100%);
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.sync-status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.user-avatar-circle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, #00e5ff 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #040812;
  box-shadow: 0 0 18px var(--primary-glow);
}

.btn-danger-hover:hover {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.5) !important;
}

/* Auth Tabs & Form */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-input);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.auth-tab {
  flex: 1;
  padding: 9px 14px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab:hover {
  color: var(--text-main);
}

.auth-tab.active {
  background: var(--bg-surface-elevated);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

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

.auth-alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.45;
}

.alert-danger {
  background: rgba(255, 51, 102, 0.15);
  border: 1px solid var(--danger);
  color: #fca5a5;
}

.alert-success {
  background: rgba(0, 255, 135, 0.15);
  border: 1px solid var(--primary);
  color: #6ee7b7;
}

/* Acordeón de Configuración Supabase */
.supabase-config-accordion {
  margin-top: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.btn-toggle-config {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 2px;
  font-family: var(--font-main);
  transition: var(--transition);
}

.btn-toggle-config:hover {
  color: var(--accent);
}

.btn-toggle-config.open .chevron {
  transform: rotate(180deg);
}

.config-body {
  margin-top: 10px;
  background: rgba(8, 13, 25, 0.65);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

.sql-code-box {
  background: #040711;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #38bdf8;
  overflow-x: auto;
  line-height: 1.5;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   RESPONSIVIDAD MÓVIL Y TABLET
   ========================================================================== */
@media (max-width: 768px) {
  .phase-banner {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }
  
  .day-tabs-container {
    grid-template-columns: 1fr;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .week-selector-wrapper {
    flex: 1;
  }

  .styled-select {
    width: 100%;
  }

  .sets-table th, .sets-table td {
    padding: 0.55rem 0.35rem;
  }

  .stepper-btn {
    width: 30px;
    height: 34px;
    font-size: 0.95rem;
  }

  .stepper-value {
    width: 50px;
    height: 34px;
    font-size: 0.88rem;
  }

  .btn-set-check {
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
  }

  .calendar-day {
    min-height: 48px;
    padding: 4px 5px;
    border-radius: var(--radius-sm);
  }

  .cal-day-num {
    font-size: 0.78rem;
  }

  .cal-day-tag {
    font-size: 0.58rem;
    padding: 1px 3px;
  }

  .calendar-month-label {
    min-width: 135px;
    font-size: 1rem;
  }

  .calendar-metrics {
    width: 100%;
    justify-content: space-between;
  }

  .legend-hint {
    width: 100%;
    margin-left: 0;
  }
}
