:root {
  --tinta: #14202e; --suave: #566577; --papel: #f4f6fa; --blanco: #fff; --linea: #d3dae5;
  --azul: #0a2f55; --azul-osc: #002747; --banda: #002747; --banda-suave: #e6ecf4; --titulo: #e3001b; --marca-rojo: #e3001b;
  --verde: #2b7a53; --verde-s: #e2f1e9; --ambar: #8f5a00; --ambar-s: #fbf0d9; --rojo: #b3362b; --rojo-s: #f9e5e2;
  --radio: 6px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 16px/1.5 "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.suave { color: var(--suave); } .num { text-align: right; font-variant-numeric: tabular-nums; }
code { background: var(--banda-suave); padding: 0 .3em; border-radius: 3px; }
[hidden] { display: none !important; }

/* ---------- estructura ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.cargando { color: var(--suave); }

/* ---------- controles ---------- */
.btn { border: 1px solid var(--azul); background: var(--blanco); color: var(--azul); border-radius: var(--radio); padding: .55rem .95rem; cursor: pointer; font-weight: 700; min-height: 44px; }
.btn:hover { background: var(--banda-suave); }
.btn.primario { background: var(--azul); color: #fff; } .btn.primario:hover { background: var(--azul-osc); }
.btn.chico { padding: .25rem .65rem; min-height: 34px; font-size: .9rem; }
.btn:disabled { opacity: .6; cursor: wait; }
input, select, textarea { border: 1px solid #9aa9bd; border-radius: var(--radio); background: #fff; padding: .5rem .6rem; min-height: 44px; max-width: 100%; }
textarea { width: 100%; min-height: 0; }
label.casilla { display: flex; align-items: center; gap: .5rem; color: var(--tinta); font-size: 1rem; min-height: 44px; cursor: pointer; }
label.casilla input { width: 20px; height: 20px; min-height: 0; }
label, .etq { display: block; font-size: .88rem; color: var(--suave); margin-bottom: .2rem; }
.barra { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: end; margin-bottom: 1rem; }
.campo { min-width: 0; } .campo select { min-width: 14rem; max-width: 100%; }
.fila-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: 0 0 1.25rem; }
.fila-form .campo { flex: 1 1 14rem; } .fila-form input { width: 100%; }
.form-col { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.meses { display: flex; flex-wrap: wrap; gap: .25rem; }
.mes { border: 1px solid var(--linea); background: #fff; border-radius: var(--radio); min-width: 3rem; min-height: 44px; font-weight: 700; cursor: pointer; }
.mes.activa { background: var(--azul); border-color: var(--azul); color: #fff; }
.seg { display: inline-flex; border: 1px solid var(--azul); border-radius: var(--radio); overflow: hidden; }
.seg button { background: #fff; border: 0; padding: .55rem .9rem; min-height: 44px; font-weight: 700; color: var(--azul); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--azul); }
.seg button.activa { background: var(--azul); color: #fff; }
.seg.grande { margin-bottom: 1.25rem; }
.resumen, .resumen-grande { margin: 0 0 .75rem; }
.ok-txt { color: var(--verde); font-weight: 700; }
.aviso { padding: .6rem .8rem; border-radius: var(--radio); margin: .75rem 0; border-left: 4px solid; }
.aviso.ok { background: var(--verde-s); border-color: var(--verde); }
.aviso.warn { background: var(--ambar-s); border-color: var(--ambar); }
.aviso.error { background: var(--rojo-s); border-color: var(--rojo); }
.vacio { padding: 2rem 0; color: var(--suave); }
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translate(-50%, 150%); visibility: hidden; pointer-events: none; background: var(--tinta); color: #fff; padding: .7rem 1.1rem; border-radius: var(--radio); max-width: 92vw; transition: transform .2s; z-index: 20; }
.toast.visible { transform: translate(-50%, 0); visibility: visible; } .toast.error { background: var(--rojo); }

/* ---------- acceso ---------- */

/* ---------- tablas de captura ---------- */
.tabla { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--linea); }
.tabla th { text-align: left; background: var(--banda-suave); font-size: .88rem; padding: .5rem .6rem; border-bottom: 1px solid var(--linea); }
.tabla th.num { text-align: right; }
.tabla td { padding: .3rem .6rem; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tr.baja td { color: var(--suave); background: #f1f4f6; }
.cap td:first-child { min-width: 14rem; }
input.nota { width: 5rem; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
input.nota.malo { border-color: var(--rojo); background: var(--rojo-s); }
.tabla input:not(.nota):not([type=checkbox]) { width: 100%; min-width: 9rem; }
.tabla .in-nom { min-width: 21rem; }
.tabla input[type=checkbox] { width: 22px; height: 22px; min-height: 0; }
.estado { font-size: .85rem; color: var(--suave); min-width: 7rem; }
.estado.ok { color: var(--verde); } .estado.error { color: var(--rojo); }
.obs-lista { display: grid; gap: .9rem; }
.obs label { color: var(--tinta); font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: .25rem; background: var(--banda-suave); border-radius: 999px; padding: .1rem .2rem .1rem .65rem; margin: 0 .3rem .3rem 0; font-size: .88rem; }
.chip .x { border: 0; background: none; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .2rem .45rem; color: var(--suave); }
.tut .in-tut { width: 12rem; min-height: 36px; }
.importar { margin-top: 1.5rem; } .importar summary { cursor: pointer; font-weight: 700; color: var(--azul); }
pre { background: #fff; border: 1px solid var(--linea); padding: .6rem; overflow: auto; }

/* ---------- avance ---------- */
.grp { margin: 0 0 1.5rem; }
.grp h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding-bottom: .35rem; border-bottom: 1px solid var(--linea); }
.grp h2 .suave { font-size: .9rem; font-weight: 400; }
.pill { margin-left: auto; font-size: .85rem; background: var(--ambar-s); color: var(--ambar); border-radius: 999px; padding: .05rem .7rem; }
.pill.ok { background: var(--verde-s); color: var(--verde); }
.avance { list-style: none; margin: 0; padding: 0; }
.avance li { border-bottom: 1px solid var(--linea); }
.av-fila { width: 100%; display: grid; grid-template-columns: 9rem 1fr 7rem 3.5rem; gap: .75rem; align-items: center; text-align: left; border: 0; background: none; padding: .55rem .25rem; cursor: pointer; min-height: 44px; }
.av-fila:hover { background: var(--banda-suave); }
.av-mat { font-weight: 700; } .av-mae { color: var(--suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-barra { height: 8px; background: #e6ecf0; border-radius: 4px; overflow: hidden; } .av-barra i { display: block; height: 100%; background: var(--ambar); }
.av-fila.ok .av-barra i { background: var(--verde); } .av-fila.nada .av-barra i { background: var(--rojo); }
.av-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.av-fila.ok .av-num { color: var(--verde); } .av-fila.nada .av-num { color: var(--rojo); }
.av-det { padding: .25rem .25rem .8rem; font-size: .92rem; color: var(--suave); }

/* ---------- administración ---------- */
.fila-as { display: grid; grid-template-columns: 11rem minmax(12rem, 22rem) 1fr; gap: .75rem; align-items: center; padding: .25rem 0; }
.fila-as label { margin: 0; color: var(--tinta); font-size: 1rem; }
.fila-as.titular { background: var(--banda-suave); padding: .5rem .6rem; border-radius: var(--radio); margin: .6rem 0; }
.lista-al { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--linea); }
.lista-al li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem .75rem; border-bottom: 1px solid var(--linea); }
.lista-al li:last-child { border-bottom: 0; } .lista-al .acc { display: flex; gap: .4rem; flex-shrink: 0; }
.hijo { margin-bottom: 2.5rem; } .hijo-enc { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.hijo-enc h2 { margin: 0; font-size: 1.25rem; }

/* ---------- la boleta ---------- */
.hoja { background: #fff; border: 1px solid var(--linea); padding: 1rem; overflow-x: auto; }
#modal { width: min(860px, 96vw); max-height: 94vh; border: 0; border-radius: 8px; padding: 0; background: var(--papel); }
#modal::backdrop { background: rgba(20, 32, 43, .55); }
.modal-barra { position: sticky; top: 0; display: flex; gap: .5rem; justify-content: flex-end; padding: .6rem; background: var(--papel); border-bottom: 1px solid var(--linea); z-index: 1; }
.boleta { min-width: 660px; max-width: 760px; margin: 0 auto; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #000; line-height: 1.25; }
.bol-enc { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; }
.bol-logo { width: 66px; height: 66px; }
.bol-enc-txt { flex: 1; text-align: center; font-weight: 700; }
.bol-dom { font-size: 11px; } .bol-clave { background: var(--banda); color: #fff; padding: 3px 0; margin-top: 4px; font-size: 12px; }
.bol-titulo { background: var(--banda-suave); color: var(--azul-osc); text-align: center; font-weight: 700; font-size: 13px; padding: 3px 0; border-top: 2px solid var(--marca-rojo); }
.bol-sub { display: flex; justify-content: space-between; font-weight: 700; padding: 2px 6px; font-size: 11px; background: var(--banda-suave); color: var(--azul-osc); }
.bol-alumno { background: var(--banda); color: #fff; padding: 4px 6px; margin: 5px 0; font-size: 13px; border: 1px solid var(--azul-osc); } .bol-alumno span { font-weight: 700; }
.bol-tabla { width: 100%; border-collapse: collapse; margin-bottom: 6px; table-layout: fixed; }
.bol-tabla caption { font-size: 15px; font-weight: 700; padding: 3px 0; text-align: center; }
.bol-tabla th, .bol-tabla td { border: 1px solid #333; padding: 2px 1px; text-align: center; }
.bol-tabla thead th { font-size: 10px; background: var(--banda-suave); color: var(--azul-osc); border-bottom: 2px solid var(--marca-rojo); }
.bol-tabla thead th:first-child, .bol-tabla th.mat, .bol-tabla tr.prom th, .bol-tabla tr.general th { text-align: left; padding-left: 3px; }
.bol-tabla th:first-child { width: 22%; }
.bol-tabla th.mat { font-weight: 400; font-size: 10px; }
.bol-tabla td.t { font-weight: 700; }
.bol-tabla tr.area th { background: var(--banda); color: #fff; text-align: center; font-size: 11px; }
.bol-tabla tr.prom td, .bol-tabla tr.prom th { font-weight: 700; }
.bol-tabla tr.general th, .bol-tabla tr.general td { font-weight: 700; border-top: 2px solid var(--marca-rojo); }
.bol-tabla tr.general td:last-child { background: #fde3e6; color: #9b0013; }
.bol-obs { border: 1px solid #333; margin: 6px 0; min-height: 66px; } .bol-obs-t { font-weight: 700; border-bottom: 1px solid #333; padding: 1px 4px; background: var(--banda-suave); color: var(--azul-osc); }
.bol-obs p { margin: 4px; font-size: 12px; white-space: pre-wrap; }
.bol-firmas { display: flex; justify-content: space-around; margin: 22px 0 8px; text-align: center; }
.bol-firmas > div { width: 40%; } .firma { border-bottom: 1px solid #000; min-height: 20px; font-family: "Brush Script MT", cursive; font-size: 14px; padding-bottom: 2px; }
.firma-r { font-weight: 700; padding-top: 2px; }
.bol-banda { background: var(--titulo); color: #fff; font-weight: 700; text-align: center; padding: 4px; font-size: 12px; margin: 6px 0; }
.bol-recibi { font-size: 11px; } .tijera { color: #777; overflow: hidden; white-space: nowrap; margin-bottom: 3px; }
.recibi-t { font-weight: 700; margin-bottom: 4px; } .recibi-g { display: flex; justify-content: space-between; margin: 2px 0; } .recibi-f { margin-top: 5px; }

/* ---------- impresión: una boleta por página ---------- */
#print-area { display: none; }
/* Reglas de la boleta impresa: viven fuera de @media para poder medirla antes de imprimir */
#print-area .boleta { max-width: none; min-width: 0; width: 100%; break-after: page; page-break-after: always; break-inside: avoid; font-size: 11.5px; }
#print-area .bol-tabla th, #print-area .bol-tabla td { padding: 2.5px 1px; }
#print-area .bol-tabla thead th, #print-area .bol-tabla th.mat { font-size: 10.5px; }
#print-area .boleta:last-child { break-after: auto; page-break-after: auto; }
@media print {
  @page { size: letter portrait; margin: 9mm; }
  html, body { background: #fff !important; }
  #app, #toast, #modal, #barrafam, #pagobar, #demo-bar, #ayuda-btn, #ayuda-tip, .rec { display: none !important; }
  #print-area { display: block !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- boleta compacta (teléfono) ---------- */
.bol-movil { display: none; }
.bm-gen { background: var(--banda-suave); border-left: 4px solid var(--azul); padding: .7rem .8rem; border-radius: var(--radio); margin-bottom: 1rem; }
.bm-gen > span { font-weight: 700; }
.bm-gen-n { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .4rem; text-align: center; }
.bm-gen-n small { display: block; color: var(--suave); font-size: .75rem; } .bm-gen-n b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.bm-area { margin-bottom: 1.1rem; } .bm-area h3 { font-size: 1rem; margin: 0 0 .3rem; padding-bottom: .2rem; border-bottom: 2px solid var(--banda); }
.bm-tabla { width: 100%; border-collapse: collapse; } .bm-tabla th, .bm-tabla td { padding: .35rem .25rem; border-bottom: 1px solid var(--linea); text-align: right; font-variant-numeric: tabular-nums; }
.bm-tabla thead th { font-size: .78rem; color: var(--suave); font-weight: 400; } .bm-tabla th:first-child { text-align: left; font-weight: 400; width: 46%; }
.bm-tabla tbody th { font-weight: 700; } .bm-tabla td:last-child { font-weight: 700; }
.bm-meses { display: block; font-weight: 400; font-size: .75rem; color: var(--suave); }
.bm-tabla tr.bm-prom th, .bm-tabla tr.bm-prom td { background: var(--banda-suave); font-weight: 700; }
.bm-area p { margin: .3rem 0; white-space: pre-wrap; }

/* ---------- teléfono ---------- */
@media (max-width: 720px), (hover: none) and (pointer: coarse) and (max-width: 1000px) {
  .hijo .hoja { padding: .75rem; } .hijo .boleta { display: none; } .hijo .bol-movil { display: block; }
  .av-fila { grid-template-columns: 1fr 4rem; grid-template-areas: "mat num" "mae mae" "barra barra"; gap: .2rem .6rem; }
  .av-mat { grid-area: mat; } .av-num { grid-area: num; } .av-mae { grid-area: mae; } .av-barra { grid-area: barra; }
  .fila-as { grid-template-columns: 1fr; gap: .2rem; }
  .cap td:first-child { min-width: 9rem; }
  .tabla td, .tabla th { padding-left: .4rem; padding-right: .4rem; }
  main { padding-left: .75rem; padding-right: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* diálogos pequeños (accesos, contraseña) */
.modal-cuerpo, #modal > .form-col { padding: 1.1rem 1.3rem; }
.modal-cuerpo .acciones, #modal .acciones { display: flex; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.modal-cuerpo code, td code { background: #eef1f4; padding: .1rem .35rem; border-radius: 4px; }
.tabla-scroll { max-height: 55vh; overflow: auto; }
.in-u { width: 100%; min-width: 11rem; }

.pill.bloq { background: #fde8e6; color: #8a1f17; border: 1px solid #f1b9b3; }
.aviso-bloqueo { padding: 1rem 1.2rem; font-size: 1.02rem; line-height: 1.5; }
.aviso-bloqueo strong { display: block; font-size: 1.15rem; margin-bottom: .3rem; }
.btn.peligro { border-color: #b3261e; color: #8a1f17; }
td .pill { margin-left: 0; }

/* captura por alumno (cuadrícula) */
.cap-scroll { overflow: auto; max-height: calc(100vh - 8rem); }
/* el encabezado (Alumno + materias) se queda fijo al bajar */
.tabla.cap th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--linea); }
body.con-menu .tabla.cap:not(.cap-grid) th { top: 0; }
@media (max-width: 900px) { body.con-menu #tabla-mg .tabla.cap th { top: 4rem; } }
.cap-scroll .tabla.cap th { top: 0 !important; }
.cap-grid th.num { min-width: 5.2rem; font-size: .8rem; }
.cap-grid td:first-child, .cap-grid th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 12rem; box-shadow: 1px 0 0 var(--linea); }
.cap-grid th:first-child { background: var(--banda-suave); z-index: 3; }
.cap-grid input.nota { width: 4.2rem; }
.cap-grid td.estado { min-width: 10rem; font-size: .85rem; }

.mes.cerrado::after { content: " 🔒"; font-size: .7em; }
.acuse { background: var(--banda-suave); border-left: 4px solid var(--marca-rojo); padding: .7rem .9rem; border-radius: var(--radio); margin-bottom: .8rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.acuse p { margin: 0; flex: 1 1 14rem; }
.pill.vio { background: var(--ambar-s); color: var(--ambar); } .pill.sin { background: #eceff3; color: var(--suave); }
li .pill { margin-left: .5rem; }

.aviso.pend { background: #fdf3e3; border-left: 4px solid var(--rojo, #E3001B); padding: .6rem .8rem; border-radius: var(--radio); margin: .6rem 0; display: flex; flex-wrap: wrap; gap: .4rem .5rem; align-items: center; }
.aviso.ok { background: #e8f3ec; border-left: 4px solid #2e7d4f; padding: .5rem .8rem; border-radius: var(--radio); margin: .6rem 0; }

/* ---------- menú lateral (azul del logo) ---------- */
#app { min-height: 100vh; }
.top, .velo, .menu-btn, .menu-x { display: none; }
.lateral, .top { background: var(--azul-osc); color: #fff; }
.lateral { display: none; }
body.con-menu #app { display: grid; grid-template-columns: 17rem minmax(0, 1fr); }
body.con-menu .lateral { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 4px solid var(--marca-rojo); }
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: #fff; font-weight: 700; font-size: 1.1rem; line-height: 1.15; padding: 1.1rem 1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.marca small { display: block; font-weight: 400; font-size: .72rem; color: rgba(255,255,255,.72); margin-top: .15rem; }
#nav { display: flex; flex-direction: column; gap: .2rem; padding: .8rem .6rem; flex: 1; }
.tab { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: none; border: 0; border-left: 4px solid transparent; border-radius: 0 var(--radio) var(--radio) 0; padding: .65rem .8rem; cursor: pointer; font-weight: 700; color: rgba(255,255,255,.82); }
.tab svg { flex: none; opacity: .9; }
.tab:hover { background: rgba(255,255,255,.09); color: #fff; }
.tab.activa { background: rgba(255,255,255,.16); color: #fff; border-left-color: var(--marca-rojo); }
.lateral :focus-visible { outline-color: #fff; }
.quien { padding: .9rem 1rem 1.1rem; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; color: rgba(255,255,255,.8); }
.quien-nombre { font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.quien .btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); } .quien .btn:hover { background: rgba(255,255,255,.14); }
.quien-botones { display: flex; gap: .5rem; flex-wrap: wrap; }
main { max-width: 1080px; width: 100%; }
body:not(.con-menu) main { margin: 0 auto; }
body:not(.con-menu) .top { display: none; }
body:not(.con-menu) .marca { display: none; }
body:not(.con-menu) .lateral { display: none; }

@media (max-width: 900px) {
  body.con-menu #app { display: block; }
  body.con-menu .top { display: flex; align-items: center; gap: .6rem; position: sticky; top: 0; z-index: 20; padding: .5rem .75rem; border-bottom: 3px solid var(--marca-rojo); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: var(--radio); cursor: pointer; }
  .top-titulo { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; } .top-titulo img { border-radius: 50%; background: #fff; }
  body.con-menu .lateral { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(18rem, 85vw); height: auto; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 24px rgba(0,0,0,.35); }
  body.con-menu.menu-abierto .lateral { transform: none; }
  body.menu-abierto .velo { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0,20,40,.5); }
  .tab { padding: .85rem .8rem; }
  body.menu-abierto .menu-x { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: .6rem; right: .6rem; width: 2.5rem; height: 2.5rem; background: rgba(255,255,255,.14); color: #fff; border: 0; border-radius: 50%; cursor: pointer; z-index: 2; }
  .marca { padding-right: 3.6rem; }
}
@media (prefers-reduced-motion: reduce) { body.con-menu .lateral { transition: none; } }

/* ---------- pantalla de entrada ---------- */
body:not(.con-menu) main { display: flex; justify-content: center; min-height: 100vh; padding-top: 0; padding-bottom: 2rem; }
.login { width: 100%; max-width: 26rem; margin: 0 auto; padding: 2.2rem 0 1rem; text-align: center; display: flex; flex-direction: column; align-items: center; }
.login-logo { width: min(9.5rem, 36vw); height: auto; aspect-ratio: 1; display: block; border-radius: 50%; box-shadow: 0 8px 22px rgba(0,39,71,.25); background:#fff; object-fit:contain; }
.login h1 { color: var(--azul-osc); font-size: 1.9rem; margin: 0 0 .2rem; }
.login > .suave { margin: 0 0 1.2rem; max-width: 22rem; }
.login .form-col, .login #login-paso2 { width: 100%; text-align: left; background: var(--blanco); border: 1px solid var(--linea); border-top: 4px solid var(--marca-rojo); border-radius: var(--radio); padding: 1.1rem 1.1rem 1.25rem; box-shadow: 0 4px 16px rgba(0,39,71,.08); }
.login .btn:not(.primario) { margin-top: .9rem; }
.login > .btn { width: 100%; }

.avance .av-ev { background: var(--banda-suave); } .avance .av-ev .av-mat { font-style: italic; }


.nota.auto { color: #5b6b7c; font-style: italic; background: #eef3f8; }

/* ---------- Planeación (maestros y coordinación) ---------- */
.pill.pl-borrador { background: #eef1f5; color: #3b4859; } .pill.pl-entregada { background: #e1ecfa; color: #17407a; }
.pill.pl-devuelta { background: #fdebd0; color: #8a4b00; } .pill.pl-revisada { background: #e3f3e8; color: #1f6a3b; } .pill.pl-sin { background: #f3f3f3; color: #6b7480; }
.pl-cards { display: grid; gap: .6rem; margin-top: .8rem; }
.pl-card { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: .8rem 1rem; }
.pl-top h2 { margin: .5rem 0 .2rem; } .pl-guard { margin-left: .5rem; font-size: .88rem; color: var(--suave); }
.pl-acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0; }
.pl-coms { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: .4rem 1rem 1rem; margin-top: .8rem; }
.pl-coms.devuelta { border-left: 5px solid #d98a1b; background: #fffaf0; } .pl-coms h3 { margin: .5rem 0; font-size: 1.05rem; }
.pl-com { border-left: 3px solid var(--azul); background: var(--banda-suave); padding: .4rem .7rem; margin: .4rem 0; border-radius: 4px; white-space: pre-wrap; } .pl-comh small { color: var(--suave); }
.pl-sec, .pl-sem { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); margin: .6rem 0; }
.pl-sec > summary, .pl-sem > summary { cursor: pointer; font-weight: 700; padding: .8rem 1rem; min-height: 44px; } .pl-sem > summary small { font-weight: 400; color: var(--suave); margin-left: .5rem; }
.pl-body, .pl-sem > :not(summary) { padding: 0 1rem .8rem; } .pl-sem { margin: .6rem 1rem; }
.pl-f { display: block; margin: .5rem 0; } .pl-f > span { display: block; font-size: .85rem; font-weight: 700; color: var(--suave); margin-bottom: .2rem; }
.pl-f textarea, .pl-f input[type=text], .pl-f input[type=date], .pl-f select { width: 100%; box-sizing: border-box; }
.pl-f textarea { resize: vertical; min-height: 4.2rem; line-height: 1.4; }
.pl-fijo > div { background: #f1f4f8; border-radius: var(--radio); padding: .55rem .6rem; min-height: 1.2rem; }
.pl-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 .8rem; } .pl-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 .8rem; }
.pl-item { border: 1px solid var(--linea); border-left: 4px solid var(--banda); border-radius: var(--radio); padding: .2rem .8rem .6rem; margin: .6rem 0; background: #fcfdff; }
.pl-ih { display: flex; justify-content: space-between; align-items: center; margin-top: .4rem; }
.pl-dia { border-top: 2px solid var(--banda); padding-top: .4rem; margin-top: .8rem; } .pl-dcab { display: grid; grid-template-columns: 10rem 10rem auto; gap: .6rem; align-items: end; }
.pl-ck { display: flex; flex-wrap: wrap; gap: .3rem 1rem; } .pl-ck label { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; } .pl-ck input { min-height: 0; }
.pl-der { text-align: right; margin-top: .6rem; }
@media (max-width: 640px) { .pl-dcab { grid-template-columns: 1fr 1fr; } .pl-sem { margin: .6rem .3rem; } }

/* hoja impresa de la planeación */
.plp { font: 10.5px/1.35 Arial, Helvetica, sans-serif; color: #111; }
.plp-enc { display: flex; align-items: center; gap: 12px; background: var(--azul, #123a73); color: #fff; padding: 8px 12px; } .plp-enc img { height: 46px; background: #fff; border-radius: 4px; padding: 2px; }
.plp-enc h1 { margin: 0; font-size: 17px; letter-spacing: .5px; } .plp-enc p { margin: 2px 0 0; font-size: 9.5px; opacity: .9; }
.plp-enc2 { background: var(--azul, #123a73); color: #fff; text-align: center; padding: 6px; margin-top: 10px; }
.plp-t { width: 100%; border-collapse: collapse; table-layout: auto; } .plp-t td, .plp-t th { border: 1px solid #8794a8; padding: 4px 6px; vertical-align: top; }
.plp-t th { background: #dfe7f3; text-align: left; font-size: 9.5px; }
.plp-l { display: block; font-size: 8.5px; font-weight: 700; color: #3b4859; } .plp-v { min-height: 13px; }
.plp-h { background: #dfe7f3; font-weight: 700; border: 1px solid #8794a8; padding: 4px 8px; margin-top: 10px; break-after: avoid; } .plp-sub { padding: 3px 8px; border: 1px solid #8794a8; border-top: 0; font-weight: 700; break-after: avoid; }
.plp-b, .plp-nota { border: 1px solid #8794a8; border-top: 0; padding: 4px 8px; } .plp-nota { border-top: 1px solid #8794a8; margin-top: 4px; }
.plp-dn { width: 17%; background: #f1f4f8; text-align: center; } .plp-d tr { break-inside: auto; }
.plp-ses { margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px dashed #b9c3d2; } .plp-ses:last-child { border-bottom: 0; margin-bottom: 0; } .plp-mat { font-weight: 700; color: var(--azul, #123a73); }
.plp-s { margin: 2px 0; }
.plp-r tr { break-inside: avoid; } .plp-sug td { width: 50%; }
.pill[class*="pl-"] { margin-left: 0; }

/* ritmo, avance y avisos */
.pill.rt-ok { background: #e3f3e8; color: #1f6a3b; } .pill.rt-ojo { background: #fff1c9; color: #7a5600; } .pill.rt-mal { background: #fbdcdc; color: #9b1c1c; } .pill.rt-futuro, .pill.rt-sin { background: #eef1f5; color: #4b5868; }
.rt-txt-mal { color: #9b1c1c; font-weight: 700; } .rt-txt-ojo { color: #7a5600; font-weight: 700; }
.pl-ritmo { background: #fff; border: 1px solid var(--linea); border-left: 5px solid #98a4b3; border-radius: var(--radio); padding: .6rem 1rem; margin-top: .8rem; }
.pl-ritmo.rt-b-ok { border-left-color: #2f9e5a; } .pl-ritmo.rt-b-ojo { border-left-color: #d9a400; } .pl-ritmo.rt-b-mal { border-left-color: #c93030; }
.pl-ritmo small { color: var(--suave); margin-left: .4rem; } .pl-barra { height: 8px; background: #e6ebf1; border-radius: 4px; margin-top: .5rem; overflow: hidden; } .pl-barra span { display: block; height: 100%; background: #2f9e5a; }
.pl-hecha { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400; background: #eef1f5; border-radius: 14px; padding: .15rem .7rem; margin-left: .6rem; cursor: pointer; min-height: 32px; }
.pl-hecha.si { background: #d8f0e0; color: #1f6a3b; font-weight: 700; } .pl-hecha input { min-height: 0; width: 18px; height: 18px; }
.badge-tab, .badge-menu { background: #c93030; color: #fff; border-radius: 10px; font-size: .75rem; padding: 0 .45rem; margin-left: auto; line-height: 1.4; } .badge-menu { position: absolute; top: 2px; right: 2px; }
.menu-btn { position: relative; }
.av-lista { display: grid; gap: .4rem; margin-top: .8rem; }
.av-item { display: flex; gap: .7rem; align-items: center; text-align: left; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: .7rem .9rem; cursor: pointer; width: 100%; font: inherit; }
.av-item.nuevo { background: #f1f7ff; border-left: 5px solid var(--azul, #123a73); font-weight: 700; } .av-tx { flex: 1; } .av-item small { color: var(--suave); font-weight: 400; }
.pill[class*="rt-"] { white-space: nowrap; }
.sg-dia { border: 1px solid var(--linea); border-left: 5px solid #98a4b3; border-radius: var(--radio); padding: .4rem .8rem; margin: .6rem 0; background: #fff; }
.sg-dia.hecho { border-left-color: #2f9e5a; background: #f5fbf7; } .sg-dia.tarde { border-left-color: #c93030; background: #fff7f7; }
.sg-dh { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .3rem; } .sg-dh .pill { margin-left: 0; }
.sg-act { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; padding: .4rem 0; border-top: 1px dashed #d5dce6; } .sg-act:first-of-type { border-top: 0; }
.sg-act small { color: var(--suave); } .sg-act details summary { cursor: pointer; color: var(--azul, #123a73); font-size: .9rem; } .sg-act details p { margin: .3rem 0; }
.sg-btn { white-space: nowrap; min-width: 9.5rem; } .sg-btn.si { background: #d8f0e0; border-color: #2f9e5a; color: #1f6a3b; font-weight: 700; }
@media (max-width: 640px) { .sg-act { flex-direction: column; } .sg-btn { width: 100%; } }

/* Revisión de calificaciones bajas */
.rv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .7rem; margin: 1rem 0; }
.rv-tile { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: .8rem 1rem; } .rv-tile b { display: block; font-size: 2rem; line-height: 1.1; color: var(--azul, #123a73); } .rv-tile span { color: var(--suave); font-size: .9rem; }
.rv-tile.ojo b { color: #b77900; } .rv-tile.mal b { color: #c22a2a; }
.rv-barras { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .3rem .8rem; margin-bottom: 1rem; }
.rv-barra { display: grid; grid-template-columns: 3.2rem 1fr 1.8rem; align-items: center; gap: .5rem; background: none; border: 0; padding: .2rem .4rem; border-radius: 8px; cursor: pointer; font: inherit; text-align: left; } .rv-barra.activa, .rv-barra:hover { background: #e8eef8; }
.rv-bb { background: #e6ebf1; border-radius: 6px; height: 10px; overflow: hidden; } .rv-bb i { display: block; height: 100%; background: linear-gradient(90deg, #f0a030, #d63a3a); }
.rv-filtros { align-items: end; margin: .6rem 0 1rem; } .rv-chk { display: flex; align-items: center; gap: .4rem; } .rv-chk input { min-height: 0; }
.rv-grupo h3 { margin: 1.4rem 0 .5rem; padding-bottom: .3rem; border-bottom: 2px solid var(--banda, #d33); } .rv-grupo h3 small { font-weight: 400; color: var(--suave); margin-left: .5rem; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: .8rem; }
.rv-card { background: #fff; border: 1px solid var(--linea); border-left: 6px solid #e0a020; border-radius: 14px; padding: .7rem .9rem; box-shadow: 0 1px 3px rgba(18, 58, 115, .08); }
.rv-card.rv-s2 { border-left-color: #e07020; } .rv-card.rv-s3 { border-left-color: #c22a2a; }
.rv-card header { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; } .rv-nom { font-weight: 700; line-height: 1.25; } .rv-gr { color: var(--suave); font-size: .85rem; }
.rv-multi { background: #fde7e7; color: #9b1c1c; font-weight: 700; font-size: .8rem; border-radius: 12px; padding: .1rem .6rem; white-space: nowrap; }
.rv-card ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; }
.rv-card li { display: grid; grid-template-columns: 3.2rem 1fr auto; align-items: center; gap: .6rem; padding: .35rem .5rem; border-radius: 10px; background: #fff8e6; } .rv-card li.rv-s2 { background: #fff0e4; } .rv-card li.rv-s3 { background: #fdebeb; }
.rv-cal { font-size: 1.35rem; font-weight: 800; text-align: center; border-radius: 8px; padding: .1rem 0; background: #f6c453; color: #4a3200; } li.rv-s2 .rv-cal { background: #f08c4a; color: #fff; } li.rv-s3 .rv-cal { background: #c22a2a; color: #fff; }
.rv-mt b { display: block; line-height: 1.2; } .rv-mt small { color: var(--suave); } .rv-ant { font-size: .75rem; color: var(--suave); white-space: nowrap; } .rv-ant.baja { color: #b02a2a; } .rv-ant.sube { color: #1f7a45; }
.rv-auto { font-size: .65rem; background: #eef1f5; border-radius: 6px; padding: 0 .3rem; color: #4b5868; grid-column: 2; justify-self: start; }
.rv-ok { font-size: 1.1rem; }
@media (max-width: 640px) { .rv-grid { grid-template-columns: 1fr; } }
.rvp { font: 11px Arial, sans-serif; } .rvp h1 { font-size: 16px; margin: 0 0 4px; } .rvp table { width: 100%; border-collapse: collapse; margin-top: 8px; } .rvp td, .rvp th { border: 1px solid #8794a8; padding: 3px 6px; text-align: left; } .rvp th { background: #dfe7f3; } .rvp tr { break-inside: avoid; }
.mes:disabled { opacity: .38; cursor: not-allowed; }
.cc-mejor { background: #fff8e0; border-left: 5px solid #e0a020; } td.lugar { font-weight: 700; white-space: nowrap; text-align: left; }

/* CURA */
.cu-admin { background: #fff; border: 1px solid var(--linea); border-left: 5px solid var(--azul, #123a73); border-radius: var(--radio); padding: .4rem 1rem 1rem; margin: .8rem 0; } .cu-admin h3 { margin: .5rem 0; }
.cu-res { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .3rem; } .cu-res li { padding: .4rem .7rem; border-radius: 8px; background: #e3f3e8; } .cu-res li.mal { background: #fdebeb; }
.cu-lista { display: grid; gap: .8rem; margin-top: .8rem; }
.cu-al { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: .6rem 1rem 1rem; } .cu-al header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .3rem; }
.cu-chips { display: flex; gap: .3rem; flex-wrap: wrap; } .cu-chip { background: #e8eef8; color: #123a73; font-weight: 700; font-size: .85rem; border-radius: 10px; padding: .1rem .55rem; } .cu-chip.rep { background: #fbdcdc; color: #9b1c1c; }
.cu-campo { display: block; margin: .5rem 0; } .cu-campo > span { display: block; font-size: .85rem; font-weight: 700; color: var(--suave); margin-bottom: .2rem; }
.cu-campo textarea { width: 100%; box-sizing: border-box; text-transform: uppercase; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; resize: vertical; line-height: 1.4; } .cu-cont { color: var(--suave); float: right; }

/* Tablero */
.tb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; margin: .8rem 0; }
.tb-tile { text-align: left; cursor: pointer; border: 1px solid var(--linea); border-left: 6px solid #9aa; background: #fff; border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .15rem; font: inherit; color: inherit; }
.tb-tile span { font-weight: 700; font-size: .9rem; color: var(--suave); } .tb-tile b { font-size: 2rem; line-height: 1.1; } .tb-tile small { color: var(--suave); }
.tb-tile.ok { border-left-color: #2e9e5b; } .tb-tile.med { border-left-color: #e0a020; } .tb-tile.mal { border-left-color: #c93a3a; }
.tb-tile:hover { box-shadow: 0 3px 12px rgba(0,0,0,.12); }
.tb-per { font-weight: 800; font-size: 1.2rem; padding: .35rem 0; }
.tb-sec { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: .4rem 1rem 1rem; margin: .8rem 0; } .tb-sec h3 { margin: .6rem 0; }
.tb-fila { display: grid; grid-template-columns: 90px 1fr 1fr 70px; gap: .8rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--linea); } .tb-enc { font-weight: 700; font-size: .8rem; color: var(--suave); border-top: 0; }
.tb-bar { height: 10px; background: #e6e9ef; border-radius: 6px; overflow: hidden; } .tb-bar i { display: block; height: 100%; } .tb-bar i.ok { background: #2e9e5b; } .tb-bar i.med { background: #e0a020; } .tb-bar i.mal { background: #c93a3a; }
.tb-fila small { color: var(--suave); } .tb-r { color: #9b1c1c; font-weight: 800; }
.tb-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; } .tb-lista li { padding: .3rem .6rem; background: #f6f7fa; border-radius: 8px; } .tb-lista small { color: var(--suave); margin-left: .4rem; }
@media (max-width: 700px) { .tb-fila { grid-template-columns: 1fr; gap: .2rem; } .tb-enc { display: none; } }
/* Historial */
.hi-lista { display: grid; gap: .45rem; margin-top: .6rem; }
.hi-it { display: grid; grid-template-columns: 120px 1fr auto 1.2fr; gap: .8rem; align-items: center; background: #fff; border: 1px solid var(--linea); border-left: 5px solid #9aa; border-radius: 10px; padding: .5rem .8rem; }
.hi-alta { border-left-color: #2e9e5b; } .hi-cambio { } .hi-baja { border-left-color: #c93a3a; } .hi-it.hi-cambio { border-left-color: #e0a020; }
.hi-cuando { font-size: .8rem; color: var(--suave); } .hi-det { font-size: .85rem; color: var(--suave); } .hi-med small { color: var(--suave); margin-left: .3rem; }
.hi-cambio { text-align: center; font-weight: 700; font-size: 1.05rem; } .hi-cambio small { display: block; font-weight: 400; font-size: .7rem; color: var(--suave); } .hi-ant { color: #9b1c1c; } .hi-nue { color: #1f7a45; }
.hi-quien { font-size: .8rem; color: var(--suave); word-break: break-all; text-align: right; }
@media (max-width: 700px) { .hi-it { grid-template-columns: 1fr auto; } .hi-cuando, .hi-quien { grid-column: 1 / -1; text-align: left; } }

/* Concentrado: encabezados ordenables */
th.ord { cursor: pointer; user-select: none; } th.ord:hover { background: #e8eef8; } th.ord.act { background: #dbe6f7; color: #123a73; }
.cc-ayuda { margin: .3rem 0 .6rem; font-size: .88rem; }

/* Medallas */
.md-card { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: .4rem 1.1rem 1.1rem; margin: .9rem 0; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.md-card header { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; border-bottom: 1px solid var(--linea); margin-bottom: .4rem; } .md-card h3 { margin: .5rem 0; font-size: 1.3rem; } .md-card header small, .md-card h4 small { color: var(--suave); font-weight: 400; }
.md-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; } .md-cols.uno { grid-template-columns: 1fr; } .md-cols h4 { margin: .6rem 0 .4rem; }
.md-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.md-lista > li { display: flex; gap: .8rem; align-items: center; padding: .5rem .7rem; border-radius: 12px; background: #f6f7fa; }
.md-ins { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.25); }
.md-oro .md-ins { background: linear-gradient(145deg, #f7d154, #d49a0c); } .md-plata .md-ins { background: linear-gradient(145deg, #cfd5de, #8d97a5); } .md-bronce .md-ins { background: linear-gradient(145deg, #e0a06a, #a9622b); } .md-azul .md-ins { background: linear-gradient(145deg, #5b9be0, #2f62a8); }
.md-oro { background: #fff8e0 !important; } .md-nombres { list-style: disc; margin: .2rem 0 .3rem; padding-left: 1.2rem; display: block; } .md-lista .md-nombres li { display: list-item; background: none; padding: .05rem 0; border-radius: 0; font-weight: 600; } .md-nombres li::marker { color: var(--suave); } .md-lista small { color: var(--suave); }
.md-vacio { color: var(--suave); } .md-inc { margin: .6rem 0 0; font-size: .85rem; color: var(--suave); }
@media (max-width: 760px) { .md-cols { grid-template-columns: 1fr; } }

/* Fechas límite y recordatorios */
.fl-panel { background: #fff; border: 1px solid var(--linea); border-left: 5px solid #e0a020; border-radius: 14px; padding: .4rem 1rem 1rem; margin: .8rem 0; } .fl-panel h3 { margin: .5rem 0; } .fl-panel h4 { margin: .6rem 0 .3rem; }
.fl-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; } .fl-fila { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .3rem 0; border-top: 1px solid var(--linea); } .fl-fila b { width: 7.5rem; } .fl-fila input[type=date] { font: inherit; padding: .25rem .4rem; border: 1px solid var(--linea); border-radius: 8px; }
.fl-est { font-size: .82rem; font-weight: 700; padding: .1rem .5rem; border-radius: 10px; background: #eef0f4; color: var(--suave); } .fl-est.lejos { background: #e3f3e8; color: #1f7a45; } .fl-est.proximo { background: #fff2cf; color: #8a5a00; } .fl-est.hoy { background: #ffe1c4; color: #a04a00; } .fl-est.vencida { background: #fbdcdc; color: #9b1c1c; }
.av-rec { margin: .8rem 0; display: grid; gap: .5rem; } .av-rec h3 { margin: 0 0 .2rem; }
.av-r { text-align: left; font: inherit; cursor: pointer; display: grid; gap: .1rem; padding: .6rem .9rem; background: #fff; border: 1px solid var(--linea); border-left: 6px solid #e0a020; border-radius: 12px; } .av-r small { color: var(--suave); }
.av-rt { font-weight: 800; font-size: .85rem; } .av-r.vencida { border-left-color: #c93a3a; } .av-r.vencida .av-rt { color: #9b1c1c; } .av-r.hoy { border-left-color: #e6762a; } .av-r.hoy .av-rt { color: #a04a00; } .av-r.proximo .av-rt { color: #8a5a00; }
.cu-fecha { padding: .5rem .8rem; border-radius: 10px; background: #e3f3e8; margin: .6rem 0; } .cu-fecha.proximo { background: #fff2cf; } .cu-fecha.hoy { background: #ffe1c4; } .cu-fecha.vencida { background: #fbdcdc; }
@media (max-width: 760px) { .fl-cols { grid-template-columns: 1fr; } }

/* Menú con secciones */
.grupo { display: flex; flex-direction: column; }
.grupo-enc { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; background: none; border: 0; border-left: 4px solid transparent; border-radius: 0 var(--radio) var(--radio) 0; color: inherit; font: inherit; font-weight: 700; padding: .7rem .8rem; cursor: pointer; opacity: .95; }
.grupo-enc:hover { background: rgba(255,255,255,.09); } .grupo.activo > .grupo-enc { color: #fff; }
.grupo-enc .chev { margin-left: auto; transition: transform .2s; } .grupo.abierto > .grupo-enc .chev { transform: rotate(180deg); }
.grupo-sub { display: flex; flex-direction: column; gap: .1rem; margin: 0 0 .3rem .9rem; border-left: 1px solid rgba(255,255,255,.18); } .grupo-sub[hidden] { display: none; }
.tab.sub { padding-left: 1rem; font-size: .95rem; font-weight: 500; }

/* Tablero: mosaicos con media luna */
.tb-tile { align-items: stretch; justify-items: center; text-align: center; border-left-width: 1px; border-top: 5px solid #9aa; min-height: 190px; transition: transform .15s, box-shadow .15s; }
.tb-tile:hover { transform: translateY(-2px); } .tb-tile span { font-size: 1rem; color: var(--texto, #1a2433); } .tb-tile small { text-align: center; }
.tb-gauge { width: 100%; max-width: 190px; } .tb-gauge path { fill: none; stroke-width: 11; stroke-linecap: round; } .tb-gauge .bg { stroke: #e6e9ef; } .tb-gauge .fg { stroke: #9aa; transition: stroke-dasharray .6s; } .tb-gauge.ok .fg { stroke: #2e9e5b; } .tb-gauge.med .fg { stroke: #e0a020; } .tb-gauge.mal .fg { stroke: #c93a3a; }
.tb-gauge text { font-size: 17px; font-weight: 800; fill: #1a2433; }
.tb-num { font-size: 3.4rem; line-height: 1.1; align-self: center; } .tb-num.ok { color: #2e9e5b; } .tb-num.mal { color: #c93a3a; }
.tb-f { display: inline-block; margin-top: .3rem; padding: .1rem .5rem; border-radius: 10px; background: #e3f3e8; font-size: .78rem; } .tb-f.proximo { background: #fff2cf; } .tb-f.hoy { background: #ffe1c4; } .tb-f.vencida { background: #fbdcdc; }
.tb-tiles.chicos { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } .tb-mini { background: #fff; border: 1px solid var(--linea); border-top: 5px solid #9aa; border-radius: 12px; padding: .6rem; text-align: center; display: grid; } .tb-mini b { font-size: 1.8rem; } .tb-mini span { font-size: .85rem; color: var(--suave); } .tb-mini.ok { border-top-color: #2e9e5b; } .tb-mini.med { border-top-color: #e0a020; } .tb-mini.mal { border-top-color: #c93a3a; }
.tb-fila.tb-2 { grid-template-columns: 90px 1fr; }

/* Respaldo */
.rs-estado { padding: .7rem 1rem; border-radius: 12px; font-weight: 600; margin: .8rem 0; background: #e3f3e8; } .rs-estado.med { background: #fff2cf; } .rs-estado.mal { background: #fbdcdc; }
.rs-info { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: .4rem 1.2rem 1rem; margin-top: 1rem; } .rs-info h3 { margin: .8rem 0 .3rem; }
.tb-alerta { display: block; width: 100%; text-align: left; font: inherit; cursor: pointer; background: #fff2cf; border: 1px solid #ecd48a; border-radius: 12px; padding: .65rem 1rem; margin: .5rem 0; color: #6b4a00; font-weight: 600; }

/* PWA */
.pwa-barra { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 9999; display: flex; gap: .8rem; align-items: center; background: #0f2a4d; color: #fff; padding: .7rem 1rem; border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.35); max-width: min(92vw, 520px); font-size: .92rem; } .pwa-barra.off { background: #7a1f1f; bottom: auto; top: .8rem; }
.pwa-guia ol { padding-left: 1.2rem; line-height: 1.7; }

/* =====================================================================
   Estilo v2 — más aire, esquinas suaves, sombras ligeras, jerarquía clara
   (solo apariencia; no cambia ninguna función)
   ===================================================================== */
:root { --radio: 12px; --sombra: 0 1px 2px rgba(16,32,56,.06), 0 4px 14px rgba(16,32,56,.06); --sombra-alta: 0 2px 4px rgba(16,32,56,.08), 0 10px 28px rgba(16,32,56,.12); --papel: #f2f5fa; }
body { background: linear-gradient(180deg, #eef2f9 0, var(--papel) 260px) no-repeat, var(--papel); letter-spacing: .005em; }
main { padding: 1.6rem 1.2rem 4.5rem; }
h2 { font-size: 1.55rem; font-weight: 800; color: var(--azul-osc); display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
h2::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--marca-rojo) 0, var(--marca-rojo) 38px, var(--linea) 38px); max-width: 100%; opacity: .9; }
h3 { color: var(--azul-osc); } .suave { line-height: 1.55; }

/* botones */
.btn { border-radius: 12px; border: 1.5px solid #c5d0e0; background: #fff; color: var(--azul-osc); box-shadow: 0 1px 2px rgba(16,32,56,.06); transition: transform .12s, box-shadow .12s, background .12s, border-color .12s; }
.btn:hover { background: #f3f7fd; border-color: var(--azul); box-shadow: 0 3px 10px rgba(16,32,56,.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.primario { background: linear-gradient(180deg, #14518f, var(--azul)); border-color: var(--azul); color: #fff; box-shadow: 0 2px 8px rgba(10,47,85,.35); }
.btn.primario:hover { background: linear-gradient(180deg, #1a5fa6, #0d3a69); box-shadow: 0 5px 14px rgba(10,47,85,.4); }
.btn.chico { border-radius: 10px; }
.mes, .seg { border-radius: 12px; } .mes { box-shadow: 0 1px 2px rgba(16,32,56,.05); transition: background .12s, transform .12s; } .mes:hover { background: #eef3fb; transform: translateY(-1px); } .mes.activa { box-shadow: 0 3px 10px rgba(10,47,85,.3); }

/* campos */
input, select, textarea { border: 1.5px solid #c5d0e0; border-radius: 10px; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 4px rgba(20,81,143,.14); outline: none; }
label, .etq { font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: .72rem; }
label.casilla { text-transform: none; font-size: 1rem; letter-spacing: 0; font-weight: 400; }
.barra { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: .9rem 1.1rem; box-shadow: var(--sombra); }

/* tablas */
.tabla { border-radius: 14px; overflow: clip; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.tabla thead th { background: #eaf0f9; color: var(--azul-osc); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.tabla tbody tr:nth-child(even) td, .tabla tbody tr:nth-child(even) th { background: #fafcff; } .tabla tbody tr:hover td, .tabla tbody tr:hover th { background: #f0f6ff; }
.tabla-scroll { border-radius: 14px; }

/* tarjetas */
.tb-tile, .tb-sec, .md-card, .cu-al, .cu-admin, .fl-panel, .rs-info, .hi-it, .rv-card, .av-r, .tb-mini { border-radius: 16px !important; box-shadow: var(--sombra); }
.tb-tile:hover, .rv-card:hover, .av-r:hover { box-shadow: var(--sombra-alta); }
.tb-tile { border-top-width: 6px; background: linear-gradient(180deg, #fff, #fafcff); }
.aviso { border-radius: 12px; box-shadow: var(--sombra); }
.toast { border-radius: 14px; box-shadow: var(--sombra-alta); }

/* menú lateral */
#lateral { background: linear-gradient(180deg, #003159 0, #001e3a 100%); box-shadow: 4px 0 24px rgba(0,20,45,.25); }
.tab { border-radius: 0 14px 14px 0; transition: background .15s, padding-left .15s; } .tab:hover { padding-left: 1rem; } .tab.sub:hover { padding-left: 1.2rem; }
.tab.activa { background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.08)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.grupo-enc { border-radius: 0 14px 14px 0; transition: background .15s; }
.badge-tab, .badge-menu { box-shadow: 0 1px 4px rgba(150,0,0,.4); }
.pwa-barra { border-radius: 16px; }
.tabla.cap { overflow: visible; border-radius: 0; box-shadow: none; } .cap-scroll { border: 1px solid var(--linea); border-radius: 14px; box-shadow: var(--sombra); }

/* Boleta en teléfono (vertical u horizontal): meses y trimestres en una tabla que se desliza */
.bm-tip { color: var(--suave); font-size: .8rem; margin: 0 0 .6rem; }
.bm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bm-tabla { width: max-content; min-width: 100%; }
.bm-tabla th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 7.5rem; max-width: 9rem; box-shadow: 1px 0 0 var(--linea); }
.bm-tabla tr.bm-prom th:first-child { background: var(--banda-suave); }
.bm-tabla th, .bm-tabla td { white-space: nowrap; padding: .35rem .45rem; }
.bm-tabla tbody th:first-child { white-space: normal; }
.bm-tabla .bm-t { background: var(--banda-suave); font-weight: 700; }
@media (max-width: 720px) and (orientation: portrait) { .bm-tabla th, .bm-tabla td { padding: .35rem .3rem; font-size: .88rem; } }

/* listas de nombres con viñetas */
.lista-nombres { list-style: disc; margin: .3rem 0 .2rem; padding-left: 1.3rem; } .lista-nombres li { padding: .05rem 0; } .lista-nombres li::marker { color: var(--suave); }

/* ============ Preescolar ============ */
.pre-ch { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font-weight: 800; font-size: .95rem; flex: none; vertical-align: middle; }
.pre-ley { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; background: #eaeefe; border-radius: 999px; padding: .4rem 1rem; margin: .6rem 0; font-weight: 700; font-size: .9rem; }
.pre-ley span { display: inline-flex; align-items: center; gap: .35rem; }
.pre-ley .pre-ch { width: 1.4rem; height: 1.4rem; font-size: .8rem; }
.pre-num { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; color: #fff; font-weight: 800; font-size: .8rem; flex: none; }
.pre-m { border-color: var(--c); } .pre-m.activa { background: var(--c); border-color: var(--c); color: #fff; }
.pre-pdas ol { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .6rem; }
.pre-pdas li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; }
.pre-pdas textarea, .pre-nuevo textarea, .pre-ob textarea { width: 100%; font: inherit; padding: .5rem; border: 1px solid var(--linea); border-radius: var(--radio); resize: vertical; }
.pre-nuevo { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: start; margin-top: .6rem; }
.pre-tabla th.al, .pre-tabla td { white-space: normal; }
.pre-tabla th.al { min-width: 11rem; text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 700; }
.pre-tabla thead th { vertical-align: bottom; min-width: 9.5rem; text-align: center; }
.pre-sel { display: inline-flex; gap: .3rem; }
.pre-n { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid var(--b); background: #fff; color: var(--b); font-weight: 800; font-size: 1rem; cursor: pointer; padding: 0; }
.pre-n.on { background: var(--b); color: var(--f, #fff); }
.pre-n:disabled { opacity: .55; cursor: not-allowed; }
.pre-n.mini { width: 1.6rem; height: 1.6rem; font-size: .75rem; border-width: 1.5px; }
.pre-todos { display: flex; gap: .2rem; justify-content: center; margin-top: .3rem; }
.pre-tabla td { text-align: center; } .pre-tabla td small { display: block; margin-top: .15rem; }
.pre-obs { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.pre-ob label { font-weight: 700; display: block; margin-bottom: .2rem; }
.pre-av th, .pre-av td { text-align: center; } .pre-av tbody th { text-align: left; }
.pre-ok { background: var(--verde-s); font-weight: 700; } .pre-med { background: var(--ambar-s); } .pre-no { color: var(--suave); }

/* boleta de Preescolar */
.pre-boleta { background: #fff; color: #1d2540; font-family: 'Nunito', 'Atkinson Hyperlegible', system-ui, sans-serif; max-width: 52rem; margin: 0 auto; }
.pre-portada { display: none; }
.pre-enc { display: flex; align-items: center; gap: .8rem; margin-bottom: .4rem; }
.pre-enc img { width: 3.6rem; height: 3.6rem; object-fit: contain; flex: none; }
.pre-enc h2 { margin: 0; font-size: 1.3rem; } .pre-enc p { margin: 0; font-size: .9rem; color: #3d4766; font-weight: 700; }
.pre-bl { border: 2px solid var(--c); border-radius: 16px; overflow: hidden; margin: .9rem 0; break-inside: avoid; background: #fff; }
.pre-bl header { display: flex; align-items: center; gap: 0; background: var(--c); color: #fff; padding: .45rem .5rem .45rem .9rem; }
.pre-bl header > div { flex: 1; min-width: 0; } .pre-bl h3 { margin: 0; font-size: 1.1rem; line-height: 1.1; color: #fff; } .pre-bl header small { opacity: .95; font-weight: 700; font-size: .78rem; }
.pre-th { width: 4.9rem; text-align: center; font-weight: 800; font-size: .75rem; line-height: 1.15; flex: none; } .pre-th i { font-style: normal; } .pre-th .c { display: none; }
.pre-fila { display: flex; align-items: stretch; border-top: 1px solid color-mix(in srgb, var(--c) 25%, #fff); }
.pre-fila:nth-child(even) { background: color-mix(in srgb, var(--c) 6%, #fff); }
.pre-fila > .pre-num { margin: .6rem .5rem 0 .55rem; align-self: flex-start; }
.pre-fila p { flex: 1; margin: 0; padding: .55rem .6rem .55rem 0; font-size: .9rem; line-height: 1.35; font-weight: 600; }
.pre-celda { width: 4.9rem; flex: none; display: flex; align-items: center; justify-content: center; border-left: 1px solid color-mix(in srgb, var(--c) 25%, #fff); }
.pre-celda.vacia { background: repeating-linear-gradient(135deg, #f3f4f9 0, #f3f4f9 5px, #eaecf4 5px, #eaecf4 6px); }
.pre-cierre { margin-top: 1rem; } .pre-cierre h3 { margin: 0 0 .4rem; }
.pre-obs-card { border-left: 5px solid; border-radius: 10px; padding: .5rem .8rem; margin: .5rem 0; background: #f6f8ff; break-inside: avoid; }
.pre-obs-card h4 { margin: 0 0 .2rem; font-size: .95rem; } .pre-obs-card p { margin: 0; white-space: pre-wrap; }
.pre-obs-card.t1 { border-color: #c8243a; background: #fff5f6; } .pre-obs-card.t2 { border-color: #1a6fc0; background: #f3f8fe; } .pre-obs-card.t3 { border-color: #2f8a1b; background: #f6fbf2; }
.pre-firmas { display: none; }
@media (max-width: 560px) {
  .pre-th { width: 2.6rem; } .pre-th .l { display: none; } .pre-th .c { display: inline; } .pre-celda { width: 2.6rem; }
  .pre-ch { width: 1.55rem; height: 1.55rem; font-size: .85rem; }
  .pre-pdas li { grid-template-columns: auto 1fr; } .pre-pdas li .btn { grid-column: 2; justify-self: start; }
  .pre-nuevo { grid-template-columns: 1fr; }
}
/* impresión */
#print-area .pre-boleta { font-size: 11.5px; max-width: none; }
#print-area .pre-portada { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 235mm; border: 6px solid #19a7c4; border-radius: 28px; padding: 2rem; break-after: page; page-break-after: always; position: relative; }
#print-area .pre-portada img { width: 260px; max-width: 70%; }
#print-area .pre-portada h1 { font-size: 2.6rem; margin: 1.2rem 0 .4rem; color: #1d2540; } .pre-ciclo { background: #f2c14e; border-radius: 999px; padding: .35rem 1.2rem; font-weight: 800; font-size: 1.1rem; }
#print-area .pre-datos { width: 100%; max-width: 38rem; background: #eaeefe; border-radius: 22px; padding: 1.2rem 1.6rem; margin-top: 1.6rem; display: grid; gap: .9rem; text-align: left; }
#print-area .pre-datos > div { display: flex; align-items: baseline; gap: 1rem; border-bottom: 2px solid #8e9cdc; padding-bottom: .2rem; } #print-area .pre-datos span { font-weight: 800; font-size: .75rem; letter-spacing: .12em; color: #3b4a8f; width: 9rem; flex: none; } #print-area .pre-datos b { font-size: 1.15rem; }
#print-area .pre-pie, .pre-pie { font-size: .8rem; color: #3d4766; font-weight: 700; margin-top: 1.4rem; }
#print-area .pre-enc, #print-area .pre-ley { margin-top: 0; }
#print-area .pre-firmas { display: flex; gap: 1.5rem; margin-top: 2.2rem; } #print-area .pre-firmas > div { flex: 1; text-align: center; font-size: .8rem; font-weight: 800; } #print-area .pre-firmas i { display: block; border-bottom: 2px solid #1d2540; height: 2rem; margin-bottom: .3rem; }
#print-area .pre-boleta { break-after: page; page-break-after: always; } #print-area .pre-boleta:last-child { break-after: auto; page-break-after: auto; }
.pre-pie { text-align: center; }

.hijo .pre-enc { display: none; } #print-area .pre-enc { display: flex; }
.pre-pt { display: block; font-weight: 600; font-size: .78rem; color: var(--suave); line-height: 1.25; margin-top: .25rem; max-width: 11rem; margin-inline: auto; }
.pre-fila > p:first-child { padding-left: .9rem; }
.pre-boleta h2::after, .pre-boleta h3::after, .pre-boleta h4::after { display: none !important; }
.pre-cierre { break-inside: avoid; } #print-area .pre-firmas { break-inside: avoid; }

/* ============ Selector de nivel ============ */
.selnivel { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; background: rgba(255,255,255,.1); border-radius: 14px; padding: .25rem; margin: .2rem .2rem .8rem; }
.selnivel .nv { border: 0; background: transparent; color: #fff; font-weight: 800; padding: .55rem .4rem; border-radius: 11px; cursor: pointer; min-height: 40px; }
.selnivel .nv.activo { background: #fff; color: var(--azul-osc); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.selnivel .nv:not(.activo):hover { background: rgba(255,255,255,.18); }

/* ============ Tema Preescolar (colorido e infantil) ============ */
body[data-nivel="pre"] {
  --azul: #1a6fc0; --azul-osc: #1d2540; --banda: #1d2540; --banda-suave: #eaeefe; --marca-rojo: #d6249f; --linea: #d9def5;
  --radio: 18px; --papel: #fff8ec;
  font-family: "Nunito", "Atkinson Hyperlegible", system-ui, sans-serif;
  background: radial-gradient(circle at 12% 8%, #ffe9ee 0, transparent 26%), radial-gradient(circle at 90% 4%, #e3f2ff 0, transparent 24%), radial-gradient(circle at 80% 96%, #e8f7de 0, transparent 26%), #fff8ec;
}
body[data-nivel="pre"] h1, body[data-nivel="pre"] h2, body[data-nivel="pre"] h3 { font-family: "Baloo 2", "Nunito", sans-serif; }
body[data-nivel="pre"] h2 { color: #1d2540; font-size: 1.7rem; }
body[data-nivel="pre"] h2::after { height: 6px; background: linear-gradient(90deg, #d82b3d 0 22%, #f2c14e 22% 44%, #55b83a 44% 66%, #1d7fd6 66% 88%, #d6249f 88%); opacity: 1; }
body[data-nivel="pre"].con-menu .lateral { background: linear-gradient(180deg, #1d2540 0%, #2a2f6e 55%, #4a2a73 100%); border-right: 6px solid transparent; border-image: linear-gradient(180deg, #d82b3d, #f2c14e, #55b83a, #1d7fd6, #d6249f) 1; }
body[data-nivel="pre"] .marca { font-family: "Baloo 2", sans-serif; font-size: 1.25rem; }
body[data-nivel="pre"] .marca img { background: #fff; border-radius: 14px; padding: 2px; }
body[data-nivel="pre"] .top { background: linear-gradient(90deg, #1d2540, #4a2a73); border-bottom: 5px solid #f2c14e; }
body[data-nivel="pre"] .btn { border-radius: 999px; border-color: #b9c4f0; }
body[data-nivel="pre"] .btn:hover { border-color: #1a6fc0; background: #eef3ff; }
body[data-nivel="pre"] .btn.primario { background: linear-gradient(180deg, #2b8be0, #1a6fc0); border-color: #1a6fc0; box-shadow: 0 3px 0 #124e8c; }
body[data-nivel="pre"] .btn.primario:hover { background: linear-gradient(180deg, #3b9bf0, #1f78d0); }
body[data-nivel="pre"] .btn.primario:active { box-shadow: none; transform: translateY(2px); }
body[data-nivel="pre"] .barra, body[data-nivel="pre"] .tabla, body[data-nivel="pre"] .aviso, body[data-nivel="pre"] .cap-scroll, body[data-nivel="pre"] section.hijo { border-radius: 22px; }
body[data-nivel="pre"] .barra { border: 2px solid #dfe5fb; }
body[data-nivel="pre"] .mes { border-radius: 999px; border-width: 2px; }
body[data-nivel="pre"] .mes.activa { background: #1a6fc0; border-color: #1a6fc0; }
body[data-nivel="pre"] #nav .tab.activa { background: rgba(255,255,255,.2); box-shadow: inset 4px 0 0 #f2c14e; }
body[data-nivel="pre"] .pre-tabla th.al { background: #fffdf8; }

/* tablero de Preescolar */
.pt-saludo { display: flex; align-items: center; gap: 1rem; background: #fff; border: 3px solid #19a7c4; border-radius: 26px; padding: .9rem 1.2rem; margin-bottom: 1.2rem; box-shadow: 0 6px 0 #bfe6ee; }
.pt-saludo img { width: 4.5rem; height: 4.5rem; object-fit: contain; flex: none; }
.pt-saludo h2 { margin: 0; } .pt-saludo h2::after { display: none; } .pt-saludo p { margin: .1rem 0 0; }
.pt-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.pt-dato { border-radius: 22px; padding: .8rem 1rem; color: #1d2540; border: 2px solid; }
.pt-dato b { display: block; font: 800 2rem/1.1 "Baloo 2", sans-serif; } .pt-dato span { font-weight: 700; font-size: .92rem; }
.pt-dato.c1 { background: #fdeaec; border-color: #d82b3d; } .pt-dato.c2 { background: #e6f2fd; border-color: #1d7fd6; } .pt-dato.c3 { background: #eaf6e3; border-color: #55b83a; } .pt-dato.c4 { background: #fff4d6; border-color: #f2c14e; }
.pt-grupos { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.pt-grupo { background: #fff; border: 3px solid var(--g); border-radius: 26px; padding: 1rem 1.1rem; box-shadow: 0 6px 0 color-mix(in srgb, var(--g) 30%, #fff); }
.pt-grupo h3 { margin: 0 0 .1rem; font-size: 1.5rem; color: var(--g); } .pt-grupo .suave { margin: 0 0 .6rem; font-size: .88rem; }
.pt-barra { height: 16px; border-radius: 999px; background: #eceff9; overflow: hidden; margin: .3rem 0 .15rem; } .pt-barra i { display: block; height: 100%; border-radius: 999px; background: var(--g); }
.pt-fila { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; padding: .15rem 0; } .pt-fila b { font-weight: 800; }
.pt-grupo .acc { margin-top: .7rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.pt-falta { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .88rem; } .pt-falta li { margin: .1rem 0; }
.pt-fecha { display: inline-block; border-radius: 999px; padding: .15rem .7rem; font-weight: 800; font-size: .85rem; background: #fff4d6; color: #5a4200; }
.pt-fecha.vencida { background: #fde1e1; color: #8a1b1b; } .pt-fecha.hoy, .pt-fecha.proximo { background: #ffe9c2; color: #6b3d00; }

/* ============ Preescolar: menú y entorno realmente coloridos ============ */
body[data-nivel="pre"] #lateral { background: linear-gradient(170deg, #19a7c4 0%, #1d7fd6 30%, #7b4fd6 62%, #d6249f 100%); box-shadow: 4px 0 24px rgba(80,30,120,.25); border: 0; border-image: none; }
body[data-nivel="pre"] #lateral::after { content: ""; position: absolute; inset: auto 0 0 0; height: 0; }
body[data-nivel="pre"] .marca { border-bottom: 0; background: rgba(255,255,255,.16); margin: .7rem .7rem .2rem; border-radius: 22px; padding: .7rem .8rem; }
body[data-nivel="pre"] .marca img { width: 3rem; height: 3rem; object-fit: contain; }
body[data-nivel="pre"] .selnivel { background: rgba(255,255,255,.22); }
body[data-nivel="pre"] .selnivel .nv.activo { color: #d6249f; }
body[data-nivel="pre"] #nav { gap: .35rem; }
body[data-nivel="pre"] #nav .tab, body[data-nivel="pre"] .grupo-enc { background: rgba(255,255,255,.14); border-left: 0; border-radius: 999px; font-weight: 800; padding-left: .5rem; }
body[data-nivel="pre"] #nav .tab:hover, body[data-nivel="pre"] .grupo-enc:hover { background: rgba(255,255,255,.28); }
body[data-nivel="pre"] #nav .tab.activa { background: #fff; color: #1d2540; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
body[data-nivel="pre"] #nav .tab svg, body[data-nivel="pre"] .grupo-enc svg:first-child { box-sizing: content-box; padding: 6px; border-radius: 50%; background: var(--ic, #f2c14e); color: #fff; opacity: 1; width: 20px; height: 20px; }
body[data-nivel="pre"] #nav .tab:nth-of-type(5n+1) { --ic: #d82b3d; } body[data-nivel="pre"] #nav .tab:nth-of-type(5n+2) { --ic: #f2a900; }
body[data-nivel="pre"] #nav .tab:nth-of-type(5n+3) { --ic: #3cb458; } body[data-nivel="pre"] #nav .tab:nth-of-type(5n+4) { --ic: #1d7fd6; } body[data-nivel="pre"] #nav .tab:nth-of-type(5n) { --ic: #d6249f; }
body[data-nivel="pre"] .grupo:nth-of-type(5n+1) > .grupo-enc { --ic: #d82b3d; } body[data-nivel="pre"] .grupo:nth-of-type(5n+2) > .grupo-enc { --ic: #f2a900; } body[data-nivel="pre"] .grupo:nth-of-type(5n+3) > .grupo-enc { --ic: #3cb458; } body[data-nivel="pre"] .grupo:nth-of-type(5n+4) > .grupo-enc { --ic: #1d7fd6; } body[data-nivel="pre"] .grupo:nth-of-type(5n) > .grupo-enc { --ic: #d6249f; }
body[data-nivel="pre"] .quien { border-top: 0; background: rgba(255,255,255,.16); margin: .5rem .7rem .8rem; border-radius: 22px; }
body[data-nivel="pre"] .quien .btn { border-radius: 999px; }
body[data-nivel="pre"] .top { background: linear-gradient(90deg, #19a7c4, #1d7fd6, #d6249f); border-bottom: 5px solid #f2c14e; }
body[data-nivel="pre"] .barra { background: #fff; }
body[data-nivel="pre"] .tabla table th { background: #eaeefe; }

/* PDA largos (o sin espacios): se parten en renglones y nunca empujan las columnas de trimestre */
.pre-fila p, .pre-pdas textarea, .pre-tabla thead th, .pre-tabla th.al { min-width: 0; overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.pre-fila p { flex: 1 1 0; min-width: 0; }
.pre-tabla thead th small, .pre-tabla thead th span { overflow-wrap: anywhere; }

/* Tabla de captura de Preescolar: encabezado (Alumno + PDA) pegado arriba */
.cap-scroll.libre { overflow: visible; max-height: none; }
.cap-scroll.libre .tabla.cap th { top: var(--stick, 0px) !important; }
.pre-tabla thead th { background: #eaeefe; z-index: 3; } .pre-tabla thead th.al { z-index: 4; background: #eaeefe; }
.pre-tabla tbody th.al { z-index: 2; }

/* portada */
.login-logos { display:flex; gap:1rem; align-items:center; justify-content:center; margin:0 auto 1rem; }
.login-logo.pre { border-radius:0; box-shadow:none; background:none; filter:drop-shadow(0 6px 10px rgba(214,36,159,.25)); animation:flota 4s ease-in-out infinite; }
@keyframes flota { 50% { transform:translateY(-5px); } }
.login h1 { font-family:'Baloo 2',inherit; line-height:1.1; font-size:1.7rem; }
.login h1 span { display:block; font-size:1.25rem; background:linear-gradient(90deg,#d82b3d,#d6249f,#1d7fd6,#19a7c4); -webkit-background-clip:text; background-clip:text; color:transparent; }
.login-niv { display:flex; gap:.6rem; align-items:center; justify-content:center; margin:.5rem 0 1.1rem; font-size:.85rem; }
.login-niv b { padding:.2rem .8rem; border-radius:99px; color:#fff; }
.login-niv .n1 { background:#1d2540; } .login-niv .n2 { background:linear-gradient(90deg,#d6249f,#f2c14e); }
.login-niv i { width:.5rem; height:.5rem; border-radius:50%; background:#55b83a; }
.login .form-col { border-top:0; background:linear-gradient(#fff,#fff) padding-box, linear-gradient(90deg,#d82b3d,#f2c14e,#55b83a,#19a7c4,#d6249f) border-box; border:3px solid transparent; border-radius:1.2rem; }
body:has(.login) #main { background:radial-gradient(circle at 15% 10%,#ffe9ef 0,transparent 40%),radial-gradient(circle at 90% 20%,#e3f3ff 0,transparent 40%),radial-gradient(circle at 50% 100%,#fff6d8 0,transparent 45%); }

/* v40: fecha de emisión en Cierre de mes, asistencias de CURA, Preescolar en Asignaciones */
.fe-campo { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; margin-left: .5rem; }
.fe-campo input { padding: .25rem .4rem; font: inherit; border: 1px solid var(--borde, #c9d3dd); border-radius: .4rem; }
.fe-est { font-size: .8rem; margin-left: .35rem; }
#fec-nota { display: block; margin-top: .2rem; font-size: .78rem; }
.adm-nivel { margin: 2rem 0 .3rem; padding-top: 1rem; border-top: 2px solid var(--borde, #c9d3dd); }
.cu-cfg { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: flex-end; margin: .4rem 0 .6rem; }
.cu-cfg label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; font-weight: 600; }
.cu-cfg input { width: 7.5rem; padding: .4rem .5rem; font: inherit; border: 1px solid var(--borde, #c9d3dd); border-radius: .4rem; }
.cu-asis { max-width: 46rem; }
.cu-asis .cu-as { font-weight: 700; }
@media (max-width: 760px) { .fe-campo { margin: .4rem 0 0; } .cu-cfg input { width: 6rem; } }

/* ---------- v40: movimiento suave y acabados (solo apariencia; se apaga si el dispositivo pide menos movimiento) ---------- */
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes sube { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes guardado { 0% { transform: scale(.9); opacity: .2; } 60% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
@keyframes barra-llena { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* al cambiar de sección el contenido entra con un desliz corto (no al cambiar de grupo o de mes) */
#main.entra > * { animation: entra .22s ease-out both; }
#main.entra > *:nth-child(2) { animation-delay: .03s; } #main.entra > *:nth-child(3) { animation-delay: .06s; } #main.entra > *:nth-child(n+4) { animation-delay: .09s; }

/* "Cargando…" con un indicador que gira */
.cargando { display: flex; align-items: center; gap: .6rem; padding: .8rem 0; animation: aparece .3s .15s both; }
.cargando::before { content: ""; width: 1.05rem; height: 1.05rem; flex: none; border-radius: 50%; border: 2.5px solid #c9d6e6; border-top-color: var(--azul); animation: gira .7s linear infinite; }

/* ventanas (boleta, confirmaciones): aparecen con suavidad y el fondo se atenúa */
#modal[open] { animation: sube .2s ease-out both; box-shadow: 0 18px 50px rgba(8, 24, 44, .35); border-radius: 16px; }
#modal::backdrop { background: rgba(10, 24, 42, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: aparece .2s ease-out both; }

/* confirmación visual al guardar una casilla */
.estado.ok, .pl-guard { transform-origin: left center; }
.estado.ok { animation: guardado .28s ease-out both; font-weight: 700; }
.estado.ok::before { content: "✓ "; }
.nota { transition: border-color .15s, box-shadow .15s, background .2s; }
.nota:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(20, 81, 143, .18); outline: none; }
.obs textarea, .cu-campo textarea { transition: border-color .15s, box-shadow .15s; }
.obs textarea:focus, .cu-campo textarea:focus { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(20, 81, 143, .16); outline: none; }

/* menú: el indicador de la sección activa y el despliegue de los grupos */
.tab { transition: background .15s, color .15s, border-color .15s, padding-left .15s; }
.tab:not(.activa):hover { padding-left: 1rem; } .tab.sub:not(.activa):hover { padding-left: 1.2rem; }
.grupo-enc .chev { transition: transform .2s ease; }
.grupo.abierto > .grupo-enc .chev { transform: rotate(180deg); }
.grupo-sub:not([hidden]) { animation: entra .18s ease-out both; }

/* barras de avance: se llenan al aparecer */
.av-barra i, .tb-bar i { transform-origin: left center; animation: barra-llena .5s cubic-bezier(.2, .7, .2, 1) both; }

/* listas y filas: respuesta al pasar el cursor */
.lista-al li { transition: background .12s; } .lista-al li:hover { background: #f3f7fd; }
.mes, .seg button, .nv { transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s; }
.mes:active, .seg button:active { transform: scale(.96); }
.pill { transition: background .2s, color .2s; }
.aviso { animation: aparece .25s ease-out both; }

/* pantalla de acceso */
.login { animation: sube .35s ease-out both; }
.login-logo { transition: transform .25s ease; } .login-logo:hover { transform: translateY(-3px) scale(1.03); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  .cargando::before { animation: none !important; border-top-color: #c9d6e6; }
}
@media print { * { animation: none !important; transition: none !important; } }

/* ===== v41: Agenda escolar y Horarios ===== */
.ag, .hr { display: flex; flex-direction: column; gap: .8rem; max-width: 60rem; }
.ag-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; flex-wrap: wrap; }
.ag-cab h2, .hr h2 { margin: 0; }
.ag-cab p { margin: .2rem 0 0; }
.ag-comofam { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; font-size: .9rem; background: var(--blanco); border: 1px solid var(--linea); border-radius: 999px; padding: .35rem .8rem; cursor: pointer; }
.ag-hijos { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: 2px; }
.ag-hijos button { flex: 0 0 auto; border: 2px solid var(--linea); background: var(--blanco); border-radius: 14px; padding: .4rem .8rem; text-align: left; font-weight: 800; line-height: 1.15; cursor: pointer; }
.ag-hijos button small { display: block; font-weight: 700; color: var(--suave); font-size: .75rem; }
.ag-hijos button[aria-pressed="true"] { background: var(--banda); color: #fff; border-color: var(--banda); }
.ag-hijos button[aria-pressed="true"] small { color: #fff; opacity: .85; }
.ag-seg { display: inline-flex; border: 1px solid var(--banda); border-radius: var(--radio); overflow: hidden; background: var(--blanco); align-self: flex-start; }
.ag-seg button { border: 0; background: transparent; padding: .45rem .9rem; font-weight: 700; color: var(--banda); min-height: 40px; cursor: pointer; }
.ag-seg button + button { border-left: 1px solid var(--banda); }
.ag-seg button[aria-pressed="true"] { background: var(--banda); color: #fff; }
.ag-seg.ancho { display: flex; } .ag-seg.ancho button { flex: 1; }
.ag-hoy { background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.ag-hoy-c { display: flex; gap: .8rem; align-items: center; padding: .8rem 1rem; }
.ag-hoy.sin .ag-hoy-c { background: var(--verde-s); }
.ag-big { font-size: 2.3rem; line-height: 1; }
.ag-hoy h3 { margin: 0; font-size: 1.15rem; text-transform: none; }
.ag-estado { display: inline-block; border-radius: 999px; padding: .1rem .7rem; font-weight: 800; font-size: .85rem; margin-top: .25rem; }
.ag-estado.no { background: var(--titulo); color: #fff; } .ag-estado.si { background: var(--verde-s); color: var(--verde); }
.ag-clase { margin: .35rem 0 0; font-size: .9rem; }
.ag-hoy-l { padding: 0 1rem .8rem; display: grid; gap: .4rem; }
.ag-manana { border-top: 1px solid var(--linea); padding: .6rem 1rem; font-size: .9rem; color: var(--suave); }
.ag-manana b { color: var(--tinta); }
.ag-traer { background: var(--ambar-s); border-radius: 10px; padding: .8rem 1rem; }
.ag-traer h3 { margin: 0 0 .3rem; font-size: 1rem; } .ag-traer p { margin: .1rem 0; }
.ag-pub { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; padding: .6rem .8rem; }
.ag-pub p { margin: 0; flex: 1 1 14rem; font-size: .9rem; color: var(--suave); }
.ag-pill { border-radius: 999px; padding: .1rem .6rem; font-weight: 800; font-size: .75rem; }
.ag-pill.ok { background: var(--verde-s); color: var(--verde); } .ag-pill.draft { background: var(--ambar-s); color: var(--ambar); }
.ag-barra { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ag-nav { display: flex; align-items: center; gap: .4rem; }
.ag-flecha { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--linea); background: var(--blanco); font-size: 1.25rem; font-weight: 800; cursor: pointer; }
.ag-tt { font-weight: 800; color: var(--titulo); min-width: 9em; text-align: center; text-transform: capitalize; }
.ag-semana { display: grid; gap: .6rem; }
.ag-dia { background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.ag-dia.sin { background: var(--verde-s); }
.ag-dc { display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem; }
.ag-dia .ag-evs { border-top: 1px solid var(--linea); padding: .5rem .8rem .7rem; display: grid; gap: .4rem; }
.ag-num { font-weight: 800; font-size: 1.3rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; background: var(--banda-suave); }
.ag-dia.eshoy .ag-num, .ag-d.hoyd .n { background: #f2b705; color: var(--tinta); }
.ag-dn b { display: block; text-transform: capitalize; } .ag-dn small { color: var(--suave); font-weight: 700; }
.ag-add { justify-self: start; border: 1px dashed var(--banda); background: transparent; color: var(--banda); border-radius: var(--radio); padding: .3rem .7rem; font-weight: 700; cursor: pointer; }
.ag-ev { display: flex; align-items: center; gap: .6rem; border-radius: 10px; padding: .55rem .7rem; width: 100%; border: 0; text-align: left; font: inherit; color: inherit; }
button.ag-ev { cursor: pointer; }
.ag-e { font-size: 1.6rem; line-height: 1; flex: 0 0 auto; }
.ag-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.ag-tx b { line-height: 1.2; } .ag-tx small { color: var(--suave); font-weight: 700; font-size: .8rem; }
.ag-chips { display: flex; flex-wrap: wrap; gap: .25rem; }
.ag-chip { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .05rem .5rem; background: var(--blanco); color: var(--suave); }
.ag-chip.suyo { background: var(--banda); color: #fff; }
.ag-mas { font-size: .75rem; font-weight: 800; color: var(--banda); background: var(--blanco); border-radius: 999px; padding: .2rem .6rem; }
.ag-cal { background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.ag-dias, .ag-sem { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ag-dias div { background: var(--banda); color: #fff; text-align: center; font-weight: 700; padding: .35rem 0; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.ag-d { min-height: 4.6rem; border: 0; border-right: 1px solid var(--linea); border-top: 1px solid var(--linea); background: var(--blanco); padding: .25rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.ag-d:nth-child(5n) { border-right: 0; }
.ag-d .n { font-weight: 800; font-size: 1.05rem; line-height: 1; align-self: flex-end; border-radius: 6px; padding: .1rem .35rem; }
.ag-d.fuera .n { opacity: .4; } .ag-d.sinc { background: var(--verde-s); } .ag-d.sel { outline: 3px solid var(--titulo); outline-offset: -3px; }
.ag-d .ems { display: flex; flex-wrap: wrap; font-size: 1.1rem; line-height: 1.1; }
.ag-d .tits { display: none; flex-direction: column; gap: .15rem; }
.ag-d .tits span { font-size: .68rem; font-weight: 800; line-height: 1.15; border-radius: 4px; padding: .1rem .25rem; overflow-wrap: anywhere; }
@media (min-width: 760px) { .ag-d { min-height: 7rem; } .ag-d .ems { display: none; } .ag-d .tits { display: flex; } }
.ag-detalle { background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; padding: .8rem 1rem; display: grid; gap: .5rem; }
.ag-detalle h3 { margin: 0; text-transform: capitalize; }
.ag-oculto { text-align: center; padding: 2rem 1rem; color: var(--suave); background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; }
.ag-oculto b { display: block; font-size: 1.3rem; color: var(--tinta); }
.ag-ley, .ag-editores { background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; padding: .6rem 1rem; }
.ag-ley summary, .ag-editores summary { font-weight: 800; cursor: pointer; }
.ag-ley div { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.ag-ley span { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; }
.ag-edl { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .3rem; }
.ag-edl li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.ag-edf { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.ag-edf label { display: grid; gap: .2rem; font-weight: 700; font-size: .85rem; }
.ag-edf input { border: 1px solid #9aa9bd; border-radius: 6px; padding: .45rem .6rem; }
.ag-form { display: grid; gap: .7rem; min-width: min(30rem, 86vw); }
.ag-form h3 { margin: 0; }
.ag-form label { display: grid; gap: .25rem; font-weight: 700; font-size: .85rem; color: var(--suave); }
.ag-form input, .ag-form select { border: 1px solid #9aa9bd; border-radius: 6px; padding: .55rem .7rem; color: var(--tinta); font-weight: 400; font-size: 1rem; }
.ag-fila { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ag-lab { display: block; font-weight: 700; font-size: .85rem; color: var(--suave); margin-bottom: .25rem; }
.ag-auto { font-size: .8rem; color: var(--verde); font-weight: 800; min-height: 1em; margin-top: -.4rem; }
.ag-tipos { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.ag-tipos button { border: 2px solid transparent; border-radius: 999px; padding: .25rem .6rem; font-weight: 800; font-size: .8rem; cursor: pointer; }
.ag-tipos button[aria-pressed="true"] { border-color: var(--banda); }
.ag-prev { display: flex; align-items: center; gap: .6rem; border-radius: 10px; padding: .6rem; }
.ag-borrar { color: var(--rojo); border-color: var(--rojo); }
.ag-t-cumple { background: #fbe3e6; } .ag-t-examen { background: #e1ecf8; } .ag-t-cte { background: #fbf0d9; } .ag-t-honores { background: #e2f1e9; }
.ag-t-reunion { background: #ece6f6; } .ag-t-festivo { background: #d3ecdf; } .ag-t-vacaciones { background: #dcefd0; } .ag-t-evento { background: #f9e5e2; }
.ag-t-proyecto { background: #dff1f1; } .ag-t-entrega { background: #fdf3d3; } .ag-t-calif { background: #e6ecf4; } .ag-t-deporte { background: #e3ebf6; } .ag-t-otro { background: #eef1f5; }
/* horario */
.hr-sel { display: grid; gap: .25rem; font-weight: 700; font-size: .85rem; color: var(--suave); max-width: 22rem; }
.hr-sel select { border: 1px solid #9aa9bd; border-radius: 6px; padding: .5rem .6rem; color: var(--tinta); font-weight: 400; }
.hr-tit h3 { margin: 0; font-size: 1.15rem; } .hr-tit p { margin: .15rem 0 0; }
.hr-ahora { background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin: .6rem 0; }
.hr-ahora.uno { grid-template-columns: 1fr; }
.hr-ahora > div { padding: .7rem .9rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.hr-ahora > div + div { border-left: 1px solid var(--linea); }
.hr-ahora .ya { background: var(--verde-s); }
.hr-ahora .et { font-size: .72rem; font-weight: 800; color: var(--suave); text-transform: uppercase; letter-spacing: .05em; }
.hr-ahora .mat { font-weight: 800; font-size: 1.1rem; line-height: 1.2; overflow-wrap: anywhere; }
.hr-h { color: var(--suave); font-weight: 700; font-size: .85rem; }
.hr-dias { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin: .6rem 0; }
.hr-dias button { border: 1px solid var(--linea); background: var(--blanco); border-radius: 12px; padding: .35rem 0; font-weight: 800; display: flex; flex-direction: column; align-items: center; line-height: 1.1; cursor: pointer; }
.hr-dias button small { font-weight: 700; color: var(--suave); font-size: .7rem; }
.hr-dias button[aria-pressed="true"] { background: var(--banda); color: #fff; border-color: var(--banda); }
.hr-dias button[aria-pressed="true"] small { color: #fff; }
.hr-lista { display: grid; gap: .35rem; }
.hr-cl { display: grid; grid-template-columns: 6.2em 1fr; gap: .6rem; align-items: center; background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; padding: .55rem .8rem; }
.hr-hh { font-weight: 800; font-size: .8rem; color: var(--suave); font-variant-numeric: tabular-nums; }
.hr-m { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.hr-m b { display: block; line-height: 1.2; } .hr-m small { color: var(--suave); font-weight: 700; font-size: .8rem; }
.hr-e { font-size: 1.3rem; }
.hr-cl.pausa { background: #eef1f5; border-style: dashed; padding: .35rem .8rem; }
.hr-cl.pausa b { font-weight: 700; color: var(--suave); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.hr-cl.esp, .hr-tabla td.esp { background: #fdf3d3; } .hr-cl.b1, .hr-tabla td.b1 { background: #e1ecf8; } .hr-cl.b2, .hr-tabla td.b2 { background: #fbe3e6; }
.hr-cl.coord, .hr-tabla td.coord { background: #ece6f6; } .hr-cl.libre, .hr-tabla td.libre { background: var(--verde-s); }
.hr-cl.actual { outline: 3px solid #f2b705; outline-offset: -1px; }
.hr-tag { font-size: .68rem; font-weight: 800; background: #f2b705; color: var(--tinta); border-radius: 999px; padding: 0 .5rem; margin-left: .4rem; vertical-align: middle; }
.hr-tabla { overflow-x: auto; background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px; margin-top: .6rem; }
.hr-tabla table { border-collapse: collapse; min-width: 44rem; width: 100%; font-size: .82rem; }
.hr-tabla th, .hr-tabla td { border: 1px solid var(--linea); padding: .35rem; text-align: center; vertical-align: middle; }
.hr-tabla th { background: var(--banda); color: #fff; }
.hr-tabla td.hh { font-weight: 800; color: var(--suave); white-space: nowrap; }
.hr-tabla td.pausa { background: #eef1f5; letter-spacing: .15em; font-weight: 700; color: var(--suave); }
.hr-tabla td small { display: block; color: var(--suave); font-weight: 700; }
.chico { font-size: .8rem; }
body[data-nivel="pre"] .ag-seg, body[data-nivel="pre"] .ag-seg button + button { border-color: #1d2540; }
body[data-nivel="pre"] .ag-hijos button[aria-pressed="true"], body[data-nivel="pre"] .hr-dias button[aria-pressed="true"], body[data-nivel="pre"] .ag-seg button[aria-pressed="true"], body[data-nivel="pre"] .ag-dias div, body[data-nivel="pre"] .hr-tabla th { background: #1d2540; }
@media (max-width: 480px) { .ag-fila { grid-template-columns: 1fr; } .hr-cl { grid-template-columns: 5.2em 1fr; } }

/* ===== v41: Comedor de Preescolar ===== */
.cm { display: flex; flex-direction: column; gap: .9rem; max-width: 62rem; }
.cm-cab h2 { margin: 0; } .cm-cab p { margin: .15rem 0 0; }
.cm h3 { margin: 0; font-size: 1.05rem; }
.cm-sem { text-transform: none; }
.cm-semana { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.cm-dia { background: var(--blanco); border-radius: 18px; overflow: hidden; border: 2px solid #ffe2a8; display: flex; flex-direction: column; box-shadow: 0 2px 0 #ffe2a8; }
.cm-dia:nth-child(5n+2) { border-color: #c9e6ff; box-shadow: 0 2px 0 #c9e6ff; } .cm-dia:nth-child(5n+3) { border-color: #d8f0c4; box-shadow: 0 2px 0 #d8f0c4; }
.cm-dia:nth-child(5n+4) { border-color: #ffd3e2; box-shadow: 0 2px 0 #ffd3e2; } .cm-dia:nth-child(5n+5) { border-color: #e3d6ff; box-shadow: 0 2px 0 #e3d6ff; }
.cm-dcab { display: flex; align-items: baseline; gap: .5rem; padding: .55rem .9rem; background: #fff3d6; }
.cm-dia:nth-child(5n+2) .cm-dcab { background: #e7f3ff; } .cm-dia:nth-child(5n+3) .cm-dcab { background: #eef8e4; } .cm-dia:nth-child(5n+4) .cm-dcab { background: #ffeaf1; } .cm-dia:nth-child(5n+5) .cm-dcab { background: #f1ebff; }
.cm-dcab b { font-family: "Baloo 2", "Nunito", system-ui, sans-serif; font-size: 1.2rem; color: #1d2540; }
.cm-dcab span { color: var(--suave); font-weight: 700; font-size: .85rem; }
.cm-dcab em { margin-left: auto; font-style: normal; background: #d6249f; color: #fff; border-radius: 999px; padding: 0 .6rem; font-weight: 800; font-size: .75rem; }
.cm-dia.hoy { outline: 3px solid #d6249f; outline-offset: 2px; }
.cm-bloque { padding: .55rem .9rem; }
.cm-bloque + .cm-bloque { border-top: 2px dashed #f0e6d6; }
.cm-et { display: inline-block; font-weight: 800; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: #8a5a00; background: #fff3d6; border-radius: 999px; padding: .05rem .55rem; margin-bottom: .3rem; }
.cm-comida .cm-et { color: #1f6b3f; background: #e2f4e9; }
.cm-bloque ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.cm-bloque li { display: flex; gap: .45rem; align-items: baseline; }
.cm-bloque li span { font-size: 1.15rem; }
.cm-como { margin-top: auto; padding: .5rem .9rem .7rem; display: flex; flex-wrap: wrap; gap: .3rem; background: #fafbff; border-top: 1px solid var(--linea); }
.cm-pill { border-radius: 999px; padding: .1rem .55rem; font-weight: 800; font-size: .75rem; background: #eef1f5; color: var(--suave); }
.cm-pill.ok, .cm-c.ok, .cm-op.ok[aria-pressed="true"], .cm-hoyc.ok { background: #d9f2e2; color: #1f6b3f; }
.cm-pill.reg, .cm-c.reg, .cm-op.reg[aria-pressed="true"], .cm-hoyc.reg { background: #fff0c2; color: #7a5600; }
.cm-pill.mal, .cm-c.mal, .cm-op.mal[aria-pressed="true"], .cm-hoyc.mal { background: #fde0dc; color: #a12d22; }
.cm-pill.na, .cm-c.na, .cm-op.na[aria-pressed="true"], .cm-hoyc.na { background: #e8ebf1; color: #4f5b6b; }
.cm-hoy { background: var(--blanco); border-radius: 18px; padding: .8rem 1rem; border: 2px solid #e3d6ff; }
.cm-hoyg { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .5rem; }
.cm-hoyc { display: flex; align-items: center; gap: .6rem; border-radius: 14px; padding: .6rem .8rem; background: #f4f6fa; }
.cm-hoyc small { display: block; font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.cm-cara { font-size: 2rem; line-height: 1; }
.cm-res { background: linear-gradient(135deg, #fff3d6, #ffeaf1 55%, #e7f3ff); border-radius: 18px; padding: .9rem 1rem; }
.cm-res p { margin: .3rem 0; font-weight: 700; }
.cm-barra { display: flex; height: .9rem; border-radius: 999px; overflow: hidden; background: #fff; margin: .4rem 0; }
.cm-barra .ok { background: #3aa76d; } .cm-barra .reg { background: #f2b705; } .cm-barra .mal { background: #d9473b; } .cm-barra .vacia { flex: 1; background: #fff; }
.cm-ley { display: flex; flex-wrap: wrap; gap: .3rem .8rem; font-size: .85rem; margin: 0; }
.cm-grupos { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: 2px; }
.cm-grupos button { flex: 0 0 auto; border: 2px solid var(--linea); background: var(--blanco); border-radius: 14px; padding: .35rem .8rem; font-weight: 800; cursor: pointer; line-height: 1.1; }
.cm-grupos button small { display: block; font-weight: 700; color: var(--suave); font-size: .72rem; }
.cm-grupos button[aria-pressed="true"] { background: #1d2540; border-color: #1d2540; color: #fff; } .cm-grupos button[aria-pressed="true"] small { color: #fff; }
.cm-reg { display: grid; gap: .7rem; }
.cm-fecha { display: flex; align-items: center; gap: .5rem; }
.cm-fecha label { display: flex; flex-direction: column; font-weight: 800; font-size: .8rem; color: var(--suave); }
.cm-fecha input { border: 1px solid #9aa9bd; border-radius: 6px; padding: .4rem .5rem; font-size: 1rem; color: var(--tinta); }
.cm-todos { display: flex; flex-wrap: wrap; gap: .4rem; }
.cm-lista { display: grid; gap: .5rem; }
.cm-nino { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .6rem .8rem; display: grid; gap: .4rem; }
.cm-nom b { display: block; font-size: 1.05rem; } .cm-nom small { color: var(--suave); font-size: .72rem; }
.cm-fila { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: .4rem; }
.cm-fk { font-weight: 800; font-size: .85rem; }
.cm-opc { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; }
.cm-op { border: 1px solid var(--linea); background: #fff; border-radius: 12px; padding: .25rem 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.05; min-height: 44px; }
.cm-op span { font-size: 1.3rem; } .cm-op small { font-size: .62rem; font-weight: 800; color: var(--suave); }
.cm-op[aria-pressed="true"] { border-width: 2px; border-color: currentColor; }
.cm-op[aria-pressed="false"] { filter: grayscale(.6); opacity: .75; }
.cm-graf { background: var(--blanco); border-radius: 18px; border: 2px solid #e3d6ff; padding: .8rem; display: grid; gap: .5rem; }
.cm-graf-cab { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cm-tabla { overflow-x: auto; }
.cm-tabla table { border-collapse: separate; border-spacing: 0 4px; width: 100%; min-width: 36rem; }
.cm-tabla th, .cm-tabla td { padding: .25rem .35rem; text-align: center; font-size: .82rem; }
.cm-tabla thead th { background: #1d2540; color: #fff; font-weight: 700; }
.cm-tabla thead th:first-child { border-radius: 10px 0 0 10px; } .cm-tabla thead th:last-child { border-radius: 0 10px 10px 0; }
.cm-tabla tbody th { text-align: left; font-weight: 800; background: #f7f8fc; border-radius: 10px 0 0 10px; white-space: nowrap; }
.cm-tabla tbody th small { display: block; font-weight: 400; color: var(--suave); font-size: .65rem; }
.cm-tabla tbody td { background: #f7f8fc; } .cm-tabla tbody td:last-child { border-radius: 0 10px 10px 0; }
.cm-par { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cm-c { display: grid; place-items: center; height: 1.9rem; border-radius: 8px; font-size: 1rem; }
.cm-c.pend { background: #fff; border: 1px dashed var(--linea); }
.cm-pct { font-weight: 800; }
.cm-editar, .cm-pegar { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .7rem 1rem; }
.cm-editar summary, .cm-pegar summary { font-weight: 800; cursor: pointer; }
.cm-form { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); margin: .6rem 0; }
.cm-form fieldset { border: 1px solid var(--linea); border-radius: 12px; padding: .4rem .7rem .7rem; display: grid; gap: .4rem; }
.cm-form legend { font-weight: 800; padding: 0 .3rem; }
.cm-form label { display: grid; gap: .2rem; font-weight: 700; font-size: .8rem; color: var(--suave); }
.cm-form textarea, .cm-pegar textarea { border: 1px solid #9aa9bd; border-radius: 8px; padding: .4rem .5rem; font: inherit; font-size: .9rem; color: var(--tinta); width: 100%; resize: vertical; }
.cm-pegar { margin: .5rem 0; display: block; } .cm-pegar .btn { margin-top: .4rem; }
.cm-editar .acciones { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.cm-lgr { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .7rem 1rem; }
.cm-chk { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: .2rem .8rem; margin-top: .4rem; }
.cm-chk label { display: flex; gap: .45rem; align-items: center; font-size: .9rem; min-height: 32px; }
@media (max-width: 480px) { .cm-fila { grid-template-columns: 1fr; } .cm-hoyg { grid-template-columns: 1fr; } }

/* ===== v41: Comunicados, encuestas y mensajes ===== */
.cx { display: flex; flex-direction: column; gap: .8rem; max-width: 46rem; }
.cx-cab { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.cx-cab h2 { margin: 0; } .cx-cab p { margin: .15rem 0 0; }
.cx-feed { display: grid; gap: .8rem; }
.cx-card { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .5rem; border-left: 5px solid var(--banda); }
.cx-card.t-encuesta { border-left-color: #7b4fd6; } .cx-card.t-facebook { border-left-color: #1877f2; }
.cx-card.imp { border-left-color: var(--titulo); background: linear-gradient(0deg, var(--blanco), var(--blanco)), var(--blanco); box-shadow: 0 0 0 2px #fbe3e6 inset; }
.cx-card.nuevo { box-shadow: 0 4px 14px rgba(0, 39, 71, .12); }
.cx-card header { display: flex; gap: .6rem; align-items: flex-start; }
.cx-card header > div { flex: 1; min-width: 0; }
.cx-card header b { display: block; font-size: 1.05rem; line-height: 1.25; }
.cx-card header small { color: var(--suave); font-weight: 700; font-size: .78rem; }
.cx-ic { font-size: 1.5rem; line-height: 1; }
.cx-nuevo { font-style: normal; background: var(--titulo); color: #fff; border-radius: 999px; padding: .05rem .55rem; font-weight: 800; font-size: .72rem; }
.cx-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.cx-chip { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .1rem .55rem; background: var(--banda-suave); color: var(--banda); }
.cx-chip.imp { background: var(--titulo); color: #fff; } .cx-chip.hj { background: #fdf3d3; color: #7a5600; }
.cx-chip button { border: 0; background: transparent; cursor: pointer; font-weight: 800; color: inherit; padding: 0 0 0 .2rem; }
.cx-txt { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.cx-fb { display: flex; gap: .7rem; align-items: center; background: #e9f1fe; border-radius: 12px; padding: .7rem .8rem; }
.cx-fb p { margin: 0; font-weight: 700; }
.cx-fb-logo { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #1877f2; color: #fff; display: grid; place-items: center; font: 800 1.5rem/1 Arial, sans-serif; }
.cx-fb-btn { justify-self: start; background: #1877f2; border-color: #1877f2; text-decoration: none; }
.cx-encw { display: grid; gap: .5rem; }
.cx-enc { background: #f6f3fd; border-radius: 12px; padding: .7rem .8rem; display: grid; gap: .45rem; }
.cx-enc .btn { justify-self: start; }
.cx-ops { display: grid; gap: .35rem; }
.cx-op { display: flex; gap: .55rem; align-items: center; background: var(--blanco); border: 1px solid #d9cdf3; border-radius: 10px; padding: .55rem .7rem; cursor: pointer; min-height: 44px; }
.cx-op input { width: 1.15rem; height: 1.15rem; accent-color: #7b4fd6; }
.cx-op:has(input:checked) { border-color: #7b4fd6; background: #efe8fd; font-weight: 700; }
.cx-qty { display: grid; gap: .35rem; }
.cx-qty label { display: flex; justify-content: space-between; align-items: center; gap: .6rem; background: var(--blanco); border: 1px solid #d9cdf3; border-radius: 10px; padding: .4rem .5rem .4rem .7rem; }
.cx-qty input { width: 4.2rem; border: 1px solid #9aa9bd; border-radius: 6px; padding: .4rem; font-size: 1rem; text-align: center; }
.cx-ya { margin: 0; color: var(--verde); font-weight: 800; }
.cx-cierre { margin: 0; font-size: .8rem; font-weight: 800; color: #7b4fd6; } .cx-cierre.cerr { color: var(--suave); }
.cx-resfam summary, .cx-det summary { cursor: pointer; font-weight: 800; color: var(--banda); }
.cx-resg h4 { margin: .5rem 0 .3rem; font-size: .9rem; } .cx-resg h4 small { color: var(--suave); font-weight: 700; }
.cx-resg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.cx-resg li { display: flex; justify-content: space-between; gap: .6rem; font-size: .88rem; padding: .25rem .5rem; border-radius: 8px; background: #f4f6fa; }
.cx-resg li.no b { color: var(--ambar); font-weight: 700; font-style: italic; } .cx-resg li.si b { color: var(--tinta); }
.cx-est { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .1rem .55rem; white-space: nowrap; }
.cx-est.ok { background: var(--verde-s); color: var(--verde); } .cx-est.rev { background: var(--ambar-s); color: var(--ambar); } .cx-est.dev { background: #fbe3e6; color: var(--rojo); }
.cx-stats { display: grid; gap: .5rem; border-top: 1px solid var(--linea); padding-top: .5rem; }
.cx-leido { display: grid; gap: .25rem; font-size: .9rem; }
.cx-tbar { display: block; height: .55rem; border-radius: 999px; background: #e6ecf4; overflow: hidden; }
.cx-tbar i { display: block; height: 100%; background: var(--verde); border-radius: 999px; }
.cx-totales { display: grid; gap: .3rem; } .cx-totales h4 { margin: 0; font-size: .9rem; }
.cx-tot { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 2.2rem; gap: .5rem; align-items: center; font-size: .88rem; }
.cx-tot .cx-tbar i { background: #7b4fd6; } .cx-tot b { text-align: right; }
.cx-falta { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .88rem; } .cx-falta small { color: var(--suave); }
.cx-form { display: grid; gap: .8rem; background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: 1rem; }
.cx-form label { display: grid; gap: .25rem; font-weight: 700; font-size: .85rem; color: var(--suave); }
.cx-form input:not([type=checkbox]):not([type=radio]), .cx-form textarea, .cx-form select { border: 1px solid #9aa9bd; border-radius: 6px; padding: .55rem .7rem; font: inherit; color: var(--tinta); font-weight: 400; }
.cx-form fieldset { border: 1px solid var(--linea); border-radius: 12px; padding: .5rem .8rem .8rem; display: grid; gap: .6rem; }
.cx-form legend { font-weight: 800; padding: 0 .3rem; }
.cx-opsf { display: grid; gap: .35rem; } .cx-opf { display: flex; gap: .4rem; } .cx-opf input { flex: 1; min-width: 0; }
.cx-para { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.cx-para label, .cx-gr label, .cx-chk { display: inline-flex !important; gap: .4rem; align-items: center; font-weight: 700; color: var(--tinta) !important; font-size: .9rem !important; min-height: 32px; }
.cx-gr { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: center; } .cx-gr small { width: 100%; font-weight: 800; color: var(--suave); }
#cx-aw { display: grid; gap: .4rem; }
.cx-hit { display: block; width: 100%; text-align: left; border: 1px solid var(--linea); background: var(--blanco); border-radius: 8px; padding: .45rem .6rem; cursor: pointer; font: inherit; margin-top: .25rem; }
.cx-hit small { color: var(--suave); }
.cx-form .acciones, .cx-card .acciones { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
/* mensajes */
.ch { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: .8rem; height: calc(100dvh - 7rem); min-height: 26rem; max-width: 62rem; }
.ch-lista { display: flex; flex-direction: column; gap: .5rem; min-height: 0; }
.ch-lista h2 { margin: 0; } .ch-lista p { margin: 0; } .ch-lista > .btn { align-self: flex-start; }
.ch-items { overflow-y: auto; display: grid; gap: .35rem; align-content: start; }
.ch-item { display: flex; gap: .6rem; align-items: center; text-align: left; background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; padding: .55rem .7rem; cursor: pointer; font: inherit; color: inherit; }
.ch-item.activa { border-color: var(--banda); box-shadow: 0 0 0 2px var(--banda-suave); }
.ch-it { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-it b { line-height: 1.2; } .ch-it small { color: var(--suave); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-it .ch-ult { color: var(--tinta); opacity: .75; }
.ch-h { color: var(--suave); font-size: .7rem; white-space: nowrap; }
.ch-av { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; background: var(--banda-suave); }
.ch-av.titular { background: #fdf3d3; }
.ch-hilo { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ch-vacio { margin: auto; text-align: center; color: var(--suave); } .ch-vacio span { font-size: 2.5rem; }
.ch-cab { display: flex; gap: .6rem; align-items: center; padding: .6rem .8rem; border-bottom: 1px solid var(--linea); }
.ch-cab b { display: block; } .ch-cab small { color: var(--suave); font-size: .78rem; }
.ch-volver { display: none; }
.ch-aviso { margin: 0; background: #fdf3d3; color: #7a5600; font-size: .8rem; font-weight: 700; padding: .4rem .8rem; }
.ch-msgs { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .4rem; background: #f4f6fa; }
.ch-m { display: flex; } .ch-m.yo { justify-content: flex-end; }
.ch-b { max-width: 78%; padding: .5rem .7rem; border-radius: 14px; background: var(--blanco); border: 1px solid var(--linea); line-height: 1.4; overflow-wrap: anywhere; }
.ch-m.yo .ch-b { background: var(--banda); color: #fff; border-color: var(--banda); border-bottom-right-radius: 4px; }
.ch-m.otro .ch-b { border-bottom-left-radius: 4px; }
.ch-t { display: block; font-size: .68rem; opacity: .7; margin-top: .15rem; text-align: right; }
.ch-quien { display: block; font-weight: 800; font-size: .72rem; color: var(--banda); }
.ch-pista { margin: auto; color: var(--suave); text-align: center; max-width: 18rem; }
.ch-escribir { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid var(--linea); align-items: flex-end; }
.ch-escribir textarea { flex: 1; border: 1px solid #9aa9bd; border-radius: 18px; padding: .55rem .8rem; font: inherit; resize: none; max-height: 140px; }
.ch-sl { padding: .6rem .8rem; margin: 0; border-top: 1px solid var(--linea); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 760px) {
  .ch { grid-template-columns: 1fr; height: calc(100dvh - 6rem); }
  .ch.con-hilo .ch-lista { display: none; } .ch:not(.con-hilo) .ch-hilo { display: none; }
  .ch-volver { display: grid; }
}
.cx-chips { align-items: flex-start; } .cx-chip { white-space: nowrap; flex: 0 0 auto; }
.cx label, .cm label, .ag label, .ch label, .ag-form label, .hr label { text-transform: none; letter-spacing: normal; margin-bottom: 0; }
.cx-op, .cx-qty label, .cx-op span { font-size: .95rem; color: var(--tinta); font-weight: 600; }
.cx-card, .cx-form { align-content: start; } .cx-chips { align-content: flex-start; }
.cx-form fieldset { min-width: 0; } .cx-form > *, .cx-form fieldset > * { min-width: 0; }
.cx-form input:not([type=checkbox]):not([type=radio]), .cx-form textarea, .cx-form select { width: 100%; min-width: 0; }
.cx-form .ag-seg.ancho button { padding-inline: .4rem; }

/* ===== v41: Fotos y Tareas ===== */
.ft-sel { display: grid; gap: .4rem; }
.ft-btn { justify-self: start; cursor: pointer; }
.ft-prev { display: flex; flex-wrap: wrap; gap: .4rem; }
.ft-mini { position: relative; width: 4.5rem; height: 4.5rem; border-radius: 10px; overflow: hidden; border: 1px solid var(--linea); }
.ft-mini img { width: 100%; height: 100%; object-fit: cover; }
.ft-mini button { position: absolute; top: 2px; right: 2px; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 0; background: rgba(20, 32, 46, .75); color: #fff; cursor: pointer; font-weight: 800; }
.ft-gal { display: grid; gap: .3rem; border-radius: 12px; overflow: hidden; }
.ft-gal.n1 { grid-template-columns: 1fr; } .ft-gal.n2, .ft-gal.n4 { grid-template-columns: 1fr 1fr; } .ft-gal.n3 { grid-template-columns: 2fr 1fr; }
.ft-gal.n3 .ft-foto:first-child { grid-row: span 2; }
.ft-foto { border: 0; padding: 0; background: #e6ecf4; cursor: zoom-in; display: block; min-height: 0; }
.ft-foto img { display: block; width: 100%; height: 100%; max-height: 22rem; object-fit: cover; aspect-ratio: 4 / 3; }
.ft-gal.n1 .ft-foto img { aspect-ratio: auto; max-height: 26rem; object-fit: contain; background: #e6ecf4; }
.ft-visor { display: grid; gap: .6rem; justify-items: center; }
.ft-visor img { max-width: min(92vw, 60rem); max-height: 75vh; border-radius: 10px; }
.ft-vbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.tr { display: flex; flex-direction: column; gap: .8rem; max-width: 46rem; }
.tr-semana { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.tr-semana button { border: 1px solid var(--linea); background: var(--blanco); border-radius: 12px; padding: .4rem 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; font: inherit; color: inherit; }
.tr-semana button small { font-size: .7rem; font-weight: 800; color: var(--suave); text-transform: capitalize; }
.tr-semana button b { font-size: 1.2rem; }
.tr-semana button.hoy b { background: #f2b705; border-radius: 8px; padding: 0 .35rem; }
.tr-semana button[aria-pressed="true"] { background: var(--banda); border-color: var(--banda); color: #fff; } .tr-semana button[aria-pressed="true"] small, .tr-semana button[aria-pressed="true"] .tr-n { color: #fff; }
.tr-n { font-size: .65rem; font-weight: 800; color: var(--suave); } .tr-n.si { color: var(--verde); }
.tr-dia { text-transform: none; margin: 0; }
.tr-lista { display: grid; gap: .6rem; }
.tr-card { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .5rem; border-left: 5px solid #2b7a53; }
.tr-card header { display: flex; gap: .6rem; align-items: center; } .tr-card header > div { flex: 1; min-width: 0; }
.tr-card header b { display: block; font-size: 1.05rem; } .tr-card header small { color: var(--suave); font-weight: 700; font-size: .78rem; }
.tr-ic { font-size: 1.5rem; } .tr-txt { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
body[data-nivel="pre"] .tr-semana button[aria-pressed="true"] { background: #1d2540; border-color: #1d2540; }
body[data-nivel="pre"] .tr-card { border-left-color: #d6249f; border-radius: 18px; }

/* barra "Estás viendo a…" de las familias */
#hijobar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: #fff8e1; border-bottom: 2px solid #f2b705; padding: .5rem max(16px, env(safe-area-inset-right, 0px)) .5rem max(16px, env(safe-area-inset-left, 0px)); }
#hijobar[hidden] { display: none; }
.hb-et { font-weight: 800; font-size: .8rem; color: #7a5600; }
.hb-l { display: flex; gap: .4rem; overflow-x: auto; flex: 1; min-width: 0; }
.hb-l button { flex: 0 0 auto; display: flex; align-items: center; gap: .45rem; border: 2px solid #f0d58a; background: #fff; border-radius: 999px; padding: .2rem .8rem .2rem .25rem; cursor: pointer; font: inherit; color: var(--tinta); text-align: left; line-height: 1.1; min-height: 44px; }
.hb-l button b { display: block; font-size: .95rem; } .hb-l button small { color: var(--suave); font-weight: 700; font-size: .72rem; }
.hb-l button[aria-pressed="true"] { border-color: var(--banda); background: var(--banda); color: #fff; } .hb-l button[aria-pressed="true"] small { color: #fff; opacity: .85; }
.hb-l button:disabled { cursor: default; opacity: 1; }
.hb-av { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #e6ecf4; color: var(--banda); }
.hb-av.preescolar { background: #ffe0ef; color: #b0157d; }

@media (max-width: 900px) { #hijobar { top: 59px; } }

/* ===== v41: Ventas y pedidos ===== */
.vt { display: flex; flex-direction: column; gap: .8rem; max-width: 50rem; }
.vt .cx-cab h2 { margin: .3rem 0 0; }
.vt-card { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .6rem; border-left: 5px solid #e8801c; }
.vt-card header { display: flex; gap: .6rem; align-items: flex-start; } .vt-card header > div { flex: 1; min-width: 0; }
.vt-card header b { display: block; font-size: 1.05rem; } .vt-card header small { color: var(--suave); font-weight: 700; font-size: .78rem; }
.vt-est { font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; background: #eef1f5; color: var(--suave); }
.vt-est.ok { background: var(--verde-s); color: var(--verde); } .vt-est.par { background: var(--ambar-s); color: var(--ambar); } .vt-est.pen { background: #fbe3e6; color: var(--rojo); }
.vt-prods { display: grid; gap: .4rem; }
.vt-prod { display: flex; align-items: center; gap: .6rem; background: #fff8ef; border: 1px solid #f6dfc0; border-radius: 12px; padding: .45rem .6rem; }
.vt-pe { font-size: 1.5rem; } .vt-pn { flex: 1; min-width: 0; } .vt-pn b { display: block; line-height: 1.2; } .vt-pn small { color: var(--suave); font-weight: 700; }
.vt-ctl { display: flex; align-items: center; gap: .25rem; }
.vt-ctl input { width: 3rem; text-align: center; border: 1px solid #9aa9bd; border-radius: 8px; padding: .4rem .2rem; font-size: 1.05rem; font-weight: 800; }
.vt-q { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--banda); background: var(--blanco); color: var(--banda); font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.vt-cant { font-size: 1.2rem; padding: 0 .6rem; }
.vt-tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px dashed #f6dfc0; padding-top: .5rem; margin: 0; font-weight: 800; }
.vt-tot b { font-size: 1.35rem; color: var(--banda); font-variant-numeric: tabular-nums; }
.vt-pago { margin: 0; color: var(--verde); }
.vt-card > .btn { justify-self: start; }
.vt-lista { display: grid; gap: .45rem; }
.vt-item { display: flex; gap: .6rem; align-items: center; text-align: left; background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; padding: .6rem .8rem; cursor: pointer; font: inherit; color: inherit; }
.vt-item > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; } .vt-item small { color: var(--suave); font-size: .78rem; }
.vt-res { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.vt-res > div { background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; padding: .5rem .6rem; display: flex; flex-direction: column; }
.vt-res small { color: var(--suave); font-weight: 700; font-size: .72rem; } .vt-res b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
#vt-corte { justify-self: start; }
.vt-ninos { display: grid; gap: .4rem; }
.vt-nino { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .6rem; align-items: center; background: var(--blanco); border: 1px solid var(--linea); border-left: 5px solid #d3dae5; border-radius: 12px; padding: .55rem .7rem; }
.vt-nino.ok { border-left-color: var(--verde); } .vt-nino.par { border-left-color: var(--ambar); } .vt-nino.pen { border-left-color: var(--rojo); }
.vt-nn { min-width: 0; display: flex; flex-direction: column; } .vt-nn small { color: var(--suave); font-size: .72rem; } .vt-nn .vt-it { color: var(--tinta); font-size: .82rem; font-weight: 700; }
.vt-acc { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; }
.vt-cortes { margin: .3rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
.vt-ent { display: grid; gap: .35rem; }
.vt-el { display: flex !important; gap: .6rem; align-items: center; background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; padding: .55rem .7rem; color: var(--tinta) !important; font-size: .95rem !important; }
.vt-el input { width: 1.4rem; height: 1.4rem; } .vt-el span { flex: 1; min-width: 0; } .vt-el b { display: block; } .vt-el small { color: var(--suave); font-weight: 700; }
.vt-el em { font-style: normal; font-size: .72rem; font-weight: 800; background: var(--ambar-s); color: var(--ambar); border-radius: 999px; padding: .1rem .5rem; }
.vt-el:has(input:checked) { background: var(--verde-s); }
.vt-ins { display: grid; gap: .4rem; }
.vt-in { display: grid; grid-template-columns: auto minmax(0, 1fr) repeat(3, 4.6rem); gap: .5rem; align-items: center; background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; padding: .5rem .7rem; }
.vt-n { text-align: center; font-weight: 800; font-size: 1.15rem; line-height: 1; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; } .vt-n small { font-size: .62rem; color: var(--suave); font-weight: 700; margin-top: .15rem; }
.vt-n.ok { color: var(--verde); } .vt-n.pen { color: var(--ambar); }
.vt-cortes2 { display: grid; gap: .35rem; } .vt-cr { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: var(--ambar-s); border-radius: 10px; padding: .45rem .7rem; flex-wrap: wrap; }
.vt-pf { display: grid; gap: .35rem; margin-bottom: .4rem; } .vt-pfr { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem auto; gap: .35rem; }
.vt-epl { display: flex !important; justify-content: space-between; align-items: center; gap: .6rem; } .vt-epl input { width: 4.5rem; }
@media (max-width: 480px) { .vt-res { grid-template-columns: 1fr 1fr; } .vt-in { grid-template-columns: auto minmax(0, 1fr) repeat(3, 3.6rem); } }
.hb-uno { display: inline-flex; align-items: center; gap: .45rem; } .hb-uno small { color: var(--suave); font-weight: 700; font-size: .78rem; }

/* ===== v41: Inicio y barra de abajo para familias ===== */
body.familia #menu-btn, body.familia .lateral, body.familia #velo { display: none !important; }
body.familia #app { display: block; }
body.familia .top { display: flex !important; align-items: center; gap: .6rem; position: sticky; top: 0; z-index: 20; padding: .5rem 1rem; border-bottom: 3px solid var(--marca-rojo); }
body.familia main#main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); max-width: 46rem; margin-inline: auto; }
body.familia #hijobar { top: 59px; justify-content: center; }
#barrafam { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--blanco); border-top: 1px solid var(--linea); box-shadow: 0 -4px 16px rgba(0, 39, 71, .08); padding: .25rem max(.25rem, env(safe-area-inset-right, 0px)) calc(.25rem + env(safe-area-inset-bottom, 0px)) max(.25rem, env(safe-area-inset-left, 0px)); }
#barrafam button { position: relative; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .35rem 0 .3rem; color: var(--suave); font: inherit; font-size: .7rem; font-weight: 800; cursor: pointer; border-radius: 12px; min-height: 52px; }
#barrafam button[aria-current="true"] { color: var(--banda); }
#barrafam button[aria-current="true"] svg { background: var(--banda-suave); border-radius: 999px; padding: 2px 14px; box-sizing: content-box; }
#barrafam em { position: absolute; top: .15rem; left: calc(50% + .45rem); font-style: normal; background: var(--titulo); color: #fff; border-radius: 999px; min-width: 1.15rem; height: 1.15rem; font-size: .66rem; display: grid; place-items: center; padding: 0 .25rem; }
body[data-nivel="pre"] #barrafam button[aria-current="true"] { color: #b0157d; } body[data-nivel="pre"] #barrafam button[aria-current="true"] svg { background: #ffe0ef; }
@media (min-width: 900px) { #barrafam { left: 50%; right: auto; transform: translateX(-50%); width: 34rem; bottom: .8rem; border: 1px solid var(--linea); border-radius: 20px; padding-bottom: .25rem; } }
.mas-hoja { display: grid; gap: .8rem; min-width: min(26rem, 88vw); }
.mas-hoja h3 { margin: 0; }
.mas-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.mas-t { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; border: 1px solid var(--linea); background: var(--blanco); border-radius: 16px; padding: .7rem .8rem; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 5.2rem; }
.mas-t:active { background: var(--banda-suave); }
.mas-e { font-size: 1.7rem; line-height: 1; margin-bottom: .2rem; } .mas-t small { color: var(--suave); font-size: .75rem; }
.mas-cuenta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; border-top: 1px solid var(--linea); padding-top: .6rem; } .mas-cuenta span { flex: 1; color: var(--suave); font-weight: 700; font-size: .85rem; }
#mas-x { justify-self: stretch; }
.ini { display: flex; flex-direction: column; gap: 1rem; }
.ini-hola p { margin: 0; color: var(--suave); font-weight: 700; } .ini-hola h2 { margin: .1rem 0 0; font-size: 1.8rem; } .ini-hola h2::after { display: none; } .ini-hola span { color: var(--suave); font-weight: 700; }
.ini-hoy { background: var(--blanco); border: 1px solid var(--linea); border-radius: 20px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 39, 71, .06); }
.ini-hoy-c { display: flex; gap: .8rem; align-items: center; padding: 1rem; background: linear-gradient(135deg, #e7f3ff, #f4f6fa); }
.ini-hoy.sin .ini-hoy-c { background: linear-gradient(135deg, #d3ecdf, #eef8e4); }
.ini-big { font-size: 2.6rem; line-height: 1; }
.ini-hoy-c small { display: block; color: var(--suave); font-weight: 800; font-size: .75rem; } .ini-hoy-c b { font-size: 1.35rem; } .ini-hoy-c span { display: block; font-weight: 700; }
.ini-chips { display: flex; flex-wrap: wrap; gap: .35rem; padding: .7rem 1rem 0; } .ini-chips:empty { display: none; }
.ini-chip { border-radius: 999px; padding: .25rem .7rem; font-weight: 800; font-size: .85rem; background: #fdf3d3; } .ini-chip small { color: var(--suave); font-weight: 700; }
.ini-chip.ev { background: #e2f1e9; }
.ini-filas { display: grid; padding: .5rem; }
.ini-fila { display: grid; grid-template-columns: 2rem 5.2rem minmax(0, 1fr) 1rem; align-items: center; gap: .3rem; border: 0; background: transparent; border-radius: 12px; padding: .65rem .5rem; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.ini-fila + .ini-fila { border-top: 1px solid var(--linea); border-radius: 0; }
.ini-fila span { font-size: 1.3rem; } .ini-fila em { font-style: normal; color: var(--suave); font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ini-fila i { font-style: normal; color: var(--suave); font-size: 1.3rem; }
.ini-h { margin: 0 0 .5rem; font-size: 1rem; text-transform: none; }
.ini-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.ini-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; border: 0; border-radius: 18px; padding: .8rem; text-align: left; font: inherit; color: var(--tinta); cursor: pointer; min-height: 6rem; }
.ini-tile b { line-height: 1.2; } .ini-tile small { color: var(--suave); font-weight: 700; font-size: .75rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ini-te { font-size: 1.6rem; line-height: 1; margin-bottom: .2rem; }
.ini-tile.morado { background: #efe8fd; } .ini-tile.azul { background: #e1ecf8; } .ini-tile.rojo { background: #fde7e5; } .ini-tile.naranja { background: #fff0dc; }
.ini-ok { background: var(--verde-s); color: var(--verde); border-radius: 16px; padding: .8rem 1rem; font-weight: 800; }
.ini-prox, .ini-av { display: grid; gap: .4rem; }
.ini-pr, .ini-a { display: flex; align-items: center; gap: .7rem; border: 1px solid var(--linea); background: var(--blanco); border-radius: 14px; padding: .55rem .7rem; text-align: left; font: inherit; color: inherit; cursor: pointer; min-height: 48px; }
.ini-fe { display: flex; flex-direction: column; align-items: center; width: 2.6rem; border-radius: 10px; background: var(--banda-suave); padding: .15rem 0; line-height: 1.05; } .ini-fe b { font-size: 1.1rem; } .ini-fe small { font-size: .65rem; font-weight: 800; color: var(--suave); text-transform: uppercase; }
.ini-a > span:first-child { font-size: 1.3rem; } .ini-a > span:nth-child(2) { flex: 1; min-width: 0; } .ini-a b { display: block; line-height: 1.2; } .ini-a small { color: var(--suave); font-size: .75rem; }
.ini-a em { font-style: normal; background: var(--titulo); color: #fff; border-radius: 999px; padding: .05rem .5rem; font-size: .68rem; font-weight: 800; }
.ini-a.nuevo { border-color: #f3b8bf; }
.ini-todos { margin-top: .5rem; }
body[data-nivel="pre"] .ini-hoy, body[data-nivel="pre"] .ini-tile, body[data-nivel="pre"] .ini-pr, body[data-nivel="pre"] .ini-a { border-radius: 22px; }
body[data-nivel="pre"] .ini-hoy-c { background: linear-gradient(135deg, #fff3d6, #ffeaf1 60%, #e7f3ff); }

/* ---- justificantes ---- */
.jf { display: grid; gap: 1rem; }
.jf-mot { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .45rem; }
.jf-mot button { overflow-wrap: anywhere; font-size: .95rem; display: flex; align-items: center; gap: .45rem; border: 2px solid var(--linea); background: var(--blanco); border-radius: 12px; padding: .55rem .7rem; font: inherit; font-weight: 800; color: var(--tinta); cursor: pointer; min-height: 48px; text-align: left; }
.jf-mot button span { font-size: 1.3rem; }
.jf-mot button[aria-pressed="true"] { border-color: var(--banda); background: color-mix(in srgb, var(--banda) 10%, #fff); box-shadow: 0 0 0 1px var(--banda) inset; }
.jf-fechas { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.jf-form #jf-n { margin: -.4rem 0 0; }
.jf-lbl { display: block; font-weight: 700; font-size: .85rem; color: var(--suave); margin-bottom: .3rem; }
.jf-env { justify-self: stretch; min-height: 48px; font-size: 1rem; }
.jf-lista { display: grid; gap: .7rem; }
.jf-card { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .5rem; border-left: 5px solid #e0a106; }
.jf-card.ok { border-left-color: #2e9d57; } .jf-card.no { border-left-color: #c8333f; }
.jf-card header { display: flex; gap: .6rem; align-items: flex-start; } .jf-card header > div { flex: 1; min-width: 0; }
.jf-card header b { display: block; font-size: 1.05rem; line-height: 1.25; }
.jf-card header small { display: block; color: var(--suave); font-weight: 700; font-size: .8rem; }
.jf-card header small.jf-f { color: var(--tinta); font-weight: 600; margin-top: .1rem; }
.jf-est { flex: 0 0 auto; border-radius: 999px; padding: .2rem .6rem; font-size: .78rem; font-weight: 800; background: #fff4d6; color: #7a5600; white-space: nowrap; }
.jf-est.ok { background: #e3f5ea; color: #1d6b3a; } .jf-est.no { background: #fde7e9; color: #9b1c27; }
.jf-resp { margin: 0; background: #f4f6fa; border-radius: 10px; padding: .5rem .7rem; font-size: .92rem; }
.jf-card footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.jf-acc { display: flex; gap: .4rem; flex-wrap: wrap; margin-left: auto; }
.jf-no { display: grid; gap: .5rem; width: 100%; }
.jf-no label { display: grid; gap: .25rem; font-weight: 700; font-size: .85rem; color: var(--suave); }
.jf-no input { border: 1px solid #9aa9bd; border-radius: 6px; padding: .5rem .7rem; font: inherit; width: 100%; }
.ag-seg em { font-style: normal; background: var(--titulo); color: #fff; border-radius: 999px; padding: 0 .4rem; font-size: .75rem; margin-left: .2rem; }
.ag-seg em.gris { background: #8795a8; }
.ini-fila.jf-avisada em { color: #1d6b3a; }
@media (max-width: 420px) { .jf-card header { flex-wrap: wrap; } .jf-est { order: 3; margin-left: 2.1rem; } }

/* ---- quién recoge ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rc { display: grid; gap: 1rem; }
.rc-lista { display: grid; gap: .6rem; }
.rc-p { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: .7rem; align-items: center; background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .6rem .8rem; }
.rc-p.pen { border-style: dashed; } .rc-p.no { opacity: .8; }
.rc-av { width: 3.4rem; height: 3.4rem; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #e6ecf5; color: var(--banda); font-weight: 800; font-size: 1.1rem; cursor: zoom-in; }
.rc-av.ini { cursor: default; }
.rc-av.grande { width: 5rem; height: 5rem; font-size: 1.5rem; }
.rc-pd { display: grid; gap: .2rem; justify-items: start; min-width: 0; }
.rc-pd b { font-size: 1.02rem; line-height: 1.2; }
.rc-pd small { color: var(--suave); font-weight: 700; font-size: .82rem; }
.rc-pd a, .rc-aviso a { color: var(--banda); font-weight: 800; text-decoration: none; white-space: nowrap; }
.rc-tag { font-size: .75rem; font-weight: 700; color: var(--suave); }
.rc-x { border: 0; background: transparent; color: var(--suave); font-size: 1.1rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.rc-x:hover { background: #f1f3f7; color: var(--titulo); }
.rc-p .jf-acc { grid-column: 1 / -1; }
.rc-add { justify-self: stretch; min-height: 48px; margin-top: .7rem; }
.rc-hoy-btn { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) 1rem; grid-template-rows: auto auto; column-gap: .5rem; align-items: center; text-align: left; border: 2px dashed #e8801c; background: #fff8ef; border-radius: 14px; padding: .8rem 1rem; font: inherit; color: var(--tinta); cursor: pointer; min-height: 56px; }
.rc-hoy-btn > span { grid-row: 1 / 3; font-size: 1.7rem; } .rc-hoy-btn b { font-size: 1rem; } .rc-hoy-btn small { color: var(--suave); font-weight: 700; } .rc-hoy-btn i { grid-row: 1 / 3; grid-column: 3; font-style: normal; font-size: 1.4rem; color: var(--suave); }
.rc-aviso { background: var(--blanco); border: 1px solid var(--linea); border-left: 5px solid #e8801c; border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .5rem; }
.rc-aviso.ok { border-left-color: #2e9d57; } .rc-aviso.no { border-left-color: #c8333f; }
.rc-aviso-c { display: flex; gap: .8rem; align-items: center; }
.rc-aviso-c > div { display: grid; gap: .15rem; justify-items: start; min-width: 0; }
.rc-aviso-c b { font-size: 1.1rem; line-height: 1.2; } .rc-aviso-c small { color: var(--suave); font-weight: 700; font-size: .82rem; }
.rc-aviso-c small.rc-cuando { color: #b35c00; text-transform: none; }
.rc-aviso > .btn { justify-self: start; }
.rc-hoja { padding: 1rem; } .rc-hoja .cx-form { border: 0; padding: 0; }
.rc-par { display: flex; flex-wrap: wrap; gap: .4rem; }
.rc-par button { border: 2px solid var(--linea); background: var(--blanco); border-radius: 999px; padding: .4rem .8rem; font: inherit; font-weight: 700; cursor: pointer; min-height: 40px; }
.rc-par button[aria-pressed="true"] { border-color: var(--banda); background: var(--banda); color: #fff; }
.cx-form .rc-chk { display: flex; align-items: center; gap: .5rem; color: var(--tinta); font-size: .95rem; }
.cx-form .rc-chk input { width: 1.2rem; height: 1.2rem; }
.rc-busca input { width: 100%; border: 1px solid #9aa9bd; border-radius: 10px; padding: .65rem .8rem; font: inherit; }
.rc-alus { display: grid; gap: .4rem; }
.rc-alu { background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; }
.rc-alu.ab { box-shadow: 0 4px 14px rgba(0, 39, 71, .1); }
.rc-alu-b { display: grid; grid-template-columns: minmax(0, 1fr) 1rem; grid-template-rows: auto auto; column-gap: .5rem; width: 100%; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; padding: .65rem .9rem; cursor: pointer; min-height: 52px; }
.rc-alu-b b { font-size: 1rem; } .rc-alu-b small { color: var(--suave); font-weight: 700; font-size: .8rem; } .rc-alu-b i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; color: var(--suave); font-size: 1.2rem; }
.rc-falta { color: #b3261e; } .rc-hoyt { color: #b35c00; }
.rc-alu-l { display: grid; gap: .5rem; padding: 0 .7rem .8rem; }
.rc-para { display: grid; gap: .3rem; } .rc-para > small { color: var(--suave); font-weight: 700; }

/* ---- barra de abajo para el personal (solo celular) ---- */
@media (min-width: 901px) { body.barra-staff #barrafam { display: none; } }
@media (max-width: 900px) {
  body.barra-staff #menu-btn { display: none; }
  body.barra-staff main#main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
}
.mp-sec { display: grid; gap: .4rem; }
.mp-sec h4 { margin: .2rem 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--suave); }
.mp-t { position: relative; display: block; width: 100%; border: 1px solid var(--linea); background: var(--blanco); border-radius: 16px; padding: .7rem .8rem .7rem 2.9rem; text-align: left; font: inherit; color: var(--tinta); cursor: pointer; min-height: 52px; }
.mp-t .mp-i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--banda); line-height: 0; }
.mp-t .mp-i svg { width: 22px; height: 22px; display: block; }
.mp-t .mp-l { display: block; color: var(--tinta); font-weight: 800; font-size: .92rem; line-height: 1.2; overflow-wrap: anywhere; }
.mp-t:active { background: var(--banda-suave); }
.mp-t.act { border-color: var(--banda); background: var(--banda-suave); }
.mp-t em { position: absolute; top: .3rem; right: .4rem; font-style: normal; background: var(--titulo); color: #fff; border-radius: 999px; min-width: 1.15rem; height: 1.15rem; font-size: .66rem; display: grid; place-items: center; padding: 0 .3rem; }
.mas-hoja { max-height: 86vh; overflow-y: auto; }
.ip-larga em { white-space: normal; }
.ip-int { font-size: .7rem; font-weight: 800; color: #7b4fd6; background: #f0eafc; border-radius: 999px; padding: .05rem .4rem; margin-left: .2rem; }
/* por aprobar */
.ap { display: grid; gap: 1rem; }
.ap-b { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .9rem 1rem; display: grid; gap: .6rem; }
.ap-b header { display: flex; align-items: center; gap: .6rem; } .ap-b header span { font-size: 1.5rem; } .ap-b h3 { margin: 0; flex: 1; font-size: 1.05rem; }
.ap-b header em { font-style: normal; background: var(--titulo); color: #fff; border-radius: 999px; min-width: 1.8rem; text-align: center; padding: .1rem .5rem; font-weight: 800; }
.ap-b header em.cero { background: #e3f5ea; color: #1d6b3a; }
.ap-b ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; } .ap-b li { border-bottom: 1px dashed var(--linea); padding-bottom: .3rem; } .ap-b li small { color: var(--suave); font-weight: 700; }
.ap-b .btn { justify-self: start; min-height: 44px; } .ap-b p { margin: 0; }
/* Safari: sin flex dentro de los botones de "Más" */
.mas-t { display: block; } .mas-t > .mas-e, .mas-t > b, .mas-t > small { display: block; } .mas-t > b { color: var(--tinta); }

/* ---- avisos de pago ---- */
#pagobar { display: grid; gap: 1px; background: #f3c6a5; }
#pagobar .pg-l { display: flex; gap: .6rem; align-items: flex-start; background: #fff3e6; padding: .55rem max(16px, env(safe-area-inset-left, 0px)); color: #6b3500; }
#pagobar .pg-l.venc { background: #fde7e9; color: #8a1c25; }
#pagobar .pg-l > span { font-size: 1.2rem; line-height: 1.3; } #pagobar p { margin: 0; font-size: .9rem; line-height: 1.35; max-width: 46rem; }
#pagobar em { font-style: normal; font-weight: 800; background: #c8333f; color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .72rem; margin-left: .2rem; }
body.familia #pagobar { max-width: none; }
.pg { display: grid; gap: 1rem; }
.pg-res { display: grid; gap: .3rem; }
.pg-res button, .pg-sel { display: flex; justify-content: space-between; align-items: center; gap: .5rem; border: 1px solid var(--linea); background: var(--blanco); border-radius: 10px; padding: .55rem .8rem; font: inherit; text-align: left; cursor: pointer; color: var(--tinta); }
.pg-res small, .pg-sel small { color: var(--suave); font-weight: 700; margin-left: .4rem; }
.pg-sel { background: var(--banda-suave); border-color: var(--banda); cursor: default; }
.pg-dos { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pg-prev { margin: 0; }
.pg-lista { display: grid; gap: .6rem; }
.pg-c { display: flex; gap: .7rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--blanco); border: 1px solid var(--linea); border-left: 5px solid #e8801c; border-radius: 14px; padding: .7rem .9rem; }
.pg-c.hist { border-left-color: #2e9d57; opacity: .85; }
.pg-c > div { display: grid; gap: .15rem; min-width: 0; } .pg-c > div > small { color: var(--suave); font-weight: 700; font-size: .8rem; } .pg-c p { margin: .1rem 0; }

/* ---- alumno bloqueado por Administración ---- */
.bloq-pant { text-align: center; background: var(--blanco); border: 1px solid var(--linea); border-top: 5px solid #c8333f; border-radius: 16px; padding: 2rem 1.3rem; display: grid; gap: .6rem; justify-items: center; margin-top: .5rem; }
.bloq-ic { font-size: 3rem; line-height: 1; } .bloq-pant h2 { margin: 0; font-size: 1.3rem; } .bloq-pant p { margin: 0; max-width: 32rem; line-height: 1.5; }

/* ---- notificaciones ---- */
.pu-st { display: flex; gap: .7rem; align-items: flex-start; background: #f4f6fa; border-radius: 12px; padding: .7rem .8rem; }
.pu-st > span { font-size: 1.6rem; line-height: 1; } .pu-st b { display: block; } .pu-st small { color: var(--suave); font-weight: 600; }
.pu-st.ok { background: #e3f5ea; } .pu-st.no { background: #fde7e9; }
.pu-act { min-height: 48px; }
.pu-cats { border: 1px solid var(--linea); border-radius: 12px; padding: .4rem .8rem .7rem; display: grid; gap: .1rem; min-width: 0; }
.pu-cats legend { font-weight: 800; padding: 0 .3rem; }
.pu-c { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--linea); cursor: pointer; }
.pu-c > span:first-child { font-size: 1.3rem; } .pu-c b { display: block; font-size: .95rem; } .pu-c small { color: var(--suave); font-size: .8rem; }
.pu-c input { appearance: none; -webkit-appearance: none; width: 2.9rem; height: 1.7rem; border-radius: 999px; background: #c5ccd8; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.pu-c input::after { content: ''; position: absolute; top: 3px; left: 3px; width: calc(1.7rem - 6px); height: calc(1.7rem - 6px); border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.pu-c input:checked { background: #2e9d57; } .pu-c input:checked::after { transform: translateX(1.2rem); }
.pu-c input:focus-visible { outline: 3px solid var(--banda); outline-offset: 2px; }
.pu-cats p { margin: .5rem 0 0; }
.pu-inv { display: flex; gap: .7rem; align-items: flex-start; background: linear-gradient(135deg, #fff8e1, #fff); border: 2px solid #f2b705; border-radius: 16px; padding: .8rem .9rem; }
.pu-inv > span { font-size: 1.8rem; line-height: 1; } .pu-inv b { display: block; } .pu-inv small { display: block; color: var(--suave); font-weight: 600; margin: .1rem 0 .5rem; }
.pu-inv-b { display: flex; gap: .4rem; flex-wrap: wrap; }
/* simulación de notificación en el demo */
.pu-sim { position: fixed; top: max(10px, env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(24rem, calc(100vw - 20px)); z-index: 100; background: rgba(250, 250, 252, .97); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: .7rem .8rem; display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; animation: sube .25s ease-out both; }
.pu-sim img { width: 38px; height: 38px; border-radius: 9px; } .pu-sim b { display: block; font-size: .92rem; } .pu-sim span { font-size: .88rem; line-height: 1.3; color: #333; } .pu-sim small { display: block; font-size: .72rem; color: #888; text-transform: uppercase; letter-spacing: .03em; }
.pu .pu-c, .pu .pu-c b, .pu .pu-c small { text-transform: none; letter-spacing: normal; }
.pu .pu-c { font-weight: 400; color: var(--tinta); font-size: 1rem; }
.pu .pu-c b { font-weight: 800; } .pu .pu-c small { font-weight: 600; }
.pu .pu-c input[type=checkbox] { width: 2.9rem; min-width: 2.9rem; height: 1.7rem; min-height: 0; padding: 0; border: 0; flex: none; box-sizing: border-box; }
.vt-ctl-v { display: flex; gap: .4rem; flex-wrap: wrap; }
.vt-plazo { margin: 0; background: #e3f5ea; color: #1d5b33; border-radius: 10px; padding: .5rem .7rem; font-size: .9rem; font-weight: 600; }
.vt-plazo.cerr { background: #f4f6fa; color: var(--tinta); }

/* ---- privacidad y reglas ---- */
.doc-hoja { display: grid; gap: .8rem; max-width: 38rem; max-height: 88vh; overflow-y: auto; }
.doc-txt { line-height: 1.55; font-size: .95rem; }
.doc-txt h3 { margin: .2rem 0 .3rem; } .doc-txt h4 { margin: 1rem 0 .3rem; font-size: 1rem; color: var(--banda); }
.doc-txt ul, .doc-txt ol { padding-left: 1.2rem; margin: .3rem 0; } .doc-txt li { margin-bottom: .35rem; } .doc-txt p { margin: .3rem 0; }
.doc-acepta { text-align: left; }
.doc-logo { justify-self: center; border-radius: 50%; background: #fff; }
.doc-acepta h3 { margin: 0; text-align: center; } .doc-acepta > p.suave { margin: 0; text-align: center; }
.doc-res { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.doc-res li { display: flex; gap: .6rem; align-items: flex-start; background: var(--blanco); border: 1px solid var(--linea); border-radius: 12px; padding: .55rem .7rem; font-size: .93rem; line-height: 1.4; }
.doc-res li > span:first-child { font-size: 1.3rem; line-height: 1.2; }
.doc-links { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin: 0; }
.doc-chk { display: flex; gap: .6rem; align-items: flex-start; background: #fff8e1; border: 2px solid #f2b705; border-radius: 12px; padding: .7rem .8rem; cursor: pointer; text-transform: none; letter-spacing: normal; font-weight: 700; color: var(--tinta); font-size: .93rem; line-height: 1.4; }
.doc-chk input { width: 1.4rem; height: 1.4rem; min-width: 1.4rem; margin: 0; }
.doc-entrar { min-height: 50px; font-size: 1.05rem; } .doc-entrar:disabled { opacity: .45; cursor: not-allowed; }
.doc-salir { justify-self: center; }
.lnk { border: 0; background: none; padding: 0; font: inherit; color: var(--banda); text-decoration: underline; cursor: pointer; }

/* Celulares y Mac en modo oscuro: el sistema pintaba de blanco el texto de las ventanas (dialog) sobre fondo claro */
:root { color-scheme: light; }
dialog, #modal { color: var(--tinta); }

/* ---- recorrido de bienvenida ---- */
.rec { position: fixed; inset: 0; z-index: 200; }
.rec.sin { background: rgba(10, 22, 40, .62); }
.rec-luz { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(10, 22, 40, .62), 0 0 0 3px #f2b705 inset; transition: all .25s ease; pointer-events: none; }
.rec-bur { position: fixed; background: #fff; color: var(--tinta); border-radius: 16px; padding: .9rem 1rem .8rem; box-shadow: 0 12px 34px rgba(0, 0, 0, .3); width: min(340px, calc(100vw - 24px)); transition: top .25s ease, left .25s ease; }
.rec-bur::before { content: ''; position: absolute; left: calc(var(--fx, 50%) - 9px); width: 18px; height: 18px; background: #fff; transform: rotate(45deg); border-radius: 3px; }
.rec-bur[data-f="arriba"]::before { top: -8px; } .rec-bur[data-f="abajo"]::before { bottom: -8px; }
.rec.sin .rec-bur::before { display: none; }
.rec-cab { display: flex; align-items: center; gap: .5rem; } .rec-cab span { font-size: 1.6rem; line-height: 1; } .rec-cab b { font-size: 1.1rem; }
.rec-bur p { margin: .45rem 0 .7rem; line-height: 1.45; font-size: .97rem; }
.rec-pie { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.rec-pts { display: flex; gap: 4px; margin-right: auto; } .rec-pts i { width: 7px; height: 7px; border-radius: 50%; background: #d3d9e3; } .rec-pts i.on { background: var(--banda); width: 18px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .rec-luz, .rec-bur { transition: none; } }
.version-app { margin: .4rem 0 0; font-size: .75rem; color: var(--suave); text-align: center; letter-spacing: .02em; }
.quien .version-app { color: inherit; opacity: .7; text-align: left; flex-basis: 100%; }
/* motivos del justificante: ícono arriba y palabra completa (sin cortar "Enfermedad") */
.jf-mot { grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); }
.jf-mot button { flex-direction: column; justify-content: center; text-align: center; gap: .15rem; overflow-wrap: normal; padding: .55rem .3rem; min-height: 64px; font-size: .9rem; }

/* ===== Bitácora de incidencias ===== */
.bi { display: grid; gap: .8rem; }
.bi .cx-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.bi-busca input { width: 100%; min-height: 44px; border: 2px solid var(--linea); border-radius: 12px; padding: .5rem .8rem; font: inherit; background: var(--blanco); color: var(--tinta); }
.bi-lista { display: grid; gap: .7rem; }
.bi-card { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .55rem; border-left: 5px solid #e0a106; }
.bi-card.seg { border-left-color: #3b6fd8; } .bi-card.ok { border-left-color: #2e9d57; }
.bi-card header { display: flex; gap: .6rem; align-items: flex-start; } .bi-card header > div { flex: 1; min-width: 0; }
.bi-card header b { display: block; font-size: 1.05rem; line-height: 1.25; }
.bi-card header small { display: block; color: var(--suave); font-weight: 700; font-size: .8rem; margin-top: .1rem; }
.jf-est.seg { background: #e6eefc; color: #1f4aa8; }
.bi-als { display: flex; flex-wrap: wrap; gap: .35rem; }
.bi-al, .bi-chip { display: inline-flex; align-items: baseline; gap: .3rem; border-radius: 999px; padding: .2rem .65rem; background: #eef1f7; color: var(--tinta); font-weight: 800; font-size: .85rem; }
.bi-al small, .bi-chip small { color: var(--suave); font-weight: 700; font-size: .72rem; }
.bi-chip { border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: .85rem; }
.bi-acc { margin: 0; background: #f4f7fb; border-radius: 10px; padding: .5rem .7rem; font-size: .92rem; }
.bi-fam { margin: 0; font-size: .82rem; font-weight: 800; } .bi-fam.si { color: #1d6b3a; } .bi-fam.no { color: #9a5a00; }
.bi-coms { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; border-top: 1px dashed var(--linea); padding-top: .5rem; }
.bi-coms li { background: #f7f8fb; border-radius: 10px; padding: .45rem .65rem; font-size: .9rem; }
.bi-coms li small { color: var(--suave); font-weight: 700; } .bi-coms li p { margin: .15rem 0 0; }
.bi-comf { display: flex; gap: .4rem; align-items: flex-end; }
.bi-comf textarea { flex: 1; min-height: 40px; resize: vertical; border: 2px solid var(--linea); border-radius: 10px; padding: .45rem .6rem; font: inherit; background: var(--blanco); color: var(--tinta); }
.bi-card footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.bi-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.bi-form legend { font-weight: 800; margin-bottom: .35rem; }
.bi-lug { display: flex; flex-wrap: wrap; gap: .35rem; }
.bi-lug button { border: 2px solid var(--linea); background: var(--blanco); color: var(--tinta); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-weight: 800; cursor: pointer; min-height: 40px; }
.bi-lug button[aria-pressed="true"] { border-color: var(--banda); background: color-mix(in srgb, var(--banda) 10%, #fff); }
.bi-selw { display: flex; flex-wrap: wrap; gap: .35rem; min-height: 1.5rem; }
.bi-res { display: grid; gap: .25rem; } .bi-res button { text-align: left; border: 1px solid var(--linea); background: var(--blanco); color: var(--tinta); border-radius: 10px; padding: .5rem .7rem; font: inherit; font-weight: 700; cursor: pointer; }
.bi-res button small { color: var(--suave); }
.bi-chk { display: flex; gap: .5rem; align-items: center; font-weight: 800; }
.bi-chk input { width: 22px; height: 22px; }
.bi .ag-seg button { padding-left: .4rem; padding-right: .4rem; }

/* ===== Dirección ===== */
.od { display: grid; gap: .8rem; }
.od-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .55rem; }
.od-tile { display: grid; gap: .1rem; text-align: left; border: 0; border-radius: 14px; padding: .8rem .9rem; cursor: pointer; font: inherit; color: var(--tinta); background: #eef1f7; }
.od-tile span { font-size: 1.4rem; } .od-tile b { font-size: 1.7rem; line-height: 1; } .od-tile small { font-weight: 700; color: var(--suave); line-height: 1.2; }
.od-tile.naranja { background: #fff1de; } .od-tile.azul { background: #e6eefc; } .od-tile.verde { background: #e3f5ea; } .od-tile.morado { background: #efe9fb; }
.od-form select { width: 100%; }
.od-lista { display: grid; gap: .7rem; }
.od-card { background: var(--blanco); border: 1px solid var(--linea); border-left: 5px solid #e0a106; border-radius: 14px; padding: .8rem 1rem; display: grid; gap: .45rem; }
.od-card.atendida { border-left-color: #2e9d57; }
.od-card header { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.od-card footer { display: grid; gap: .45rem; }
.od-at { display: flex; gap: .4rem; flex-wrap: wrap; } .od-at input { flex: 1; min-width: 10rem; min-height: 40px; border: 2px solid var(--linea); border-radius: 10px; padding: .4rem .6rem; font: inherit; }
.cm-grupos em { font-style: normal; background: var(--titulo); color: #fff; border-radius: 999px; padding: 0 .35rem; font-size: .72rem; margin-left: .2rem; }
.ch-grupos { margin: .4rem 0; }

/* marca ColeClick discreta al pie de la entrada */
.login-cc { display:inline-flex; align-items:center; gap:.35rem; margin:1.4rem 0 0; font:700 .78rem/1 'Nunito',system-ui,sans-serif; color:#14163A; opacity:.45; letter-spacing:.01em; }
.login-cc svg { display:block; border-radius:5px; }

/* ---------- Spelling Bee ---------- */
.sp { display:flex; flex-direction:column; gap:.9rem; max-width:46rem; }
.sp-cab h2 { margin:0 0 .2rem; }
.sp-mes { display:flex; gap:.4rem; align-items:center; }
.sp-mes select { flex:1; max-width:18rem; min-height:40px; font-weight:700; border-radius:var(--radio); border:1px solid var(--linea); padding:0 .6rem; background:var(--blanco); }
.sp-acc { margin:0; justify-content:flex-start; flex-wrap:wrap; }
.sp-lista { list-style:none; margin:0; padding:0; display:grid; gap:.6rem; }
.sp-vacio { padding:1.2rem; text-align:center; color:var(--suave); background:var(--blanco); border:1px dashed var(--linea); border-radius:var(--radio); }
.sp-t { background:var(--blanco); border:1px solid var(--linea); border-left:5px solid #f5b700; border-radius:var(--radio); padding:.7rem .9rem; }
.sp-p { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; justify-content:space-between; }
.sp-p b { font-size:1.35rem; letter-spacing:.02em; }
.sp-bts { display:flex; gap:.3rem; flex-wrap:wrap; }
.sp-b { min-width:42px; min-height:42px; border:1px solid var(--linea); background:#fffbea; border-radius:12px; font-size:1.15rem; cursor:pointer; }
.sp-b:active { transform:scale(.95); }
.sp-d { margin-top:.35rem; color:var(--texto,#222); }
.sp-d p { margin:.15rem 0; }
.sp-ej { font-style:italic; color:var(--suave); }
.sp-rev { display:inline-block; margin-top:.4rem; font-size:.78rem; font-weight:700; color:#8a5a00; background:#fff3cd; border-radius:8px; padding:.15rem .5rem; }
.sp-agregar { background:var(--blanco); border:1px solid var(--linea); border-radius:var(--radio); padding:1rem; display:flex; flex-direction:column; gap:.5rem; }
.sp-agregar h3 { margin:0; font-size:1.05rem; }
.sp-agregar textarea { width:100%; font:inherit; border:1px solid var(--linea); border-radius:10px; padding:.6rem; }
.sp-chk { display:flex; gap:.45rem; align-items:flex-start; font-weight:600; font-size:.92rem; }
.sp-prac, .sp-fin { background:var(--blanco); border:1px solid var(--linea); border-radius:var(--radio); padding:1.3rem 1rem; text-align:center; display:flex; flex-direction:column; gap:.7rem; align-items:center; }
.sp-oir { display:flex; gap:.6rem; align-items:center; }
.sp-gde { width:92px; height:92px; border-radius:50%; border:0; background:#f5b700; font-size:2.4rem; cursor:pointer; box-shadow:0 6px 16px rgba(245,183,0,.35); }
.sp-pista { margin:0; max-width:30rem; color:var(--suave); }
.sp-prac form { width:100%; max-width:24rem; display:flex; flex-direction:column; gap:.6rem; }
.sp-prac input { font-size:1.4rem; text-align:center; padding:.6rem; border:2px solid var(--linea); border-radius:12px; }
.sp-ok { color:#1a7f37; font-weight:800; margin:0; } .sp-mal { color:#b42318; font-weight:700; margin:0; }
.sp-score { font-size:1.4rem; font-weight:800; margin:0; }
.sp-repasar { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; }
.sp-repasar li { display:flex; gap:.35rem; align-items:center; background:#fffbea; border-radius:10px; padding:.2rem .3rem .2rem .7rem; }
.sp-agregar label { text-transform:none; letter-spacing:0; font-size:.92rem; color:var(--suave); font-weight:600; }
.sp-agregar .sp-chk { color:inherit; }
.sp-vista { margin:0; }
.sp-mescab { list-style:none; margin-top:.5rem; } .sp-mescab h3 { margin:0; font-size:1.05rem; color:var(--azul-osc); } .sp-mescab small { color:var(--suave); font-weight:600; font-size:.82rem; }
/* impresión del Spelling Bee */
.spi { font-family: 'Atkinson Hyperlegible', system-ui, sans-serif; color:#111; }
.spi-cab { display:flex; gap:14px; align-items:center; border-bottom:3px solid #f5b700; padding-bottom:8px; margin-bottom:10px; }
.spi-cab img { width:64px; height:64px; object-fit:contain; }
.spi-cab h1 { margin:0; font-size:22pt; } .spi-cab p { margin:2px 0; font-size:11pt; } .spi-col { color:#555; font-size:9.5pt !important; }
.spi table { width:100%; border-collapse:collapse; font-size:11pt; }
.spi th { text-align:left; background:#fff3c4; padding:5px 6px; border-bottom:2px solid #e0b000; }
.spi td { padding:6px; border-bottom:1px solid #ddd; vertical-align:top; }
.spi tr { break-inside:avoid; }
.spi-n { width:28px; color:#777; } .spi-w { font-size:15pt; font-weight:700; white-space:nowrap; width:30%; } .spi-c { width:28px; font-size:15pt; text-align:center; }
.spi-d i { display:block; color:#555; font-size:10pt; margin-top:2px; }
.spi-mes td { background:#f3f4f8; font-weight:800; font-size:12pt; border-bottom:2px solid #ccc; }
.spi-pie { margin-top:10px; font-size:9.5pt; color:#555; }

/* ---------- ayuda por sección ---------- */
#ayuda-btn { position: fixed; top: 12px; right: 14px; z-index: 30; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--linea); background: var(--blanco); color: var(--azul-osc); font: 800 1.05rem/1 'Nunito', system-ui, sans-serif; box-shadow: 0 3px 10px rgba(0,39,71,.15); cursor: pointer; }
#ayuda-btn:hover { border-color: var(--azul-osc); }
#ayuda-btn[hidden] { display: none; }
body.con-menu #ayuda-btn, body.familia #ayuda-btn { top: 9px; right: 10px; width: 34px; height: 34px; background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.45); box-shadow: none; }
@media (min-width: 761px) { body.con-menu:not(.familia) #ayuda-btn { top: 12px; right: 14px; background: var(--blanco); color: var(--azul-osc); border-color: var(--linea); } }
#ayuda-tip { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: min(26rem, calc(100vw - 24px)); background: #fffbea; border: 1px solid #f2d27a; border-radius: 16px; padding: .8rem .95rem .7rem; box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: ay-sube .25s ease-out; }
body.familia #ayuda-tip, body.barra-staff #ayuda-tip { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
@keyframes ay-sube { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
#ayuda-tip .ay-cab { display: flex; gap: .45rem; align-items: center; } #ayuda-tip .ay-cab b { font-size: .98rem; }
#ayuda-tip ul, .ay-modal ul { margin: .45rem 0 .5rem 1.1rem; padding: 0; } #ayuda-tip li, .ay-modal li { margin: .2rem 0; font-size: .92rem; }
#ayuda-tip .ay-pie { display: flex; justify-content: space-between; align-items: center; gap: .5rem; } #ayuda-tip small { color: var(--suave); }
.ay-modal h3 { margin-top: 0; }
@media print { #ayuda-btn, #ayuda-tip { display: none !important; } }
.od-tile:disabled { cursor: default; opacity: 1; color: inherit; }
