:root {
  /* Paleta de marca "Speak & Listen" (rediseño ago-2026, alineada al moodboard institucional:
     navy profundo + azul-verde en degradado, sobre fondos claros neutros). Los nombres de las
     variables se mantienen (--blue-900, --blue-500, etc.) para no tener que tocar cada regla que
     ya las usa en todo el sitio — cambiar solo estos valores repinta index.html, admin-v6.html y
     padres-v6.html a la vez, porque los tres comparten este mismo archivo. */
  --blue-900: #0b2e59;
  --blue-900-deep: #071b38;
  --blue-700: #0a4a94;
  --blue-500: #0d6efd;
  --blue-100: #e7f1fb;
  --blue-50: #f2f6fa;
  --ink: #1c2733;
  --muted: #5c6b7a;
  --green: #22c55e;
  --green-dark: #16a34a;
  --red: #c0392b;
  --amber: #b8860b;
  --white: #ffffff;
  --border: #d7e3ef;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 2px 10px rgba(11, 46, 89, 0.08);
  --shadow-lg: 0 18px 40px rgba(7, 27, 56, 0.35);
  --brand-gradient: linear-gradient(135deg, var(--blue-500) 0%, var(--green) 100%);
  --brand-gradient-diag: linear-gradient(120deg, var(--blue-900-deep) 0%, var(--blue-900) 45%, #0f3d63 100%);
  --font-heading: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-script: 'Caveat', cursive;
  /* Colores institucionales reales (tomados del logotipo de la UESQ), usados en el
     certificado en vez del azul de la app, que es solo la identidad visual de "Speak & Listen". */
  --inst-green: #008a3d;
  --inst-green-dark: #00602a;
  --inst-green-50: #e8f6ee;
  --inst-black: #101010;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--blue-50);
  color: var(--ink);
}

h1, h2, h3, .profile-heading, .btn, .tab-btn, .brand-title { font-family: var(--font-heading); }

/* Enlaces de marca: por defecto el navegador pinta los links visitados de morado, lo cual
   choca con la paleta azul/verde de "Speak & Listen". Se fija a los colores de marca en
   todos los estados. */
a { color: var(--blue-500); text-decoration-color: rgba(13, 110, 253, 0.4); }
a:visited { color: var(--blue-700); }
a:hover { color: var(--green-dark); }

.topbar {
  position: relative;
  background: var(--blue-900-deep);
  background-image: linear-gradient(100deg, var(--blue-900-deep) 0%, var(--blue-900) 60%, #0f3d63 100%);
  color: var(--white);
  box-shadow: var(--shadow);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--brand-gradient);
  opacity: 0.9;
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  background: var(--white);
  color: var(--blue-900);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.brand-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.35;
}
.brand-title .accent { color: var(--green); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.nav-user { display: flex; align-items: center; gap: 12px; }
.nav-user[hidden] { display: none; }
.nav-user-name { font-size: 14px; opacity: 0.9; }

/* Logos: wrapped in a white pill so they read cleanly against the dark navy topbar */
.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.logo-badge img { display: block; height: 34px; width: auto; }
.logo-badge-uesq img { height: 30px; }
/* logo-badge-app ahora muestra solo el ícono (audífonos+micrófono, sin el texto "Speak & Listen"
   ni el renglón de UESQ que ya trae el logotipo completo) — a este tamaño tan pequeño, el logotipo
   completo con texto se veía apretado/ilegible; el ícono solo se lee mejor y sigue siendo
   reconocible junto al nombre de la App en texto (.brand-title). */
.logo-badge-app {
  border-radius: 999px;
  padding: 5px;
  background: var(--white);
}
.logo-badge-app img { height: 36px; width: 36px; }

/* Grupo del ícono de la App en el topbar: ícono + nombre "Speak & Listen" debajo, tal como
   aparece en el logotipo completo (icono + wordmark), para que el nombre de la App siempre
   acompañe a su ícono en el banner superior. */
.app-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.app-brand-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--white);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .brand-title { display: none; }
  .logo-badge img { height: 28px; }
  .logo-badge-app img { height: 30px; width: 30px; }
  .app-brand-label { font-size: 10px; }
}

.app-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px 14px;
}

.view[hidden] { display: none; }

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  overflow: hidden;
  margin-bottom: 20px;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand-gradient);
}

/* Access layout: panel oscuro con degradado + textura tipo "circuitos" (solo CSS, sin imágenes),
   sobre el que flotan los logos institucionales y una tarjeta de vidrio (glassmorphism) con el
   formulario. Grid de 3 columnas simétricas para que la tarjeta quede siempre centrada. */
.access-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 8px auto;
  max-width: 1150px;
  padding: 20px 36px;
  border-radius: var(--radius-lg);
  background: var(--brand-gradient-diag);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* Textura de circuitos: líneas finas horizontales/verticales + nodos, todo con gradientes CSS. */
.access-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgba(34,197,94,0.35) 0, rgba(34,197,94,0.35) 3px, transparent 4px),
    radial-gradient(circle at 82% 18%, rgba(13,110,253,0.4) 0, rgba(13,110,253,0.4) 3px, transparent 4px),
    radial-gradient(circle at 70% 78%, rgba(34,197,94,0.3) 0, rgba(34,197,94,0.3) 3px, transparent 4px),
    radial-gradient(circle at 12% 82%, rgba(13,110,253,0.35) 0, rgba(13,110,253,0.35) 3px, transparent 4px);
  background-size: 46px 46px, 46px 46px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  pointer-events: none;
}
.access-layout::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 15%, rgba(13,110,253,0.25), transparent 55%);
  pointer-events: none;
}
.access-layout > * { position: relative; z-index: 1; }
.access-layout .auth-card { margin: 0; }
/* Los dos logos institucionales tienen formas muy distintas (uno es un letrero ancho, el otro un
   emblema cuadrado), así que en vez de igualar solo su alto, se les da a AMBOS la misma caja
   (mismo ancho y alto) y cada imagen se ajusta adentro sin deformarse (object-fit: contain). Ahora
   llevan un fondo translúcido blanco (tarjeta suave) para leerse bien sobre el panel oscuro. */
.access-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 172px;
  height: 106px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}
.access-logo-left { justify-self: end; }
.access-logo-right { justify-self: start; }
.access-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 900px) {
  .access-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 16px;
    padding: 24px 24px;
  }
  .access-layout .auth-card { order: 1; }
  .access-logo-left { justify-self: center; order: 2; }
  .access-logo-right { justify-self: center; order: 3; }
  .access-logo { width: 140px; height: 85px; }
}
@media (max-width: 560px) {
  .access-logo { width: 110px; height: 65px; }
}

/* Tarjeta de vidrio (glassmorphism), componente reutilizable: se usa dentro de .access-layout
   (login, salida) y dentro de .hero-access (gate general). El .auth-card independiente del panel
   docente/admin (fondo claro) no lleva esta clase y no se toca.
   Nota: el selector combinado ".auth-card.glass-card" (en vez de solo ".glass-card") es a propósito
   — sube la especificidad para que SIEMPRE gane sobre el fondo blanco de ".auth-card" base, sin
   importar el orden en el archivo. Con solo ".glass-card" quedaban empatadas en especificidad y
   ganaba la que apareciera después en el CSS, dejando el fondo blanco con texto blanco (invisible). */
.auth-card.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 32px rgba(7, 27, 56, 0.45);
  color: var(--white);
}
.glass-card .profile-heading { color: var(--white); }
.glass-card .muted { color: rgba(255, 255, 255, 0.75); }
.glass-card .auth-form label { color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.glass-card .auth-form input,
.glass-card .auth-form select {
  background: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.18), 0 2px 8px rgba(7, 27, 56, 0.25);
}
.glass-card .auth-form input:focus,
.glass-card .auth-form select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35), 0 2px 8px rgba(7, 27, 56, 0.25);
}
.glass-card .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.glass-card .btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.glass-card .access-help { color: rgba(255, 255, 255, 0.7); }
.glass-card .access-trust {
  margin: 6px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.3px;
}

/* ==========================================================================
   Hero de acceso v2 (pantalla general de contraseña): fila superior (logo UESQ +
   tagline), columna izquierda (ilustración + titular + lista de destrezas con
   línea conectora) y columna derecha (tarjeta de acceso clara), franja inferior
   de aliado estratégico. Reconstruido a partir del mockup de referencia
   compartido por el usuario. La fotografía real del mockup se reemplaza por una
   ilustración hecha solo con CSS/íconos (sin fotografía generada), por acuerdo
   explícito previo con el usuario.
   (sep-2026: se probó un rediseño completo "AI tech" a partir de un nuevo mockup,
   pero el usuario pidió revertirlo por desproporcionado y conservar esta portada
   v2 tal cual — el único cambio permitido es la insignia ".version-badge" junto
   al nombre de la App, ver más abajo.)
   ========================================================================== */
.hero-access {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-areas:
    "top top"
    "left right"
    "bottom bottom";
  align-items: start;
  gap: 8px 28px;
  margin: 6px auto;
  max-width: 1150px;
  padding: 16px 36px 14px;
  border-radius: var(--radius-lg);
  background: var(--brand-gradient-diag);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-access::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(circle at 15% 25%, rgba(34,197,94,0.35) 0, rgba(34,197,94,0.35) 3px, transparent 4px),
    radial-gradient(circle at 85% 15%, rgba(13,110,253,0.4) 0, rgba(13,110,253,0.4) 3px, transparent 4px),
    radial-gradient(circle at 60% 85%, rgba(34,197,94,0.3) 0, rgba(34,197,94,0.3) 3px, transparent 4px),
    radial-gradient(circle at 30% 70%, rgba(13,110,253,0.3) 0, rgba(13,110,253,0.3) 3px, transparent 4px);
  background-size: 46px 46px, 46px 46px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  pointer-events: none;
}
.hero-access::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(34,197,94,0.18), transparent 50%),
              radial-gradient(circle at 85% 80%, rgba(13,110,253,0.22), transparent 50%);
  pointer-events: none;
}
.hero-access > * { position: relative; z-index: 1; }

/* Fila superior: logo UESQ a la izquierda + tagline "Practice English. Every Day." a la derecha */
.hero-top-row {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.hero-top-logo {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 10px;
  padding: 6px 10px;
  box-shadow: var(--shadow);
}
.hero-top-logo img { display: block; height: 32px; width: auto; }
.hero-top-tagline {
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1.35;
  text-transform: uppercase;
  text-align: right;
}
.hero-top-tagline .accent { color: var(--green); }

/* Columna izquierda: escena + destrezas. El titular ahora vive dentro de .hero-scene
   (superpuesto a la foto), ver .hero-scene-title más abajo. */
.hero-left { display: flex; flex-direction: column; align-self: stretch; color: var(--white); }

/* Escena real del estudiante (foto provista por el usuario, ya compuesta con fondo de oficina
   y laptop con logo UESQ) junto a la lista de destrezas. El titular vive dentro de la escena,
   superpuesto sobre un degradado oscuro para legibilidad, según el mockup de referencia.
   .hero-photo-row ocupa todo el alto disponible de .hero-left (misma altura que la tarjeta de
   la derecha) y reparte ese espacio: la foto crece para mostrarse completa, y la cuadrícula de
   destrezas queda anclada abajo. */
.hero-photo-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  min-height: 0;
}
.hero-scene {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 140px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--blue-900-deep);
  box-shadow: 0 14px 26px rgba(3, 14, 28, 0.5);
}
.hero-scene-img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Parche pequeño solo detrás del titular (esquina superior izquierda) para legibilidad —
   ya NO cubre el resto de la foto, para que la laptop con el logo UESQ se vea nítida y brillante. */
.hero-scene-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 58%;
  height: 42%;
  background: radial-gradient(120% 120% at 0% 0%, rgba(7, 27, 56, 0.55) 0%, rgba(7, 27, 56, 0.32) 55%, rgba(7, 27, 56, 0) 100%);
  pointer-events: none;
}
.hero-scene-title {
  position: absolute;
  left: 18px;
  top: 16px;
  right: 42%;
  margin: 0;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
}
.hero-scene-title .accent { color: var(--green); }
.hero-feature-rail {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  width: 100%;
}
.hero-feature-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
}
.hero-feature-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-feature-icon-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--blue-500);
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.hero-feature-row:nth-child(4) .hero-feature-icon-inner {
  background: var(--green);
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.35);
}
.hero-feature-row strong { display: block; color: var(--white); font-size: 11px; letter-spacing: 0.3px; margin-bottom: 1px; text-transform: uppercase; }
.hero-feature-row p { margin: 0; font-size: 10.5px; line-height: 1.3; color: rgba(255, 255, 255, 0.72); }

/* Columna derecha: tarjeta de acceso clara (independiente de .glass-card: texto
   oscuro sobre vidrio claro, en vez de texto blanco sobre vidrio oscuro). */
.hero-right { display: flex; justify-content: center; }
.hero-login-card {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-lg);
  padding: 18px 26px;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 45px rgba(7, 27, 56, 0.35);
  color: var(--blue-900);
}
.hero-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 6px;
}
.hero-login-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero-login-card h2 { margin: 0 0 4px; color: var(--blue-900); font-size: 19px; }
/* Insignia "V10" junto al nombre de la App (único cambio pedido sobre la portada v2 original). */
.version-badge {
  display: inline-block;
  background: var(--green);
  color: #06210f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 4px;
}
.hero-login-card .hero-login-desc {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 4px;
}
.hero-login-card .hero-login-desc .text-blue { color: var(--blue-500); font-weight: 700; }
.hero-login-card .hero-login-desc .text-green { color: var(--green-dark); font-weight: 700; }
.hero-login-card .hero-login-sub { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.hero-login-card .auth-form { text-align: left; }
.hero-login-card .auth-form label { color: var(--blue-900); font-weight: 700; font-size: 13px; }
.hero-login-card .auth-form input {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--ink);
  box-shadow: none;
}
.hero-login-card .auth-form input::placeholder { color: var(--muted); }
.hero-login-card .auth-form input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}
.hero-login-card .btn-primary {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hero-login-card .access-trust {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.hero-input-wrap { position: relative; }
.hero-input-wrap input { width: 100%; padding-right: 38px; }
.hero-input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.55;
  pointer-events: none;
  font-size: 14px;
}

/* Franja inferior: aliado estratégico (Cambridge). Se representa el nombre en
   texto, no el logotipo oficial de Cambridge, para no reproducir la marca de un
   tercero como imagen. */
.hero-partner-strip {
  grid-area: bottom;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-partner-badge {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 4px 7px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.hero-partner-badge img { display: block; height: 15px; width: auto; }
.hero-partner-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 9px;
  line-height: 1.3;
  max-width: 560px;
}

@media (max-width: 960px) {
  .hero-access {
    grid-template-columns: 1fr;
    grid-template-areas:
      "top"
      "right"
      "left"
      "bottom";
    padding: 24px 24px 20px;
    gap: 18px;
  }
  .hero-left { text-align: center; }
  .hero-scene { height: 190px; }
  .hero-scene-title { font-size: 13px; right: 46%; }
  .hero-partner-strip { justify-content: center; text-align: center; }
  .hero-partner-strip p { max-width: 100%; }
}
@media (max-width: 560px) {
  .hero-access { padding: 20px 16px 16px; }
  .hero-left h1 { font-size: 21px; }
  .hero-top-tagline { font-size: 10.5px; }
}

/* Auth */
.auth-card {
  max-width: 440px;
  margin: 24px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 26px;
}
.auth-tabs { display: flex; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.auth-tabs[hidden] { display: none; }
.tab-btn {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tab-btn.active { color: var(--blue-700); border-bottom-color: var(--blue-500); font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.auth-form[hidden] { display: none; }
.auth-form label { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); gap: 6px; }
.auth-form input,
.auth-form select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
}
.auth-form input:focus,
.auth-form select:focus { outline: 2px solid var(--blue-500); border-color: var(--blue-500); }
.form-error { color: var(--red); font-size: 13px; min-height: 12px; margin: 0; }

/* Profile picker (reemplaza login/registro): mismo lenguaje visual que el resto del rediseño
   (tarjeta con acento en degradado de marca), en vez de la caja plana gris anterior. */
.profile-heading { margin: 0 0 4px; color: var(--blue-900); }
.profile-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.profile-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  padding: 14px 20px 14px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.profile-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--brand-gradient);
}
.profile-item::after {
  content: "\2192";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--blue-500);
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.profile-item:hover,
.profile-item:focus-visible {
  border-color: var(--blue-500);
  box-shadow: var(--shadow-lg);
  transform: translateX(2px);
}
.profile-item:hover::after,
.profile-item:focus-visible::after { opacity: 1; transform: translateY(-50%) translateX(2px); }
.profile-item-name { font-weight: 700; color: var(--blue-900); font-size: 15px; }
.profile-item-meta { font-size: 13px; color: var(--muted); }

/* Access view (V2 - control de acceso por cédula) */
.access-help { margin-top: 16px; text-align: center; }

/* Admin panel (V2 - admin.html) */
.admin-warning {
  margin-top: 18px;
  background: #fff8e6;
  border: 1px solid var(--amber);
  color: #8a6d00;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.admin-warning code {
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
.admin-format-table, .admin-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}
.admin-format-table th, .admin-format-table td,
.admin-preview-table th, .admin-preview-table td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.admin-format-table th, .admin-preview-table th {
  background: var(--blue-50);
  color: var(--blue-900);
}
.admin-table-wrap { max-height: 360px; overflow-y: auto; margin-top: 10px; }
.admin-preview-table tr.row-error td { background: #fdecea; color: var(--red); }
.admin-steps { padding-left: 20px; line-height: 1.7; }
#fileInput { margin-top: 8px; }

/* Tabs principales del panel admin (roster / dashboard de progreso) */
.admin-main-tabs { max-width: none; margin-bottom: 20px; }
.tab-panel[hidden] { display: none; }
.progress-detail-row td { background: var(--blue-50); padding: 12px; }
.progress-lesson-table { margin-top: 0; }
.btn-small { padding: 6px 12px; font-size: 13px; }
#progressFileInput { margin-top: 8px; }
.admin-sep { border: none; border-top: 1px solid var(--blue-100); margin: 16px 0; }
.progress-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.parent-send-btn { padding: 4px 10px; font-size: 12px; }
.parent-send-status { font-size: 12px; margin-top: 4px; }

.btn {
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--brand-gradient);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(13, 110, 253, 0.36); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: #9db8ce; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost { background: transparent; color: var(--blue-700); border: 1px solid var(--blue-500); }
.btn-ghost:hover { background: var(--blue-100); }
.btn-danger { background: #b3261e; color: var(--white); }
.btn-danger:hover { background: #8c1d17; }
.btn-danger:disabled { background: #d7a29e; cursor: not-allowed; }
.nav-user .btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.5); }
.nav-user .btn-ghost:hover { background: rgba(255,255,255,0.12); }
/* Barra superior oscura del panel admin: "Ir a la app" era azul sobre azul y no se leía. */
.topbar-right .btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.6); text-decoration: none; }
.topbar-right .btn-ghost:hover { background: rgba(255,255,255,0.14); }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Placement test */
.placement-header h2 { margin: 0 0 6px; color: var(--blue-900); }
.progress-bar-outer {
  background: var(--blue-100);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
  margin: 12px 0 6px;
}
.progress-bar-inner {
  background: var(--brand-gradient);
  height: 100%;
  width: 0%;
  transition: width 0.25s ease;
}
.question-box {
  margin-top: 20px;
  padding: 18px;
  background: var(--blue-50);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.question-prompt { font-size: 17px; font-weight: 600; margin-bottom: 14px; color: var(--blue-900); }
.option-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--white);
}
.option-item.selected { border-color: var(--blue-500); background: var(--blue-100); }
.option-item input { accent-color: var(--blue-500); }
.listen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  background: var(--blue-100);
  color: var(--blue-700);
  border: 1px solid var(--blue-500);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}
.listen-btn:hover { background: var(--blue-500); color: var(--white); }

/* Subtítulos (captions) del audio — accesibilidad para estudiantes con NEE */
.listen-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.listen-controls .listen-btn { margin-bottom: 0; }
.cc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--blue-700);
  border: 1px solid var(--blue-500);
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}
.cc-btn:hover { background: var(--blue-100); }
.cc-btn[aria-pressed="true"] { background: var(--blue-700); color: var(--white); border-color: var(--blue-700); }
.caption-box {
  background: #1a1a1a;
  color: #ffffff;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.6;
}
.placement-actions { display: flex; justify-content: space-between; margin-top: 22px; gap: 10px; }

/* Results */
.results-card { text-align: center; }
.result-level {
  display: inline-block;
  font-size: 42px;
  font-weight: 800;
  color: var(--white);
  background: var(--blue-700);
  padding: 10px 30px;
  border-radius: 12px;
  margin: 16px 0;
}
.explanation { max-width: 480px; margin: 10px auto 22px; }
.pronunciation-box {
  text-align: left;
  max-width: 560px;
  margin: 0 auto 22px;
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.pronunciation-box h3 { margin: 0 0 10px; color: var(--blue-900); font-size: 16px; }
.pronunciation-list { margin: 0; padding-left: 18px; }
.pronunciation-list li { margin-bottom: 10px; font-size: 14px; }

/* Escudos (Básica Media / Young Learners, V10) — ver isYoungLearnersGroup en app-v10.js */
.shields { font-size: 16px; letter-spacing: 2px; }

/* Dashboard */
.dashboard-header h2 { margin: 0 0 6px; color: var(--blue-900); }
.dashboard-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.dashboard-header-top h2 { margin: 0; }
#btnExportExcel { white-space: nowrap; }

.skill-summary { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.skill-pill {
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--blue-900);
}
.level-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.level-block-header {
  background: var(--blue-900);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.level-block-header h3 { margin: 0; font-size: 16px; }
.level-badge-cert {
  background: var(--green);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.lesson-list { list-style: none; margin: 0; padding: 10px; }
.lesson-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.lesson-item:hover { background: var(--blue-50); }
.lesson-item.locked { opacity: 0.55; }
.lesson-item-left { display: flex; align-items: center; gap: 12px; }
.skill-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--blue-100);
  font-size: 16px;
}
.lesson-item-title { font-weight: 600; font-size: 14px; }
.lesson-item-sub { font-size: 12px; color: var(--muted); }
.status-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}
.status-passed { background: #e3f7e9; color: var(--green); }
.status-unlocked { background: var(--blue-100); color: var(--blue-700); }
.status-locked { background: #eef1f4; color: var(--muted); }
.status-failed { background: #fdecea; color: var(--red); }
.status-pending_oral_review { background: #fff8e6; color: var(--amber); }

/* Plan de tiempo por nivel (dashboard de padres de familia — ver PLAN_WEEKS_PER_LEVEL_V6 en
   config-v6.js). Se usa en el propio dashboard del estudiante, en padres-v6.html, y como columna
   extra en el dashboard de progreso del docente/administrador. */
.plan-row { margin: 4px 0 12px; }
.plan-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}
.plan-badge-ontrack { background: var(--blue-100); color: var(--blue-700); }
.plan-badge-overdue { background: #fdecea; color: var(--red); }
.plan-badge-ontime { background: #e3f7e9; color: var(--green); }
.plan-badge-late { background: #fff4e0; color: var(--amber); }
.plan-badge-deadline { background: var(--blue-100); color: var(--blue-700); }
.plan-badge-deadline-overdue { background: #fdecea; color: var(--red); }

/* V10: reporte "destrezas orales vs. escritas" (listening+speaking vs. reading+writing) — ver
   computeOralWrittenComparison en store-v10.js. Se usa en el dashboard del estudiante
   (#oralWrittenSummary), en la página de padres (padres-v10.html) y como celda extra en el
   dashboard del docente/admin (.oral-written-cell). */
.oral-written-card {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--blue-100, #eef4ff);
}
.oral-written-card h4 { margin: 0 0 8px; font-size: 14px; }
.oral-written-bars { display: flex; flex-direction: column; gap: 6px; }
.oral-written-bar-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.oral-written-cell { font-size: 12px; }
.lesson-btn {
  background: var(--blue-500);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.lesson-btn:hover { background: var(--blue-700); }
.lesson-btn:disabled { background: #c3d4e2; cursor: not-allowed; }
.cert-btn {
  background: var(--green);
  color: white; border: none; padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; font-weight: 700;
}

/* Fila superior de una tarjeta con botón de volver (izquierda) y/o cerrar sesión (derecha) */
.card-top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-top-row .back-btn { margin-bottom: 0; }

/* Lesson player */
.lesson-card h2 { color: var(--blue-900); margin-top: 6px; }
.back-btn { margin-bottom: 10px; }
.passage-box {
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  line-height: 1.6;
  font-size: 15px;
  white-space: pre-line;
}
.phrase-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.phrase-target { font-size: 16px; font-weight: 600; color: var(--blue-900); margin-bottom: 10px; }
.record-btn {
  background: var(--red);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 700;
}
.record-btn.recording { background: #7a1f14; animation: pulse 1s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }
.transcript-box { margin-top: 10px; font-size: 14px; color: var(--muted); min-height: 20px; }
.word-missed { color: var(--red); text-decoration: underline; }
textarea.writing-input {
  width: 100%;
  min-height: 160px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
}
.word-count { font-size: 13px; color: var(--muted); margin-top: 6px; }
.lesson-result-box {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.lesson-result-box.pass { background: #e3f7e9; border-color: var(--green); }
.lesson-result-box.fail { background: #fdecea; border-color: var(--red); }
.lesson-result-box.pending { background: #fff8e6; border-color: var(--amber); }
.support-warning {
  background: #fff8e6;
  border: 1px solid var(--amber);
  color: #8a6d00;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}

/* Desglose de puntaje de writing/speaking abierto (V10) — ver renderScoreBreakdownHtml en app-v10.js */
.score-breakdown {
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 0 14px;
  font-size: 13px;
}
.score-breakdown summary { cursor: pointer; font-weight: 600; color: var(--blue-700); }
.score-breakdown ul { margin: 8px 0 0; }
.score-breakdown li { margin-bottom: 6px; }

/* ---------- V10: pista opcional de palabras clave (Ver pista / Ocultar pista) ---------- */
.hint-toggle { margin: 6px 0; display: inline-block; }
.hint-box {
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 4px 0 10px;
}

/* ---------- V5: pausar/reanudar prueba de ubicación ---------- */
.placement-autosave-note { margin-top: 6px; }
.placement-actions-secondary { display: flex; justify-content: center; margin-top: 10px; }

/* ---------- V5: captura de speaking (grabar o escribir) ---------- */
.speaking-capture-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.write-fallback-toggle { white-space: normal; text-align: left; }
.write-fallback-input { margin-top: 8px; }

/* ---------- V5: imágenes de tareas de speaking abiertas ---------- */
.speaking-image-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.speaking-image-box { position: relative; width: 220px; max-width: 100%; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--white); }
.speaking-image-box svg { display: block; width: 100%; height: auto; }
.speaking-image-label {
  position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-700); color: var(--white); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}

/* Info Exchange (tarea de speaking "intercambio de información") */
.info-exchange-table { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 10px 0; max-width: 420px; }
.info-exchange-title { background: var(--blue-700); color: var(--white); font-weight: 700; padding: 8px 12px; font-size: 14px; }
.info-exchange-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--white); }
.info-exchange-row:first-of-type { border-top: none; }
.info-exchange-label { color: var(--text-muted, #555); }
.info-exchange-value { font-weight: 600; }
.info-exchange-value.info-exchange-missing { color: var(--blue-700); font-weight: 700; }
.note-completion-row { align-items: center; }
.note-completion-input { border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; width: 140px; max-width: 45%; font-size: 14px; }

/* Certificate */
.certificate-wrap { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 20px; }
.certificate {
  width: 100%;
  max-width: 680px;
  background: var(--white);
  border: 10px solid var(--inst-green);
  border-radius: 6px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}
.cert-logo { display: block; margin: 0 auto 14px; max-width: 220px; height: auto; }
.cert-eyebrow { text-transform: uppercase; letter-spacing: 2px; color: var(--inst-green-dark); font-size: 13px; font-weight: 700; }
.cert-title { color: var(--inst-black); font-size: 30px; margin: 10px 0 20px; }
.cert-text { color: var(--muted); margin: 6px 0; }
.cert-name { font-size: 26px; font-weight: 700; color: var(--inst-black); margin: 8px 0; }
.cert-level { font-size: 40px; font-weight: 800; color: var(--inst-green); margin: 10px 0; }
.cert-date { margin-top: 24px; font-size: 13px; color: var(--muted); }

.cert-skills {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.cert-skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 78px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--inst-green-50);
  border: 1px solid var(--inst-green-50);
}
.cert-skill-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--inst-green-dark); font-weight: 700; }
.cert-skill-score { font-size: 18px; font-weight: 800; color: var(--inst-black); }

.cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--inst-green-50);
  border: 1px solid var(--inst-green);
  color: var(--inst-green-dark);
  font-size: 12px;
  font-weight: 700;
}
.cert-badge-icon { width: 14px; height: 14px; color: #d1a233; flex: 0 0 auto; }

.cert-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--inst-green-50);
}
.cert-signature, .cert-verify { flex: 1; min-width: 0; text-align: center; }
.cert-signature-line { width: 160px; max-width: 100%; height: 0; border-top: 1.5px solid var(--inst-black); margin: 0 auto 6px; }
.cert-signature-name { font-weight: 700; color: var(--inst-black); font-size: 13px; margin: 0; line-height: 1.3; }
.cert-signature-title { font-size: 11px; color: var(--muted); margin: 2px 0 0; text-transform: uppercase; letter-spacing: 1px; }

.cert-seal { flex: 0 0 auto; width: 108px; }
.cert-seal-svg { width: 100%; height: auto; display: block; }

.cert-qr { display: flex; justify-content: center; margin-bottom: 6px; min-height: 78px; }
.cert-qr-fallback { border: 1px dashed var(--inst-green-50); border-radius: 4px; align-items: center; }
.cert-qr-fallback::before { content: 'QR no disponible sin conexión'; font-size: 9px; color: var(--muted); padding: 0 6px; }
.cert-qr img, .cert-qr canvas, .cert-qr table { display: block; }
.cert-folio { font-size: 10px; color: var(--muted); letter-spacing: 0.5px; margin: 0; word-break: break-all; }
.cert-folio-pending { font-style: italic; }

.certificate-actions { display: flex; gap: 12px; }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-900);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 999;
}
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

/* Footer institucional: visible en todas las pantallas (fuera de las vistas que se
   muestran/ocultan), con el correo de soporte y los créditos de autoría. */
.app-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  margin-top: 4px;
}
.app-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 20px 10px;
  text-align: center;
}
.app-footer-help {
  margin: 0 0 3px;
  font-size: 12px;
  color: var(--blue-900);
}
.app-footer-help a { color: var(--blue-500); }
.app-footer-copyright {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

@media print {
  .topbar, .certificate-actions, .app-footer { display: none !important; }
  .certificate { border-width: 4px; }
  .cert-footer { break-inside: avoid; }
}

@media (max-width: 560px) {
  .cert-footer { flex-direction: column; align-items: center; }
  .cert-signature, .cert-verify { text-align: center; }
}
