/* IncluTask — aspecto de la zona de docentes (acceso, lista, edición y páginas legales).
   Se carga después de estilos.css. El tablero de la PDI no usa esta hoja: sus colores los elige cada docente. */
body.editor{
  /* Gama de Doble Equipo: verde oscuro, naranja, rosa, lima y blanco */
  --verde: #173827;
  --naranja: #f75435;
  --rosa: #fea1cd;
  --lima: #dfff30;
  --fondo: #f6f7f1;
  --papel: #ffffff;
  --tinta: #173827;
  --suave: #56655c;
  --borde: #e1e5da;
  --acento: #173827;
  --acento-suave: #f3ffb5;
  --radio: 16px;
  --sombra: 0 1px 2px rgb(23 56 39 / .05), 0 6px 20px rgb(23 56 39 / .06);
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--tinta);
  background: var(--fondo);
  accent-color: var(--acento);
}
.editor h1, .editor h2{ letter-spacing: -.01em; }

/* ---------- Botones y campos ---------- */
.editor .boton{ border-radius: 12px; font-weight: 700; transition: transform .12s, box-shadow .12s, border-color .12s, background .12s; }
.editor .boton:hover{ border-color: var(--acento); transform: translateY(-1px); box-shadow: 0 3px 10px rgb(23 56 39 / .08); }
.editor .boton:active{ transform: none; box-shadow: none; }
.editor .boton.principal{ background: var(--lima); border-color: var(--verde); color: var(--verde); box-shadow: 0 2px 0 var(--verde); }
.editor .boton.principal:hover{ filter: none; background: #e8ff5c; box-shadow: 0 3px 0 var(--verde), 0 6px 16px rgb(23 56 39 / .18); }
.editor .boton.peligro:hover{ border-color: var(--alerta); background: #fdecea; }
.editor .boton.grabando{ box-shadow: none; }
.editor .icono{ border-radius: 10px; transition: border-color .12s, background .12s; }
.editor .icono:hover:not(:disabled){ border-color: var(--acento); background: var(--acento-suave); }
.editor .icono.peligro:hover:not(:disabled){ border-color: var(--alerta); background: #fdecea; }
.editor input:not([type=radio]):not([type=checkbox]):not([type=color]), .editor textarea, .editor select{
  border: 1.5px solid var(--borde); border-radius: 10px; background: #fff; transition: border-color .12s, box-shadow .12s;
}
.editor input:not([type=radio]):not([type=checkbox]):not([type=color]):focus, .editor textarea:focus, .editor select:focus{
  outline: none; border-color: var(--acento); box-shadow: 0 0 0 4px rgb(223 255 48 / .65);
}
.editor :focus-visible{ outline: 2px solid var(--acento); outline-offset: 2px; }
.editor .enlace{ font-weight: 700; text-decoration: none; }
.editor .enlace:hover{ text-decoration: underline; }

/* ---------- Cabecera ---------- */
/* El logo y «Cerrar sesión» se alinean con el contenido (1280px), no con los bordes de la ventana */
.editor .barra{ position: sticky; top: 0; z-index: 20; padding: 10px max(24px, calc(50% - 616px)); gap: 12px; background: #fff; border-bottom: 1px solid var(--borde); }
/* Sin desenfoques (backdrop-filter): en algunos equipos dejaban la cabecera en blanco */
.editor .barra > *{ position: relative; z-index: 1; }
.editor .marca{ display: inline-flex; align-items: center; gap: 10px; font-size: 1.3em; font-weight: 800; letter-spacing: -.02em; color: var(--verde); }
.editor .marca img{ width: 34px; height: 34px; display: block; }
.editor .marca b{ color: var(--naranja); font-weight: 800; }
.editor .usuario{ display: flex; align-items: center; gap: 10px; min-width: 0; }
.editor .usuario .quien{ background: var(--fondo); border: 1px solid var(--borde); border-radius: 999px; padding: .35em .9em; font-size: .92em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor .usuario .salir{ flex: none; padding: .45em 1em; font-size: .95em; background: var(--verde); border-color: var(--verde); color: #fff; }
.editor .usuario .salir:hover{ background: #22503a; }
@media (max-width: 560px){ .editor .usuario .quien{ display: none; } }
.editor .barra > a:not(.marca){ font-weight: 700; text-decoration: none; }
/* En la pantalla de acceso no hay cabecera: la marca va en el panel */
body.editor:has(#vAcceso:not([hidden])) .barra{ display: none; }

/* ---------- Acceso ---------- */
.acceso{ display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; background: var(--papel); }
.acceso-marca{
  position: relative; overflow: hidden; color: #fff; padding: clamp(28px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 26px;
  background:
    radial-gradient(34em 24em at 108% -12%, rgb(223 255 48 / .26), transparent 60%),
    radial-gradient(30em 24em at -12% 112%, rgb(254 161 205 / .26), transparent 60%),
    var(--verde);
}
.acceso-marca .marca{ color: #fff; font-size: 1.7em; }
.acceso-marca .marca img{ width: 48px; height: 48px; border-radius: 13px; box-shadow: 0 0 0 1px rgb(255 255 255 / .18); }
.acceso-marca .marca b{ color: var(--lima); }
.acceso-marca h1{ margin: 0; font-size: clamp(1.7em, 3.1vw, 2.7em); line-height: 1.12; font-weight: 800; max-width: 15em; }
.acceso-marca h1 em{ font-style: normal; color: var(--lima); }
.acceso-marca .colaboran{ justify-content: flex-start; margin: 10px 0 0; }
.acceso-marca .colaboran img{ height: 96px; border-radius: 22px; }
.acceso-marca > p{ margin: 0; font-size: 1.1em; line-height: 1.5; color: rgb(255 255 255 / .82); max-width: 32em; }

/* Maqueta decorativa del tablero */
.maqueta{ width: min(460px, 100%); background: #f6f7f1; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; transform: rotate(-2deg); box-shadow: 0 24px 60px rgb(0 0 0 / .35); margin-top: 6px; }
.mq-titulo{ height: 30px; border-radius: 10px; background: linear-gradient(90deg, var(--lima) 62%, #fff 62%); position: relative; }
.mq-titulo::after{ content: ''; position: absolute; left: 12px; top: 11px; width: 40%; height: 8px; border-radius: 4px; background: rgb(23 56 39 / .55); }
.mq-cols{ display: grid; grid-template-columns: 1fr 1.7fr 1fr; gap: 10px; }
.mq-col{ background: #fff; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.mq-col b{ display: block; height: 34px; border-radius: 9px; background: #ffe3f1; border: 2px solid var(--rosa); }
.mq-col b:nth-child(2){ transform: rotate(3deg); background: #f3ffb5; border-color: #c5e020; }
.mq-col b:nth-child(3){ transform: rotate(-3deg); }
.mq-col span{ display: flex; align-items: center; gap: 8px; height: 26px; border-radius: 8px; padding: 0 6px; background: #eef0e8; }
.mq-col span::before{ content: ''; width: 14px; height: 14px; border-radius: 50%; background: #c9c4b8; flex: none; }
.mq-col span::after{ content: ''; height: 6px; border-radius: 3px; background: #c9c4b8; flex: 1; }
.mq-col span.hecho{ background: #f3ffb5; }
.mq-col span.hecho::before{ background: var(--verde); }
.mq-col span.actual{ background: #fff; box-shadow: 0 0 0 2px var(--acento); }
.mq-col span.actual::before{ background: var(--naranja); }
.mq-col em{ width: 78%; aspect-ratio: 1; margin: auto; border-radius: 50%; background: conic-gradient(#fff 0 35%, var(--naranja) 35% 100%); border: 3px solid var(--verde); }

.acceso-form{ display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.acceso-caja{ width: min(400px, 100%); }
.acceso-caja h2{ margin: 0 0 4px; font-size: 1.8em; font-weight: 800; }
.acceso-caja > .nota{ margin: 0 0 22px; font-size: 1em; }
.acceso .pestanas{ gap: 4px; padding: 4px; margin: 0 0 20px; background: var(--fondo); border-radius: 14px; }
.acceso .pestana{ border: 0; border-radius: 10px; background: transparent; color: var(--suave); font-weight: 700; padding: .65em; }
.acceso .pestana.activa{ background: #fff; color: var(--tinta); box-shadow: 0 1px 4px rgb(23 56 39 / .14); }
.acceso .tarjeta-form{ border: 0; border-radius: 0; padding: 0; background: none; gap: 16px; }
.acceso .tarjeta-form label{ gap: 6px; font-weight: 700; font-size: .95em; }
.acceso .tarjeta-form input{ padding: .75em .9em; font-size: 1.05em; }
.acceso .tarjeta-form .boton{ padding: .8em 1em; font-size: 1.08em; margin-top: 4px; }
.acceso .tarjeta-form .error{ margin: 0; }
.acceso .aviso-pruebas{ padding: 12px 14px; border-radius: 12px; border: 1px solid var(--borde); background: #fff7e0; color: var(--tinta); font-size: .9em; line-height: 1.45; }
.acceso .aviso-pruebas p{ margin: 0; }
.acceso .aviso-pruebas p + p{ margin-top: .6em; }
.acceso .aviso-ok{ margin: 0; padding: 12px 14px; border-radius: 12px; background: #f3ffb5; color: var(--tinta); font-weight: 600; line-height: 1.4; }
.acceso .enlace{ align-self: center; border: 0; background: none; padding: 0; color: var(--tinta); font: inherit; font-size: .95em; font-weight: 700; text-decoration: underline; cursor: pointer; }
.acceso .enlace:hover{ color: var(--naranja); }
.acceso [hidden]{ display: none !important; }
/* Códigos de registro (administradores) */
.admin-codigos{ margin-top: 32px; }
.form-codigo-registro{ display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.form-codigo-registro label{ display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: .92em; }
.form-codigo-registro .ancho{ grid-column: span 2; }
.lista-codigos{ list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lista-codigos li{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--borde); border-radius: 12px; background: #fff; }
.lista-codigos .meta{ flex: 1; min-width: 12em; color: var(--suave); }
.lista-codigos .botones{ display: flex; gap: 6px; }
.lista-codigos .agotado .codigo-grande{ text-decoration: line-through; opacity: .55; }
.acceso-otra{ margin-top: 26px; padding: 14px 16px; border-radius: 14px; background: var(--fondo); font-size: .95em; }
.acceso-otra a{ font-weight: 700; }
@media (max-width: 860px){
  .acceso{ grid-template-columns: 1fr; }
  .acceso-marca{ padding: 28px 24px; gap: 14px; }
  .acceso-marca > p, .maqueta{ display: none; }
  .acceso-marca .colaboran{ margin-top: 2px; gap: 10px; }
  .acceso-marca .colaboran img{ height: 56px; border-radius: 14px; }
  .acceso-form{ justify-content: flex-start; padding-top: 28px; }
}

/* ---------- Lista de actividades ---------- */
.editor .contenedor{ padding: 28px 24px; }
.editor .titular{ margin-bottom: 20px; }
.editor .titular h1{ font-size: 1.9em; font-weight: 800; }
.editor .lista-actividades{ display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.editor .item-actividad{
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 14px 12px;
  padding: 18px; border-radius: var(--radio); border: 1px solid var(--borde); border-top: 5px solid var(--lima);
  box-shadow: var(--sombra); transition: transform .15s, box-shadow .15s;
}
.editor .item-actividad:nth-child(3n+2){ border-top-color: var(--rosa); }
.editor .item-actividad:nth-child(3n){ border-top-color: var(--naranja); }
.editor .item-actividad:hover{ transform: translateY(-2px); box-shadow: 0 2px 4px rgb(23 56 39 / .06), 0 14px 32px rgb(23 56 39 / .10); }
.editor .item-actividad .datos{ min-width: 0; gap: 6px; }
.editor .item-actividad .nombre{ font-size: 1.2em; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.editor .item-actividad .nombre:hover{ color: var(--naranja); }
.editor .item-actividad .meta{ line-height: 1.4; }
.editor .codigo-grande{ font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.2em; letter-spacing: .1em; border-radius: 10px; padding: .25em .55em; }
.editor .item-actividad .botones{ grid-column: 1 / -1; padding-top: 12px; border-top: 1px dashed var(--borde); }
.editor .item-actividad .boton{ padding: .4em .75em; font-size: .92em; }
.editor .vacio{ border: 2px dashed var(--borde); border-radius: var(--radio); padding: 56px 24px; font-size: 1.1em; }

/* ---------- Edición ---------- */
.editor .info-codigo{ background: var(--papel); border: 1px solid var(--borde); border-radius: 999px; padding: .3em 1em; color: var(--suave); }
.editor .info-codigo strong{ font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.25em; }
.editor .bloque{ border-radius: var(--radio); padding: 20px; box-shadow: var(--sombra); }
.editor .bloque h2{ display: flex; align-items: center; gap: 10px; font-size: 1.15em; font-weight: 800; text-transform: none; letter-spacing: -.01em; color: var(--tinta); margin-bottom: 16px; }
.insignia{ width: 2em; height: 2em; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--fondo); font-size: 1em; }
.bloque.de-material{ border-top: 5px solid var(--lima); }
.bloque.de-material .insignia{ background: #f3ffb5; }
.bloque.de-pasos{ border-top: 5px solid var(--rosa); }
.bloque.de-pasos .insignia{ background: #ffe3f1; }
.bloque.de-tiempo{ border-top: 5px solid var(--naranja); }
.bloque.de-tiempo .insignia{ background: #ffe1da; }
.editor .etiqueta{ color: var(--suave); font-size: .9em; font-weight: 700; }
.editor .etiqueta select{ color: var(--tinta); font-size: 1.1em; font-weight: 400; }
.editor .campo-titulo{ font-size: 1.6em; font-weight: 800; color: var(--tinta); padding: .45em .6em; }
.editor .campo-titulo::placeholder{ font-weight: 400; color: #a6b0a8; }

.editor .opciones{ gap: 8px; margin-bottom: 14px; }
.editor .opciones label{ border: 1.5px solid var(--borde); border-radius: 12px; padding: .6em .8em; line-height: 1.3; transition: border-color .12s, background .12s; }
.editor .opciones label:hover{ border-color: var(--acento); }
.editor .opciones label:has(input:checked){ border-color: var(--acento); background: var(--acento-suave); font-weight: 700; }
.editor .opciones input{ flex: none; width: 1.1em; height: 1.1em; }
/* Fila de opciones de marcado, bajo las tres columnas de Presentación */
.ajustes-marcas{ margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--borde); }
.ajustes-marcas .etiqueta{ margin-bottom: 8px; }
.editor .opciones.en-linea{ flex-direction: row; flex-wrap: wrap; margin-bottom: 8px; }
.ajustes-marcas .nota{ margin: 0; }
.editor .casilla input[type=checkbox]{ width: 1.15em; height: 1.15em; flex: none; }

.editor .fila{ border-radius: 12px; background: #fafbf6; padding: 8px; transition: border-color .12s, box-shadow .12s; }
.editor .fila:focus-within{ border-color: var(--acento); background: #fff; box-shadow: 0 0 0 4px var(--acento-suave); }
.editor .fila.arrastrando{ background: #fff; }
.editor .fila input:focus, .editor .fila textarea:focus{ box-shadow: none; }
.editor .paso-editor .numero{ background: var(--acento); color: #fff; }
.editor .hueco-picto{ border-radius: 12px; background: #fff; }
.editor .hueco-picto:hover{ background: var(--acento-suave); }
.editor .mini-picto{ border-radius: 12px; }
.editor .filas + .boton, .editor .video-principal-editor .boton{ border-style: dashed; }
.editor .filas + .boton{ width: 100%; color: var(--acento); }

.editor .acciones-pie{
  bottom: 14px; margin-top: 20px; padding: 10px 12px 10px 18px; border: 1px solid var(--borde); border-radius: 18px;
  background: #fff; box-shadow: 0 10px 34px rgb(23 56 39 / .16);
}
.editor .estado{ font-weight: 700; }

/* ---------- Diálogos ---------- */
.editor .dialogo{ border-radius: 20px; padding: 22px; box-shadow: 0 30px 80px rgb(23 56 39 / .35); color: var(--tinta); }
.editor .dialogo::backdrop{ background: rgb(23 56 39 / .55); }
.editor .dialogo.visor-video{ padding: 12px; }
.editor .pestanas-fuente{ border-radius: 12px; border-width: 1.5px; }
.editor .fuente{ font-weight: 700; }
.editor .resultado{ border-radius: 12px; transition: border-color .12s, transform .12s; }
.editor .resultado:hover{ transform: translateY(-2px); }
.editor .chip:hover{ background: var(--acento-suave); }

/* ---------- Pie y páginas legales ---------- */
.editor .creditos{ margin: 28px 16px 6px; }
.editor .enlaces-legales{ margin: 0 16px 20px; }
.editor .enlaces-legales a{ font-weight: 700; text-decoration: none; }
.editor main.legal{ background: var(--papel); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); margin: 28px auto 40px; padding: 36px clamp(18px, 5vw, 48px) 40px; }
.editor main.legal h1{ font-size: 2em; font-weight: 800; }
.editor main.legal h2{ font-weight: 800; }
.editor .donar .bizum{ background: var(--lima); color: var(--verde); box-shadow: inset 0 0 0 2px var(--verde); }
.editor .patrocinador{ display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.editor .patrocinador .doble-equipo{ padding: 0; border-radius: 24px; }
@media (max-width: 860px){ .editor main.legal{ margin: 0; border: 0; border-radius: 0; } }

@media (prefers-reduced-motion: reduce){ .editor *{ transition: none !important; } }

/* En pantallas estrechas, las muestras de color caben en una fila */
@media (max-width: 520px){
  .editor .muestras{ gap: 4px; }
  .editor .muestra{ width: 22px; height: 22px; }
  .editor .contenedor{ padding: 20px 14px; }
  .editor .acciones-pie{ padding-left: 12px; }
}
