/* Informe de auditoría por área (informe-area.js) y panel del portal de colegio */
.ia-rep { gap: 16px; }
.ia-portada { background: linear-gradient(135deg, #14307a 0%, #2447b8 60%, #3b66e0 100%); color: #fff; border-radius: 18px; padding: 22px 24px; position: relative; overflow: hidden; }
.ia-portada::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ia-portada__sup { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; opacity: .8; }
.ia-portada h2 { margin: 4px 0 2px; font-size: 1.6rem; color: #fff; }
.ia-portada h2 span { font-weight: 500; opacity: .9; font-size: 1.1rem; }
.ia-portada__col { margin: 0 0 14px; opacity: .9; }
.ia-ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px 18px; margin: 0; }
.ia-ficha div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 8px 12px; }
.ia-ficha__w { grid-column: 1 / -1; }
.ia-ficha dt { font-size: .7rem; opacity: .8; }
.ia-ficha dd { margin: 2px 0 0; font-weight: 700; }
.ia-portada__nota { margin: 12px 0 0; font-size: .85rem; opacity: .9; }
.ia-sec h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.ia-n { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 9px; background: #2447b8; color: #fff; font-size: .85rem; font-weight: 800; }
.ia-exec { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ia-gauge { width: 132px; height: 132px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 10px solid #aab; flex: none; }
.ia-gauge strong { font-size: 1.9rem; line-height: 1; }
.ia-gauge small { font-size: .72rem; color: #5b6472; }
.ia-gauge--ok { border-color: #22a55b; }
.ia-gauge--mid { border-color: #f2b01e; }
.ia-gauge--low { border-color: #e5484d; }
.ia-exec__txt { flex: 1 1 280px; min-width: 0; }
.ia-veredicto { font-size: 1.02rem; }
.ia-decision { background: #eaf1ff; border-left: 4px solid #2447b8; border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.ia-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 10px; margin: 6px 0 10px; }
.ia-stat { background: #f3f5fc; border-radius: 12px; padding: 10px 12px; text-align: center; }
.ia-stat strong { display: block; font-size: 1.25rem; }
.ia-stat small { color: #5b6472; font-size: .72rem; }
.ia-hist { display: flex; gap: 12px; align-items: flex-end; height: 200px; margin: 10px 0 6px; }
.ia-hist__c { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.ia-hist__v { font-weight: 800; height: 38px; text-align: center; line-height: 1.1; }
.ia-hist__v small { display: block; font-weight: 400; font-size: .7rem; color: #5b6472; }
.ia-hist__b { flex: 1; width: 74%; background: #eef0f7; border-radius: 10px 10px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.ia-hist__b i { display: block; width: 100%; border-radius: 8px 8px 0 0; }
.ia-nv1 { background: #e5484d; }
.ia-nv2 { background: #f2b01e; }
.ia-nv3 { background: #6bb86b; }
.ia-nv4 { background: #1d8f4e; }
.ia-hist__e { font-size: .76rem; text-align: center; line-height: 1.25; margin-top: 6px; }
.ia-hist__e b { display: block; }
.ia-hist__e small { display: block; color: #5b6472; }
.ia-dos { display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 18px; align-items: center; }
.ia-radar { width: 100%; max-width: 380px; height: auto; color: #3b4254; display: block; margin: 0 auto; overflow: visible; }
.ia-lg { display: inline-block; width: 12px; height: 8px; border-radius: 3px; margin-right: 4px; }
.ia-lg--r { background: #2563eb; }
.ia-lg--m { background: #22a55b; }
.cm-bar { position: relative; }
.ia-meta { position: absolute; top: -2px; bottom: -2px; left: 70%; width: 2px; background: #1f2430; opacity: .55; }
.ia-scroll { overflow-x: auto; }
.ia-h { text-align: center; font-weight: 700; }
.ia-h--ok { background: #d7f3e1; }
.ia-h--mid { background: #fdf0c8; }
.ia-h--low { background: #fbd9da; }
.ia-h--gris { background: #eee; }
.ia-heat td, .ia-heat th { text-align: center; }
.ia-heat td:first-child, .ia-heat th:first-child { text-align: left; }
.ia-hall { border-left-color: #e5484d; }
.ia-evid { background: #fff4f4; border-radius: 8px; padding: 6px 10px; }
.ia-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ia-chips span { background: #fff; border: 1px solid #e3e6f5; border-radius: 999px; padding: 2px 10px; font-size: .78rem; }
.ia-plan td { vertical-align: top; }
.ia-plan ol { margin: 0; padding-left: 18px; }
.ia-crono { padding-left: 20px; line-height: 1.55; }
.ia-pk { border: 1px solid var(--line, #e3e6f5); border-radius: 14px; padding: 10px 14px; margin: 10px 0; background: #fbfcff; }
.ia-pk > summary { cursor: pointer; font-size: 1.02rem; }
.ia-pk__g { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 4px 18px; }
.ia-ruta { padding-left: 20px; line-height: 1.55; }
.ia-ruta li { margin: 6px 0; }
.ia-temas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 10px; }
.ia-tema { background: #f3f5fc; border-radius: 12px; padding: 10px 12px; }
.ia-ref { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; margin: 8px 0; }
.ia-ref__c { border: 1px solid var(--line, #e3e6f5); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.ia-ref__c small { color: #5b6472; }
.ia-ref__b { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
/* Portal de colegio: panorama institucional */
.ip-hero { background: linear-gradient(135deg, #14307a, #2f58cf); color: #fff; border-radius: 18px; padding: 18px 22px; margin-bottom: 14px; }
.ip-hero h2 { margin: 0 0 4px; color: #fff; }
.ip-hero p { margin: 0; opacity: .9; }
.ip-sec { margin: 16px 0; }
.ip-sec h3 { margin: 0 0 8px; }
.ip-heat { border-collapse: separate; border-spacing: 4px; width: 100%; }
.ip-heat th { font-size: .78rem; text-align: center; color: #5b6472; }
.ip-heat td.ip-c { text-align: center; border-radius: 10px; padding: 12px 6px; font-weight: 800; cursor: pointer; }
.ip-heat td.ip-c small { display: block; font-weight: 500; font-size: .66rem; opacity: .75; }
.ip-heat td.ip-g { font-weight: 700; white-space: nowrap; }
.ip-c--ok { background: #d7f3e1; color: #14532d; }
.ip-c--mid { background: #fdf0c8; color: #6b4a00; }
.ip-c--low { background: #fbd9da; color: #7f1d1d; }
.ip-c--gris { background: #eef0f7; color: #7a8294; cursor: default !important; }
.ip-alertas { display: flex; flex-direction: column; gap: 8px; }
.ip-alerta { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; background: #fff8ec; border: 1px solid #f4dba4; }
.ip-alerta--low { background: #fff1f1; border-color: #f5c2c2; }
.ip-alerta--ok { background: #effaf2; border-color: #bfe6cc; }
.ip-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.ip-area { border: 1px solid var(--line, #e3e6f5); border-radius: 14px; padding: 12px 14px; background: var(--card, #fff); display: flex; flex-direction: column; gap: 6px; }
.ip-area__t { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.ip-area__p { font-size: 1.6rem; font-weight: 800; }
.ip-area__m { font-size: .78rem; color: #5b6472; }
@media (prefers-color-scheme: dark) {
  .ia-decision { background: #1c2c52; }
  .ia-stat, .ia-tema { background: #20243b; }
  .ia-pk { background: #1a1d31; }
  .ia-hist__b { background: #2a2d44; }
  .ia-evid { background: #3a1f23; }
  .ia-chips span { background: #20243b; border-color: #34395a; }
  .ia-radar { color: #cdd3e6; }
  .ia-h--ok { background: #1f4030; }
  .ia-h--mid { background: #4a3c1b; }
  .ia-h--low { background: #4d2424; }
  .ia-h--gris { background: #2a2d44; }
  .ip-c--ok { background: #1f4030; color: #bff0cf; }
  .ip-c--mid { background: #4a3c1b; color: #f7dd9a; }
  .ip-c--low { background: #4d2424; color: #f7b9b9; }
  .ip-c--gris { background: #2a2d44; color: #9aa3bd; }
  .ip-alerta { background: #3a2f17; border-color: #5a4720; }
  .ip-alerta--low { background: #3d2023; border-color: #5e2a2f; }
  .ip-alerta--ok { background: #1c3326; border-color: #285a3c; }
  .ia-gauge small, .ia-stat small, .ip-area__m { color: #aab2c8; }

}
@media (max-width: 720px) {
  .ia-dos { grid-template-columns: 1fr; }
  .ia-portada { padding: 16px; }
  .ia-gauge { width: 110px; height: 110px; }

}
/* Impresión: informe completo y cuadernillos */
#ia-print-root { display: none; }
@media print {
  body.es-imprime-reporte .ia-sec { break-inside: auto; }
  body.es-imprime-reporte .ia-portada { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.es-imprime-reporte .ia-pk, body.es-imprime-reporte .cm-err, body.es-imprime-reporte .ia-hall { break-inside: avoid; }
  body.es-imprime-reporte .ia-hist__b i, body.es-imprime-reporte .cm-bar i, body.es-imprime-reporte .ia-h, body.es-imprime-reporte .ia-gauge, body.es-imprime-reporte .cm-tag, body.es-imprime-reporte .ia-n { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.es-imprime-cuadernillo > *:not(#ia-print-root) { display: none !important; }
  body.es-imprime-cuadernillo #ia-print-root { display: block !important; color: #000; background: #fff; font-family: Georgia, "Times New Roman", serif; }
  .ia-bk header { border-bottom: 2px solid #000; margin-bottom: 14px; }
  .ia-bk h1 { font-size: 1.25rem; margin: 0 0 4px; }
  .ia-bk header p { margin: 2px 0 8px; font-size: .9rem; }
  .ia-bk__sec h2 { font-size: 1.05rem; background: #eee; padding: 4px 8px; margin: 16px 0 8px; }
  .ia-bk__q { break-inside: avoid; margin: 10px 0; }
  .ia-bk__q p { margin: 3px 0; }
  .ia-bk__q ol { margin: 4px 0 0; padding-left: 26px; list-style-type: upper-alpha; }
  .ia-bk__ctx { font-style: italic; font-size: .92rem; }
  .ia-bk__k { margin: 6px 0; }
  .ia-bk__k span { font-size: .88rem; color: #333; }

}

.ia-aviso { margin: 8px 0 12px; padding: 9px 12px; border-radius: 10px; background: #eef4ff; border: 1px solid #cfe0ff; color: #1e3a8a; font-size: .92rem; }

/* ---- Plan diferenciado por niveles (informe por área, docente) ---- */
.ia-nivs { display: grid; gap: 12px; margin: 10px 0 14px; }
.ia-niv { border: 1px solid #e3e9f7; border-left: 5px solid #94a3b8; border-radius: 14px; padding: 12px 14px; background: #fff; }
.ia-niv--low { border-left-color: #dc2626; background: #fff8f8; } .ia-niv--mid { border-left-color: #d97706; background: #fffbf3; } .ia-niv--ok { border-left-color: #16a34a; background: #f6fdf8; }
.ia-niv header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .ia-niv header > span { font-size: 1.4rem; }
.ia-niv header > div { flex: 1; min-width: 160px; } .ia-niv header b { display: block; color: #0f1f4d; } .ia-niv header small { color: #5b6785; }
.ia-niv header u { text-decoration: none; font-weight: 700; font-size: .78rem; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 4px 10px; }
.ia-niv__n { margin: 8px 0 4px; font-size: .88rem; } .ia-niv ul { margin: 6px 0 6px 18px; padding: 0; } .ia-niv li { margin: 3px 0; }
.ia-niv__c { font-size: .85rem; color: #475569; font-style: italic; margin: 4px 0; }
.ia-feed li { margin: 5px 0; }
.cm-live .ia-niv .ia-ver-est { display: flex; }
@media print { .ia-niv { break-inside: avoid; } }

/* Tendencia por periodo académico */
.ia-tabla { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ia-tabla th, .ia-tabla td { padding: 8px 10px; border-bottom: 1px solid #e6eaf4; vertical-align: top; }
.ia-tabla thead th { background: #f3f5fc; color: #14307a; font-weight: 700; text-align: center; }
.ia-tabla thead th small, .ia-tabla td small { display: block; font-weight: 400; font-size: .7rem; color: #5b6472; }
.ia-tabla tbody th { text-align: left; font-weight: 600; min-width: 160px; }
.ia-tabla td.c { text-align: center; }
.ia-tr-g th, .ia-tr-g td { background: #eaf1ff; }
.ia-tr-h th { background: #14307a; color: #fff; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.ia-d { display: inline-block; font-weight: 700; }
.ia-d--up { color: #1a8f4a; }
.ia-d--dn { color: #d03a3f; }
@media print { .ia-scroll { overflow: visible; } }

/* Tablero Saber (resumen del informe por área) */
.ia-ts { margin: 16px 0; border: 1px solid #dfe5f3; border-radius: 14px; background: #f7f9ff; padding: 14px 16px; }
.ia-ts__tit { font-weight: 800; color: #1e2a5a; margin-bottom: 10px; }
.ia-ts__tit small { display: block; font-weight: 500; color: #5a6585; font-size: 12px; margin-top: 2px; }
.ia-ts__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ia-ts__blq h4 { margin: 0 0 8px; font-size: 14px; }
.ia-ts__pila { display: flex; height: 34px; border-radius: 9px; overflow: hidden; background: #e8ecf6; }
.ia-ts__pila i { display: flex; align-items: center; justify-content: center; min-width: 0; color: #fff; font-style: normal; font-size: 12px; }
.ia-ts__pila i b { padding: 0 2px; overflow: hidden; }
.ia-ts__ley, .ia-ts__comp { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ia-ts__ley li { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.ia-ts__pt { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.ia-ts__comp li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ia-ts__nom { flex: 1; min-width: 0; }
.ia-ts__chip { flex: none; color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
@media (max-width: 700px) { .ia-ts__cols { grid-template-columns: 1fr; } }
@media print { .ia-ts { break-inside: avoid; } }
.ia-ts__chip.ia-nv2, .ia-ts__pila i.ia-nv2 { color: #3a2a00; }
