/* Historial de acciones del administrador (admin-historial.js) */
.hs-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.hs-filtros select, .hs-filtros input { padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line, #d9dcf0); background: var(--card, #fff); color: inherit; font: inherit; min-width: 0; }
.hs-filtros .hs-q { flex: 1 1 200px; }
.hs-resumen { margin: 6px 0 10px; font-size: .88rem; }
.hs-lista { display: flex; flex-direction: column; gap: 8px; }
.hs-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, #e3e6f5); background: var(--card, #fff); }
.hs-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: #eef0ff; }
.hs-ico--ok { background: #e3f7ea; }
.hs-ico--info { background: #e5efff; }
.hs-ico--warn { background: #fff1d6; }
.hs-ico--bad { background: #ffe3e3; }
.hs-ico--soft { background: #f0f1f7; }
.hs-linea { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hs-sujeto { font-weight: 600; }
.hs-detalle { font-size: .88rem; opacity: .8; margin-top: 2px; overflow-wrap: anywhere; }
.hs-cuando { display: flex; flex-direction: column; align-items: flex-end; font-size: .82rem; white-space: nowrap; }
.hs-pie { display: flex; justify-content: center; margin-top: 12px; }
@media (max-width: 640px) {
  .hs-row { grid-template-columns: 38px 1fr; }
  .hs-cuando { grid-column: 2; align-items: flex-start; white-space: normal; }

}
@media (prefers-color-scheme: dark) {
  .hs-ico { background: #2b2f4d; }
  .hs-ico--ok { background: #1f4030; }
  .hs-ico--info { background: #22345a; }
  .hs-ico--warn { background: #4a3c1b; }
  .hs-ico--bad { background: #4d2424; }
  .hs-ico--soft { background: #2a2d44; }

}
.pp-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.pp-msg { margin: 6px 0 10px; font-size: .88rem; }
/* ---- Aviso general (aviso.js / admin-aviso.js): tarjeta flotante ---- */
.es-aviso { --av: #2563eb; --av-s: #e8f0ff; --av-i: #1e40af; position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 16px 16px 18px; background: #fff; color: #0f1f4d; font-size: .94rem; line-height: 1.45; border-radius: 16px; border: 1px solid #e3e9f7; box-shadow: 0 14px 40px rgba(15,31,77,.20), 0 2px 6px rgba(15,31,77,.08); overflow: hidden; }
.es-aviso::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--av); }
.es-aviso[hidden] { display: none; }
.es-aviso--mant { --av: #f59e0b; --av-s: #fff1d6; --av-i: #92400e; }
.es-aviso--alerta { --av: #dc2626; --av-s: #ffe3e3; --av-i: #991b1b; }
.es-aviso__ico { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.45rem; border-radius: 13px; background: var(--av-s); }
.es-aviso__cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-right: 22px; }
.es-aviso__tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--av-i); }
.es-aviso__est { font-style: normal; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; font-size: .66rem; background: var(--av-s); color: var(--av-i); }
.es-aviso__est--curso { background: #fee2e2; color: #991b1b; }
.es-aviso__est--fin { background: #e2e8f0; color: #475569; }
.es-aviso__tit { font-size: 1.04rem; line-height: 1.25; color: #0f1f4d; }
.es-aviso__txt { margin: 0; color: #334155; overflow-wrap: anywhere; white-space: pre-line; }
.es-aviso__ventana { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--av-s); color: #1f2937; display: grid; gap: 6px; }
.es-aviso__dia { font-weight: 700; font-size: .86rem; color: var(--av-i); }
.es-aviso__horas { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: nowrap; }
.es-aviso__horas .es-aviso__momento { min-width: 0; }
.es-aviso__horas i { font-style: normal; font-weight: 800; color: var(--av-i); }
.es-aviso__momento { display: flex; flex-direction: column; line-height: 1.2; }
.es-aviso__momento small { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #64748b; }
.es-aviso__momento b { font-size: 1.12rem; color: #0f1f4d; }
.es-aviso__momento span { font-size: .78rem; color: #475569; }
.es-aviso__x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: #64748b; font-size: 1rem; cursor: pointer; border-radius: 50%; }
.es-aviso__x:hover, .es-aviso__x:focus-visible { background: #eef2fb; color: #0f1f4d; outline: none; }
.es-aviso__x:focus-visible { box-shadow: 0 0 0 3px rgba(37,99,235,.35); }
/* flotante real (la vista previa del panel no lo lleva) */
.es-aviso--flota { position: fixed; top: 96px; right: 18px; z-index: 1500; width: min(410px, calc(100vw - 24px)); animation: es-aviso-in .38s cubic-bezier(.2,.8,.2,1) both; }
.es-aviso--flota.es-aviso--sale { animation: es-aviso-out .22s ease-in both; }
@keyframes es-aviso-in { from { opacity: 0; transform: translateX(26px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes es-aviso-out { to { opacity: 0; transform: translateX(26px) scale(.97); } }
@media (max-width: 560px) {
  .es-aviso--flota { top: 74px; right: 12px; left: 12px; width: auto; padding: 14px 14px 14px 16px; }
  .es-aviso__ico { width: 38px; height: 38px; font-size: 1.25rem; }
  .es-aviso__horas { gap: 8px; justify-content: space-between; }
  .es-aviso__momento b { font-size: 1rem; }
  .es-aviso__momento span { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) { .es-aviso--flota, .es-aviso--flota.es-aviso--sale { animation: none; } }
@media print { .es-aviso { display: none !important; } }
.av-plantillas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.av-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; margin: 10px 0; }
.av-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.av-form input[type=text], .av-form input[type=datetime-local], .av-form select, .av-form textarea { padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line, #d9dcf0); font: inherit; background: var(--card, #fff); color: inherit; }
.av-form .av-ancho, .av-form .av-mant, .av-form .av-check { grid-column: 1 / -1; }
.av-form .av-check { flex-direction: row; align-items: center; font-weight: 500; }
.av-mant { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.av-t { margin: 14px 0 6px; }
.av-prev { border-radius: 12px; overflow: hidden; border: 1px solid var(--line, #e3e6f5); }
.av-prev .es-aviso { box-shadow: none; border: 0; border-radius: 0; }
.av-prev--vacio { padding: 14px; color: #5b6472; font-size: .9rem; border-style: dashed; }
.av-estado { margin: 8px 0; font-size: .9rem; }
/* ---- Cuentas y portal de colegio (admin-colegios.js / colegio.js) ---- */
.cg-nuevo { margin: 10px 0; }
.cg-nuevo > summary { display: inline-block; cursor: pointer; list-style: none; }
.cg-cred .cred-box { margin: 10px 0; }
.cl-login { max-width: 460px; margin: 20px auto; }
.cl-form { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.cl-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.cl-form input { padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line, #d9dcf0); font: inherit; background: var(--card, #fff); color: inherit; }
.cl-err { color: var(--red, #b91c1c); min-height: 1.2em; margin: 0; font-size: .9rem; }
.cl-aviso { background: #fff1d6; color: #5a3a00; padding: 10px 12px; border-radius: 10px; }
.cl-acc { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; margin: 14px 0; }
.cl-card { background: var(--card, #fff); border: 1px solid var(--line, #e3e6f5); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.cl-card span { font-size: 1.3rem; }
.cl-card strong { font-size: 1.8rem; line-height: 1.1; }
.cl-card small { color: #5b6472; }
.cl-grados, .cl-tabla { overflow-x: auto; margin-bottom: 12px; }
.cl-t { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cl-t th, .cl-t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line, #e3e6f5); white-space: nowrap; }
.cl-t th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #5b6472; }
.cl-alerta { background: #ffe3e3; color: #8f1d1d; border-radius: 8px; padding: 1px 6px; font-size: .8rem; font-weight: 600; }
.cl-pend td { color: #7a7f8d; font-style: italic; }
.cl-chk { display: flex; align-items: center; gap: 6px; font-size: .9rem; }
.cl-nota { font-size: .85rem; }
@media print {
  .no-print, .app-header, .app-footer, .shell-side, .es-aviso, .breadcrumb { display: none !important; }
  .cl-tabla, .cl-grados { overflow: visible; }
  .cl-t { font-size: 10pt; }
  .cl-t th, .cl-t td { white-space: normal; }

}
/* ---- Alertas y recuperación (admin-alertas.js / recuperar.js) ---- */
.al-ok { background: #e3f7ea; color: #14532d; padding: 10px 12px; border-radius: 10px; }
.al-nosmtp { background: #fff1d6; color: #5a3a00; padding: 10px 12px; border-radius: 10px; }
.al-nosmtp summary { cursor: pointer; }
.al-code { background: #1f2430; color: #e6e9f2; padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-size: .82rem; }
@media (prefers-color-scheme: dark) {
  .al-ok { background: #1f4030; color: #d4f5df; }
  .al-nosmtp { background: #4a3c1b; color: #ffe9b8; }

}
/* ---- Calendario escolar (admin-calendario.js) ---- */
.ca-ies, .ca-gr { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 500; }
.ca-ies .av-check, .ca-gr .av-check { grid-column: auto; }
/* ---- Textos editables (admin-textos.js) ---- */
.tx-grupo { border: 1px solid var(--line, #e3e6f5); border-radius: 12px; padding: 8px 12px; margin: 10px 0; background: var(--card, #fff); }
.tx-grupo > summary { cursor: pointer; padding: 4px 0; }
.tx-lista { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.tx-fila { display: flex; gap: 8px; align-items: flex-end; }
.tx-fila label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; }
.tx-fila input, .tx-fila textarea { padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line, #d9dcf0); font: inherit; font-weight: 400; background: var(--card, #fff); color: inherit; resize: vertical; }
.tx-fila--edit input, .tx-fila--edit textarea { border-color: #f5a623; background: #fffaf0; }
@media (prefers-color-scheme: dark) {
  .tx-fila--edit input, .tx-fila--edit textarea { background: #3a2f17; }

}
@media (max-width: 640px) {
  .tx-fila { flex-direction: column; align-items: stretch; }

}
/* ---- Menú lateral plegable (nav-acordeon.js) ---- */
.adm-nav__group--toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; color: #9fb2e6; border-radius: 8px; transition: background .15s; }
.adm-nav__group--toggle:hover, .adm-nav__group--toggle:focus-visible { background: rgba(255,255,255,.08); color: #fff; }
.adm-nav__chev { transition: transform .2s; font-size: .8rem; }
.adm-nav__group--toggle.is-open .adm-nav__chev { transform: rotate(90deg); }
.adm-nav__items { display: flex; flex-direction: column; gap: 2px; animation: navAbre .18s ease-out; }
.adm-nav__items[hidden] { display: none; }
@keyframes navAbre { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .adm-nav__items { animation: none; }
  .adm-nav__chev { transition: none; }

}
/* ---- Equipo docente y portal de colegio con menú (colegio-equipo.js / colegio.js) ---- */
.ce-asig { display: flex; flex-direction: column; gap: 10px; }
.ce-asig fieldset { border: 1px solid var(--line, #e3e6f5); border-radius: 12px; padding: 8px 12px; margin: 0; }
.ce-asig legend { font-weight: 700; font-size: .85rem; padding: 0 6px; }
.ce-asig[hidden] { display: none; }
.cl-asig { background: #e3f7ea; color: #14532d; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.cl-prox { background: #fff1d6; color: #5a3a00; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.adm--colegio .adm-pane { padding: 0; }
@media (prefers-color-scheme: dark) {
  .cl-asig { background: #1f4030; color: #d4f5df; }
  .cl-prox { background: #4a3c1b; color: #ffe9b8; }

}
/* ---- Reporte por materia (colegio-materia.js) ---- */
.cm-filtros { align-items: flex-end; }
.cm-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; }
.cm-acc { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.cm-rep { display: flex; flex-direction: column; gap: 14px; }
.cm-rep h2 { margin: 0 0 2px; }
.cm-sec { background: var(--card, #fff); border: 1px solid var(--line, #e3e6f5); border-radius: 14px; padding: 14px 16px; }
.cm-sec h3 { margin: 0 0 8px; }
.cm-sec h4 { margin: 12px 0 6px; font-size: .95rem; }
.cm-sec p { margin: 6px 0; line-height: 1.5; }
.cm-sec ul, .cm-sec ol { margin: 6px 0; padding-left: 20px; line-height: 1.5; }
.cm-fila { display: grid; grid-template-columns: minmax(130px, 34%) 1fr 96px; gap: 10px; align-items: center; margin: 7px 0; }
.cm-etq { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.cm-bar { background: #eef0f7; border-radius: 999px; height: 14px; overflow: hidden; }
.cm-bar i { display: block; height: 100%; border-radius: 999px; }
.cm-ok { background: #22a55b; }
.cm-mid { background: #f2b01e; }
.cm-low { background: #e5484d; }
.cm-gris { background: #aab; }
.cm-val { font-weight: 700; font-size: .9rem; text-align: right; }
.cm-val small { display: block; font-weight: 400; color: #5b6472; font-size: .72rem; }
.cm-ley { font-size: .78rem; color: #5b6472; }
.cm-ley i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 3px; }
.cm-pri { border-left: 4px solid #f2b01e; padding: 4px 0 4px 12px; margin: 12px 0; }
.cm-tag { font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; color: #fff; vertical-align: middle; }
.cm-err { background: #fff8ec; border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.cm-preg { font-weight: 700; }
.cm-nota { background: #eef5ff; border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.cm-plan { border-color: #22a55b; }
.cm-cautela { background: #fff8ec; }
.cm-det { margin: 6px 0; }
.cm-det summary { cursor: pointer; }
@media (prefers-color-scheme: dark) {
  .cm-bar { background: #2a2d44; }
  .cm-err, .cm-cautela { background: #3a2f17; }
  .cm-nota { background: #1c2c52; }

}
@media (max-width: 640px) {
  .cm-fila { grid-template-columns: 1fr 90px; }
  .cm-bar { grid-column: 1 / -1; order: 3; }

}
@media print {
  body.es-imprime-reporte .adm-side, body.es-imprime-reporte .adm-top, body.es-imprime-reporte .no-print { display: none !important; }
  body.es-imprime-reporte .adm { display: block; box-shadow: none; background: #fff; }
  body.es-imprime-reporte .cm-sec { break-inside: avoid; }

}
/* ---- Bandeja de informes (colegio-informes.js) ---- */
.cie-barra { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cie-meta, .cie-envio { margin-bottom: 12px; }
.cie-nota { background: #eef5ff; border-radius: 10px; padding: 10px 12px; line-height: 1.5; }
.cie-plan { margin-top: 14px; }
.cie-row .hs-ico--warn { background: #fff1d6; }
.adm--colegio .adm-nav__badge { margin-left: auto; }
.adm-nav__badge[hidden] { display: none; }
@media (prefers-color-scheme: dark) {
  .cie-nota { background: #1c2c52; }

}
/* ---- Fase 4: evolución, comparación y vista de clases ---- */
.cm-sem { display: flex; gap: 6px; align-items: flex-end; height: 170px; margin: 8px 0 4px; }
.cm-sem__c { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.cm-sem__v { font-size: .78rem; font-weight: 700; height: 18px; }
.cm-sem__b { flex: 1; width: 70%; background: #eef0f7; border-radius: 8px 8px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.cm-sem__b i { display: block; width: 100%; border-radius: 6px 6px 0 0; }
.cm-sem__e { font-size: .68rem; text-align: center; line-height: 1.2; margin-top: 4px; }
.cm-sem__e small { display: block; color: #5b6472; }
.cm-sube { color: #15803d; }
.cm-baja { color: #b91c1c; }
.cm-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(8,16,40,.6); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.cm-modal__box { position: relative; background: var(--card, #fff); color: inherit; border-radius: 16px; max-width: 760px; width: 100%; padding: 22px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.cm-modal__x { position: absolute; top: 10px; right: 12px; border: 0; background: rgba(0,0,0,.08); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; color: inherit; }
.cm-modal__box h2 { margin: 0 36px 10px 0; font-size: 1.25rem; }
.cm-paso { border-top: 1px solid var(--line, #e3e6f5); padding: 10px 0; line-height: 1.55; }
.cm-paso h4 { margin: 0 0 6px; }
.cm-paso__vis { overflow-x: auto; }
.cm-paso__vis svg { max-width: 100%; height: auto; }
.cm-paso--error { background: #fff8ec; border-radius: 10px; padding: 10px 12px; }
.cm-paso--regla { background: #e3f7ea; border-radius: 10px; padding: 10px 12px; }
@media (prefers-color-scheme: dark) {
  .cm-sem__b { background: #2a2d44; }
  .cm-paso--error { background: #3a2f17; }
  .cm-paso--regla { background: #1f4030; }
  .cm-sube { color: #6ee7a3; }
  .cm-baja { color: #ff9a9a; }

}
