/* Aulora para docentes — estilos propios de /aulora/ (se suman a /styles.css).
   Sin estilos en línea: el CSP del sitio (style-src 'self') los bloquea. */

/* Identidad de Aulora: aula + aurora. Violeta y verde azulado, como en la app; botones azul noche como en la app. */
.pagina-aulora { --acento: #5b34c4; --acento-deco: #8b6ae0; }
:root[data-theme="dark"] .pagina-aulora { --acento: #c3aefa; --acento-deco: #9a82e8; --boton: #c3aefa; --boton-texto: #14213D; --boton-hover: #d3c3fb; }
.portada-aulora { position: relative; overflow: hidden; isolation: isolate; }
.portada-aulora::before {
  content: ""; position: absolute; inset: -30% -10% auto 35%; height: 140%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(163, 94, 232, 0.16), transparent 70%), radial-gradient(closest-side at 70% 60%, rgba(45, 184, 168, 0.14), transparent 70%);
}
.aurora-texto {
  background: linear-gradient(90deg, #6a3fd0, #3c6fd0 55%, #0f7f76); -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="dark"] .aurora-texto { background-image: linear-gradient(90deg, #c3aefa, #8fb5f5 55%, #6fd8ca); }
.nombre-origen { margin: 1.25rem 0 0; font-size: 0.95rem; color: var(--suave); }
.nombre-origen b { font-family: "Outfit", sans-serif; font-weight: 600; color: var(--acento); }

/* ---------- Portada ---------- */
.portada-aulora .antetitulo { margin-bottom: 0.75rem; }
.duracion {
  font-size: 0.78rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 99px;
  background: var(--fondo); border: 1px solid var(--linea); color: var(--suave);
}

/* ---------- El problema ---------- */
.dolores {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.9rem;
  margin: 1.5rem 0 0; padding: 0; list-style: none;
}
.dolores li {
  padding: 1rem 1.2rem; border-radius: 14px; background: var(--superficie); border: 1px solid var(--linea);
  color: var(--suave); position: relative; padding-left: 2.6rem;
}
.dolores li::before {
  content: ""; position: absolute; left: 1.1rem; top: 1.45rem; width: 0.7rem; height: 2px; background: var(--acento);
}
.remate { margin: 1.75rem 0 0; font-family: "Outfit", system-ui, sans-serif; font-size: 1.35rem; font-weight: 600; color: var(--acento); }

/* ---------- Demo ---------- */
.demo-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .demo-rejilla { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.demo-texto .intro { margin-bottom: 1.5rem; }

.reloj { border: 0; margin: 0 0 1.5rem; padding: 0; }
.reloj legend { padding: 0; margin-bottom: 0.6rem; font-weight: 600; font-size: 0.95rem; }
.reloj-opciones { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.reloj-opciones button {
  font: inherit; font-size: 0.92rem; font-weight: 600; padding: 0.5rem 0.9rem; border-radius: 99px; cursor: pointer;
  background: var(--superficie); color: var(--texto); border: 1.5px solid var(--linea);
}
.reloj-opciones button:hover { border-color: var(--acento); }
.reloj-opciones button[aria-pressed="true"] { background: var(--boton); color: var(--boton-texto); border-color: var(--boton); }
:root[data-theme="dark"] .reloj-opciones button[aria-pressed="true"] { background: var(--boton); color: var(--boton-texto); border-color: var(--boton); }

.pasos { margin: 0 0 1rem; padding-left: 1.25rem; color: var(--suave); }
.pasos li { margin-bottom: 0.3rem; }
.pasos b { color: var(--texto); }
.nota-datos { margin: 0; font-size: 0.85rem; color: var(--suave); }

/* El teléfono: la app se ve siempre clara, como en la realidad. */
.telefono-marco { justify-self: center; position: relative; padding: 10px; border-radius: 44px; background: #0d1222; box-shadow: 0 24px 60px rgba(20, 33, 61, 0.28); }
.telefono {
  --a-tinta: #141a33; --a-suave: #5d6278; --a-linea: #e6e7f0; --a-fondo: #f5f6fb; --a-indigo: #4a43d6;
  position: relative; width: 340px; height: 680px; overflow: hidden; border-radius: 34px;
  background: var(--a-fondo); color: var(--a-tinta); font-family: "Outfit", system-ui, sans-serif; font-size: 15px; line-height: 1.35;
  color-scheme: light;
}
@media (max-width: 400px) { .telefono { width: calc(100vw - 52px); height: 640px; } }
.telefono button { font: inherit; cursor: pointer; }
.sin-js { padding: 4rem 1.5rem; text-align: center; }

.app-barra {
  display: flex; align-items: center; gap: 0.45rem; padding: 1.1rem 1rem 0.7rem; background: #fbfbfe; border-bottom: 1px solid var(--a-linea);
}
.app-nombre { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; margin-right: auto; }
.campana { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--a-tinta); }
.campana svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.campana:hover { background: #eef0f8; }
.contador {
  position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: #e0483e; color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center;
}
.contador[hidden] { display: none; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ecebff; color: var(--a-indigo); font-size: 12px; font-weight: 600; }

.app-pantalla { height: calc(100% - 62px); overflow-y: auto; padding: 1rem 0.9rem 1.5rem; scrollbar-width: thin; }
.app-fecha { margin: 0; font-size: 0.8rem; color: var(--a-suave); }
.app-hola { margin: 0.15rem 0 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.app-resumen { margin: 0.3rem 0 1rem; font-size: 0.88rem; color: var(--a-suave); }

.ahora {
  border-radius: 20px; padding: 2px; background: linear-gradient(120deg, #a35ee8, #4a8fd9 55%, #2db8a8);
  box-shadow: 0 10px 26px rgba(74, 67, 214, 0.16);
}
.ahora-dentro { position: relative; border-radius: 18px; background: #fff; padding: 0.95rem 0.95rem 1rem; }
.ahora-etiqueta { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-indigo); }
.ahora-etiqueta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ahora-etiqueta.libre { color: var(--a-suave); }
.ahora h4 { margin: 0.55rem 0 0.1rem; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; padding-right: 3rem; }
.ahora-detalle { margin: 0; font-size: 0.82rem; color: var(--a-suave); }
.ahora .insignia { position: absolute; top: 0.85rem; right: 0.85rem; }
.progreso { height: 6px; margin: 0.8rem 0; border-radius: 99px; background: #eceaf8; overflow: hidden; }
.progreso span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #a35ee8, #2db8a8); transition: width 0.5s ease; }
.ahora-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.app-boton {
  border: 0; border-radius: 12px; padding: 0.62rem 0.8rem; font-weight: 600; font-size: 0.9rem;
  background: #10162e; color: #fff; box-shadow: 0 2px 0 rgba(16, 22, 46, 0.18);
}
.app-boton:hover { background: #222b4f; }
.app-boton.claro { background: #fff; color: var(--a-tinta); border: 1px solid var(--a-linea); box-shadow: none; }
.app-boton.claro:hover { background: #f6f6fb; }
.app-boton.alerta { background: #c2410c; }
.app-boton.alerta:hover { background: #a3360a; }
.app-boton.chico { padding: 0.45rem 0.7rem; font-size: 0.8rem; border-radius: 10px; }

.app-subtitulo { margin: 1.3rem 0 0.6rem; font-size: 1.1rem; font-weight: 600; }
.dia { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
.dia li {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.65rem; border-radius: 16px;
  background: #fff; border: 1px solid var(--a-linea); box-shadow: 0 2px 0 rgba(20, 26, 51, 0.04);
  transition: background 0.3s ease;
}
.dia li.es-ahora { border-color: #cfcaf7; }
.dia .info { flex: 1; min-width: 0; }
.dia .info b { display: block; font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dia .info span { font-size: 0.78rem; color: var(--a-suave); }
.dia .info em { font-style: normal; font-weight: 600; color: var(--a-indigo); }
.dia .info em.tarde { color: #c2410c; }
.dia li.zona { background: #fff4de; border-color: #fbe3b4; }
.dia li.zona b { color: #9a5800; }
.dia li.zona span { color: #a8681a; }

.insignia {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  font-weight: 600; font-size: 0.9rem;
}
.insignia.c4A { background: #dff5ef; color: #0f8a72; }
.ahora .insignia.c4A { background: #0f8a72; color: #fff; box-shadow: 0 3px 0 rgba(15, 138, 114, 0.25); }
.insignia.c4B { background: #e9eaff; color: #4a4fd6; }
.ahora .insignia.c4B { background: #4a4fd6; color: #fff; }
.insignia.c5H { background: #f3e9ff; color: #8b3fd9; }
.ahora .insignia.c5H { background: #8b3fd9; color: #fff; }
.insignia.zona { background: #f2a900; color: #3d2600; }
.insignia.zona svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.hecho { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #1f7a3a; color: #fff; }
.hecho svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hecho.nuevo { animation: aparecer 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes aparecer { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.cierre { margin-top: 1rem; padding: 0.8rem 0.9rem; border-radius: 16px; background: #eeecff; font-size: 0.8rem; }
.cierre b { display: block; color: var(--a-indigo); font-weight: 600; margin-bottom: 0.15rem; }
.cierre span { color: var(--a-suave); }

/* Hojas que suben desde abajo (lista y avisos). */
.hoja {
  position: absolute; inset: 62px 0 0; display: flex; flex-direction: column; background: #fff;
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(16, 22, 46, 0.18); animation: subir 0.28s ease;
  z-index: 3; /* por encima de la pantalla (y de su columna fija del registro) */
}
.hoja[hidden] { display: none; }
@keyframes subir { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.hoja-cabeza { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; padding: 1rem 1rem 0.6rem; border-bottom: 1px solid var(--a-linea); }
.hoja-cabeza b { font-size: 1.1rem; font-weight: 600; }
.hoja-sub { display: block; font-size: 0.8rem; color: var(--a-suave); }
.cerrar { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #f1f2f8; color: var(--a-tinta); font-size: 1.2rem; line-height: 1; }
.cerrar:hover { background: #e4e6f1; }

.leyenda { margin: 0; padding: 0.55rem 1rem; font-size: 0.72rem; color: var(--a-suave); display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.35rem; }
.leyenda .m { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; font-size: 0.65rem; font-weight: 600; margin-left: 0.25rem; }
.m.P { background: #dff3e6; color: #1f7a3a; }
.m.T { background: #fff0d6; color: #9a5800; }
.m.E { background: #e3ecff; color: #2f57c7; }
.m.A { background: #fde2e0; color: #b42318; }

.alumnos { flex: 1; overflow-y: auto; margin: 0; padding: 0 0.6rem; list-style: none; scrollbar-width: thin; }
.alumnos li { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.35rem; border-bottom: 1px solid #f0f1f6; }
.alumnos .n { width: 1.3rem; font-size: 0.72rem; color: var(--a-suave); text-align: right; }
.alumnos .nombre { flex: 1; min-width: 0; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marcas { display: flex; gap: 3px; }
.marcas button {
  width: 27px; height: 27px; border-radius: 8px; border: 1px solid var(--a-linea); background: #fff;
  font-size: 0.72rem; font-weight: 600; color: #9a9db0;
}
.marcas button:hover { border-color: #b9bbcc; }
.marcas button[aria-pressed="true"].P { background: #1f7a3a; border-color: #1f7a3a; color: #fff; }
.marcas button[aria-pressed="true"].T { background: #d68400; border-color: #d68400; color: #fff; }
.marcas button[aria-pressed="true"].E { background: #2f57c7; border-color: #2f57c7; color: #fff; }
.marcas button[aria-pressed="true"].A { background: #c8322a; border-color: #c8322a; color: #fff; }
.hoja-pie { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.75rem 1rem 1rem; border-top: 1px solid var(--a-linea); font-size: 0.78rem; color: var(--a-suave); }

.avisos-lista { margin: 0; padding: 0.4rem 0.8rem; list-style: none; overflow-y: auto; }
.avisos-lista li { padding: 0.75rem 0.4rem; border-bottom: 1px solid #f0f1f6; font-size: 0.86rem; }
.avisos-lista li b { display: block; font-weight: 600; }
.avisos-lista li span { color: var(--a-suave); font-size: 0.8rem; }

.toast {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translate(-50%, 20px); width: max-content; max-width: 88%;
  padding: 0.6rem 0.9rem; border-radius: 12px; background: #10162e; color: #fff; font-size: 0.82rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 6;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Video ---------- */
.video-marco { border-radius: 18px; overflow: hidden; border: 1px solid var(--linea); background: #0d1222; box-shadow: 0 18px 48px rgba(20, 33, 61, 0.16); }
.video-marco video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0d1222; }

/* ---------- Y hay más ---------- */
.proximo { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.proximo li { padding: 1.1rem 1.2rem; border-radius: 14px; background: var(--superficie); border: 1px dashed var(--linea); font-weight: 600; }
.etiqueta-desarrollo {
  display: table; margin-bottom: 0.5rem; padding: 0.15rem 0.6rem; border-radius: 99px; font-size: 0.72rem; font-weight: 600;
  background: #fff3d6; color: #8a5a00; border: 1px solid #f1d898;
}
:root[data-theme="dark"] .etiqueta-desarrollo { background: #3a2c0c; color: #f3cf7d; border-color: #5d4716; }

/* ---------- Contacto ---------- */
.contacto-acciones { margin-top: 0; }
.icono-correo { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  .hoja, .hecho.nuevo { animation: none; }
  .toast, .progreso span, .dia li { transition: none; }
}

/* ---------- Escena pixel: el aula al amanecer ---------- */
.portada-rejilla { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (max-width: 900px) { .portada-rejilla { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; } }
.escena-aula { margin: 0; }
.aula-ventana { overflow: hidden; border-radius: 22px; border: 1px solid var(--linea); box-shadow: var(--sombra-alta); aspect-ratio: 120 / 72; }
.px-aula { display: block; width: 100%; height: 100%; }
.escena-aula figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; margin-top: 0.6rem; font-size: 0.88rem; color: var(--suave); }

.pagina-aulora {
  --px-aw: #F1ECFA; --px-aw2: #E4DCF5; --px-af: #E6DAC4; --px-af2: #D9CBB0;
  --px-sk1: #CDB9F4; --px-sk2: #F1C4C6; --px-sk3: #F8DEA2;
  --px-pz: #23443C; --px-tz: #F5F2EA; --px-ok: #8FE0B4; --px-wd: #9B6B43; --px-wd2: #7A5233;
  --px-ph: #14213D; --px-ps: #7C4DDB;
}
:root[data-theme="dark"] .pagina-aulora {
  --px-aw: #1d2140; --px-aw2: #232a4c; --px-af: #171d33; --px-af2: #131829;
  --px-sk1: #0b1226; --px-sk2: #121c38; --px-sk3: #1b2850;
  --px-pz: #1a332d; --px-tz: #e8e3d6; --px-wd: #5e4330; --px-wd2: #47321f;
  --px-ph: #0b1222; --px-ps: #9b74ee;
}
.c-aw { fill: var(--px-aw); } .c-aw2 { fill: var(--px-aw2); } .c-af { fill: var(--px-af); } .c-af2 { fill: var(--px-af2); }
.c-sk1 { fill: var(--px-sk1); } .c-sk2 { fill: var(--px-sk2); } .c-sk3 { fill: var(--px-sk3); }
.c-pz { fill: var(--px-pz); } .c-tz { fill: var(--px-tz); } .c-ok { fill: var(--px-ok); }
.c-wd { fill: var(--px-wd); } .c-wd2 { fill: var(--px-wd2); } .c-ph { fill: var(--px-ph); } .c-ps { fill: var(--px-ps); }

.px-aula .sol, .px-aula .luna, .px-aula .lampara { transition: opacity 0.9s ease; }
.px-aula .luna, .px-aula .lampara { opacity: 0; }
:root[data-theme="dark"] .px-aula .sol { opacity: 0; }
:root[data-theme="dark"] .px-aula .luna, :root[data-theme="dark"] .px-aula .lampara { opacity: 1; }
/* La tiza escribe por partes y la pizarra se borra; el teléfono recibe un aviso. */
.px-aula .tiza { animation: 10s steps(1) infinite; }
.px-aula .t1 { animation-name: tiza1; } .px-aula .t2 { animation-name: tiza2; } .px-aula .t3 { animation-name: tiza3; } .px-aula .t4 { animation-name: tiza4; }
@keyframes tiza1 { 0%, 5% { opacity: 0; } 6%, 92% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes tiza2 { 0%, 20% { opacity: 0; } 21%, 92% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes tiza3 { 0%, 38% { opacity: 0; } 39%, 92% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes tiza4 { 0%, 58% { opacity: 0; } 59%, 92% { opacity: 1; } 93%, 100% { opacity: 0; } }
.px-aula .aviso { animation: aviso 10s steps(1) infinite; }
@keyframes aviso { 0%, 62% { opacity: 0; } 63%, 66% { opacity: 1; } 67%, 69% { opacity: 0; } 70%, 92% { opacity: 1; } 93%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .px-aula .tiza, .px-aula .aviso { opacity: 1; } }

/* El teléfono de la demo no se pierde en el modo oscuro. */
:root[data-theme="dark"] .telefono-marco { box-shadow: 0 0 0 1px #34446e, 0 24px 60px rgba(0, 0, 0, 0.45); }
