/* Organización visual de Niveles de logro; no altera cálculos ni impresión. */
@media screen {
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) { overflow: visible !important; height: auto !important; max-height: none !important; }
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) :is(.report-paper,.achievement-course-reports,.achievement-summary-report,.achievement-summary-scroll,.smart-table,.table-wrap) { width:100% !important; max-width:100% !important; min-width:0 !important; height:auto !important; max-height:none !important; overflow:visible !important; }
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) table { width:100% !important; max-width:100% !important; min-width:0 !important; table-layout:fixed !important; }
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) :is(th,td,.table-sort) { min-width:0 !important; white-space:normal !important; overflow-wrap:anywhere !important; word-break:normal !important; }
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) .achievement-insufficient-names { min-width:0 !important; }
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) .module-compact-actions { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; width: auto !important; min-width: 0 !important; }
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) .module-compact-actions button { flex: 0 1 auto !important; width: auto !important; min-width: 0 !important; height: auto !important; min-height: 40px !important; padding: 8px 12px !important; white-space: normal !important; font-size: 13px !important; }
  html body #appMain :is(#module-informes,#module-niveles-logro) .achievement-filters.achievement-reference-filters {
    display: grid !important; grid-template-columns: minmax(90px,.55fr) minmax(130px,.8fr) minmax(150px,1fr) minmax(220px,1.6fr) minmax(110px,.7fr) minmax(170px,1fr) !important;
    gap: 10px !important; width: 100% !important; min-width: 0 !important; height: auto !important;
  }
  html body #appMain :is(#module-informes,#module-niveles-logro) .achievement-filters.achievement-reference-filters label {
    display: grid !important; align-content: start !important; gap: 5px !important; min-width: 0 !important; margin: 0 !important; font-size: 13px !important; line-height: 1.3 !important;
  }
  html body #appMain :is(#module-informes,#module-niveles-logro) .achievement-filters.achievement-reference-filters :is(select,input) {
    width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; height: 40px !important; min-height: 40px !important; padding: 7px 9px !important; font-size: 13px !important; color: #123d78 !important;
  }
  html body #appMain :is(#module-informes,#module-niveles-logro):has(.achievement-filters) > .card.no-print { padding: 12px !important; height: auto !important; min-height: 0 !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) { width: 100% !important; max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; padding: clamp(12px,2vw,24px) !important; height: auto !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) .academic-report-summary { display: grid !important; grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 10px !important; margin: 14px 0 !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) .academic-report-summary article { display: flex !important; flex-direction: column !important; gap: 6px !important; padding: 12px !important; min-width: 0 !important; min-height: 0 !important; height: auto !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) .academic-report-summary article :is(span,b) { position: static !important; white-space: normal !important; overflow-wrap: anywhere !important; line-height: 1.35 !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) .report-grade-box { min-width: 0 !important; max-width: 100% !important; height: auto !important; margin: 14px 0 !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) :is(.table-wrap,.table-scroll,.smart-table-wrap) { width: 100% !important; max-width: 100% !important; min-width: 0 !important; overflow: visible !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) :is(th,td) { white-space: normal !important; overflow-wrap: anywhere !important; padding: 8px !important; height: auto !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) .achievement-insufficient-names { min-width: 160px; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) :is(.bar-chart,.bar-row,.report-header) { min-width: 0 !important; max-width: 100% !important; }
  html body .report-paper.report-course-paper:has(.academic-report-summary) :is(h2,h3,p,small,.bar-label) { overflow-wrap: anywhere !important; white-space: normal !important; }
  @media(max-width:1200px) {
    html body #appMain :is(#module-informes,#module-niveles-logro) .achievement-filters.achievement-reference-filters { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  }
  @media(max-width:650px) {
    html body #appMain :is(#module-informes,#module-niveles-logro) .achievement-filters.achievement-reference-filters { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
    html body .report-paper.report-course-paper:has(.academic-report-summary) .academic-report-summary { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
    html body .report-paper.report-course-paper:has(.academic-report-summary) .report-header { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; }
    html body .report-paper.report-course-paper:has(.academic-report-summary) .report-header > div { min-width: 0 !important; max-width: 100% !important; }
  }
  @media(max-width:360px) {
    html body #appMain :is(#module-informes,#module-niveles-logro) .achievement-filters.achievement-reference-filters { grid-template-columns: minmax(0,1fr) !important; }
  }
}
