/* reportes-ui.css — pestañas y filtro «de lo general a lo particular» de los reportes. */
.rt { margin-top: 14px; }
.rt-nav { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; background: #eef2f9; border-radius: 14px; border: 1px solid #dbe3f1; position: sticky; top: 0; z-index: 5; }
.rt-tab { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #475a7a; font: inherit; font-weight: 700; font-size: 13.5px; padding: 9px 14px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.rt-tab:hover { background: #fff; color: #1e3a8a; }
.rt-tab:focus-visible { outline: 3px solid #93c5fd; outline-offset: 1px; }
.rt-tab.is-on { background: #fff; color: #1d4ed8; box-shadow: 0 1px 4px rgba(30, 58, 138, 0.18); }
.rt-tab em { font-style: normal; font-size: 11px; font-weight: 800; background: #dbeafe; color: #1d4ed8; border-radius: 99px; padding: 1px 7px; }
.rt-pane { padding-top: 14px; }
.rt-print-h { display: none; }
@media print { .rt-nav { display: none !important; } .rt-pane[hidden] { display: block !important; } .rt-print-h { display: block; margin: 14px 0 6px; font-size: 15px; color: #1e3a8a; } }

/* Filtro por pasos */
.rf { background: #f6f8fd; border: 1px solid #dbe3f1; border-radius: 16px; padding: 14px; }
.rf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.rf-head b { color: #14295c; font-size: 15px; }
.rf-head small { color: #64748b; }
.rf-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.rf-step { background: #fff; border: 1px solid #e0e7f3; border-radius: 12px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.rf-step__t { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #14295c; font-size: 13px; }
.rf-step__t span { width: 22px; height: 22px; border-radius: 50%; background: #2563eb; color: #fff; display: grid; place-items: center; font-size: 12px; }
.rf-step__t small { font-weight: 600; color: #7a8aa6; margin-left: auto; }
.rf-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr)); gap: 8px; }
.rf-fields label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 700; color: #5a6c8c; text-transform: uppercase; letter-spacing: 0.04em; }
.rf-fields select { font: inherit; font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #14295c; padding: 8px 10px; border: 1.5px solid #cfd9ea; border-radius: 10px; background: #fff; min-width: 0; }
.rf-hint { margin: 0; font-size: 12px; color: #64748b; line-height: 1.4; }
.rf-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.rf-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: #14295c; font-weight: 700; }
.rf-crumb i { font-style: normal; color: #94a3b8; }
.rf-crumb span { background: #e8efff; border-radius: 99px; padding: 3px 10px; }
.rf-go { border: 0; background: linear-gradient(180deg, #3b82f6, #2563eb); color: #fff; font: inherit; font-weight: 800; padding: 11px 24px; border-radius: 12px; cursor: pointer; box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3); }
.rf-go:hover { filter: brightness(1.07); }
.rf-go:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.rf-go[disabled] { opacity: 0.6; cursor: progress; }
.cm-acc { margin-top: 12px; }

/* Gráficas simples del resumen del colegio */
.rg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 12px; margin-top: 14px; }
.rg-panel { background: #fff; border: 1px solid #e0e7f3; border-radius: 14px; padding: 14px 16px; }
.rg-panel h4 { margin: 0 0 10px; font-size: 14px; color: #14295c; }
.rg-pie { margin: 10px 0 0; font-size: 12px; color: #64748b; line-height: 1.4; }
.rb { display: grid; grid-template-columns: 34px 1fr 44px; align-items: center; gap: 4px 10px; margin: 7px 0; font-size: 13px; }
.rb__t { font-weight: 800; color: #14295c; }
.rb__bar { height: 10px; background: #eef2f9; border-radius: 99px; overflow: hidden; }
.rb__bar i { display: block; height: 100%; border-radius: 99px; }
.rb b { text-align: right; color: #14295c; }
.rb small { grid-column: 2 / -1; color: #7a8aa6; font-size: 11.5px; margin-top: -3px; }

/* Consolidado de exámenes finales: por grado y por colegio */
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cs-chip { border: 1.5px solid #cfd9ea; background: #fff; color: #14295c; font: inherit; font-weight: 800; font-size: 15px; padding: 7px 16px; border-radius: 12px; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.cs-chip small { font-size: 10.5px; font-weight: 700; color: #7a8aa6; }
.cs-chip:hover { border-color: #93c5fd; }
.cs-chip.is-on { background: #2563eb; border-color: #2563eb; color: #fff; }
.cs-chip.is-on small { color: #dbeafe; }
.cs-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.cs-kpi { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #e0e7f3; border-radius: 14px; padding: 12px 14px; }
.cs-kpi > span { font-size: 26px; width: 46px; height: 46px; display: grid; place-items: center; background: #eef4ff; border-radius: 12px; }
.cs-kpi b { display: block; font-size: 24px; color: #14295c; line-height: 1.1; }
.cs-kpi small { display: block; color: #5a6c8c; font-weight: 700; font-size: 12px; }
.cs-kpi em { display: block; font-style: normal; color: #7a8aa6; font-size: 11.5px; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.cs-panel { background: #fff; border: 1px solid #e0e7f3; border-radius: 14px; padding: 14px 16px; margin-top: 12px; }
.cs-grid .cs-panel { margin-top: 0; }
.cs-panel h4 { margin: 0 0 10px; font-size: 14.5px; color: #14295c; }
.cs-b { display: grid; grid-template-columns: minmax(70px, 150px) 1fr 52px; align-items: center; gap: 4px 10px; margin: 8px 0; font-size: 13px; }
.cs-b__t { font-weight: 700; color: #14295c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-b__bar { height: 11px; background: #eef2f9; border-radius: 99px; overflow: hidden; }
.cs-b__bar i { display: block; height: 100%; border-radius: 99px; }
.cs-b b { text-align: right; color: #14295c; }
.cs-b small { grid-column: 2 / -1; color: #7a8aa6; font-size: 11.5px; margin-top: -3px; }
.cs-rank__h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cs-rank__h h4 { margin: 0; }
.cs-acc { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-acc select { font: inherit; padding: 6px 10px; border: 1.5px solid #cfd9ea; border-radius: 10px; }
.cs-scroll { overflow-x: auto; margin-bottom: 8px; }
.cs-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cs-t th { text-align: left; background: #eef2f9; color: #38507a; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 10px; white-space: nowrap; }
.cs-t td { padding: 8px 10px; border-bottom: 1px solid #edf1f8; vertical-align: middle; }
.cs-t tr.cs-top td { background: #fffbeb; }
.cs-p { font-weight: 800; font-size: 17px; text-align: center; width: 54px; }
.cs-n { font-weight: 700; color: #14295c; }
.cs-g { font-size: 17px; }
.cs-f small { display: block; color: #7a8aa6; font-size: 11px; }
.cs-ch { display: inline-block; min-width: 38px; text-align: center; font-weight: 800; font-size: 12px; padding: 2px 6px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); }
.cs-podio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.cs-pod { text-align: center; background: linear-gradient(180deg, #fffbeb, #fff); border: 1px solid #fde68a; border-radius: 14px; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.cs-pod--2 { background: linear-gradient(180deg, #f1f5f9, #fff); border-color: #cbd5e1; }
.cs-pod--3 { background: linear-gradient(180deg, #fff1e6, #fff); border-color: #fdba74; }
.cs-pod__m { font-size: 34px; }
.cs-pod b { color: #14295c; }
.cs-pod small { color: #64748b; }
.cs-pod strong { font-size: 30px; line-height: 1.1; }
.cs-pod em { font-style: normal; color: #7a8aa6; font-size: 11.5px; }
.cs-honor { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.cs-honor h5 { margin: 0 0 4px; color: #2563eb; font-size: 14px; }
.cs-honor p { margin: 3px 0; font-size: 12.5px; display: flex; gap: 6px; align-items: baseline; color: #14295c; }
.cs-honor p b { margin-left: auto; }
@media print { .cs-b__bar i, .cs-ch, .cs-pod, .cs-t th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .cs-imprime .cs-chips, .cs-imprime .cs-acc { display: none; } }

/* Márgenes seguros: nada del reporte puede ser más ancho que su tarjeta (el contenido largo se ajusta o se desplaza dentro) */
.rf, .rf-steps, .rf-step, .rf-fields, .rf-fields label, .rf-foot, .rt, .rt-pane, .rt-nav, .cm-salida, .cm-rep, .rie, .rie-body, .rie-gen__b, .rie-top, .cs, .cs-panel, .cs-grid > *, .rg-panel { min-width: 0; max-width: 100%; box-sizing: border-box; }
.rf select, .rf input, .rt-pane select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; box-sizing: border-box; }
.rt-pane { overflow-x: auto; overflow-wrap: anywhere; }
.rt-pane table { max-width: 100%; }
.rt-pane img, .rt-pane svg, .cm-rep img, .cm-rep svg { max-width: 100%; height: auto; }
.rt-nav { overflow-x: auto; scrollbar-width: thin; }
.rf-crumb { min-width: 0; }
.rf-crumb span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-kpi > div, .cs-b__t { min-width: 0; }
.cs-kpi small { overflow-wrap: anywhere; }

/* ---------- Notas por simulacro y grado (colegio-simnotas.js) ---------- */
.sn-out { margin-top: 14px; }
.sn-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.sn-acc small { color: #7a8aa6; font-size: 12px; }
.sn-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-radius: 16px; color: #fff; margin-bottom: 12px; background: radial-gradient(circle at 100% 0, rgba(252, 209, 22, 0.28), transparent 45%), linear-gradient(120deg, #0f1f4d, #1e3a8a 60%, #4338ca); }
.sn-banner b { display: block; font-size: 17px; line-height: 1.25; }
.sn-banner small { display: block; opacity: 0.85; font-size: 12.5px; margin-top: 2px; }
.sn-banner__n { text-align: center; flex: none; background: rgba(255, 255, 255, 0.14); border-radius: 12px; padding: 6px 16px; }
.sn-banner__n b { font-size: 28px; }
.sn-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.sn-t th { position: sticky; top: 0; text-align: left; background: #eef2f9; color: #38507a; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 9px 10px; white-space: nowrap; border-bottom: 2px solid #d3dcef; }
.sn-t td { padding: 8px 10px; border-bottom: 1px solid #edf1f8; vertical-align: middle; }
.sn-t tbody tr:nth-child(even) td { background: #f8faff; }
.sn-t tbody tr:hover td { background: #eef4ff; }
.sn-t .sn-c { text-align: center; }
.sn-t tr.sn-off td { color: #7a8aa6; }
.sn-nom { color: #14295c; }
.sn-big { font-size: 15px; }
.sn-pc { display: inline-block; width: 64px; height: 8px; background: #e8edf7; border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.sn-pc i { display: block; height: 100%; border-radius: 99px; }
.sn-ch { display: inline-block; min-width: 38px; text-align: center; font-weight: 800; font-size: 12.5px; padding: 2px 7px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); }
.sn-niv { display: inline-block; font-weight: 800; font-size: 11.5px; padding: 2px 10px; border-radius: 99px; color: #fff; background: var(--c); }
.sn-vac { font-size: 12px; font-style: italic; color: #94a3b8; }
.sn-vac--sinaut { color: #b45309; }
.sn-nd { color: #cbd5e1; }
.sn-tot { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; padding: 11px 16px; border-radius: 12px; background: #eef4ff; border: 1px solid #c7d8fb; color: #1e3a8a; font-size: 13.5px; }
.sn-top { display: flex; align-items: baseline; gap: 8px; margin: 7px 0; font-size: 13.5px; color: #14295c; }
.sn-top em { font-style: normal; color: #7a8aa6; font-size: 12px; margin-left: auto; }
.sn-top strong { min-width: 52px; text-align: right; }
.sn-top > span { width: 24px; text-align: center; }
@media (max-width: 640px) { .sn-banner { flex-direction: column; align-items: flex-start; } }
@media print { .sn-acc { display: none; } .sn-niv, .sn-ch, .sn-pc i, .sn-banner, .sn-t th { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.rie > *, .sn, .sn-host, .sn-out, .sn .rt, .sn .rt-pane { min-width: 0; max-width: 100%; }
.sn-t td:nth-child(2) { white-space: nowrap; }

/* Red de seguridad para TODAS las pantallas con menú lateral (admin, rector, coordinador, docente, familias):
   lo que sea más ancho que la pantalla se desplaza dentro del panel en vez de quedar recortado por el borde. */
.adm-main { overflow-x: auto; overscroll-behavior-x: contain; }
.adm-pane, .adm-pane > *, .rie > *, .cl, .cl > * { min-width: 0; max-width: 100%; }
.adm-pane table { max-width: 100%; }
.cs-scroll, .rt-pane { max-width: 100%; }
@media print { .adm-main { overflow: visible !important; } }
.sn-ley { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: #f6f8fd; border: 1px solid #dbe3f1; font-size: 13px; color: #14295c; }
.sn-ley ul { margin: 8px 0 0; padding: 0; list-style: none; columns: 2 260px; }
.sn-ley li { margin: 4px 0; break-inside: avoid; }
.sn-ley li span { display: inline-block; min-width: 34px; font-weight: 800; color: #2563eb; }
