


/* =========================================================
   BLOQUE 1: PALETA DE COLORES
   Cambia aquí TODOS los colores de la aplicación de una vez.
   ========================================================= */:root {
    /* COLORES DE BOTONES - Cambiar para color de botones */
    --color-button-primary: #41c592;
    --color-button-primary-dark: #b01818;
    --color-button-primary-soft: #ffe8e8;

    /* COLORES DE LINKS - Cambiar para color de links y texto */
    --color-link-primary: #16a34a;
    --color-link-primary-dark: #15803d;
    --color-link-primary-soft: #dcfce7;

    /* COLORES DE ESTADO - ERROR */
    --color-error: #9b1c1c;
    --color-error-dark: #7f1d1d;
    --color-error-bg: #ffe8e8;
    --color-error-border: #f5c6cb;

    /* COLORES DE ESTADO - ÉXITO */
    --color-success: #35c759;
    --color-success-dark: #2ba547;
    --color-success-bg: #d4edda;
    --color-success-border: #c3e6cb;

    /* COLORES DE ESTADO - ADVERTENCIA */
    --color-warning: #ffb4b4;
    --color-warning-dark: #ff9999;
    --color-warning-bg: #fff2cf;
    --color-warning-border: #ffeaa7;
    --color-warning-text: #7a4b00;

    /* COLORES DE ESTADO - DESHABILITADO */
    --color-disabled: #516172;
    --color-disabled-bg: #e8edf4;
    --color-disabled-border: #d0d7e8;

    /* COLORES DE FONDO */
    --color-bg: #edf4ff;
    --color-bg-gradient-1: #dbeaff;
    --color-bg-gradient-2: #f7fbff;
    --color-bg-gradient-3: #e9f2ff;
    --color-bg-surface: #f7fbff;
    --color-bg-light: #f8fbff;
    --color-bg-lighter: #f2f4f7;
    --color-bg-section: #eef5ff;

    /* COLORES DE SUPERFICIE */
    --color-surface: #ffffff;
    --color-surface-dark: #25272b;

    /* COLORES DE TEXTO */
    --color-text: #172033;
    --color-text-muted: #657186;
    --color-text-secondary: #516172;
    --color-text-light: #f3f4f6;
    --color-text-white: #ffffff;
    --color-text-white-faint: #d6d9df;
    --color-muted: #657186;

    /* COLORES DE BORDE */
    --color-border: #d7e1ef;
    --color-border-light: #b7c8e3;

    /* COLORES DE ACENTO */
    --color-accent-orange: #ffcf8a;
    --color-accent-blue: #d5e5ff;

    /* SOMBRAS */
    --shadow-card: 0 22px 70px rgba(38, 79, 140, 0.18);
    --shadow-button: 0 12px 24px rgba(22, 163, 74,0.28);
    --shadow-top: 0 12px 30px rgba(61, 89, 130, 0.08);
    --shadow-profile: 0 10px 28px rgba(38, 79, 140, 0.08);
    --shadow-user: 0 24px 60px rgba(23, 32, 51, 0.28);

    /* RADIOS DE BORDE */
    --radius-lg: 26px;
    --radius-md: 14px;
    --radius-sm: 8px;

    /* ALIAS PARA COMPATIBILIDAD */
    --color-primary: #d01e1e;
    --color-primary-dark: #b01818;
    --color-primary-soft: #ffe8e8;
    --color-status-error: #9b1c1c;
    --color-status-success: #35c759;
    --color-status-warning: #ffb4b4;
    --color-status-warning-bg: #fff2cf;
    --color-status-warning-text: #7a4b00;
    --color-status-disabled-bg: #e8edf4;
    --color-status-disabled-text: #516172;
    --color-status-error-bg: #ffe8e8;
}


/* =========================================================
   PANEL DE DISENO EDITABLE
   Este bloque controla la apariencia principal del portal.
   Cambia aqui colores, medidas, sombras y radios.

   1. Marca y botones: --brand-*
   2. Fondos y textos: --color-*
   3. Barra lateral: --sidebar-*
   4. Landing/index: --landing-*
   5. Bordes y sombras: --radius-* / --shadow-*
   ========================================================= */:root {
    /* Marca principal */
    --brand-primary: #16a34a;
    --brand-primary-dark: #15803d;
    --brand-primary-soft: #dcfce7;
    --brand-success: #35c759;
    --brand-danger: #b01818;

    /* Botones y enlaces */
    --color-button-primary: var(--brand-primary);
    --color-button-primary-dark: var(--brand-primary-dark);
    --color-button-primary-soft: var(--brand-primary-soft);
    --color-link-primary: var(--brand-primary);
    --color-link-primary-dark: var(--brand-primary-dark);
    --color-link-primary-soft: var(--brand-primary-soft);

    /* Fondos */
    --color-bg: #edf4ff;
    --color-bg-gradient-1: #dbeaff;
    --color-bg-gradient-2: #f7fbff;
    --color-bg-gradient-3: #e9f2ff;
    --color-bg-surface: #f7fbff;
    --color-bg-light: #f8fbff;
    --color-bg-lighter: #f2f4f7;
    --color-bg-section: #eef5ff;

    /* Superficies y texto */
    --color-surface: #ffffff;
    --color-surface-dark: #25272b;
    --color-text: #172033;
    --color-text-muted: #657186;
    --color-text-secondary: #516172;
    --color-text-light: #f3f4f6;
    --color-text-white: #ffffff;
    --color-text-white-faint: #d6d9df;
    --color-muted: #657186;

    /* Estados */
    --color-error: #9b1c1c;
    --color-error-dark: #7f1d1d;
    --color-error-bg: #ffe8e8;
    --color-error-border: #f5c6cb;
    --color-success: var(--brand-success);
    --color-success-dark: #2ba547;
    --color-success-bg: #d4edda;
    --color-success-border: #c3e6cb;
    --color-warning: #ffb4b4;
    --color-warning-dark: #ff9999;
    --color-warning-bg: #fff2cf;
    --color-warning-border: #ffeaa7;
    --color-warning-text: #7a4b00;
    --color-disabled: #516172;
    --color-disabled-bg: #e8edf4;
    --color-disabled-border: #d0d7e8;

    /* Bordes, radios y sombras */
    --color-border: #d7e1ef;
    --color-border-light: #b7c8e3;
    --color-accent-orange: #ffcf8a;
    --color-accent-blue: #d5e5ff;
    --shadow-card: 0 22px 70px rgba(38, 79, 140, 0.18);
    --shadow-button: 0 12px 24px rgba(22, 163, 74,0.28);
    --shadow-top: 0 12px 30px rgba(61, 89, 130, 0.08);
    --shadow-profile: 0 10px 28px rgba(38, 79, 140, 0.08);
    --shadow-user: 0 24px 60px rgba(23, 32, 51, 0.28);
    --radius-lg: 26px;
    --radius-md: 14px;
    --radius-sm: 8px;

    /* Barra lateral */
    --sidebar-expanded: 288px;
    --sidebar-collapsed: 82px;
    --sidebar-bg: var(--color-surface);
    --sidebar-border: #d5dfed;
    --sidebar-shadow: 10px 0 30px rgba(38, 79, 140, 0.1);
    --sidebar-link-hover-bg: var(--color-bg-section);
    --sidebar-link-active-bg: var(--color-bg-light);

    /* Landing / index */
    --landing-bg: #f4f7fb;
    --landing-bg-glow: rgba(22, 163, 74,0.10);
    --landing-bg-glow-dark: rgba(22, 163, 74,0.18);
    --landing-max-width: 1180px;
    --landing-title-color: #0e1b33;
    --landing-title-size: clamp(2.4rem, 4.1vw, 4.15rem);
    --landing-hero-min-height: min(640px, calc(76vh - 74px));

    /* Alias para reglas antiguas */
    --color-primary: var(--brand-primary);
    --color-primary-dark: var(--brand-primary-dark);
    --color-primary-soft: var(--brand-primary-soft);
    --color-status-error: var(--color-error);
    --color-status-success: var(--color-success);
    --color-status-warning: var(--color-warning);
    --color-status-warning-bg: var(--color-warning-bg);
    --color-status-warning-text: var(--color-warning-text);
    --color-status-disabled-bg: var(--color-disabled-bg);
    --color-status-disabled-text: var(--color-disabled);
    --color-status-error-bg: var(--color-error-bg);
}


/* Override final para que el sidebar ERP prevalezca sobre estilos heredados. */.app-shell {
    display: block;
    padding: 0;
}

.sidebar.app-sidebar {
    display: flex;
}

.content {
    margin-left: var(--sidebar-expanded);
}

body.sidebar-is-collapsed .content {
    margin-left: var(--sidebar-collapsed);
}

.topbar {
    align-items: center;
}

.docente-panel {
    display: none;
}

.docente-panel.is-active {
    display: block;
}













.history-apartado-head .eyebrow {
    color: var(--color-link-primary-dark);
}
















body.theme-dark .history-doc-time {
    border-color: #334155;
    background: rgba(17, 24, 39, 0.72);
}









.document-history-card.is-read-notif {
    opacity: 0.6;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.history-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-secondary, var(--color-muted));
    background: var(--color-bg-light, #f8fbff);
    font-size: 0.86rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.history-meta i {
    color: var(--color-link-primary);
}

.history-fields {
    margin-top: 10px;
}









.history-empty-card p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.7;
}

@media (max-width: 720px) {
    .content,
body.sidebar-is-collapsed .content {
        margin-left: var(--sidebar-collapsed);
    }
}


/* =========================================================
   SIDEBAR ERP / CEDULA CURRICULAR
   Navegacion institucional colapsable.
   ========================================================= */:root {
    --sidebar-expanded: 288px;
    --sidebar-collapsed: 82px;
}

.app-shell {
    display: block;
    min-height: 100vh;
    padding: 0;
    background: transparent;
}

.content {
    min-height: 100vh;
    margin-left: var(--sidebar-expanded);
    padding: 18px 22px 22px;
    transition: margin-left 0.22s ease;
}

body.sidebar-is-collapsed .content {
    margin-left: var(--sidebar-collapsed);
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-expanded);
    padding: 16px 12px;
    border-right: 1px solid #d5dfed;
    background: #ffffff;
    box-shadow: 10px 0 30px rgba(38, 79, 140, 0.1);
    transition: width 0.22s ease, box-shadow 0.22s ease;
}

body.sidebar-is-collapsed .app-sidebar {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 38px;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 4px 4px 14px;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-brand-text {
    min-width: 0;
}

.sidebar-brand-text strong,
.sidebar-brand-text small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-brand-text small {
    color: var(--color-text-muted);
    margin-top: 2px;
}



/* .sidebar-toggle, .sidebar-toggle:hover → ver BLOQUE 4: BOTONES */.app-nav {
    display: grid;
    gap: 6px;
    padding-top: 14px;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-nav-link,
.app-submenu-link {
    position: relative;
    display: grid;
    align-items: center;
    min-width: 0;
    border-radius: 12px;
    color: var(--color-text-secondary);
    background: transparent;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.app-nav-link {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    min-height: 46px;
    width: 100%;
    padding: 0 10px;
    border: 0;
}

.app-nav-link > .bi:first-child,
.app-submenu-link > .bi:first-child {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    color: var(--color-link-primary-dark);
    background: #eef5ff;
    font-size: 16px;
}

.app-nav-link span,
.app-submenu-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-nav-link:hover,
.app-submenu-link:hover {
    color: var(--color-link-primary-dark);
    background: #f7fbff;
}

.app-nav-link.active,
.app-submenu-link.active {
    color: var(--color-link-primary-dark);
    background: #eef5ff;
    box-shadow: inset 4px 0 0 var(--color-link-primary);
}

.app-nav-link.active > .bi:first-child,
.app-submenu-link.active > .bi:first-child {
    color: #ffffff;
    background: var(--color-link-primary);
}

.submenu-chevron {
    justify-self: end;
    color: var(--color-text-muted);
    font-size: 13px;
    transition: transform 0.18s ease;
}

.app-nav-badge {
    justify-self: end;
    background: #dc2626;
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.app-nav-link[aria-expanded="true"] .submenu-chevron {
    transform: rotate(180deg);
}

.sidebar-profile-menu[open] .submenu-chevron {
    transform: rotate(180deg);
}

.sidebar-profile-menu {
    min-width: 0;
}

.sidebar-profile-actions {
    display: grid;
    gap: 4px;
    margin-left: 12px;
    padding: 4px 0 8px 10px;
    border-left: 1px solid var(--color-border);
}

.sidebar-profile-actions .app-submenu-link.is-danger {
    color: #b91c1c;
}

.sidebar-profile-actions .app-submenu-link.is-danger > .bi:first-child {
    color: #b91c1c;
    background: #fee2e2;
}

.app-submenu {
    display: grid;
    gap: 4px;
    max-height: 0;
    margin-left: 12px;
    overflow: hidden;
    border-left: 1px solid transparent;
    transition: max-height 0.24s ease, border-color 0.18s ease, padding 0.18s ease;
}

.app-submenu.is-open {
    max-height: min(430px, calc(100vh - 330px));
    overflow-y: auto;
    padding: 4px 0 8px 10px;
    border-color: var(--color-border);
    scrollbar-width: thin;
}

.app-submenu-label {
    display: block;
    padding: 4px 8px 6px;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.app-submenu-link {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 34px;
    padding: 3px 8px;
    font-size: 12px;
}

.app-submenu-link > .bi:first-child {
    width: 26px;
    height: 26px;
    font-size: 14px;
    background: #f4f8ff;
}

body.sidebar-is-collapsed .sidebar-brand {
    grid-template-columns: 44px;
    justify-items: center;
}

body.sidebar-is-collapsed .sidebar-brand-text,
body.sidebar-is-collapsed .app-nav-link span,
body.sidebar-is-collapsed .app-submenu-link span,
body.sidebar-is-collapsed .app-submenu-label,
body.sidebar-is-collapsed .sidebar-profile-actions,
body.sidebar-is-collapsed .submenu-chevron,
body.sidebar-is-collapsed .sidebar-section-label {
    display: none;
}

body.sidebar-is-collapsed .sidebar-toggle {
    position: absolute;
    right: -14px;
    top: 24px;
    width: 30px;
    height: 30px;
    background: #ffffff;
}

body.sidebar-is-collapsed .app-nav-link,
body.sidebar-is-collapsed .app-submenu-link {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 6px;
}

body.sidebar-is-collapsed .app-submenu {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
}

.docente-panel {
    display: none;
}

.docente-panel.is-active {
    display: block;
    animation: panelFadeIn 0.18s ease;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-placeholder {
    display: grid;
    gap: 10px;
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-top);
}

.dashboard-placeholder h2 {
    margin: 0;
}

.dashboard-placeholder p {
    max-width: 680px;
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.settings-card {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 14px 30px rgba(38, 79, 140, 0.08);
}

.settings-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.settings-card-head i {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    color: var(--color-link-primary);
    background: var(--color-link-primary-soft);
    font-size: 18px;
}

.settings-card-head h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 16px;
}

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-light);
}



/* .segmented-control button → ver BLOQUE 4: BOTONES */.settings-select select {
    width: 100%;
    min-height: 54px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    background: var(--color-bg-light);
    font: inherit;
    font-weight: 800;
}

body.font-compact {
    font-size: 13px;
}

body.font-large {
    font-size: 16px;
}

body.font-large .app-nav-link,
body.font-large .app-submenu-link,
body.font-large .data-table,
body.font-large input,
body.font-large select,
body.font-large textarea,
body.font-large button {
    font-size: 1rem;
}

body.font-compact .course-row,
body.font-compact .panel-section,
body.font-compact .dashboard-placeholder {
    padding: 18px;
}

body.theme-dark {
    --color-bg: #111827;
    --color-bg-gradient-1: #111827;
    --color-bg-gradient-2: #172033;
    --color-bg-gradient-3: #0f172a;
    --color-bg-surface: #172033;
    --color-bg-light: #1f2937;
    --color-bg-section: #172033;
    --color-surface: #1b2536;
    --color-text: #f8fbff;
    --color-text-muted: #bac7da;
    --color-text-secondary: #c8d3e3;
    --color-muted: #bac7da;
    --color-border: #334155;
    --color-border-light: #475569;
    --color-link-primary-soft: #1d345f;
    --shadow-card: 0 22px 70px rgba(0, 0, 0, 0.34);
    background: #111827;
    color: var(--color-text);
}

body.theme-dark .content,
body.theme-dark .dashboard-placeholder,
body.theme-dark .panel-section,
body.theme-dark .course-row,
body.theme-dark .history-apartado-head,
body.theme-dark .stat-card,
body.theme-dark .data-table-wrap,
body.theme-dark .preview-dialog,
body.theme-dark .settings-card {
    background: var(--color-surface);
    color: var(--color-text);
}

body.theme-dark .app-sidebar,
body.theme-dark .topbar,
body.theme-dark .app-nav-link,
body.theme-dark .app-submenu-link,
body.theme-dark .extracted-field,
body.theme-dark .file-drop,
body.theme-dark .profile-menu summary,
body.theme-dark .profile-dropdown,
body.theme-dark .segmented-control,
body.theme-dark .settings-select select {
    background-color: var(--color-bg-light);
    border-color: var(--color-border);
    color: var(--color-text);
}

body.theme-dark .app-nav-link.active,
body.theme-dark .app-submenu-link.active {
    background: #16a34a;
    color: #ffffff;
}

body.theme-dark .eyebrow,
body.theme-dark .settings-card-head i,
body.theme-dark .history-meta i {
    color: #86efac;
}

body.theme-dark .topbar p,
body.theme-dark .dashboard-placeholder p,
body.theme-dark .section-heading p,
body.theme-dark .extracted-field span,
body.theme-dark .file-drop small,
body.theme-dark .history-meta span {
    color: var(--color-muted);
}

body.theme-dark .history-apartado-group {
    background: #1b2536;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
}

body.theme-dark .history-apartado-head {
    background:
        radial-gradient(circle at 22px 22px, rgba(156, 193, 255, 0.16), transparent 34px),
        linear-gradient(90deg, #203d72, #1b2536 62%);
}

body.theme-dark .history-apartado-files {
    background: #111827;
}

body.theme-dark .history-count,
body.theme-dark .history-apartado-summary small {
    border-color: #334155;
    background: rgba(17, 24, 39, 0.72);
}

body.theme-dark .history-count,
body.theme-dark .history-apartado-head .eyebrow {
    color: #86efac;
}

body.theme-dark .upload-toast {
    border-color: #334155;
    background: #1b2536;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

body.theme-dark .upload-toast button {
    background: #111827;
}

@media (max-width: 820px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    :root {
        --sidebar-expanded: 250px;
    }

    .content {
        padding: 14px;
    }
}

@media (max-width: 720px) {
    .app-sidebar {
        width: var(--sidebar-collapsed);
        padding: 12px 8px;
    }

    body:not(.sidebar-is-expanded-mobile) .app-sidebar {
        width: var(--sidebar-collapsed);
    }

    body.sidebar-is-expanded-mobile .app-sidebar {
        width: min(286px, calc(100vw - 22px));
        box-shadow: 18px 0 48px rgba(23, 32, 51, 0.24);
    }

    .content,
body.sidebar-is-collapsed .content {
        margin-left: var(--sidebar-collapsed);
        padding: 10px;
    }

    body.sidebar-is-expanded-mobile .sidebar-brand {
        grid-template-columns: 44px minmax(0, 1fr) 38px;
        justify-items: stretch;
    }

    body:not(.sidebar-is-expanded-mobile) .sidebar-brand {
        grid-template-columns: 44px;
        justify-items: center;
    }

    body:not(.sidebar-is-expanded-mobile) .sidebar-brand-text,
body:not(.sidebar-is-expanded-mobile) .app-nav-link span,
body:not(.sidebar-is-expanded-mobile) .app-submenu-link span,
body:not(.sidebar-is-expanded-mobile) .app-submenu-label,
body:not(.sidebar-is-expanded-mobile) .submenu-chevron,
body:not(.sidebar-is-expanded-mobile) .sidebar-section-label {
        display: none;
    }
}


/* =========================================================
   BLOQUE 2: TIPOGRAFÍA Y FUENTES
   Centraliza TODOS los tamaños y estilos de texto.
   ========================================================= */:root {
    /* FUENTES BASE */
    --font-family-base: Arial, Helvetica, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    --font-weight-extra-bold: 800;

    /* TAMAÑOS DE FUENTE */
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 24px;
    --font-size-2xl: 26px;
    --font-size-3xl: 28px;
    --font-size-4xl: 30px;
    --font-size-5xl: 34px;
    --font-size-6xl: 36px;

    /* ESPACIADO BASE */
    --spacing-xs: 6px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 14px;
    --spacing-xl: 16px;
    --spacing-2xl: 18px;
    --spacing-3xl: 20px;
    --spacing-4xl: 22px;
    --spacing-5xl: 24px;
    --spacing-6xl: 34px;
}


/* =========================================================
   BLOQUE 3: RESET Y BASE
   Normalización de estilos por defecto del navegador.
   ========================================================= */* {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font-family-base);
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-bg-gradient-1) 0%, var(--color-bg-gradient-2) 54%, var(--color-bg-gradient-3) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}




/* ── BASE — aplica a todo elemento con clase .btn ────────── */.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}




/* btn-primary — azul principal, acción importante (formularios, guardado) */.btn-primary {
    color: #ffffff;
    background: var(--color-button-primary);
    box-shadow: var(--shadow-button);
}

.btn-primary:hover {
    background: var(--color-button-primary-dark);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* btn-soft — fondo claro, menos énfasis (acciones secundarias) */.btn-soft {
    color: var(--color-button-primary-dark);
    background: var(--color-button-primary-soft);
    box-shadow: none;
}

.btn-soft:hover {
    background: var(--color-button-primary-soft);
    opacity: 0.85;
}


/* btn-secondary — borde gris, opción alternativa o cancelar */.btn-secondary {
    color: var(--color-link-primary-dark);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--color-bg-surface);
}


/* btn-block — ancho completo (login, registro, formularios móviles) */.btn-block {
    width: 100%;
}



/* sidebar.php — esquina superior derecha de .sidebar-brand   */.sidebar-toggle {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-link-primary-dark);
    background: var(--color-bg-light);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.sidebar-toggle:hover {
    background: var(--color-link-primary-soft);
    transform: translateY(-1px);
}









/* docente.php panel estático "configuracion"                      */.segmented-control button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    color: var(--color-text-secondary);
    background: transparent;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segmented-control button.is-active {
    color: var(--color-text-white);
    background: var(--color-link-primary);
    box-shadow: var(--shadow-button);
}



/* docente.php panel "resumen" — esquina superior derecha del modal */.preview-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    background: #ffffff;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.preview-close:hover {
    background: var(--color-bg-section);
}



/* docente.php — notificación flotante en esquina inferior derecha */.upload-toast button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    color: var(--color-text-muted);
    background: var(--color-bg-light);
    cursor: pointer;
}



/* login.php — aparece solo en pantallas pequeñas dentro de .login-form-card */.mobile-back {
    width: 42px;
    height: 42px;
    margin-bottom: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2f4f7;
    font-size: 24px;
    color: var(--color-text);
    text-decoration: none;
}



/* index.php — dentro de .landing-nav en la barra de navegación superior */.landing-nav .landing-nav-login {
    color: #ffffff;
    background: #15803d;
}

.landing-nav .landing-nav-login:hover {
    color: #ffffff;
    background: #164f9f;
}



/* index.php — fila de botones debajo del título principal (.landing-hero) */.landing-actions .btn {
    min-height: 48px;
    padding-inline: 22px;
}



/* docente.php panel "participacion_pe" — debajo del textarea manual */.participacion-heading .btn {
    justify-self: start;
}



/* docente.php panel "resumen" — tarjeta de accesos rápidos */.dashboard-quick-links .btn {
    text-align: center;
    text-decoration: none;
}









.resumen-cedula-actions .btn {
    gap: 6px;
}



/* docente.php panel "resumen" — cabecera del modal inline #modal-cedula-pdf */.modal-cedula-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13pt;
}

.modal-cedula-close:hover {
    background: rgba(255, 255, 255, 0.28);
}


/* =========================================================
   BLOQUE 5: INPUTS Y FORMULARIOS
   Inputs, selects, labels centralizados.
   ========================================================= */input,
select,
textarea {
    font-family: var(--font-family-base);
    color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--font-size-base);
}

textarea {
    min-height: 120px;
    padding: 16px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-link-primary);
    box-shadow: 0 0 0 3px var(--color-link-primary-soft);
}

input::placeholder {
    color: var(--color-text-muted);
}

label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    color: var(--color-text);
    font-size: var(--font-size-base);
}


/* Checkbox y radio personalizados */input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-link-primary);
    cursor: pointer;
}




/* Tarjeta base: sombra, borde, fondo */.card,
.panel-section,
.upload-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-top);
}

.panel-section {
    margin-top: 22px;
    padding: 24px;
    min-width: 0;
    max-width: 100%;
}

.upload-card {
    padding: 18px;
    border-radius: var(--radius-md);
    min-width: 0;
}


/* Encabezado de sección */.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 4px 0 0;
}

.section-heading p {
    max-width: 420px;
    margin: 0;
    color: var(--color-text-muted);
}










/* =========================================================
   BLOQUE 7: LOGIN Y AUTENTICACIÓN
   Estructura de login, registro y bienvenida.
   ========================================================= */.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(300px, 440px) minmax(320px, 460px);
    gap: 36px;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.login-shell.single-card {
    grid-template-columns: minmax(320px, 520px);
}

.login-shell.single-card.single-card-wide {
    grid-template-columns: minmax(320px, 680px);
}

.login-card {
    min-height: 640px;
    padding: 34px;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.login-welcome {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #eef5ff;
}

.login-welcome.login-form-card {
    justify-content: center;
    background: #ffffff;
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: var(--color-button-primary);
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark.small {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.login-welcome h1,
.login-form-card h2 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.1;
}

.login-welcome p,
.form-subtitle {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.document-hero {
    position: relative;
    height: 230px;
    margin: 30px 0;
}

.doc {
    position: absolute;
    display: block;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(22, 163, 74,0.18);
}

.doc-a {
    width: 150px;
    height: 190px;
    left: 46px;
    top: 20px;
    background: #ffffff;
    transform: rotate(-8deg);
}

.doc-b {
    width: 150px;
    height: 190px;
    right: 42px;
    top: 14px;
    background: #d5e5ff;
    transform: rotate(8deg);
}

.doc-c {
    width: 190px;
    height: 150px;
    left: 50%;
    bottom: 8px;
    background: var(--color-button-primary);
    transform: translateX(-50%);
}

.doc-person {
    width: 78px;
    height: 78px;
    left: 50%;
    top: 42px;
    border-radius: 50%;
    background: #ffcf8a;
    transform: translateX(-50%);
}

.welcome-actions {
    display: grid;
    gap: 14px;
}

.login-form-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}



/* .mobile-back → ver BLOQUE 4: BOTONES */.login-info-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-info-card h2 {
    margin: 0 0 12px;
    font-size: 34px;
}

.login-info-card p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.info-steps {
    display: grid;
    gap: 12px;
    margin-top: 34px;
}

.info-steps span {
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--color-link-primary-soft);
    color: var(--color-link-primary-dark);
    font-weight: 800;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 34px;
}

.auth-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}



/* login.php (registro) — aprovecha el ancho extra de .single-card-wide */.fields-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.check-line {
    display: inline-flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    font-weight: 400 !important;
    color: var(--color-muted);
}

.link-action {
    color: var(--color-link-primary);
    font-size: 14px;
}

.switch-auth {
    margin: 24px 0 0;
    text-align: center;
    color: var(--color-muted);
}

.switch-auth a {
    color: var(--color-link-primary);
    font-weight: 800;
}

.alert-error {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--color-error);
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
}

.upload-toast-region {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100vw - 32px));
    pointer-events: none;
}

.upload-toast {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--color-success-border);
    border-radius: 12px;
    color: var(--color-text);
    background: var(--color-surface);
    box-shadow: 0 18px 48px rgba(23, 32, 51, 0.18);
    pointer-events: auto;
}

.upload-toast > i {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--color-success);
}

.upload-toast strong {
    display: block;
    margin: 0 0 3px;
    font-size: 0.95rem;
}

.upload-toast p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}



/* .upload-toast button → ver BLOQUE 4: BOTONES */.upload-toast.is-error {
    border-color: var(--color-error-border);
}

.upload-toast.is-error > i {
    background: var(--color-error);
}

.upload-toast.is-warning > i {
    color: var(--color-warning-text);
    background: var(--color-warning-bg);
}


/* =========================================================
   BLOQUE 8: NAVEGACIÓN
   Sidebars, topbars, menús, links.
   ========================================================= */.app-shell {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    padding: 18px;
    overflow-x: hidden;
}

.sidebar {
    display: none;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-row > div {
    min-width: 0;
}

.brand-row strong,
.brand-row small {
    overflow-wrap: anywhere;
}

.brand-row small {
    display: block;
    color: var(--color-muted);
    margin-top: 2px;
}

.side-nav {
    display: grid;
    gap: 8px;
    margin-top: 0;
}

.header-nav {
    grid-template-columns: repeat(3, max-content);
    align-items: center;
    justify-content: center;
}

.side-nav a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    font-weight: 700;
}

.side-nav a.active,
.side-nav a:hover {
    color: var(--color-link-primary-dark);
    background: var(--color-link-primary-soft);
}

.content {
    padding: 16px;
    min-width: 0;
    max-width: 100%;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-top);
}

.topbar h1 {
    margin: 4px 0 0;
    font-size: 30px;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.eyebrow {
    color: var(--color-link-primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}


/* =========================================================
   BLOQUE 9: PERFIL DE USUARIO
   Avatar, menú de perfil, información del usuario.
   ========================================================= */.profile-menu {
    position: relative;
    max-width: 100%;
}

.profile-menu summary {
    list-style: none;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: min(100%, 380px);
    padding: 8px 8px 8px 18px;
    border-radius: 999px;
    color: var(--color-link-primary-dark);
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-profile);
    cursor: pointer;
}

.profile-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--color-button-primary);
    font-size: 12px;
    font-weight: 800;
}

.profile-avatar.large {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    font-size: 15px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-card {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 20;
    width: min(360px, calc(100vw - 28px));
    padding: 18px;
    border-radius: var(--radius-md);
    color: #ffffff;
    background: #25272b;
    box-shadow: var(--shadow-user);
}

.profile-card-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-card-head strong,
.profile-card-head small {
    display: block;
    overflow-wrap: anywhere;
}

.profile-card-head small {
    margin-top: 4px;
    color: #d6d9df;
}

.profile-action {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 4px;
    color: #f3f4f6;
    font-weight: 700;
}

.profile-action:hover {
    color: #ffffff;
}

.profile-action.danger {
    color: #ffb4b4;
}

.status-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-success);
    box-shadow: inset 0 0 0 5px rgba(37, 39, 43, 0.32);
}


/* =========================================================
   BLOQUE 10: LAYOUT DE PERFIL
   Estructura para página de perfil completo.
   ========================================================= */.profile-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.profile-photo-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 22px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #f7fbff;
    text-align: center;
}

.profile-photo {
    width: 92px;
    height: 92px;
    font-size: 28px;
}

.profile-photo-card h3 {
    margin: 8px 0 0;
}

.profile-photo-card p {
    max-width: 100%;
    margin: 0 0 10px;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

.profile-photo-button {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.profile-photo-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}









.file-drop.compact {
    min-height: 96px;
}





















/* =========================================================
   BLOQUE 12: FILAS DE CURSOS Y GRADOS
   Tarjetas para títulos, certificados, cursos.
   ========================================================= */.degree-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    column-gap: 24px;
    row-gap: 10px;
    align-items: center;
}

.degree-card .upload-title,
.degree-card p,
.degree-card .degree-option {
    grid-column: 1;
}

.degree-card .file-drop {
    grid-column: 2;
    grid-row: 1 / span 3;
}

.upload-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.upload-title h3 {
    margin: 0;
}

.upload-title span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--color-link-primary-dark);
    background: var(--color-link-primary-soft);
    font-size: 12px;
    font-weight: 800;
}

.status-pill.is-review {
    color: var(--color-warning-text);
    background: var(--color-warning-bg);
    border: 1px solid var(--color-warning-border);
}

.status-pill.is-disabled {
    color: var(--color-disabled);
    background: var(--color-disabled-bg);
    border: 1px solid var(--color-disabled-border);
}

.upload-card p {
    color: var(--color-muted);
    line-height: 1.5;
    margin: 0;
}

.degree-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 0;
    color: var(--color-muted);
    font-weight: 700;
}

.degree-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-link-primary);
}

.degree-card.is-not-applicable .file-drop {
    opacity: 0.48;
    pointer-events: none;
}







.course-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cap-meta-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.cap-field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}
.cap-field-group--wide {
    flex: 1 1 200px;
}
.cap-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #6b7280);
}
.cap-ciclo-input,
.cap-taller-input {
    font-size: 0.85rem;
    padding: 5px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 7px;
    background: var(--surface, #fff);
    color: var(--text, #111827);
    outline: none;
    transition: border-color 0.15s;
}
.cap-ciclo-input:focus,
.cap-taller-input:focus {
    border-color: var(--accent, #3b82f6);
    box-shadow: 0 0 0 2px rgba(59,130,246,.15);
}
.cap-ciclo-input { width: 90px; }
.cap-taller-input { width: 100%; }

.extracted-field {
    min-height: 76px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #f8fbff;
}

.extracted-field span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 800;
}

.extracted-field strong {
    color: var(--color-text);
    font-size: 15px;
    overflow-wrap: anywhere;
}















.manual-editor-card.has-word-limit-error .manual-editor-actions small {
    color: var(--color-error);
}


/* =========================================================
   BLOQUE 13: ACCIONES DE PIE
   Contenedores de botones al final de secciones.
   (Los estilos de los botones en sí → ver BLOQUE 4)
   ========================================================= */.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin: 24px 0 8px;
}

.profile-actions {
    margin-bottom: 0;
}


/* =========================================================
   BLOQUE 14: RESPONSIVE - TABLET
   Media query para dispositivos medianos (max-width: 980px).
   ========================================================= */@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .login-card {
        min-height: auto;
    }

    .app-shell {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 14px;
        padding: 12px;
    }

    .sidebar {
        position: static;
        height: auto;
        min-height: 0;
        padding: 18px;
        background: #ffffff;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-top);
    }

    .brand-row {
        align-items: flex-start;
    }

    .side-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 0;
    }

    .side-nav a {
        text-align: center;
    }

    .header-nav {
        width: 100%;
    }

    

    .course-fields {
        grid-template-columns: 1fr;
    }

    .degree-card {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   BLOQUE 15: RESPONSIVE - MÓVIL
   Media query para dispositivos pequeños (max-width: 720px).
   ========================================================= */@media (max-width: 720px) {
    .content {
        padding: 0;
    }

    .sidebar {
        padding: 16px 12px;
    }

    .brand-mark.small {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        flex: 0 0 40px;
        font-size: 14px;
    }

    .side-nav {
        gap: 6px;
    }

    .side-nav a {
        padding: 10px 8px;
        font-size: 14px;
        line-height: 1.2;
    }

    .topbar,
.section-heading,
.footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar h1 {
        font-size: 26px;
    }

    .user-pill {
        width: 100%;
        border-radius: var(--radius-sm);
        font-size: 14px;
    }

    .profile-menu {
        width: 100%;
    }

    .profile-card {
        left: 0;
        right: auto;
        width: 100%;
    }

    .upload-grid,
.side-nav {
        grid-template-columns: 1fr;
    }

    .degree-card {
        grid-template-columns: 1fr;
    }

    .degree-card .file-drop {
        grid-column: 1;
        grid-row: auto;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .login-shell {
        padding: 18px 12px;
    }

    .login-card {
        padding: 24px;
        border-radius: 20px;
    }

    .login-welcome h1,
.login-form-card h2 {
        font-size: 30px;
    }

    .document-hero {
        height: 190px;
    }

    .form-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .fields-2col {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   BLOQUE 16: RESPONSIVE - EXTRA PEQUEÑO
   Media query para dispositivos muy pequeños (max-width: 360px).
   ========================================================= */@media (max-width: 360px) {
    .app-shell {
        padding: 8px;
        gap: 10px;
    }

    .sidebar {
        padding: 14px 10px;
    }

    .brand-row strong {
        font-size: 15px;
    }

    .brand-row small,
.side-nav a,
.user-pill {
        font-size: 13px;
    }

    .content {
        padding: 0;
    }

    .topbar h1 {
        font-size: 22px;
    }

    .panel-section {
        padding: 16px 12px;
    }
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.auth-form select {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--color-text);
}


/* =========================================================
   MODAL DE VISTA PREVIA
   ========================================================= */.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.preview-modal.is-open {
    display: flex;
}

.preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 32, 51, 0.62);
    backdrop-filter: blur(3px);
}

.preview-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(980px, 100%);
    max-height: min(86vh, 820px);
    overflow: hidden;
    border: 1px solid rgba(215, 225, 239, 0.9);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: 0 28px 80px rgba(23, 32, 51, 0.32);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-light);
}

.preview-header h3 {
    margin: 4px 0 0;
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}



/* .preview-close, .preview-close:hover → ver BLOQUE 4: BOTONES */.preview-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 16px;
    background: #f4f7fb;
    overflow: auto;
}

.preview-body iframe {
    width: 100%;
    height: 68vh;
    min-height: 420px;
    border: 0;
    border-radius: var(--radius-sm);
    background: #ffffff;
}

.preview-body img {
    display: block;
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 36px rgba(23, 32, 51, 0.14);
}

.preview-body p,
.preview-body a {
    margin: 0;
    color: var(--color-text-secondary);
    font-weight: 700;
    text-align: center;
}

.docente-workspace {
    display: grid;
    grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 22px;
}

.docente-section-nav {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(61, 89, 130, 0.08);
}

.docente-section-nav-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.docente-section-nav-head strong {
    display: block;
    margin-top: 4px;
    color: var(--color-text);
    font-size: 17px;
}

.docente-section-select {
    display: none;
    gap: 8px;
    margin: 0;
}

.docente-section-select span {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 800;
    text-transform: uppercase;
}

.docente-section-select select {
    min-height: 46px;
}

.docente-tabs {
    display: grid;
    gap: 6px;
}

.docente-tabs a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 52px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--color-text-secondary);
    background: transparent;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.docente-tab-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--color-link-primary-dark);
    background: var(--color-link-primary-soft);
    font-size: 12px;
    font-weight: 800;
}

.docente-tab-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.docente-tab-copy strong,
.docente-tab-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docente-tab-copy strong {
    color: inherit;
    font-size: 13px;
    line-height: 1.2;
}

.docente-tab-copy small {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.docente-tabs a:hover {
    border-color: #c8d6ea;
    color: var(--color-link-primary-dark);
    background: #f7fbff;
    transform: translateX(2px);
}

.docente-tabs a.active,
.docente-tabs a[aria-current="page"] {
    border-color: #b7c8e3;
    color: var(--color-link-primary-dark);
    background: #eef5ff;
    box-shadow: inset 4px 0 0 var(--color-link-primary);
}

.docente-tabs a.active .docente-tab-number,
.docente-tabs a[aria-current="page"] .docente-tab-number {
    color: #ffffff;
    background: var(--color-link-primary);
}

.docente-section-content {
    min-width: 0;
}

.docente-section-content > .panel-section {
    margin-top: 0;
}

@media (max-width: 720px) {
    .docente-workspace {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 16px;
    }

    .docente-section-nav {
        position: static;
        gap: 12px;
        padding: 14px;
    }

    .docente-section-nav-head {
        display: none;
    }

    .docente-section-select {
        display: grid;
    }

    .docente-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .docente-tabs a {
        flex: 0 0 auto;
        grid-template-columns: auto;
        min-width: 48px;
        min-height: 38px;
        padding: 6px 8px;
    }

    .docente-tab-copy {
        display: none;
    }

    .docente-tab-number {
        width: 30px;
        height: 28px;
    }

    .preview-modal {
        padding: 12px;
    }

    .preview-dialog {
        max-height: 90vh;
    }

    .preview-header {
        padding: 14px;
    }

    .preview-header h3 {
        font-size: 16px;
    }

    .preview-body {
        min-height: 320px;
        padding: 10px;
    }

    .preview-body iframe {
        height: 66vh;
        min-height: 320px;
    }
}


/* Override final para que el sidebar ERP prevalezca sobre estilos heredados. */.app-shell {
    display: block;
    padding: 0;
}

.sidebar.app-sidebar {
    display: flex;
}

.content {
    margin-left: var(--sidebar-expanded);
}

body.sidebar-is-collapsed .content {
    margin-left: var(--sidebar-collapsed);
}

.topbar {
    align-items: center;
}

.docente-panel {
    display: none;
}

.docente-panel.is-active {
    display: block;
}

.app-submenu.is-open {
    max-height: min(430px, calc(100vh - 330px));
    overflow-y: auto;
}

.app-submenu-link {
    min-height: 34px;
    font-size: 12px;
}

@media (max-width: 720px) {
    .content,
body.sidebar-is-collapsed .content {
        margin-left: var(--sidebar-collapsed);
    }

    

    

    

    body.sidebar-is-expanded-mobile .app-submenu.is-open {
        max-height: calc(100vh - 300px);
    }
}

/* =========================================================
   LANDING PUBLICA / INDEX INSTITUCIONAL
   ========================================================= */html.theme-dark {
    background: #111827;
    color-scheme: dark;
}

html.theme-dark body {
    background: #111827;
}

html.font-compact body {
    font-size: 13px;
}

html.font-large body {
    font-size: 16px;
}

.landing-page {
    min-height: 100vh;
    margin: 0;
    color: #172033;
    background:
        linear-gradient(180deg, rgba(22, 163, 74,0.10), rgba(255, 255, 255, 0) 430px),
        #f4f7fb;
}

.landing-page.has-landing-sidebar {
    box-sizing: border-box;
    padding-left: var(--sidebar-expanded);
    transition: padding-left 0.24s ease;
}

body.sidebar-is-collapsed.landing-page.has-landing-sidebar {
    padding-left: var(--sidebar-collapsed);
}

.landing-page a {
    text-decoration: none;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 18px 0;
    backdrop-filter: blur(16px);
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #172033;
}

.landing-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 800;
    background: #15803d;
    box-shadow: 0 14px 30px rgba(29, 95, 195, 0.25);
}

.landing-brand strong,
.landing-brand small {
    display: block;
}

.landing-brand strong {
    font-size: 0.98rem;
}

.landing-brand small {
    margin-top: 2px;
    color: #657186;
    font-size: 0.78rem;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(215, 225, 239, 0.86);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(61, 89, 130, 0.08);
}

.landing-nav a {
    padding: 10px 14px;
    border-radius: 8px;
    color: #516172;
    font-size: 0.92rem;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.landing-nav a:hover {
    color: #15803d;
    background: #dcfce7;
    transform: translateY(-1px);
}



/* .landing-nav-login → ver BLOQUE 4: BOTONES */.landing-hero,
.landing-section {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.landing-hero {
    display: flex;
    align-items: center;
    min-height: min(640px, calc(76vh - 74px));
    padding: 56px 0 46px;
}

.landing-hero-content {
    max-width: 1060px;
    animation: landingFadeUp 0.7s ease both;
}

.landing-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #15803d;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.landing-kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: #15803d;
}

.landing-hero h1 {
    max-width: 980px;
    margin: 0;
    color: #0e1b33;
    font-size: clamp(2.4rem, 4.1vw, 4.15rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.landing-hero p {
    max-width: 650px;
    margin: 20px 0 0;
    color: #516172;
    font-size: 1.08rem;
    line-height: 1.65;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}



/* .landing-actions .btn → ver BLOQUE 4: BOTONES */.landing-dashboard-preview {
    position: relative;
    padding: 22px;
    border: 1px solid rgba(215, 225, 239, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 26px 80px rgba(38, 79, 140, 0.17);
    animation: landingFadeUp 0.7s 0.12s ease both;
}

.preview-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.preview-toolbar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #b7c8e3;
}

.preview-toolbar span:first-child {
    background: #15803d;
}

.preview-status {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, #14532d, #16a34a);
}

.preview-status strong,
.preview-status small {
    display: block;
}

.preview-status small {
    color: rgba(255, 255, 255, 0.78);
}

.preview-chart {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    gap: 12px;
    height: 210px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    background: #f8fbff;
}

.preview-chart span {
    display: block;
    min-height: 46px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #16a34a, #86efac);
    animation: landingBars 1s ease both;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.preview-grid span {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 12px;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    color: #516172;
    background: #ffffff;
    font-weight: 700;
}

.preview-grid i,
.landing-card i,
.module-grid i {
    color: #15803d;
}

.landing-section {
    padding: 68px 0;
}

.landing-about {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 38px;
    border-top: 1px solid #d7e1ef;
}

.landing-section h2 {
    margin: 0;
    color: #0e1b33;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    line-height: 1.15;
    letter-spacing: 0;
}

.about-copy {
    display: grid;
    gap: 16px;
}

.about-copy p,
.landing-card p {
    margin: 0;
    color: #657186;
    line-height: 1.7;
}

.section-heading {
    max-width: 740px;
    margin-bottom: 26px;
}

.benefit-grid,
.module-grid {
    display: grid;
    gap: 16px;
}

.benefit-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.landing-card {
    min-height: 210px;
    padding: 22px;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(38, 79, 140, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.landing-card:hover,
.module-grid article:hover {
    border-color: #86efac;
    box-shadow: 0 20px 48px rgba(38, 79, 140, 0.13);
    transform: translateY(-4px);
}

.landing-card i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 8px;
    background: #dcfce7;
    font-size: 1.25rem;
}

.landing-card h3 {
    margin: 0 0 10px;
    color: #172033;
    font-size: 1rem;
    line-height: 1.3;
}

.module-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.module-grid article {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 84px;
    padding: 18px;
    border: 1px solid #d7e1ef;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(38, 79, 140, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.module-grid i {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 8px;
    background: #dcfce7;
    font-size: 1.08rem;
}

.module-grid span {
    color: #172033;
    font-weight: 800;
    line-height: 1.25;
}

.landing-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(1180px, calc(100% - 36px));
    margin: 28px auto 0;
    padding: 24px 0 34px;
    border-top: 1px solid #d7e1ef;
    color: #657186;
    font-size: 0.92rem;
}

.landing-footer strong {
    color: #172033;
}

.landing-public-sidebar .app-nav {
    padding-bottom: 24px;
}

.landing-page.theme-dark,
html.theme-dark .landing-page {
    background:
        linear-gradient(180deg, rgba(22, 163, 74,0.18), rgba(17, 24, 39, 0) 430px),
        #111827;
    color: #f8fbff;
}

.landing-page.theme-dark .landing-brand,
.landing-page.theme-dark .landing-hero h1,
.landing-page.theme-dark .landing-section h2,
.landing-page.theme-dark .landing-card h3,
.landing-page.theme-dark .module-grid span,
.landing-page.theme-dark .landing-footer strong,
html.theme-dark .landing-page .landing-brand,
html.theme-dark .landing-page .landing-hero h1,
html.theme-dark .landing-page .landing-section h2,
html.theme-dark .landing-page .landing-card h3,
html.theme-dark .landing-page .module-grid span,
html.theme-dark .landing-page .landing-footer strong {
    color: #f8fbff;
}

.landing-page.theme-dark .landing-brand small,
.landing-page.theme-dark .landing-hero p,
.landing-page.theme-dark .about-copy p,
.landing-page.theme-dark .landing-card p,
.landing-page.theme-dark .landing-footer,
.landing-page.theme-dark .preview-grid span,
html.theme-dark .landing-page .landing-brand small,
html.theme-dark .landing-page .landing-hero p,
html.theme-dark .landing-page .about-copy p,
html.theme-dark .landing-page .landing-card p,
html.theme-dark .landing-page .landing-footer,
html.theme-dark .landing-page .preview-grid span {
    color: #bac7da;
}

.landing-page.theme-dark .landing-nav,
.landing-page.theme-dark .landing-dashboard-preview,
.landing-page.theme-dark .landing-card,
.landing-page.theme-dark .module-grid article,
.landing-page.theme-dark .preview-chart,
.landing-page.theme-dark .preview-grid span,
html.theme-dark .landing-page .landing-nav,
html.theme-dark .landing-page .landing-dashboard-preview,
html.theme-dark .landing-page .landing-card,
html.theme-dark .landing-page .module-grid article,
html.theme-dark .landing-page .preview-chart,
html.theme-dark .landing-page .preview-grid span {
    border-color: #334155;
    background: #1b2536;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.landing-page.theme-dark .landing-nav a,
html.theme-dark .landing-page .landing-nav a {
    color: #c8d3e3;
}

.landing-page.theme-dark .landing-nav a:hover,
.landing-page.theme-dark .landing-card i,
.landing-page.theme-dark .module-grid i,
html.theme-dark .landing-page .landing-nav a:hover,
html.theme-dark .landing-page .landing-card i,
html.theme-dark .landing-page .module-grid i {
    background: #1d345f;
}

.landing-page.theme-dark .landing-about,
.landing-page.theme-dark .landing-footer,
html.theme-dark .landing-page .landing-about,
html.theme-dark .landing-page .landing-footer {
    border-color: #334155;
}

.landing-page.font-compact .landing-hero p,
.landing-page.font-compact .about-copy p,
.landing-page.font-compact .landing-card p,
html.font-compact .landing-page .landing-hero p,
html.font-compact .landing-page .about-copy p,
html.font-compact .landing-page .landing-card p {
    font-size: 0.94rem;
}

.landing-page.font-large .landing-hero p,
.landing-page.font-large .about-copy p,
.landing-page.font-large .landing-card p,
.landing-page.font-large .landing-nav a,
html.font-large .landing-page .landing-hero p,
html.font-large .landing-page .about-copy p,
html.font-large .landing-page .landing-card p,
html.font-large .landing-page .landing-nav a {
    font-size: 1.08rem;
}

@keyframes landingFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes landingBars {
    from {
        transform: scaleY(0.35);
        transform-origin: bottom;
    }
    to {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

@media (max-width: 1040px) {
    .landing-hero,
.landing-about {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        min-height: auto;
        padding-top: 34px;
    }

    .benefit-grid,
.module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .landing-page.has-landing-sidebar,
body.sidebar-is-collapsed.landing-page.has-landing-sidebar {
        padding-left: var(--sidebar-collapsed);
    }

    body.sidebar-is-expanded-mobile.landing-page.has-landing-sidebar {
        padding-left: var(--sidebar-expanded);
    }

    .landing-header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .landing-nav {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .landing-nav a {
        white-space: nowrap;
    }

    .landing-hero,
.landing-section,
.landing-footer {
        width: min(100% - 28px, 1180px);
    }

    .landing-hero h1 {
        font-size: clamp(2rem, 11vw, 3.15rem);
    }

    .landing-hero p {
        font-size: 1rem;
    }

    .landing-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .landing-dashboard-preview {
        padding: 16px;
    }

    .preview-status,
.preview-grid {
        grid-template-columns: 1fr;
    }

    .preview-status {
        display: block;
    }

    .preview-chart {
        height: 170px;
    }

    .benefit-grid,
.module-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   REGLAS CONECTADAS AL PANEL DE DISENO
   Estas reglas deben quedarse al final para prevalecer sobre
   estilos heredados. Modifica los valores en :root, no aqui.
   ========================================================= */.app-sidebar {
    border-right-color: var(--sidebar-border);
    background: var(--sidebar-bg);
    box-shadow: var(--sidebar-shadow);
}



/* .sidebar-toggle → ver BLOQUE 4: BOTONES */.app-nav-link > .bi:first-child,
.app-submenu-link > .bi:first-child {
    color: var(--color-link-primary-dark);
    background: var(--sidebar-link-hover-bg);
}

.app-nav-link:hover,
.app-submenu-link:hover {
    color: var(--color-link-primary-dark);
    background: var(--sidebar-link-active-bg);
}

.app-nav-link.active,
.app-submenu-link.active,
.app-nav-link[aria-expanded="true"] {
    color: var(--color-link-primary-dark);
    background: var(--sidebar-link-hover-bg);
    box-shadow: inset 4px 0 0 var(--color-link-primary);
}

.brand-mark,
.landing-brand-mark {
    color: var(--color-text-white);
    background: var(--brand-primary);
    box-shadow: var(--shadow-button);
}

.landing-page {
    color: var(--color-text);
    background:
        linear-gradient(180deg, var(--landing-bg-glow), rgba(255, 255, 255, 0) 430px),
        var(--landing-bg);
}

.landing-header,
.landing-hero,
.landing-section,
.landing-footer {
    width: min(var(--landing-max-width), calc(100% - 36px));
}

.landing-brand,
.landing-card h3,
.module-grid span,
.landing-footer strong {
    color: var(--color-text);
}

.landing-brand small,
.landing-hero p,
.about-copy p,
.landing-card p,
.landing-footer {
    color: var(--color-text-muted);
}

.landing-nav {
    border-color: var(--color-border);
    background: color-mix(in srgb, var(--color-surface) 78%, transparent);
    box-shadow: var(--shadow-top);
}

.landing-nav a {
    color: var(--color-text-secondary);
}

.landing-nav a:hover {
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

.landing-hero {
    min-height: var(--landing-hero-min-height);
}

.landing-kicker,
.preview-grid i,
.landing-card i,
.module-grid i {
    color: var(--brand-primary);
}

.landing-kicker::before {
    background: var(--brand-primary);
}

.landing-hero h1,
.landing-section h2 {
    color: var(--landing-title-color);
}

.landing-hero h1 {
    font-size: var(--landing-title-size);
}

.landing-about,
.landing-footer {
    border-color: var(--color-border);
}

.landing-card,
.module-grid article {
    border-color: var(--color-border);
    background: var(--color-surface);
}

.landing-card {
    box-shadow: var(--shadow-profile);
}

.module-grid article {
    box-shadow: var(--shadow-top);
}

.landing-card:hover,
.module-grid article:hover {
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-card);
}

.landing-card i,
.module-grid i {
    background: var(--brand-primary-soft);
}

html.theme-dark .landing-page,
.landing-page.theme-dark {
    background:
        linear-gradient(180deg, var(--landing-bg-glow-dark), rgba(17, 24, 39, 0) 430px),
        #111827;
}

@media (max-width: 720px) {
    .landing-header,
.landing-hero,
.landing-section,
.landing-footer {
        width: min(100% - 28px, var(--landing-max-width));
    }
}















/* Estado del expediente — pill adicional */.status-pill.is-validated {
    background: var(--color-success-bg);
    color: var(--color-success-dark);
    border: 1px solid var(--color-success-border);
}

.status-pill.is-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border: 1px solid var(--color-error-border);
}


/* Grid de los 11 apartados */.cedula-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.progress-section-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: box-shadow 0.18s, border-color 0.18s;
}

.progress-section-card:hover {
    box-shadow: 0 6px 22px rgba(22, 163, 74,0.12);
    border-color: var(--color-link-primary);
}

.progress-section-card.is-done {
    border-color: var(--color-success-border);
    background: linear-gradient(135deg, var(--color-success-bg) 0%, var(--color-surface) 80%);
}

.progress-section-card.is-partial {
    border-color: var(--color-accent-blue);
    background: linear-gradient(135deg, var(--color-link-primary-soft) 0%, var(--color-surface) 80%);
}

.progress-section-card.is-pending {
    border-color: var(--color-warning-border);
    background: linear-gradient(135deg, var(--color-warning-bg) 0%, var(--color-surface) 80%);
}

.progress-section-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.progress-section-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--color-link-primary-soft);
    color: var(--brand-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.progress-section-card.is-done .progress-section-icon {
    background: var(--color-success-bg);
    color: var(--color-success-dark);
}

.progress-section-card.is-pending .progress-section-icon {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.progress-section-info {
    flex: 1;
    min-width: 0;
}

.progress-section-info .eyebrow {
    font-size: 0.68rem;
}

.progress-section-info strong {
    display: block;
    margin-top: 3px;
    font-size: 0.85rem;
    line-height: 1.28;
    color: var(--color-text);
}

.progress-section-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
}

.progress-section-badge.is-empty {
    background: var(--color-disabled-bg);
    color: var(--color-disabled);
}

.progress-bar-track {
    height: 5px;
    border-radius: 99px;
    background: var(--color-border);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--brand-primary);
    transition: width 0.4s ease;
}

.progress-section-card.is-done .progress-bar-fill {
    background: var(--color-success);
}

.progress-section-card.is-pending .progress-bar-fill {
    background: var(--color-warning-dark);
}

.progress-bar-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: -4px;
}

.progress-section-link {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    margin-top: auto;
    padding-top: 4px;
}

.progress-section-link:hover {
    text-decoration: underline;
}









/* Accesos rapidos del dashboard (extiende module-grid con links) */.dashboard-quick-links {
    margin-top: 4px;
}





/* ── Encabezado de seccion de graficas por apartado ────────────────────── */.section-charts-heading {
    margin-bottom: 6px;
}

.section-charts-heading h3 {
    margin: 4px 0 0;
}

.charts-heading-legend {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}


/* Grid 11 tarjetas de anillo — una por apartado */.section-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.section-chart-card {
    display: grid;
    grid-template-columns: 76px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: box-shadow 0.18s, border-color 0.18s;
}

.section-chart-card:hover {
    box-shadow: 0 4px 18px rgba(22, 163, 74,0.12);
    border-color: var(--color-link-primary);
}

.section-ring-wrap {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
}

.section-ring-svg {
    width: 76px;
    height: 76px;
    color: var(--color-text);
    overflow: visible;
}

.section-chart-info {
    min-width: 0;
}

.section-chart-info .eyebrow {
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-chart-info strong {
    display: block;
    margin-top: 3px;
    font-size: 0.87rem;
    line-height: 1.28;
    color: var(--color-text);
}

.section-chart-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 7px;
    flex-wrap: wrap;
}

.section-chart-meta small {
    font-size: 0.73rem;
    color: var(--color-text-muted);
}

.section-chart-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 0;
}

.section-chart-link:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .section-chart-card {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
    }

    .section-ring-wrap,
.section-ring-svg {
        width: 60px;
        height: 60px;
    }

    .section-chart-link {
        grid-column: 1 / -1;
        padding-top: 2px;
    }
}







.chart-card .card-title-row {
    margin-bottom: 4px;
}





.chart-donut-wrap {
    height: 280px;
}





.chart-bar-wrap {
    height: 320px;
}









/* Responsive */@media (max-width: 900px) {
    

    .chart-donut-wrap {
        height: 260px;
    }

    

    

    
}

@media (max-width: 640px) {
    .cedula-progress-grid {
        grid-template-columns: 1fr;
    }

    

    

    .chart-bar-wrap {
        height: 260px;
    }
}


















































.chart-nodet-alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 16px 4px;
    padding: 8px 12px;
    border-left: 3px solid #f07a35;
    background: rgba(240, 122, 53, 0.08);
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.chart-nodet-alert .chart-nodet-icon {
    color: #f07a35;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 1px;
}





