﻿:root {
    --color-primary-blue: #2f9f58;
    --color-primary-light: #b7f5a1;
    --color-accent: #ff7a5c;
    --color-surface: #f0fff4;
    --color-surface-2: #ffffff;
    --color-text-dark: #163d2a;
    --color-text-light: #607a68;
    --color-border: rgba(47, 143, 85, 0.12);
    --color-success: #3f8f5c;
    --color-error: #d32f2f;
    --shadow-sm: 0 4px 10px rgba(47, 143, 85, 0.08);
    --shadow-md: 0 10px 24px rgba(47, 143, 85, 0.12);
    --shadow-lg: 0 18px 48px rgba(47, 143, 85, 0.16);
    --transition: all 0.32s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
    color: var(--color-text-dark);
    line-height: 1.65;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
}

/* ========================================
   DENSIDAD COMODA GLOBAL
   Reduce espacios excesivos sin cambiar la identidad visual.
   ======================================== */
@media screen {
    .page-header,
    .main-content,
    .footer-content {
        width: min(1240px, calc(100% - 32px)) !important;
    }

    .topbar {
        min-height: 58px !important;
        padding-block: 6px !important;
        gap: 14px !important;
    }

    .brand {
        gap: 9px !important;
    }

    .brand img {
        width: 38px !important;
        height: 38px !important;
    }

    .topbar-actions,
    .form-actions,
    .preview-actions {
        gap: 8px !important;
    }

    .hero-panel {
        min-height: auto !important;
        margin-block: 4px 14px !important;
        padding: clamp(14px, 2vw, 20px) !important;
        gap: clamp(12px, 2vw, 18px) !important;
    }

    .hero-copy,
    .section-header,
    .panel-heading,
    .area-heading div {
        gap: 5px !important;
    }

    .hero-panel h1,
    .hero-copy h1 {
        font-size: clamp(28px, 3vw, 38px) !important;
        line-height: 1.05 !important;
    }

    .hero-description,
    .hero-panel p,
    .section-header p,
    .panel-heading p,
    .area-heading p,
    .empty-state p {
        line-height: 1.42 !important;
    }

    .quick-summary,
    .summary-grid,
    .hero-summary {
        gap: 8px !important;
    }

    .quick-summary div,
    .summary-grid div,
    .hero-summary div {
        min-height: 58px !important;
        padding: 9px 12px !important;
    }

    .main-content {
        padding-bottom: 18px !important;
    }

    .area-section,
    .database-panel,
    .report-controls,
    .empty-state,
    .panel,
    .form-panel,
    .role-panel,
    .list-panel,
    .info-panel,
    .import-panel,
    .register-panel,
    .chart-panel,
    .report-panel,
    .filters-panel,
    .control-panel,
    .schedule-panel,
    .justification-panel,
    .course-picker,
    .grade-book,
    .attendance-book,
    .settings-card,
    .section-manual,
    .section-masiva,
    .preview-section {
        padding: clamp(14px, 1.8vw, 18px) !important;
        margin-bottom: 14px !important;
    }

    .area-heading,
    .panel-header,
    .attendance-header,
    .preview-header {
        gap: 10px !important;
        margin-bottom: 12px !important;
        padding-bottom: 12px !important;
    }

    .section-header {
        margin-bottom: 12px !important;
    }

    .section-header h2,
    .panel-heading h2,
    .panel-header h2,
    .area-heading h2,
    .empty-state h2 {
        font-size: clamp(20px, 2.2vw, 24px) !important;
        line-height: 1.15 !important;
    }

    .workspace-grid,
    .container-alumnos,
    .dashboard-grid,
    .area-grid,
    .metric-grid,
    .filters-grid,
    .form-grid,
    .controls-grid,
    .picker-grid,
    .justification-selectors,
    .justifier-grid,
    .upload-grid,
    .settings-grid {
        gap: 12px !important;
    }

    .area-grid,
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
    }

    .dashboard-card,
    .metric-card,
    .role-card,
    .permission-card,
    .course-students-card,
    .status-card,
    .donut-card,
    .list-card,
    .student-summary div,
    .general-average,
    .card-upload,
    .info-box {
        min-height: auto !important;
        padding: clamp(12px, 1.6vw, 16px) !important;
        gap: 7px !important;
    }

    .dashboard-card {
        grid-template-rows: auto auto auto 1fr auto !important;
    }

    .featured-card {
        min-height: auto !important;
        padding: clamp(13px, 1.6vw, 16px) !important;
    }

    .card-icon,
    .featured-card .card-icon,
    .upload-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 22px !important;
    }

    .dashboard-card h3,
    .role-card h3,
    .card-upload h3,
    .list-card h3 {
        font-size: clamp(17px, 1.8vw, 19px) !important;
        line-height: 1.16 !important;
    }

    .dashboard-card p,
    .role-card p,
    .metric-card p,
    .card-upload p,
    .info-box p,
    .list-card p {
        line-height: 1.38 !important;
    }

    .card-link,
    .btn-secondary,
    .btn-primary,
    .btn-warning,
    .btn-submit,
    .btn-upload,
    .btn-login,
    .btn-logout,
    .btn-back,
    .download-button {
        min-height: 36px !important;
        padding-inline: 12px !important;
    }

    input,
    select,
    textarea,
    .custom-student-button,
    .credential-display,
    .selected-file,
    .selected-file-preview {
        min-height: 40px !important;
    }

    textarea {
        min-height: 84px !important;
    }

    .formulario-alumnos,
    .teacher-form,
    .user-form,
    .late-form,
    .settings-form,
    .justification-form,
    .evaluation-form {
        gap: 12px !important;
    }

    .table-wrapper,
    .table-zone {
        margin-top: 8px !important;
    }

    .footer {
        margin-top: 16px !important;
        padding-block: 16px !important;
    }
}

@media screen and (max-width: 980px) {
    .hero-panel,
    .workspace-grid,
    .container-alumnos,
    .filters-panel,
    .control-panel {
        grid-template-columns: 1fr !important;
    }

    .quick-summary,
    .summary-grid,
    .hero-summary,
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 680px) {
    .page-header,
    .main-content,
    .footer-content {
        width: min(100% - 22px, 1240px) !important;
    }

    .topbar {
        padding-block: 10px !important;
    }

    .hero-panel {
        padding: 14px !important;
    }

    .quick-summary,
    .summary-grid,
    .hero-summary,
    .metric-grid,
    .area-grid,
    .dashboard-grid,
    .filters-grid,
    .form-grid,
    .controls-grid,
    .picker-grid,
    .justification-selectors,
    .justifier-grid,
    .upload-grid,
    .student-summary,
    .signature-grid {
        grid-template-columns: 1fr !important;
    }

    .area-section,
    .database-panel,
    .report-controls,
    .empty-state,
    .panel,
    .form-panel,
    .role-panel,
    .list-panel,
    .info-panel,
    .import-panel,
    .register-panel,
    .chart-panel,
    .report-panel,
    .filters-panel,
    .control-panel,
    .schedule-panel,
    .justification-panel,
    .course-picker,
    .grade-book,
    .attendance-book,
    .settings-card,
    .section-manual,
    .section-masiva,
    .preview-section {
        padding: 13px !important;
    }
}

/* ========================================
   CAPA MOVIL TIPO APP PARA MODULOS
   No modifica Home; Login tiene su propia capa movil.
   ======================================== */
@media screen and (max-width: 680px) {
    body:not(.body-home):not(.body-login) {
        min-height: 100dvh;
        background: linear-gradient(180deg, #f7fff8 0%, #edf7ef 100%) !important;
        overflow-x: hidden;
        padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
        -webkit-tap-highlight-color: transparent;
    }

    body:not(.body-home):not(.body-login) .page-header,
    body:not(.body-home):not(.body-login) .main-content,
    body:not(.body-home):not(.body-login) .footer-content {
        width: min(100% - 18px, 1240px) !important;
    }

    body:not(.body-home):not(.body-login) .topbar {
        position: sticky !important;
        top: 0;
        z-index: 30;
        min-height: 58px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
        margin-inline: -9px !important;
        padding: max(8px, env(safe-area-inset-top)) 9px 8px !important;
        background: rgba(248, 251, 255, 0.92) !important;
        border-bottom: 1px solid rgba(47, 143, 85, 0.08);
        backdrop-filter: blur(14px);
    }

    body:not(.body-home):not(.body-login) .brand {
        min-width: 0;
        gap: 8px !important;
    }

    body:not(.body-home):not(.body-login) .brand img {
        width: 34px !important;
        height: 34px !important;
    }

    body:not(.body-home):not(.body-login) .brand span {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px !important;
    }

    body:not(.body-home):not(.body-login) .topbar-actions {
        width: auto !important;
        max-width: 48vw;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 7px !important;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    body:not(.body-home):not(.body-login) .topbar-actions::-webkit-scrollbar {
        display: none;
    }

    body:not(.body-home):not(.body-login) .topbar-actions a,
    body:not(.body-home):not(.body-login) .topbar-actions button,
    body:not(.body-home):not(.body-login) .btn-secondary,
    body:not(.body-home):not(.body-login) .btn-primary,
    body:not(.body-home):not(.body-login) .btn-warning,
    body:not(.body-home):not(.body-login) .btn-submit,
    body:not(.body-home):not(.body-login) .btn-back,
    body:not(.body-home):not(.body-login) .btn-upload,
    body:not(.body-home):not(.body-login) .download-button {
        width: auto !important;
        min-height: 34px !important;
        flex: 0 0 auto;
        padding-inline: 11px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        line-height: 1.1 !important;
        box-shadow: 0 5px 14px rgba(47, 143, 85, 0.08);
        white-space: nowrap;
    }

    body:not(.body-home):not(.body-login) .hero-panel {
        min-height: auto !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin: 10px 0 12px !important;
        padding: 15px !important;
        border-radius: 8px !important;
        box-shadow: 0 10px 24px rgba(47, 143, 85, 0.12) !important;
    }

    body:not(.body-home):not(.body-login) .hero-copy,
    body:not(.body-home):not(.body-login) .section-title,
    body:not(.body-home):not(.body-login) .panel-heading,
    body:not(.body-home):not(.body-login) .panel-header > div,
    body:not(.body-home):not(.body-login) .book-title {
        gap: 5px !important;
    }

    body:not(.body-home):not(.body-login) .eyebrow,
    body:not(.body-home):not(.body-login) .section-label,
    body:not(.body-home):not(.body-login) .area-label {
        font-size: 10px !important;
        letter-spacing: 0.08em !important;
    }

    body:not(.body-home):not(.body-login) .hero-panel h1,
    body:not(.body-home):not(.body-login) .hero-copy h1 {
        font-size: 25px !important;
        line-height: 1.08 !important;
    }

    body:not(.body-home):not(.body-login) .hero-panel p,
    body:not(.body-home):not(.body-login) .hero-description {
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    body:not(.body-home):not(.body-login) .quick-summary,
    body:not(.body-home):not(.body-login) .hero-summary,
    body:not(.body-home):not(.body-login) .summary-grid,
    body:not(.body-home):not(.body-login) .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body:not(.body-home):not(.body-login) .quick-summary div,
    body:not(.body-home):not(.body-login) .hero-summary div,
    body:not(.body-home):not(.body-login) .summary-grid div,
    body:not(.body-home):not(.body-login) .metric-card,
    body:not(.body-home):not(.body-login) .status-card {
        min-height: 56px !important;
        padding: 9px 10px !important;
        border-radius: 8px !important;
    }

    body:not(.body-home):not(.body-login) .main-content {
        padding-bottom: 8px !important;
        min-width: 0 !important;
    }

    body:not(.body-home):not(.body-login) .area-section,
    body:not(.body-home):not(.body-login) .database-panel,
    body:not(.body-home):not(.body-login) .report-controls,
    body:not(.body-home):not(.body-login) .empty-state,
    body:not(.body-home):not(.body-login) .panel,
    body:not(.body-home):not(.body-login) .form-panel,
    body:not(.body-home):not(.body-login) .role-panel,
    body:not(.body-home):not(.body-login) .list-panel,
    body:not(.body-home):not(.body-login) .info-panel,
    body:not(.body-home):not(.body-login) .import-panel,
    body:not(.body-home):not(.body-login) .register-panel,
    body:not(.body-home):not(.body-login) .chart-panel,
    body:not(.body-home):not(.body-login) .report-panel,
    body:not(.body-home):not(.body-login) .filters-panel,
    body:not(.body-home):not(.body-login) .control-panel,
    body:not(.body-home):not(.body-login) .schedule-panel,
    body:not(.body-home):not(.body-login) .justification-panel,
    body:not(.body-home):not(.body-login) .course-picker,
    body:not(.body-home):not(.body-login) .grade-book,
    body:not(.body-home):not(.body-login) .attendance-book,
    body:not(.body-home):not(.body-login) .settings-card,
    body:not(.body-home):not(.body-login) .section-manual,
    body:not(.body-home):not(.body-login) .section-masiva,
    body:not(.body-home):not(.body-login) .preview-section {
        margin-bottom: 12px !important;
        padding: 12px !important;
        border-radius: 8px !important;
        box-shadow: 0 8px 20px rgba(47, 143, 85, 0.07) !important;
    }

    body:not(.body-home):not(.body-login) .panel-header,
    body:not(.body-home):not(.body-login) .panel-heading,
    body:not(.body-home):not(.body-login) .book-header,
    body:not(.body-home):not(.body-login) .attendance-header,
    body:not(.body-home):not(.body-login) .preview-header,
    body:not(.body-home):not(.body-login) .area-heading {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 9px !important;
        margin-bottom: 10px !important;
        padding-bottom: 10px !important;
    }

    body:not(.body-home):not(.body-login) .panel-heading h2,
    body:not(.body-home):not(.body-login) .panel-header h2,
    body:not(.body-home):not(.body-login) .book-title h2,
    body:not(.body-home):not(.body-login) .area-heading h2,
    body:not(.body-home):not(.body-login) .empty-state h2,
    body:not(.body-home):not(.body-login) .course-picker h2 {
        font-size: 20px !important;
        line-height: 1.14 !important;
    }

    body:not(.body-home):not(.body-login) .workspace-grid,
    body:not(.body-home):not(.body-login) .container-alumnos,
    body:not(.body-home):not(.body-login) .filters-panel,
    body:not(.body-home):not(.body-login) .control-panel,
    body:not(.body-home):not(.body-login) .course-picker,
    body:not(.body-home):not(.body-login) .filters,
    body:not(.body-home):not(.body-login) .filters-grid,
    body:not(.body-home):not(.body-login) .form-grid,
    body:not(.body-home):not(.body-login) .form-row,
    body:not(.body-home):not(.body-login) .controls-grid,
    body:not(.body-home):not(.body-login) .picker-grid,
    body:not(.body-home):not(.body-login) .justification-selectors,
    body:not(.body-home):not(.body-login) .justifier-grid,
    body:not(.body-home):not(.body-login) .upload-grid,
    body:not(.body-home):not(.body-login) .settings-grid,
    body:not(.body-home):not(.body-login) .bulk-actions {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body:not(.body-home):not(.body-login) label,
    body:not(.body-home):not(.body-login) .form-group {
        gap: 5px !important;
        font-size: 12px !important;
    }

    body:not(.body-home):not(.body-login) input,
    body:not(.body-home):not(.body-login) select,
    body:not(.body-home):not(.body-login) textarea,
    body:not(.body-home):not(.body-login) .custom-student-button,
    body:not(.body-home):not(.body-login) .credential-display,
    body:not(.body-home):not(.body-login) .selected-file,
    body:not(.body-home):not(.body-login) .selected-file-preview {
        min-height: 46px !important;
        border-radius: 8px !important;
        font-size: 16px !important;
        line-height: 1.25 !important;
    }

    body:not(.body-home):not(.body-login) textarea {
        min-height: 92px !important;
    }

    body:not(.body-home):not(.body-login) .form-actions,
    body:not(.body-home):not(.body-login) .bulk-actions,
    body:not(.body-home):not(.body-login) .data-actions,
    body:not(.body-home):not(.body-login) .lock-actions,
    body:not(.body-home):not(.body-login) .preview-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    body:not(.body-home):not(.body-login) .form-actions a,
    body:not(.body-home):not(.body-login) .form-actions button,
    body:not(.body-home):not(.body-login) .bulk-actions a,
    body:not(.body-home):not(.body-login) .bulk-actions button,
    body:not(.body-home):not(.body-login) .data-actions a,
    body:not(.body-home):not(.body-login) .data-actions button,
    body:not(.body-home):not(.body-login) .lock-actions a,
    body:not(.body-home):not(.body-login) .lock-actions button,
    body:not(.body-home):not(.body-login) .preview-actions a,
    body:not(.body-home):not(.body-login) .preview-actions button {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center !important;
        font-size: 14px !important;
    }

    body:not(.body-home):not(.body-login) .topbar-actions a,
    body:not(.body-home):not(.body-login) .topbar-actions button {
        width: auto !important;
        min-height: 34px !important;
        font-size: 12px !important;
    }

    body:not(.body-home):not(.body-login) .settings-nav {
        position: sticky !important;
        top: 58px !important;
        z-index: 20;
        display: flex !important;
        gap: 6px !important;
        width: calc(100% + 4px) !important;
        margin: 0 -2px 12px !important;
        padding: 5px !important;
        overflow-x: auto;
        border: 1px solid rgba(47, 143, 85, 0.1);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 8px 18px rgba(47, 143, 85, 0.08);
        backdrop-filter: blur(14px);
        scrollbar-width: none;
    }

    body:not(.body-home):not(.body-login) .settings-nav::-webkit-scrollbar {
        display: none;
    }

    body:not(.body-home):not(.body-login) .settings-nav button,
    body:not(.body-home):not(.body-login) .settings-nav a {
        flex: 0 0 auto;
        width: auto !important;
        min-height: 36px !important;
        padding: 0 12px !important;
        border-radius: 8px !important;
        white-space: nowrap;
    }

    body:not(.body-home):not(.body-login) .dashboard-card,
    body:not(.body-home):not(.body-login) .role-card,
    body:not(.body-home):not(.body-login) .permission-card,
    body:not(.body-home):not(.body-login) .course-students-card,
    body:not(.body-home):not(.body-login) .list-card,
    body:not(.body-home):not(.body-login) .card-upload,
    body:not(.body-home):not(.body-login) .info-box {
        border-radius: 8px !important;
        box-shadow: 0 8px 18px rgba(47, 143, 85, 0.07) !important;
    }

    body:not(.body-home):not(.body-login) .table-wrapper,
    body:not(.body-home):not(.body-login) .table-zone,
    body:not(.body-home):not(.body-login) .records-list,
    body:not(.body-home):not(.body-login) .list-wrapper {
        border-radius: 8px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    body:not(.body-home):not(.body-login) .toast,
    body:not(.body-home):not(.body-login) .access-toast {
        right: 9px !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: 9px !important;
        max-width: none !important;
        border-radius: 8px !important;
    }

    body:not(.body-home):not(.body-login) table th,
    body:not(.body-home):not(.body-login) table td {
        vertical-align: middle !important;
    }
}

@media screen and (max-width: 380px) {
    body:not(.body-home):not(.body-login) .brand span {
        max-width: 145px;
    }

    body:not(.body-home):not(.body-login) .topbar-actions {
        max-width: 44vw;
    }

    body:not(.body-home):not(.body-login) .hero-panel h1,
    body:not(.body-home):not(.body-login) .hero-copy h1 {
        font-size: 23px !important;
    }

    body:not(.body-home):not(.body-login) .quick-summary,
    body:not(.body-home):not(.body-login) .hero-summary,
    body:not(.body-home):not(.body-login) .summary-grid,
    body:not(.body-home):not(.body-login) .metric-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   ENCABEZADOS COMPACTOS TIPO HOME
   Unifica los headers de todos los modulos sin tocar cada HTML.
   ======================================== */
@media screen {
    html body:not(.body-login) header.page-header,
    html body:not(.body-login) main.main-content,
    html body:not(.body-login) .footer-content {
        width: min(1240px, calc(100% - 32px)) !important;
        margin-inline: auto !important;
    }

    html body:not(.body-login) header.page-header .topbar {
        min-height: 64px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 24px !important;
        padding: 8px 0 !important;
    }

    html body:not(.body-login) header.page-header .brand {
        display: inline-flex !important;
        align-items: center !important;
        gap: 10px !important;
        color: #0f3022 !important;
        text-decoration: none !important;
        font-size: 14px !important;
        font-weight: 800 !important;
    }

    html body:not(.body-login) header.page-header .brand img {
        width: 42px !important;
        height: 42px !important;
        object-fit: contain !important;
    }

    html body:not(.body-login) header.page-header .topbar-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 12px !important;
    }

    html body:not(.body-login) header.page-header .hero-panel {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
        gap: 18px !important;
        align-items: stretch !important;
        min-height: 168px !important;
        margin: 4px 0 16px !important;
        padding: 20px 22px !important;
        border: 0 !important;
        border-radius: 8px !important;
        background: linear-gradient(135deg, #163d2a 0%, #2f9f58 58%, #9be78d 100%) !important;
        color: #ffffff !important;
        box-shadow: 0 14px 30px rgba(47, 143, 85, 0.14) !important;
    }

    html body:not(.body-login) header.page-header .hero-panel:not(:has(.quick-summary)):not(:has(.hero-summary)):not(:has(.summary-grid)) {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body:not(.body-login) header.page-header .hero-copy {
        display: grid !important;
        align-content: center !important;
        gap: 8px !important;
    }

    html body:not(.body-login) header.page-header .eyebrow {
        margin: 0 !important;
        color: inherit !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        letter-spacing: 0.12em !important;
        opacity: 0.76 !important;
        text-transform: uppercase !important;
    }

    html body:not(.body-login) header.page-header .hero-panel h1,
    html body:not(.body-login) header.page-header .hero-copy h1 {
        margin: 0 !important;
        color: #ffffff !important;
        font-size: clamp(28px, 3.5vw, 38px) !important;
        line-height: 1.04 !important;
        font-weight: 900 !important;
    }

    html body:not(.body-login) header.page-header .hero-panel p,
    html body:not(.body-login) header.page-header .hero-description,
    html body:not(.body-login) header.page-header .hero-copy p:last-child {
        max-width: 690px !important;
        margin: 0 !important;
        color: rgba(255, 255, 255, 0.92) !important;
        font-size: 15px !important;
        line-height: 1.45 !important;
    }

    html body:not(.body-login) header.page-header .quick-summary,
    html body:not(.body-login) header.page-header .hero-summary,
    html body:not(.body-login) header.page-header .summary-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)) !important;
        gap: 8px !important;
        align-content: center !important;
    }

    html body:not(.body-login) header.page-header .quick-summary div,
    html body:not(.body-login) header.page-header .hero-summary div,
    html body:not(.body-login) header.page-header .summary-grid div {
        display: grid !important;
        gap: 2px !important;
        min-height: 74px !important;
        align-content: center !important;
        padding: 10px 14px !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.16) !important;
        color: #ffffff !important;
        backdrop-filter: blur(4px);
    }

    html body:not(.body-login) header.page-header .quick-summary strong,
    html body:not(.body-login) header.page-header .hero-summary strong,
    html body:not(.body-login) header.page-header .summary-grid strong {
        color: #ffffff !important;
        font-size: 23px !important;
        line-height: 1 !important;
    }

    html body:not(.body-login) header.page-header .quick-summary span,
    html body:not(.body-login) header.page-header .hero-summary span,
    html body:not(.body-login) header.page-header .summary-grid span {
        color: rgba(255, 255, 255, 0.8) !important;
        font-size: 12px !important;
        font-weight: 700 !important;
    }
}

@media screen and (max-width: 980px) {
    html body:not(.body-login) header.page-header .hero-panel {
        grid-template-columns: 1fr !important;
    }
}

@media screen and (max-width: 680px) {
    html body:not(.body-login) header.page-header,
    html body:not(.body-login) main.main-content,
    html body:not(.body-login) .footer-content {
        width: min(100% - 18px, 1240px) !important;
    }

    html body:not(.body-login) header.page-header .topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 30 !important;
        min-height: 58px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 10px !important;
        margin-inline: -9px !important;
        padding: max(8px, env(safe-area-inset-top)) 9px 8px !important;
        background: rgba(247, 251, 255, 0.9) !important;
        border-bottom: 1px solid rgba(47, 143, 85, 0.08) !important;
        backdrop-filter: blur(14px);
    }

    html body:not(.body-login) header.page-header .brand {
        min-width: 0 !important;
        gap: 8px !important;
    }

    html body:not(.body-login) header.page-header .brand img {
        width: 34px !important;
        height: 34px !important;
    }

    html body:not(.body-login) header.page-header .brand span {
        max-width: 185px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 13px !important;
    }

    html body:not(.body-login) header.page-header .topbar-actions {
        width: auto !important;
        max-width: 48vw !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        overflow-x: auto !important;
        overscroll-behavior-x: contain !important;
        scrollbar-width: none !important;
    }

    html body:not(.body-login) header.page-header .topbar-actions::-webkit-scrollbar {
        display: none !important;
    }

    html body:not(.body-login) header.page-header .topbar-actions a,
    html body:not(.body-login) header.page-header .topbar-actions button,
    html body:not(.body-login) header.page-header .btn-logout {
        width: auto !important;
        min-height: 34px !important;
        flex: 0 0 auto !important;
        padding: 0 11px !important;
        border-radius: 8px !important;
        font-size: 12px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    html body:not(.body-login) header.page-header .user-info {
        display: none !important;
    }

    html body:not(.body-login) header.page-header .hero-panel {
        min-height: auto !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin: 10px 0 12px !important;
        padding: 15px !important;
        border-radius: 8px !important;
        box-shadow: 0 10px 24px rgba(47, 143, 85, 0.13) !important;
    }

    html body:not(.body-login) header.page-header .hero-copy {
        gap: 6px !important;
    }

    html body:not(.body-login) header.page-header .eyebrow {
        font-size: 11px !important;
        letter-spacing: 0.1em !important;
    }

    html body:not(.body-login) header.page-header .hero-panel h1,
    html body:not(.body-login) header.page-header .hero-copy h1 {
        font-size: 25px !important;
        line-height: 1.08 !important;
    }

    html body:not(.body-login) header.page-header .hero-panel p,
    html body:not(.body-login) header.page-header .hero-description {
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    html body:not(.body-login) header.page-header .quick-summary,
    html body:not(.body-login) header.page-header .hero-summary,
    html body:not(.body-login) header.page-header .summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)) !important;
        gap: 7px !important;
    }

    html body:not(.body-login) header.page-header .quick-summary div,
    html body:not(.body-login) header.page-header .hero-summary div,
    html body:not(.body-login) header.page-header .summary-grid div {
        min-height: 54px !important;
        justify-items: center !important;
        padding: 8px 6px !important;
        text-align: center !important;
    }

    html body:not(.body-login) header.page-header .quick-summary strong,
    html body:not(.body-login) header.page-header .hero-summary strong,
    html body:not(.body-login) header.page-header .summary-grid strong {
        font-size: 18px !important;
    }

    html body:not(.body-login) header.page-header .quick-summary span,
    html body:not(.body-login) header.page-header .hero-summary span,
    html body:not(.body-login) header.page-header .summary-grid span {
        font-size: 10px !important;
    }
}

/* ========================================
   CONTROL DE ACCESO
   ======================================== */
.access-disabled {
    cursor: not-allowed !important;
    opacity: 0.52 !important;
    pointer-events: none;
}

.dashboard-card.access-card-locked {
    position: relative;
    filter: grayscale(0.18);
}

.dashboard-card.access-card-locked::after,
.dashboard-card.access-card-readonly::after {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.dashboard-card.access-card-locked::after {
    content: "Bloqueado";
    background: #fee2e2;
    color: #991b1b;
}

.dashboard-card.access-card-readonly::after {
    content: "Solo ver";
    background: #e4f8e9;
    color: #1f7a3d;
}

.access-readonly input:not([type="search"]):not([type="hidden"]),
.access-readonly textarea,
.access-readonly .access-disabled {
    background: #f4f7fb !important;
    color: #607a68 !important;
}

.access-lock-panel {
    min-height: 360px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    padding: 34px 20px;
    border: 1px solid rgba(47, 143, 85, 0.1);
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 8px 22px rgba(47, 143, 85, 0.07);
}

.access-lock-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 28px;
    font-weight: 900;
}

.access-lock-panel h2 {
    margin: 0;
    color: #163d2a;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 900;
}

.access-lock-panel p {
    max-width: 460px;
    margin: 0;
    color: #607a68;
    font-size: 14px;
    line-height: 1.5;
}

.access-lock-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 8px;
    background: #e4f8e9;
    color: #1f7a3d;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.access-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: none;
    max-width: calc(100vw - 48px);
    padding: 14px 16px;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
    background: #ffffff;
    color: #991b1b;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(47, 143, 85, 0.16);
}

.access-toast.show {
    display: block;
}

/* ========================================
   TEMA VERDE CLARO LICEO LUIS LEYTON RUBIO
   ======================================== */
:root {
    --theme-green-deep: #0f3d24;
    --theme-green: #2f9f58;
    --theme-green-soft: #6ed47c;
    --theme-green-mist: #e9f9ec;
    --theme-gold: #f3b73f;
}

body {
    background-color: #f4fbf2;
}

body.body-login {
    background:
        linear-gradient(rgba(47, 159, 88, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47, 159, 88, 0.045) 1px, transparent 1px),
        linear-gradient(135deg, #f0fff4 0%, #fbfff7 48%, #fff8ed 100%) !important;
    background-size: 42px 42px, 42px 42px, auto !important;
}

.hero-panel,
.login-brand {
    background:
        linear-gradient(135deg, rgba(15, 61, 36, 0.98) 0%, rgba(47, 159, 88, 0.96) 58%, rgba(110, 212, 124, 0.94) 100%) !important;
    box-shadow: 0 16px 34px rgba(47, 143, 85, 0.18) !important;
}

.brand {
    color: var(--theme-green-deep) !important;
}

.brand img,
.login-brand img {
    filter: drop-shadow(0 10px 16px rgba(15, 61, 36, 0.18));
}

.dashboard-card,
.login-card,
.database-panel,
.report-controls,
.panel,
.form-panel,
.role-panel,
.list-panel,
.info-panel,
.import-panel,
.register-panel,
.chart-panel,
.report-panel,
.filters-panel,
.control-panel,
.schedule-panel,
.justification-panel,
.course-picker,
.access-lock-panel {
    border-color: rgba(47, 159, 88, 0.14) !important;
    box-shadow: 0 10px 24px rgba(47, 143, 85, 0.08) !important;
}

.section-label,
.area-label,
.card-kicker,
.card-link,
.form-header h2,
.panel-heading h2,
.panel-heading h3,
.section-header h2 {
    color: var(--theme-green) !important;
}

.btn-login,
.btn-primary,
.primary-button,
.action-button.primary,
button[type="submit"] {
    background: linear-gradient(135deg, var(--theme-green) 0%, var(--theme-green-soft) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(47, 159, 88, 0.22) !important;
}

input:focus,
select:focus,
textarea:focus,
.input-wrapper:focus-within {
    border-color: rgba(47, 159, 88, 0.72) !important;
    box-shadow: 0 0 0 4px rgba(110, 212, 124, 0.14) !important;
}

.area-badge,
.helper-pill,
.access-lock-button,
.dashboard-card.access-card-readonly::after {
    background: var(--theme-green-mist) !important;
    color: var(--theme-green-deep) !important;
}

/* ========================================
   TEXTO NEGRO FUERA DEL ENCABEZADO
   ======================================== */
body :where(main, footer, .modal, .toast, .access-toast, .alerts-container) {
    color: #000000 !important;
}

body :where(main, footer, .modal, .toast, .access-toast, .alerts-container) * {
    color: #000000 !important;
}

body :where(main, footer, .modal, .toast, .access-toast, .alerts-container) *::before,
body :where(main, footer, .modal, .toast, .access-toast, .alerts-container) *::after {
    color: #000000 !important;
}

body :where(main, footer, .modal, .toast, .access-toast, .alerts-container) :where(button, .btn-login, .btn-submit, .btn-cancel, .btn-upload, .btn-primary, .primary-button, .action-button, .card-link, .access-lock-button, a[class*="btn"]) {
    color: #000000 !important;
}

header.page-header,
header.page-header * {
    color: inherit;
}

/* ========================================
   TEMA INSTITUCIONAL AZUL / NEUTRO
   ======================================== */
:root {
    --theme-ink: #111827;
    --theme-muted: #667085;
    --theme-blue: #0f7ddc;
    --theme-blue-deep: #0b2454;
    --theme-blue-soft: #edf5ff;
    --theme-border: #dbe5f2;
    --theme-panel: #ffffff;
    --theme-page: #f4f7fb;
}

body:not(.body-login) {
    background:
        radial-gradient(circle at 14% 8%, rgba(15, 125, 220, 0.08), transparent 22%),
        radial-gradient(circle at 86% 10%, rgba(124, 58, 237, 0.07), transparent 20%),
        var(--theme-page) !important;
    color: var(--theme-ink) !important;
}

body:not(.body-login) header.page-header .hero-panel {
    border: 1px solid var(--theme-border) !important;
    border-left: 7px solid var(--theme-blue) !important;
    background:
        radial-gradient(circle at 54% 40%, rgba(15, 125, 220, 0.08), transparent 34%),
        var(--theme-panel) !important;
    color: var(--theme-ink) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
}

body:not(.body-login) header.page-header .hero-panel h1,
body:not(.body-login) header.page-header .hero-copy h1,
body:not(.body-login) main h1,
body:not(.body-login) main h2,
body:not(.body-login) main h3 {
    color: var(--theme-ink) !important;
}

body:not(.body-login) header.page-header .hero-panel p,
body:not(.body-login) header.page-header .hero-description,
body:not(.body-login) .hero-copy p:last-child,
body:not(.body-login) main p,
body:not(.body-login) small {
    color: var(--theme-muted) !important;
}

body:not(.body-login) .eyebrow,
body:not(.body-login) .section-label,
body:not(.body-login) .area-label,
body:not(.body-login) .card-kicker,
body:not(.body-login) .panel-heading h2,
body:not(.body-login) .panel-heading h3,
body:not(.body-login) .form-header h2,
body:not(.body-login) .section-header h2 {
    color: var(--theme-blue-deep) !important;
}

body:not(.body-login) :where(
    .dashboard-card,
    .metric-card,
    .role-card,
    .permission-card,
    .course-students-card,
    .status-card,
    .donut-card,
    .list-card,
    .student-summary div,
    .general-average,
    .card-upload,
    .info-box,
    .database-panel,
    .report-controls,
    .panel,
    .form-panel,
    .role-panel,
    .list-panel,
    .info-panel,
    .import-panel,
    .register-panel,
    .chart-panel,
    .report-panel,
    .filters-panel,
    .control-panel,
    .schedule-panel,
    .justification-panel,
    .course-picker,
    .grade-book,
    .attendance-book,
    .settings-card,
    .settings-panel,
    .module-card,
    .switch-row,
    .action-card,
    .storage-row,
    .section-manual,
    .section-masiva,
    .preview-section,
    .access-lock-panel
) {
    border-color: var(--theme-border) !important;
    background: var(--theme-panel) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
}

body:not(.body-login) .dashboard-card,
body:not(.body-login) .module-card,
body:not(.body-login) .action-card,
body:not(.body-login) .role-card,
body:not(.body-login) .metric-card {
    border-left: 4px solid var(--theme-blue) !important;
}

body:not(.body-login) :where(
    .btn-primary,
    .btn-secondary,
    .btn-warning,
    .btn-submit,
    .btn-cancel,
    .btn-upload,
    .btn-back,
    .download-button,
    .primary-button,
    .action-button,
    .action-button.primary,
    .card-link,
    .access-lock-button,
    a[class*="btn"],
    button[type="submit"]
) {
    border: 1px solid var(--theme-border) !important;
    background: #ffffff !important;
    color: var(--theme-ink) !important;
    box-shadow: none !important;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
}

body:not(.body-login) :where(
    .btn-primary,
    .btn-secondary,
    .btn-warning,
    .btn-submit,
    .btn-cancel,
    .btn-upload,
    .btn-back,
    .download-button,
    .primary-button,
    .action-button,
    .action-button.primary,
    .card-link,
    .access-lock-button,
    a[class*="btn"],
    button[type="submit"]
):hover,
body:not(.body-login) :where(
    .btn-primary,
    .btn-secondary,
    .btn-warning,
    .btn-submit,
    .btn-cancel,
    .btn-upload,
    .btn-back,
    .download-button,
    .primary-button,
    .action-button,
    .action-button.primary,
    .card-link,
    .access-lock-button,
    a[class*="btn"],
    button[type="submit"]
):focus-visible {
    border-color: var(--theme-blue) !important;
    background: var(--theme-blue) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    outline: none !important;
}

body:not(.body-login) input:focus,
body:not(.body-login) select:focus,
body:not(.body-login) textarea:focus,
body:not(.body-login) .input-wrapper:focus-within {
    border-color: rgba(15, 125, 220, 0.72) !important;
    box-shadow: 0 0 0 4px rgba(15, 125, 220, 0.12) !important;
}

body:not(.body-login) :where(.area-badge, .helper-pill, .status-pill, .privilege-chip) {
    background: var(--theme-blue-soft) !important;
    color: var(--theme-blue-deep) !important;
}

body:not(.body-login) .toast.success {
    border-left-color: var(--theme-blue) !important;
}

/* ========================================
   NORMALIZACION FINAL DE LAYOUT Y TARJETAS
   ======================================== */
@media screen {
    html body:not(.body-login) header.page-header,
    html body:not(.body-login) main.main-content,
    html body:not(.body-login) .footer-content,
    html body:not(.body-login) .page-header,
    html body:not(.body-login) .main-content {
        width: calc(100% - 2cm) !important;
        max-width: none !important;
        margin-inline: auto !important;
    }

    html body:not(.body-login) header.page-header .hero-panel {
        min-height: 128px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 16px !important;
        padding: 22px 24px !important;
        border: 1px solid var(--theme-border) !important;
        border-left: 7px solid #1492a7 !important;
        border-radius: 8px !important;
        background:
            radial-gradient(circle at 54% 40%, rgba(15, 125, 220, 0.08), transparent 34%),
            #ffffff !important;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
        color: var(--theme-ink) !important;
    }

    html body:not(.body-login) header.page-header .hero-panel h1,
    html body:not(.body-login) header.page-header .hero-copy h1 {
        color: var(--theme-blue-deep) !important;
        font-size: clamp(28px, 2.8vw, 38px) !important;
        line-height: 1.08 !important;
    }

    html body:not(.body-login) header.page-header .hero-panel p,
    html body:not(.body-login) header.page-header .hero-description,
    html body:not(.body-login) header.page-header .hero-copy p:last-child {
        color: var(--theme-ink) !important;
        font-size: 14px !important;
        line-height: 1.45 !important;
        font-weight: 600 !important;
    }

    html body:not(.body-login) header.page-header .hero-panel .eyebrow,
    html body:not(.body-login) header.page-header .hero-panel .status-pill {
        width: max-content !important;
        min-height: auto !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #667085 !important;
        font-size: 12px !important;
        font-weight: 900 !important;
        letter-spacing: 0.02em !important;
    }

    html body:not(.body-login) :where(
        .dashboard-card,
        .metric-card,
        .role-card,
        .permission-card,
        .course-students-card,
        .status-card,
        .donut-card,
        .list-card,
        .module-card,
        .action-card,
        .storage-row,
        .switch-row,
        .info-box,
        .card-upload
    ) {
        min-height: 112px !important;
        border: 1px solid var(--theme-border) !important;
        border-left: 4px solid var(--card-accent, var(--theme-blue)) !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06) !important;
    }

    html body:not(.body-login) :where(.dashboard-card, .module-card, .action-card):hover,
    html body:not(.body-login) :where(.dashboard-card, .module-card, .action-card):focus-visible {
        border-color: var(--theme-blue) !important;
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1) !important;
    }
}

@media screen and (max-width: 720px) {
    html body:not(.body-login) header.page-header,
    html body:not(.body-login) main.main-content,
    html body:not(.body-login) .footer-content,
    html body:not(.body-login) .page-header,
    html body:not(.body-login) .main-content {
        width: min(100% - 18px, 100%) !important;
    }

    html body:not(.body-login) header.page-header .hero-panel {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
        padding: 16px !important;
    }
}

/* ========================================
   ENCABEZADOS COMPACTOS POR MODULO
   ======================================== */
html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header .hero-panel {
    min-height: 118px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 16px !important;
    margin: 8px 0 16px !important;
    padding: 18px 22px !important;
    overflow: hidden !important;
    border: 1px solid var(--theme-border, #dbe5f2) !important;
    border-left: 7px solid #1492a7 !important;
    border-radius: 8px !important;
    background:
        radial-gradient(circle at 56% 38%, rgba(15, 125, 220, 0.08), transparent 32%),
        #ffffff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
    color: var(--theme-ink, #111827) !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header .hero-copy {
    gap: 6px !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header .hero-panel h1 {
    margin: 0 !important;
    color: var(--theme-blue-deep, #0b2454) !important;
    font-size: clamp(26px, 2.2vw, 32px) !important;
    line-height: 1.08 !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header .hero-panel p {
    max-width: 760px !important;
    margin: 0 !important;
    color: var(--theme-ink, #111827) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header .hero-panel :where(.eyebrow, .status-pill) {
    width: max-content !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #667085 !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: 0.02em !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header :where(.summary-grid, .hero-summary, .quick-summary, .hero-console) {
    width: min(360px, 38vw) !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(92px, 1fr)) !important;
    align-content: center !important;
    gap: 10px !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header :where(.summary-grid, .hero-summary, .quick-summary, .hero-console) > * {
    min-height: 58px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--theme-border, #dbe5f2) !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: var(--theme-ink, #111827) !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header :where(.summary-grid, .hero-summary, .quick-summary, .hero-console) strong {
    color: var(--theme-blue, #0f7ddc) !important;
    font-size: 20px !important;
    line-height: 1 !important;
}

html body:is(
    .body-alumnos,
    .body-alumnoss,
    .body-asistencia,
    .body-atrasos,
    .body-suspenciones,
    .body-adecuaciones,
    .body-calendario,
    .body-calificaciones,
    .body-configuraciones,
    .body-docentes,
    .body-horarios,
    .body-informe-notas,
    .body-promover,
    .body-reportes,
    .body-usuarios
) header.page-header :where(.summary-grid, .hero-summary, .quick-summary, .hero-console) span {
    color: var(--theme-ink, #111827) !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
}

@media screen and (max-width: 820px) {
    html body:is(
        .body-alumnos,
        .body-alumnoss,
        .body-asistencia,
        .body-atrasos,
        .body-suspenciones,
        .body-adecuaciones,
        .body-calendario,
        .body-calificaciones,
        .body-configuraciones,
        .body-docentes,
        .body-horarios,
        .body-informe-notas,
        .body-promover,
        .body-reportes,
        .body-usuarios
    ) header.page-header .hero-panel {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
        padding: 16px !important;
    }

    html body:is(
        .body-alumnos,
        .body-alumnoss,
        .body-asistencia,
        .body-atrasos,
        .body-suspenciones,
        .body-adecuaciones,
        .body-calendario,
        .body-calificaciones,
        .body-configuraciones,
        .body-docentes,
        .body-horarios,
        .body-informe-notas,
        .body-promover,
        .body-reportes,
        .body-usuarios
    ) header.page-header :where(.summary-grid, .hero-summary, .quick-summary, .hero-console) {
        width: 100% !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 560px) {
    html body:is(
        .body-alumnos,
        .body-alumnoss,
        .body-asistencia,
        .body-atrasos,
        .body-suspenciones,
        .body-adecuaciones,
        .body-calendario,
        .body-calificaciones,
        .body-configuraciones,
        .body-docentes,
        .body-horarios,
        .body-informe-notas,
        .body-promover,
        .body-reportes,
        .body-usuarios
    ) header.page-header :where(.summary-grid, .hero-summary, .quick-summary, .hero-console) {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   BOTON GLOBAL DE CIERRE DE SESION
   ======================================== */
html body:not(.body-login) .btn-logout {
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 0 13px !important;
    border: 1px solid #dbe5f2 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #111827 !important;
    font-family: Calibri, "Segoe UI", Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06) !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

html body:not(.body-login) .btn-logout::before {
    content: "\21B3";
    font-size: 14px;
    line-height: 1;
}

html body:not(.body-login) .btn-logout:hover,
html body:not(.body-login) .btn-logout:focus-visible {
    border-color: #dc2626 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    outline: none !important;
}

@media screen and (max-width: 560px) {
    html body:not(.body-login) .btn-logout {
        width: 100% !important;
    }
}
