.habilitados-page {
    --nacional-blue: #2469b3;
    --nacional-ink: #20334a;
    --nacional-muted: #5c6c80;
    color: var(--nacional-ink);
    background: #f5f7fb;
    padding-bottom: 48px;
    min-height: 80vh;
}

.skip-link {
    position: fixed;
    top: -80px;
    left: 16px;
    z-index: 1100;
    padding: 12px 18px;
    background: #fff;
    border: 2px solid #2469b3;
    border-radius: 8px;
}

.skip-link:focus { top: 10px; }

.habilitados-hero {
    padding: 116px 0 68px;
    background: #e8f0fc;
    border-bottom: 1px solid #d7e3f4;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.hero-eyebrow {
    color: var(--nacional-blue);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}

.hero-copy h1 {
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    margin: 0 0 20px;
}

.hero-description { color: #425773; margin: 0; }

.hero-summary {
    flex: 0 0 auto;
    text-align: right;
    padding-left: 32px;
    border-left: 1px solid #c8d7ec;
}

.hero-summary strong {
    display: block;
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
    color: var(--nacional-blue);
    font-variant-numeric: tabular-nums;
}

.hero-summary > span { display: block; margin-top: 10px; }
.hero-summary p { color: #425773; margin: 18px 0 0; font-size: 0.85rem; }

.listado-section { margin-top: -28px; position: relative; scroll-margin-top: 84px; }

.filters-panel {
    display: grid;
    grid-template-columns: minmax(140px, 0.7fr) minmax(180px, 1fr) minmax(220px, 1.3fr) auto;
    align-items: end;
    gap: 18px;
    padding: 26px;
    margin-bottom: 36px;
    border: 1px solid #e0e6ef;
    border-radius: 14px;
    box-shadow: 0 5px 22px #20334a08;
    background: #fff;
}

.filter-field { min-width: 0; }
.filter-field label { display: block; margin-bottom: 8px; font-size: 0.85rem; font-weight: 700; }
.filter-field .form-select { min-height: 46px; font-size: 0.95rem; color: var(--nacional-ink); border-color: #cbd5e2; }

.clear-button, .retry-button {
    border: 1px solid #adc2db;
    border-radius: 7px;
    padding: 11px 16px;
    color: #1e5b9c;
    background: #f7faff;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 46px;
}

.clear-button:hover, .retry-button:hover { background: #e8f0fc; }
.clear-button:disabled { opacity: 0.6; cursor: default; }
.filters-panel :focus-visible, .retry-button:focus-visible { outline: 3px solid #2469b3; outline-offset: 3px; }
.filters-note { grid-column: 1 / -1; font-size: 0.8rem; color: var(--nacional-muted); margin: 0; }

.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.results-heading h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 6px; }
.results-heading p { color: var(--nacional-muted); font-size: 0.9rem; margin: 0; }
.sort-note { color: var(--nacional-muted); font-size: 0.8rem; }
.results-panel { background: #fff; border: 1px solid #e0e6ef; border-radius: 12px; overflow: hidden; }
.students-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.85rem; }
.col-alumno { width: 22%; }
.col-nivel { width: 8%; }
.col-escuela { width: 25%; }
.col-localidad { width: 15%; }
.col-provincia { width: 13%; }
.col-region { width: 17%; }
.students-table thead { color: #435a73; background: #f0f4fa; }
.students-table th, .students-table td { padding: 16px 14px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.students-table thead th { font-size: 0.75rem; font-weight: 700; }
.students-table tbody th { font-weight: 600; }
.students-table tbody tr + tr { border-top: 1px solid #e9edf3; }
.students-table tbody tr:nth-child(even) { background: #fafbfd; }
.students-table tbody tr:hover { background: #f0f6ff; }
.level-badge { display: inline-block; padding: 3px 10px; border-radius: 5px; background: #eaf1fc; color: #1e5b9c; font-weight: 700; }
.listado-feedback { padding: 28px; background: #fff; border: 1px solid #dce4ef; border-radius: 12px; color: var(--nacional-muted); }
.listado-feedback.is-error { border-color: #d5a5a5; color: #873333; }
.retry-button { margin-top: 4px; }

@media (max-width: 991.98px) {
    .filters-panel { grid-template-columns: 1fr 1fr; }
    .hero-summary { padding-left: 24px; }
    .hero-summary strong { font-size: 3.7rem; }
}

@media (max-width: 767.98px) {
    .habilitados-hero { padding: 100px 0 52px; }
    .hero-content { flex-direction: column; align-items: stretch; gap: 28px; }
    .hero-eyebrow { font-size: 0.75rem; }
    .hero-copy h1 { font-size: 2.25rem; }
    .hero-description { font-size: 0.9rem; }
    .hero-summary { padding: 20px 0 0; border-left: 0; border-top: 1px solid #c8d7ec; text-align: left; }
    .hero-summary strong { display: inline; font-size: 2.8rem; margin-right: 8px; }
    .hero-summary > span { display: inline; font-size: 0.9rem; }
    .hero-summary p { margin-top: 10px; font-size: 0.78rem; }
    .filters-panel { padding: 20px; gap: 16px; }
    .filter-region { grid-column: 1 / -1; }
    .clear-button { grid-column: 1 / -1; }
    .filters-note { font-size: 0.75rem; line-height: 1.5; }
    .sort-note { display: none; }
    .results-panel { border: 0; border-radius: 0; background: transparent; overflow: visible; }
    .students-table, .students-table tbody { display: block; width: 100%; }
    .students-table colgroup { display: none; }
    .students-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
    .students-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 20px; margin-bottom: 14px; border: 1px solid #e0e6ef; border-radius: 12px; background: #fff; }
    .students-table tbody tr:nth-child(even) { background: #fff; }
    .students-table tbody th, .students-table tbody td { display: block; padding: 0; min-width: 0; }
    .students-table tbody th { grid-column: 1 / -1; font-size: 1rem; color: #1e5b9c; }
    .students-table td::before { content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 600; color: var(--nacional-muted); margin-bottom: 4px; }
    .students-table .student-school, .students-table .student-region { grid-column: 1 / -1; }
    .students-table .student-level { grid-column: 1 / -1; }
    .students-table .student-level::before { display: none; }
    .level-badge::before { content: "Nivel "; }
}

@media (max-width: 399.98px) {
    .hero-copy h1 { font-size: 1.95rem; }
    .filters-panel { grid-template-columns: minmax(0, 1fr); }
    .filters-panel > * { grid-column: 1; }
}
