﻿:root {
  /* LEVELING UP CORPORATE BRAND TOKENS (Paleta Oficial de Marca) */
  --bg-main: #14192B;           /* Azul marino ultra oscuro para evitar fatiga visual del negro */
  --bg-card: #28314E;           /* Azul marino exacto del logo para tarjetas, contenedores y modales */
  --brand-orange: #E15F39;      /* Naranja terracota del 'UP' del logo (CTAs, micro, bordes activos) */
  --brand-orange-hover: #ea704c;
  --brand-orange-soft: rgba(225, 95, 57, 0.25);
  --brand-orange-glow: rgba(225, 95, 57, 0.3);
  --text-primary: #FFFFFF;      /* Blanco puro para encabezados y lectura activa */
  --text-secondary: rgba(255, 255, 255, 0.7); /* Blanco al 70% para etiquetas, subtítulos y placeholders */

  /* Mapeos globales de compatibilidad */
  --bg-page: var(--bg-main);
  --bg-surface: var(--bg-card);
  --bg-subtle: #1c233a;
  --card-bg: var(--bg-card);
  --card-bg-high: #323d60;
  --text-main: var(--text-primary);
  --text-muted: var(--text-secondary);
  --primary-navy: var(--bg-main);
  --cta-orange: var(--brand-orange);
  --cta-orange-hover: var(--brand-orange-hover);
  --cta-orange-shadow: #9e3d22;
  --deike: var(--brand-orange);
  --deike-soft: var(--brand-orange-soft);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.22);
  --accent-dark: #1d4ed8;
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.20);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.20);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.25);
  --border-color: #38456c;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Grotesk', ui-monospace, monospace;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.app-wrapper {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  position: relative;
  transition: background-color 0.25s ease;
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 0.22s ease-out forwards;
}

.screen:not(.active) {
  display: none !important;
}

.screen.active {
  display: flex;
}

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

.scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 22px calc(96px + env(safe-area-inset-bottom, 0px)) 22px;
  -webkit-overflow-scrolling: touch;
}

/* Optimización táctil y PWA */
button, input, .quick-user-chip, .sec-pill-btn, .stage-row-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: white;
  padding: 2px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(13, 28, 50, 0.06);
}

.login-logo-img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: contain;
  background: white;
  padding: 6px;
  margin: 0 auto 14px auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 20px rgba(13, 28, 50, 0.08);
  display: block;
}

/* Header Global */
.app-header {
  padding: 12px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(13, 28, 50, 0.15);
}

.brand-titles h1 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-titles p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.streak-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  font-family: var(--font-mono);
}

.user-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.logout-btn:hover {
  background: #f1f5f9;
  color: var(--danger);
  border-color: #cbd5e1;
}

/* ========================================= */
/* PANTALLA DE LOGIN (AUDITADA Y OPTIMIZADA)  */
/* ========================================= */
.screen-login {
  background: var(--bg-page);
  min-height: 100vh;
}

.login-scroll-area {
  padding-top: max(16px, env(safe-area-inset-top, 16px));
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.login-top-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

.theme-text-label {
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
  font-family: var(--font-mono);
}

.login-hero {
  text-align: center;
  padding: 10px 0 12px 0;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* Alerta de Error Amigable (en lugar de alert nativo) */
.login-alert-box {
  display: none;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.35;
  animation: shakeError 0.3s ease;
}

.login-alert-box.visible {
  display: block;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.input-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.input-field {
  width: 100%;
  min-height: 48px; /* Táctil ergonómico >= 44px */
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 16px; /* Evita auto-zoom en iOS Safari al enfocar */
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-field.input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.btn-submit-login {
  width: 100%;
  min-height: 48px;
  background: var(--cta-orange);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--cta-orange-shadow);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.btn-submit-login:hover {
  background: var(--cta-orange-hover);
}

.btn-submit-login:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--cta-orange-shadow);
}

/* Cuentas de Acceso Rápido para Demostración */
.quick-access-box {
  margin-top: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
}

.quick-title {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.quick-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-user-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 48px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  touch-action: manipulation;
}

.quick-user-chip:hover {
  border-color: var(--accent);
  background: var(--card-bg-high);
  transform: translateY(-1px);
}

.quick-user-chip:active {
  transform: scale(0.985);
}

.qu-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.qu-name.kids {
  color: #ec4899;
}

.qu-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chip-enter-btn {
  font-weight: 800;
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  margin-left: 10px;
  transition: transform 0.15s ease;
}

.chip-enter-btn.deike {
  color: var(--cta-orange);
}

.chip-enter-btn.kids {
  color: #ec4899;
}

.quick-user-chip:active .chip-enter-btn {
  transform: translateX(3px);
}

/* ========================================= */
/* PANTALLA HOME                             */
/* ========================================= */
.hero-stage-card {
  background: var(--primary-navy);
  border-radius: 20px;
  padding: 24px;
  color: white;
  margin-bottom: 20px;
  box-shadow: 0 8px 26px rgba(13, 28, 50, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cta-orange);
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.hero-title {
  font-size: 21px;
  font-weight: 800;
  margin: 4px 0 14px 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hero-progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.hero-progress-fill {
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, var(--cta-orange), var(--success));
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.btn-hero-action {
  width: 100%;
  background: var(--cta-orange);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--cta-orange-shadow);
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-hero-action:hover {
  background: var(--cta-orange-hover);
}

.btn-hero-action:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--cta-orange-shadow);
}

/* Banner de Sección / Horario */
.schedule-info-banner {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.schedule-pill-tag {
  background: var(--accent-soft);
  color: var(--primary-navy);
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
}

/* Stages List */
.stages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-row-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stage-row-card:hover:not(.locked) {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.stage-row-card.locked {
  opacity: 0.6;
  cursor: default;
}

.stage-num-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.stage-row-info {
  flex: 1;
}

.stage-row-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.stage-row-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.stage-tag-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

/* ========================================= */
/* PANTALLA DE PRÁCTICA CALLAN CON SVG       */
/* ========================================= */
.practice-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.practice-progress-box {
  flex: 1;
}

.practice-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.practice-progress-bg {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.practice-progress-fill {
  height: 100%;
  width: 10%;
  background: var(--accent);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* CONTENEDOR DE ILUSTRACIÓN SVG CONTEXTUAL */
.visual-context-container {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.visual-svg-wrapper {
  width: 100%;
  max-width: 280px;
  height: 125px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-svg-wrapper svg {
  max-width: 100%;
  max-height: 100%;
}

.visual-cue-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  margin-top: 8px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.visual-cue-description {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* Caja del Profesor Callan */
.teacher-speech-box {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(13, 28, 50, 0.04);
}

.teacher-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.teacher-chip {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-navy);
  text-transform: uppercase;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

.btn-audio-repeat {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 9999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-audio-repeat:hover {
  border-color: var(--primary-navy);
}

.teacher-q-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.callan-note {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 8px;
}

/* Temporizador de Reflejos */
.timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.timer-pill-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  border: 1px solid var(--border-color);
}

.timer-pill-live.fast { background: var(--success-soft); color: #047857; border-color: #a7f3d0; }
.timer-pill-live.medium { background: var(--warning-soft); color: #b45309; border-color: #fde68a; }
.timer-pill-live.slow { background: var(--danger-soft); color: #b91c1c; border-color: #fecaca; }

/* Micrófono */
.mic-interactive-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px 0;
}

.big-mic-btn {
  width: 78px;
  height: 78px;
  border-radius: 50px;
  background: var(--brand-orange);
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 0 var(--cta-orange-shadow), 0 10px 24px rgba(225, 95, 57, 0.35);
  transition: all 0.15s ease;
}

.big-mic-btn:hover {
  background: var(--cta-orange-hover);
}

.big-mic-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--cta-orange-shadow);
}

.big-mic-btn.listening {
  background: #ba1a1a;
  box-shadow: 0 5px 0 #7a0d0d, 0 0 0 10px rgba(186, 26, 26, 0.2);
  animation: pulseMic 1.4s infinite;
}

@keyframes pulseMic {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.mic-subtext {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}

.transcript-bubble {
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-primary);
  font-style: italic;
  text-align: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.transcript-bubble.empty {
  color: #94a3b8;
  font-style: normal;
}

/* Feedback Card */
.feedback-card-callan {
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  display: none;
  animation: fadeIn 0.25s ease;
}

.feedback-card-callan.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
}

.feedback-card-callan.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.feedback-card-callan.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
}

.fb-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}

.fb-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
  margin-bottom: 8px;
}

.fb-model {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-main);
}

.fb-model strong {
  color: var(--accent);
}

.btn-model-audio {
  background: #eff6ff;
  border: 1px solid #3b82f6;
  color: #1d4ed8;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.15);
}

.btn-model-audio:hover {
  background: #dbeafe;
  border-color: #2563eb;
  transform: translateY(-1px);
}

.action-buttons-row {
  display: flex;
  gap: 12px;
}

.btn-secondary-action {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 9999px;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(13, 28, 50, 0.04);
}

.btn-secondary-action:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-navy);
}

.btn-primary-action {
  flex: 2;
  background: var(--cta-orange);
  border: none;
  color: #ffffff;
  border-radius: 9999px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--cta-orange-shadow);
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.btn-primary-action:hover {
  background: var(--cta-orange-hover);
}

.btn-primary-action:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--cta-orange-shadow);
}

.btn-primary-action:disabled {
  background: #d5d3ce;
  color: #7a7873;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.8;
  transform: none;
}

/* ========================================= */
/* PANEL DEL PROFESOR (REVISIÓN DE CLASE)    */
/* ========================================= */
.teacher-hub-header {
  background: var(--primary-navy);
  color: white;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(13, 28, 50, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.th-badge {
  background: rgba(254, 107, 0, 0.15);
  color: #ffb693;
  border: 1px solid rgba(254, 107, 0, 0.35);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.teacher-hub-header h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.teacher-hub-header p {
  font-size: 12px;
  color: #b9c7e4;
  line-height: 1.45;
}

/* ========================================= */
/* NAVEGACIÓN JERÁRQUICA DEL PANEL DOCENTE   */
/* ========================================= */
.th-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #09090e;
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 12px;
  overflow-x: auto;
}
.th-crumb {
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}
.th-crumb:hover { color: var(--orange); }
.th-crumb.active { color: #fff; font-weight: 700; cursor: default; }
.th-crumb-sep { color: #475569; font-size: 12px; }

.th-window-title {
  margin-bottom: 16px;
}
.th-window-title h3 {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.th-window-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Grilla de Modalidades */
.th-modalities-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.th-modality-card {
  background: #0b0b12;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.th-modality-card:hover {
  background: #141420;
  border-color: var(--cta-orange);
  transform: translateY(-2px);
}
.th-mod-icon {
  font-size: 26px;
  width: 48px;
  height: 48px;
  background: #181824;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.th-mod-body { flex: 1; }
.th-mod-body h4 { font-size: 15px; font-weight: 700; color: #fff; }
.th-mod-body p { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.th-mod-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #181824;
  border: 1px solid #28283a;
  color: #93c5fd;
}
.th-mod-arrow { font-size: 16px; color: var(--text-muted); transition: transform 0.2s; }
.th-modality-card:hover .th-mod-arrow { color: var(--cta-orange); transform: translateX(3px); }

/* Grilla de Selección Adults vs Kids */
.th-track-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 540px) {
  .th-track-choice-grid { grid-template-columns: 1fr; }
}
.th-track-card {
  background: #0b0b12;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.th-track-card:hover {
  background: #141420;
  border-color: #3b82f6;
  transform: translateY(-2px);
}
.th-track-card.kids-track-theme:hover {
  border-color: var(--cta-orange);
}
.th-track-icon { font-size: 36px; margin-bottom: 10px; }
.th-track-card h4 { font-size: 16px; font-weight: 800; color: #fff; }
.th-track-card p { font-size: 12px; color: var(--text-muted); margin: 6px 0 16px 0; }
.btn-track-action {
  background: #181824;
  border: 1px solid #334155;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

/* Grilla de Secciones (Animales y Colores) */
.th-sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.th-section-card {
  background: #0b0b12;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.th-section-card:hover {
  background: #141420;
  border-color: var(--cta-orange);
  transform: translateY(-2px);
}
.th-sec-info h4 { font-size: 16px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.th-sec-info p { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.th-sec-badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.badge-stage-pill {
  background: #1e1b4b;
  color: #c7d2fe;
  border: 1px solid #3730a3;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.badge-students-pill {
  background: #052e16;
  color: #6ee7b7;
  border: 1px solid #065f46;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.badge-lesson-pill {
  background: #281a0b;
  color: #fed7aa;
  border: 1px solid #7c2d12;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

/* ========================================================
   SECCIONES MINIMALISTAS (SOLO TÍTULOS Y APERTURA LIMPIA)
   ======================================================== */
.th-section-minimal-card {
  background: #0b0f19;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.th-section-minimal-card:hover {
  background: #131c31;
  border-color: var(--cta-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.15);
}

.th-sec-min-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.th-sec-min-code {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  font-family: monospace;
}

.th-sec-min-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.th-sec-min-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: #1e1b4b;
  color: #c7d2fe;
  border: 1px solid #3730a3;
}

/* ========================================================
   MÓDULOS EN ACORDEÓN MINIMALISTA (PANEL DE PROFESORES)
   ======================================================== */
.th-accordion-item {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.th-accordion-item.open {
  border-color: #3b82f6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.th-accordion-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  background: #0f172a;
  transition: background 0.15s ease;
}

.th-accordion-header:hover {
  background: #172554;
}

.th-accordion-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #f8fafc;
}

.th-accordion-chevron {
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.25s ease, color 0.2s ease;
  font-weight: bold;
}

.th-accordion-item.open .th-accordion-chevron {
  transform: rotate(180deg);
  color: #38bdf8;
}

.th-accordion-body {
  display: none;
  padding: 16px 18px;
  background: #0b0f19;
  border-top: 1px solid #1e293b;
  animation: fadeIn 0.2s ease-out;
}

.th-accordion-item.open .th-accordion-body {
  display: block;
}

/* ========================================================
   MODAL DE EXPORTACIÓN MULTIFORMATO
   ======================================================== */
.export-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.export-opt-card {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.export-opt-card:hover {
  background: #131c31;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.eoc-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.eoc-info {
  flex: 1;
}

.eoc-info h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}

.eoc-info p {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.35;
  margin: 0;
}

.eoc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ef4444;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Banner de Detalle de Sección */
.section-detail-banner {
  background: #0e0e16;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.section-tag-row { display: flex; gap: 6px; align-items: center; }
.sec-badge-name {
  background: var(--cta-orange);
  color: #fff;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.sec-badge-stage {
  background: #1e1b4b;
  color: #c7d2fe;
  border: 1px solid #3730a3;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.sec-badge-track {
  background: #181824;
  color: #93c5fd;
  border: 1px solid #334155;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
}

/* Estadísticas Grupales */
.th-group-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 580px) {
  .th-group-stats-row { grid-template-columns: 1fr; }
}
.group-stat-card {
  background: #0b0b12;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}
.gsc-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.gsc-val { font-size: 18px; font-weight: 800; color: #fff; margin: 4px 0 2px 0; font-family: var(--font-mono); }
.gsc-sub { font-size: 10px; color: var(--text-secondary); }

.btn-th-back {
  background: transparent;
  border: 1px solid #334155;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.btn-th-back:hover {
  background: #181824;
  color: #fff;
  border-color: #64748b;
}

.sec-pill-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.sec-pill-btn.active {
  background: var(--primary-navy);
  color: white;
  border-color: var(--primary-navy);
  box-shadow: 0 2px 6px rgba(13, 28, 50, 0.15);
}

.review-focus-card {
  background: #121008;
  border: 1px solid #78350f;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.rf-title {
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.rf-item {
  font-size: 13px;
  color: #fef3c7;
  margin-bottom: 6px;
  line-height: 1.45;
}

/* ========================================================
   ESTILOS WARM-UP ENGINE (CALENTAMIENTOS ADAPTATIVOS)
   ======================================================== */
.warmup-card {
  background: #0d121c;
  border: 1px solid #1e3a8a;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.warmup-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.warmup-badge-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.warmup-tag {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid #2563eb;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.warmup-stage-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid #059669;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.btn-refresh-warmup {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.btn-refresh-warmup:hover {
  background: var(--cta-orange);
  border-color: var(--cta-orange);
  color: #fff;
}

.warmup-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.warmup-target-alert {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.warmup-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Tarjetas interactivas de calentamiento */
.warmup-interactive-area {
  background: #06090e;
  border: 1px dashed #334155;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 10px;
}

.warmup-cards-title {
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 10px;
}

.warmup-cards-carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 110px;
}

.warmup-single-card {
  background: #0f172a;
  border: 2px solid #3b82f6;
  border-radius: 12px;
  padding: 16px 20px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  animation: fadeIn 0.2s ease-out;
}

.wsc-lead {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}
.wsc-lead span {
  color: #38bdf8;
  text-decoration: underline;
}

.wsc-follow {
  font-size: 14px;
  color: #fde047;
  font-weight: 700;
}
.wsc-follow span {
  color: var(--cta-orange);
  font-size: 15px;
}

.warmup-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 10px;
}

.btn-warmup-step {
  background: #1e293b;
  border: 1px solid #475569;
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-warmup-step:hover {
  background: #334155;
  border-color: #94a3b8;
}

.warmup-card-counter {
  font-size: 12px;
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Tab Selector de Métricas (Global vs Alumno) */
.metrics-view-tab {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}

.mv-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
}

.mv-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Lista de Estudiantes para el Profesor */
.students-performance-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.student-perf-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.student-perf-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.sp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sp-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.sp-metrics-row {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Bottom Nav Bar */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)) 10px;
  z-index: 50;
}

.nav-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  padding: 6px 0;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.nav-tab-item.active {
  color: var(--accent);
}

.nav-tab-item svg {
  width: 20px;
  height: 20px;
}

/* ======================================================== */
/* NUEVOS MÓDULOS DEIKE: SIMULACRO EXAMEN & IA EN VIVO       */
/* ======================================================== */

.deike-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.feature-module-card {
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(13, 28, 50, 0.04);
}

.feature-module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 28, 50, 0.08);
}

.feature-module-card.exam-card {
  background: #ffffff;
  border: 1.5px solid #fde68a;
}

.feature-module-card.live-ai-card {
  background: var(--primary-navy);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.fmc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 9999px;
  width: fit-content;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.fmc-badge.exam {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.fmc-badge.live {
  background: rgba(254, 107, 0, 0.15);
  color: #ffb693;
  border: 1px solid rgba(254, 107, 0, 0.35);
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseLiveDot 1.3s infinite;
}

@keyframes pulseLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

.fmc-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 4px;
}

.exam-card .fmc-title { color: #78350f; }
.live-ai-card .fmc-title { color: #f8fafc; }

.fmc-desc {
  font-size: 11px;
  line-height: 1.35;
  margin-bottom: 10px;
}

.exam-card .fmc-desc { color: #92400e; }
.live-ai-card .fmc-desc { color: #cbd5e1; }

.fmc-action {
  font-size: 11.5px;
  font-weight: 800;
}

.exam-card .fmc-action { color: #d97706; }
.live-ai-card .fmc-action { color: #38bdf8; }

/* Selector de Stage horizontal */
.stage-selector-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.stage-chip-btn {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.stage-chip-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Reglas y Resultados del Simulacro de Examen */
.exam-rules-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 11.5px;
  padding: 9px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.exam-result-card {
  background: #ffffff;
  border: 2px solid #fcd34d;
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.1);
}

.exam-result-badge {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.exam-score-big {
  font-size: 46px;
  font-weight: 900;
  color: #10b981;
  line-height: 1.05;
  margin-bottom: 6px;
}

.exam-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.em-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 6px;
}

.em-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.em-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 2px;
}

.exam-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.exam-bd-item {
  font-size: 11.5px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* IA Conversacional en Vivo */
.vocab-resource-card {
  background: #ffffff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0284c7;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.06);
}

.vrc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  color: #0369a1;
  margin-bottom: 4px;
}

.vrc-badge {
  background: #e0f2fe;
  color: #0284c7;
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 800;
}

.vocab-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.vocab-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.vocab-pill.used {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.vocab-structure-hint {
  font-size: 10.5px;
  color: #0f172a;
  background: #f0f9ff;
  padding: 6px 8px;
  border-radius: 8px;
}

/* ========================================================
   FASE 3 UX: CABINA DE IA EN VIVO (ESTILO LLAMADA MÓVIL)
   ======================================================== */
.screen-live-cockpit {
  display: none;
  flex-direction: column;
  background: var(--bg-main);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.screen-live-cockpit.active {
  display: flex;
}

.live-cockpit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
  z-index: 20;
}

.btn-call-exit {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

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

.live-header-center {
  flex: 1;
  text-align: center;
}

.live-call-status-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-header-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.live-header-subtext {
  font-size: 10.5px;
  color: var(--accent-blue);
  font-weight: 600;
  margin-top: 1px;
}

.live-cockpit-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 100px 16px; /* Espacio para el dock inferior */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Selector de Stage minimalista */
.live-stage-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

.stage-selector-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

/* Escenario Central de la Llamada Telefónica */
.live-call-stage {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  border-radius: 24px;
  padding: 20px 16px;
  text-align: center;
  color: #ffffff;
  position: relative;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-avatar-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  margin: 0 auto 10px auto;
  background: rgba(56, 189, 248, 0.12);
  border: 3px solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.live-avatar-ring.speaking {
  border-color: #10b981;
  box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.28), 0 0 24px rgba(16, 185, 129, 0.4);
  transform: scale(1.08);
}

.live-avatar-ring.listening {
  border-color: #ef4444;
  box-shadow: 0 0 0 10px rgba(239, 68, 68, 0.28), 0 0 24px rgba(239, 68, 68, 0.4);
  transform: scale(1.08);
}

.live-coach-name {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.live-status-pill {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
  padding: 3px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.live-context-pod {
  margin: 12px auto 6px auto;
}

.live-context-frame {
  width: 140px;
  height: 115px;
}

.live-waveform {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  height: 24px;
  margin-top: 12px;
}

.live-waveform span {
  display: inline-block;
  width: 4px;
  height: 6px;
  background: #475569;
  border-radius: 9999px;
  transition: height 0.15s ease, background 0.15s ease;
}

.live-waveform.active-ai span {
  background: #10b981;
  animation: waveBounce 0.7s infinite ease-in-out;
}

.live-waveform.active-user span {
  background: #ef4444;
  animation: waveBounce 0.55s infinite ease-in-out;
}

.live-waveform span:nth-child(2) { animation-delay: 0.1s; }
.live-waveform span:nth-child(3) { animation-delay: 0.2s; }
.live-waveform span:nth-child(4) { animation-delay: 0.3s; }
.live-waveform span:nth-child(5) { animation-delay: 0.15s; }
.live-waveform span:nth-child(6) { animation-delay: 0.25s; }
.live-waveform span:nth-child(7) { animation-delay: 0.05s; }
.live-waveform span:nth-child(8) { animation-delay: 0.18s; }

@keyframes waveBounce {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

/* Chat flotante y fluido */
.live-chat-stream {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 12px;
  height: 180px;
  min-height: 140px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 90%;
  animation: fadeIn 0.2s ease-out;
}

.live-msg.ai {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.live-msg.user {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text-main);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.lm-sender {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.live-vocab-card {
  margin-top: 4px;
}

/* DOCK INFERIOR ERGONÓMICO (ZONA DEL PULGAR) */
.live-phone-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px max(14px, env(safe-area-inset-bottom)) 16px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.live-phone-main-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-live-call {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 9999px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  color: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-live-call.start {
  background: #10b981;
  box-shadow: 0 4px 0 #059669;
}

.btn-live-call.start:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #059669;
}

.btn-live-call.stop {
  background: #ef4444;
  box-shadow: 0 4px 0 #b91c1c;
}

.btn-live-call.stop:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #b91c1c;
}

.live-call-icon {
  font-size: 16px;
}

/* Botón de Micrófono Táctil (72px) */
.btn-live-mic-thumb {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  border: none;
  background: var(--primary-navy);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 #050e1a;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.15s ease;
}

.btn-live-mic-thumb:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #050e1a;
}

.btn-live-mic-thumb.listening {
  background: #ef4444;
  box-shadow: 0 4px 0 #991b1b;
  animation: pulseMic 1.2s infinite;
}

.btn-live-mic-thumb:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.live-phone-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.live-toggle-label {
  font-size: 11px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
}

.live-topic-btn {
  padding: 6px 12px;
  font-size: 11.5px;
}

.btn-api-config {
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

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

.ai-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ai-modal-card {
  background: var(--card-bg);
  color: var(--text-main);
  border-radius: 18px;
  padding: 18px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
}

/* ======================================================== */
/* BOTÓN DE TEMA CLARO / OSCURO & DESCONGESTIÓN VISUAL      */
/* ======================================================== */

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Chip de Deike en Login */
.deike-chip {
  border-color: #fbd38d;
  background: #fffaf0;
}
.deike-text {
  color: #c05621 !important;
}

/* Acceso rápido Profesor en Home */
.teacher-shortcut-card {
  background: var(--deike-soft);
  border: 1px solid rgba(232, 124, 53, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tsc-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--deike);
}
.tsc-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.tsc-arrow {
  font-weight: 800;
  color: var(--deike);
}

/* Desplegable limpio de Vocabulario en IA en Vivo */
details.vocab-resource-card summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
details.vocab-resource-card summary::-webkit-details-marker {
  display: none;
}

/* Mayor respiro visual entre elementos */
.hero-stage-card {
  margin-bottom: 20px;
  padding: 24px;
}

.deike-features-grid {
  gap: 14px;
  margin-bottom: 22px;
}

.feature-module-card {
  padding: 16px;
}

.stages-list {
  gap: 12px;
}

.stage-row-card {
  padding: 15px 18px;
}

/* Encabezado y caja de Simulacro adaptables */
.exam-header-bar {
  background: #fffbeb;
  border-bottom-color: #fde68a;
}
.exam-accent-text {
  color: #b45309 !important;
  font-weight: 800;
}
.exam-speech-box {
  background: #fffbeb;
  border-color: #fcd34d;
}

/* ======================================================== */
/* ADAPTACIÓN COMPLETA PARA MODO OSCURO (DARK MODE)         */
/* ======================================================== */

[data-theme="dark"] .app-header,
[data-theme="dark"] .bottom-nav-bar,
[data-theme="dark"] .practice-header {
  background: #0f172a;
  border-color: #1e293b;
}

[data-theme="dark"] .input-field,
[data-theme="dark"] .quick-access-box,
[data-theme="dark"] .schedule-info-banner,
[data-theme="dark"] .stage-row-card,
[data-theme="dark"] .student-perf-card,
[data-theme="dark"] .live-controls-box,
[data-theme="dark"] .live-chat-stream,
[data-theme="dark"] .exam-result-card,
[data-theme="dark"] .em-box,
[data-theme="dark"] .exam-bd-item,
[data-theme="dark"] .sec-pill-btn:not(.active),
[data-theme="dark"] .stage-chip-btn:not(.active),
[data-theme="dark"] .btn-back-circle,
[data-theme="dark"] .btn-secondary-action,
[data-theme="dark"] .fb-model {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .quick-user-chip {
  background: #0f172a;
  border-color: #334155;
}

[data-theme="dark"] .quick-user-chip.deike-chip {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.4);
}
[data-theme="dark"] .deike-text {
  color: #fb923c !important;
}

[data-theme="dark"] .visual-context-container {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
}

[data-theme="dark"] .transcript-bubble {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

[data-theme="dark"] .teacher-speech-box {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .btn-audio-repeat {
  background: #0f172a;
  border-color: #334155;
  color: #93c5fd;
}

[data-theme="dark"] .feature-module-card.exam-card {
  background: linear-gradient(145deg, #271c09 0%, #3b280b 100%);
  border-color: #92400e;
}
[data-theme="dark"] .exam-card .fmc-title { color: #fef3c7; }
[data-theme="dark"] .exam-card .fmc-desc { color: #fde68a; }
[data-theme="dark"] .exam-card .fmc-action { color: #fbbf24; }

[data-theme="dark"] .exam-header-bar,
[data-theme="dark"] .exam-speech-box,
[data-theme="dark"] .exam-rules-banner,
[data-theme="dark"] .review-focus-card {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
[data-theme="dark"] .exam-accent-text,
[data-theme="dark"] .rf-title,
[data-theme="dark"] .rf-item {
  color: #fbbf24 !important;
}

[data-theme="dark"] .vocab-resource-card {
  background: #1e293b;
  border-color: #0284c7;
}
[data-theme="dark"] .vrc-header { color: #38bdf8; }
[data-theme="dark"] .vocab-pill {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
[data-theme="dark"] .vocab-pill.used {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #6ee7b7;
}
[data-theme="dark"] .vocab-structure-hint {
  background: #0f172a;
  color: #bae6fd;
}

[data-theme="dark"] .live-msg.ai {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
  color: #e0f2fe;
}
[data-theme="dark"] .live-msg.user {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.35);
  color: #d1fae5;
}

[data-theme="dark"] .feedback-card-callan.success {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
}
[data-theme="dark"] .feedback-card-callan.warning {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
}
[data-theme="dark"] .feedback-card-callan.error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
}
[data-theme="dark"] .fb-desc {
  color: #cbd5e1;
}
[data-theme="dark"] .streak-pill {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

/* ======================================================== */
/* ESTILOS PARA CALLAN FOR KIDS                             */
/* ======================================================== */
.quick-user-chip.kids-chip {
  background: rgba(236, 72, 153, 0.06);
  border-color: rgba(236, 72, 153, 0.3);
}
.quick-user-chip.kids-chip:hover {
  background: rgba(236, 72, 153, 0.14);
  border-color: #ec4899;
}
[data-theme="dark"] .quick-user-chip.kids-chip {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.35);
}

.sec-pill-btn.kids-sec-pill {
  border-color: rgba(236, 72, 153, 0.4);
}
.sec-pill-btn.kids-sec-pill.active {
  background: linear-gradient(135deg, #ec4899, #f59e0b) !important;
  border-color: #ec4899 !important;
  color: #ffffff !important;
}

.program-track-bar {
  display: flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 16px;
}
.track-toggle-btn {
  flex: 1;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
}
.track-toggle-btn.active {
  background: var(--primary-navy);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(13, 28, 50, 0.2);
}
.track-toggle-btn.kids-btn.active {
  background: #ec4899 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.25);
}

.stage-row-card.kids-card {
  border-left: 4px solid #ec4899;
}

/* ======================================================== */
/* SISTEMA DE DISEÑO STIMULER — LEVELING UP                 */
/* ======================================================== */

/* --- Cabecera Superior Stimuler (Captura 1) --- */
.stimuler-home-scroll {
  padding-bottom: 110px !important;
}

.stimuler-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-top: 4px;
}

.stimuler-greeting {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stimuler-unit-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.stimuler-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #271f16;
  border: 1px solid #78350f;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.streak-flame {
  font-size: 16px;
}

/* --- Carrusel Horizontal de Stages (1 al 12) --- */
.stimuler-stage-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 14px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stimuler-stage-slider::-webkit-scrollbar {
  display: none;
}

.stage-slide-chip {
  padding: 7px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.stage-slide-chip:hover {
  border-color: var(--primary-navy);
  color: var(--text-main);
}

.stage-slide-chip.active {
  background: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
  box-shadow: 0 2px 6px rgba(13, 28, 50, 0.2);
}

/* --- Timeline Vertical Stimuler (Captura 1) --- */
.stimuler-timeline-container {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-top: 6px;
}

.timeline-row {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-bottom: 24px;
}

/* Línea conectora vertical */
.timeline-track-line {
  position: absolute;
  top: 32px;
  bottom: 0;
  left: 17px;
  width: 3px;
  background: #6366f1;
  opacity: 0.4;
  z-index: 1;
}

.timeline-row:last-child .timeline-track-line {
  display: none;
}

/* Nodo circular con Check */
.timeline-check-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6366f1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  margin-right: 14px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
  border: 2px solid #ffffff;
}

.timeline-check-node.locked {
  background: #d5d3ce;
  color: #7a7873;
  box-shadow: none;
  font-size: 12px;
}

/* Tarjeta de Lección (Expandida vs Minimizada) */
.timeline-card-wrapper {
  flex: 1;
}

/* Estado Expandido (Foto grande, badge y botón) */
.lesson-card-expanded {
  background: #1e1b2e;
  border-radius: 20px;
  overflow: hidden;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(13, 28, 50, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s ease;
}

.lce-hero-img-box {
  position: relative;
  width: 100%;
  height: 160px;
  background: #0d0b18;
  overflow: hidden;
}

.lce-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
}

.lce-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lce-cadence-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  color: #4edea3;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
}

.lce-title-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lce-content-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lce-desc {
  font-size: 12.5px;
  color: #c7d2fe;
  line-height: 1.45;
}

.btn-lce-start {
  width: 100%;
  background: var(--cta-orange);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 13px 18px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--cta-orange-shadow);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-lce-start:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--cta-orange-shadow);
}

/* Estado Minimizado (Caja compacta tipo Stimuler) */
.lesson-card-minimized {
  background: #252238;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 18px;
  color: #e0e7ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.lesson-card-minimized:hover {
  background: #2d2a45;
  border-color: #6366f1;
  transform: translateX(2px);
}

.lcm-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lcm-icon {
  font-size: 18px;
  color: #a5b4fc;
}

.lcm-title {
  font-size: 14px;
  font-weight: 700;
}

.lcm-expand-arrow {
  color: #818cf8;
  font-size: 18px;
}

/* --- Barra de Navegación Inferior Stimuler (Solo Íconos) --- */
.stimuler-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: #111019;
  border-top: 1px solid #232034;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)) 16px;
  z-index: 50;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.sbn-icon-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 52px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sbn-icon-btn .material-symbols-outlined {
  font-size: 26px;
}

.sbn-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sbn-icon-btn.active {
  color: var(--cta-orange);
}

/* ======================================================== */
/* FASE 2: PANTALLA DE LECCIÓN CON COACH GRACE (CALLAN UX) */
/* ======================================================== */
.screen-practice {
  background: var(--bg-page);
  min-height: 100vh;
  display: none;
  flex-direction: column;
}

.screen-practice.active {
  display: flex;
}

.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 25;
}

.practice-header-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.practice-stage-indicator {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.practice-counter-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--cta-orange);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.practice-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.practice-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.practice-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cta-orange), var(--success));
  transition: width 0.3s ease;
}

.practice-scroll-area {
  flex: 1;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom, 16px)) 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 4 ESTADOS VISUALES DEL ORBE DE COACH GRACE (60 FPS) */
.grace-orb-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0 8px 0;
  position: relative;
}

.sarah-circle-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: var(--bg-surface);
  border: 3px solid var(--border-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.sarah-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Halo acústico exterior */
.grace-acoustic-halo {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Estado 1: SPEAKING (Grace emite voz por ElevenLabs o síntesis) */
.sarah-circle-ring.speaking {
  border-color: var(--cta-orange) !important;
  box-shadow: 0 0 0 4px rgba(254, 107, 0, 0.35), 0 0 32px rgba(254, 107, 0, 0.75) !important;
  animation: graceSpeakingAura 0.38s infinite alternate ease-in-out !important;
}

@keyframes graceSpeakingAura {
  0% { transform: scale(1); box-shadow: 0 0 0 3px rgba(254, 107, 0, 0.3), 0 0 16px rgba(254, 107, 0, 0.4); }
  100% { transform: scale(1.035); box-shadow: 0 0 0 8px rgba(254, 107, 0, 0.65), 0 0 42px rgba(254, 107, 0, 0.9); }
}

/* Estado 2: LISTENING (Micrófono activo post-escudo 120ms) */
.sarah-circle-ring.listening {
  border-color: var(--success) !important;
  box-shadow: 0 0 0 4px rgba(78, 222, 163, 0.35), 0 0 28px rgba(78, 222, 163, 0.65) !important;
  animation: graceListeningAura 0.45s infinite alternate ease-in-out !important;
}

@keyframes graceListeningAura {
  0% { transform: scale(1); box-shadow: 0 0 0 2px rgba(78, 222, 163, 0.3), 0 0 14px rgba(78, 222, 163, 0.35); }
  100% { transform: scale(1.025); box-shadow: 0 0 0 6px rgba(78, 222, 163, 0.6), 0 0 34px rgba(78, 222, 163, 0.8); }
}

/* Estado 3: THINKING (Gemini Flash Lite evaluando respuesta) */
.sarah-circle-ring.thinking {
  border-color: var(--text-secondary) !important;
  box-shadow: 0 0 0 4px rgba(192, 193, 255, 0.35), 0 0 28px rgba(49, 49, 192, 0.6) !important;
  animation: graceThinkingAura 0.5s infinite alternate ease-in-out !important;
}

@keyframes graceThinkingAura {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.02); opacity: 1; }
}

/* Estado 4: IDLE (Reposo) */
.sarah-circle-ring.idle {
  border-color: var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Badge de Estado debajo del Orbe */
.grace-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 12px;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.grace-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background-color 0.2s ease;
}

.sarah-circle-ring.speaking ~ .grace-status-badge .grace-status-dot {
  background: var(--cta-orange);
  box-shadow: 0 0 6px var(--cta-orange);
}

.sarah-circle-ring.listening ~ .grace-status-badge .grace-status-dot {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.sarah-circle-ring.thinking ~ .grace-status-badge .grace-status-dot {
  background: var(--text-secondary);
  box-shadow: 0 0 6px var(--text-secondary);
}

/* TELEPROMPTER DINÁMICO CALLAN */
.callan-teleprompter-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
}

.teleprompter-top-bar {
  margin-bottom: 4px;
}

.btn-teleprompter-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
}

.btn-teleprompter-toggle:hover {
  background: #323d60;
  color: var(--text-primary);
  border-color: var(--brand-orange);
}

.btn-teleprompter-toggle .material-symbols-outlined {
  font-size: 14px;
}

.stimuler-live-subtitles {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.35;
  min-height: 44px;
  padding: 0 14px;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

/* ONBOARDING CALLAN: BOTONES RÁPIDOS YES / NO CON COACH GRACE */
.grace-onboarding-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
  animation: fadeIn 0.3s ease;
}

.btn-onboard-choice {
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-family);
}

.btn-onboard-yes {
  background: #059669;
  color: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-onboard-yes:hover {
  background: #10b981;
  transform: translateY(-2px);
}

.btn-onboard-no {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: #38456c;
}

.btn-onboard-no:hover {
  background: #323d60;
  color: var(--text-primary);
  border-color: var(--brand-orange);
}

.stimuler-live-subtitles.callan-hidden {
  filter: blur(8px);
  opacity: 0.18;
  user-select: none;
}

/* MUELLE DE CONTROLES INFERIORES (THUMB ZONE) */
.practice-interaction-dock {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 12px 14px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thumb-controls-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.mic-primary-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.btn-dock-action {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.btn-dock-action:hover {
  border-color: var(--accent);
  background: var(--card-bg-high);
}

.btn-dock-action:active {
  transform: translateY(2px) scale(0.97);
}

.dock-btn-icon {
  font-size: 19px;
  line-height: 1;
}

.dock-btn-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* TARJETA DE FEEDBACK COMPARATIVO (EDTECH POLISH) */
.fb-comparison-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fb-side-block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.fb-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.fb-badge.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.fb-badge.success {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success);
}

.fb-phrase-strike {
  color: var(--text-muted);
  text-decoration: line-through;
}

.fb-phrase-target {
  color: var(--text-main);
}

.fb-phrase-target strong {
  color: var(--success);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Botón Siguiente Drill */
.btn-next-drill-action {
  width: 100%;
  background: var(--cta-orange);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--cta-orange-shadow);
  transition: all 0.15s ease;
  margin-top: 4px;
}

/* Utilidad accesible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.s-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.s-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.s-action-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.s-action-btn:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

.s-action-btn.flag-btn:hover {
  color: var(--cta-orange);
}

/* --- Escenario de Coach Sarah con Anillo y Subtítulos --- */
.sarah-stage-cockpit {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0 10px 0;
  position: relative;
}

.sarah-portrait-img,
.sarah-portrait-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid #ffffff;
  background: #1e1b4b;
}

.sarah-coach-badge {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

/* ========================================================
   CONTENEDOR INTEGRADO PARA LA IMAGEN 3D (PARTE 2 REDISEÑO)
   ======================================================== */
.seamless-3d-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 10px auto 6px auto;
  width: 220px;
  height: 175px;
  max-width: 90%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid rgba(225, 95, 57, 0.5);
  box-shadow: 0 0 20px rgba(225, 95, 57, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.seamless-3d-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  overflow: hidden;
}

.seamless-3d-frame.enlarged {
  transform: scale(1.03);
}

.seamless-3d-frame img.contextual-3d-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: fadeIn 0.35s ease;
  transition: transform 0.3s ease;
}

.speech-bubble-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  white-space: nowrap;
  background: #FFFFFF;
  color: #14192B;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 14px;
  border: 2px solid #E15F39;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 3;
  pointer-events: none;
}

.loop-frame-2 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: callanLoopFrame2 5.6s infinite ease-in-out;
}

.loop-gif-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(20, 25, 43, 0.88);
  color: #4edea3;
  border: 1px solid #4edea3;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 10px;
  z-index: 3;
  pointer-events: none;
}

@keyframes callanLoopFrame2 {
  0%, 24% { opacity: 0; }
  28%, 96% { opacity: 1; }
  100% { opacity: 0; }
}

/* ETIQUETADO UNIFICADO: SUPERPUESTO EN LA BASE DE LA IMAGEN */
.seamless-3d-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(20, 25, 43, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid rgba(225, 95, 57, 0.25);
  letter-spacing: 0.02em;
  z-index: 2;
}

/* RETRATO OFICIAL Y ELEGANTE DE COACH GRACE (ESTILO PIXAR 3D) */
.sarah-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #ffffff;
  display: block;
}

/* Aura reactiva de voz cuando Grace emite audio humano */
.sarah-circle-ring.speaking {
  box-shadow: 0 0 0 5px rgba(254, 107, 0, 0.45), 0 0 35px rgba(254, 107, 0, 0.75) !important;
  border-color: var(--cta-orange) !important;
  animation: graceSpeakingAura 0.38s infinite alternate ease-in-out !important;
}

/* Pulsación acústica del aura de voz */
@keyframes graceSpeakingAura {
  0% {
    box-shadow: 0 0 0 3px rgba(254, 107, 0, 0.35), 0 0 18px rgba(254, 107, 0, 0.45);
  }
  100% {
    box-shadow: 0 0 0 9px rgba(254, 107, 0, 0.7), 0 0 50px rgba(254, 107, 0, 0.95);
  }
}

/* Subtítulos de Sarah (Captura 2) */
.stimuler-live-subtitles {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.35;
  min-height: 48px;
  padding: 0 16px;
}

/* Globo de diálogo de Sarah (Captura 3) */
.sarah-speech-bubble {
  margin-top: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  max-width: 90%;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.sarah-speech-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--bg-card) transparent;
}

/* --- Tarjeta de Respuesta Stimuler (Captura 3) --- */
.stimuler-prompt-card {
  background: #ffffff;
  border: 1.5px solid #d97706;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.1);
}

.spc-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.spc-instruction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #b45309;
}

.spc-book-icon {
  font-size: 16px;
}

.spc-audio-btn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spc-audio-btn:hover {
  background: #fef3c7;
  transform: scale(1.05);
}

.spc-target-container {
  text-align: center;
  padding: 10px 0 14px 0;
}

.spc-target-phrase {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.spc-target-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

.speed-threshold-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* --- Modales Bottom Sheet (Captura 4) --- */
.stimuler-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease;
}

.stimuler-bottom-sheet {
  background: #1e1b2e;
  color: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)) 20px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
  animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 44px;
  height: 4px;
  background: #47435f;
  border-radius: 9999px;
  margin: 0 auto 16px auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sheet-flag-icon {
  font-size: 24px;
  color: #cbd5e1;
}

.sheet-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sheet-divider {
  height: 1px;
  background: #332f48;
  margin-bottom: 16px;
}

.report-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.report-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
  cursor: pointer;
  padding: 4px 0;
}

.report-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #6366f1;
  cursor: pointer;
}

.report-textarea-wrap {
  margin-bottom: 14px;
}

.report-textarea-wrap textarea {
  width: 100%;
  background: #28243d;
  border: 1px solid #3d3957;
  border-radius: 12px;
  color: #ffffff;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  resize: none;
  outline: none;
}

.report-textarea-wrap textarea:focus {
  border-color: #6366f1;
}

.report-diag-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  cursor: pointer;
}

.report-diag-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
  margin-top: 2px;
}

.report-diag-check strong {
  font-size: 12px;
  color: #ffffff;
  display: block;
}

.report-diag-check p {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.35;
}

.btn-sheet-submit {
  width: 100%;
  background: #47435f;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 13px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-sheet-submit:hover {
  background: var(--cta-orange);
}

/* Modales de Ajustes */
.speed-toggle-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.speed-btn {
  flex: 1;
  padding: 8px 10px;
  background: #28243d;
  border: 1px solid #3d3957;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.speed-btn.active {
  background: var(--cta-orange);
  color: #ffffff;
  border-color: var(--cta-orange);
}

/* ========================================================
   BANNER DE ESTADO DE RED (OFFLINE / ONLINE)
   ======================================================== */
.network-status-banner {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: #f59e0b;
  color: #78350f;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid #d97706;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.network-status-banner.offline-hidden {
  display: none;
}

.network-status-banner.online-recovered {
  background: #10b981;
  color: #064e3b;
  border-bottom-color: #059669;
}

.nsb-icon {
  font-size: 14px;
}

