/* ============================================================
   VARIABLES DE DISEÑO
   Paleta de colores institucional y roles sugeridos.
   ============================================================ */
:root {
    --primary: #009688;
    /* Verde principal — acciones primarias, botones filled, énfasis principal */
    --primary-dark: #00635A;
    /* Verde oscuro — hover/active, acentos fuertes, estados interactivos */
    --primary-light: #4DB6AC;
    /* Verde claro — bordes suaves, fondos de tarjetas, elementos destacados */
    --accent: #00635A;
    /* Acento general — se mantiene igual que primary-dark */
    --muted: #E0F2F1;
    /* Fondo suave — usado para áreas amplias, evita la fatiga visual */
    --navy: #004D40;
    /* Azul petróleo — navegación, encabezados oscuros, contraste alto */
    --text: #000000;
    /* Negro — texto principal para máxima legibilidad */
    --white: #FFFFFF;
    /* Blanco — contenedores limpios, contraste con primary/navy */
}

/* ============================================================
   RESET GENERAL
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================
   BODY
   Uso de Inter como tipografía principal por legibilidad en UI.
   Fondo muted para suavidad y accesibilidad.
   ============================================================ */
body {
    font-family: 'Inter', system-ui, sans-serif;
    /* Tipografía primaria UI */
    /* Fondo soft — reduce contraste duro */
    background-color: var(--muted);
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    color: var(--text);
    /* Texto principal negro */
}

/* ============================================================
   BOTÓN DE VERIFICACIÓN
   ============================================================ */
button[type="submit"] {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 1rem;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

button[type="submit"]:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 150, 136, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 150, 136, 0.2);
}

button[type="submit"]:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

/* ============================================================
   CONTENEDOR DE LOGIN
   Fondo blanco para claridad, borde con primary-light para cohesión.
   ============================================================ */
.login-container {
    background: var(--white);
    /* Contenedor claro */
    border-radius: 20px;
    /* Bordes suaves — estilo moderno */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    /* Profundidad */
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--primary-light);
    /* Uso del verde claro para sutil énfasis */
}

/* ============================================================
   HEADER DEL LOGIN
   Uso del azul petróleo como color de navegación/encabezado.
   Tipografía secundaria (Merriweather) para dar tono formal.
   ============================================================ */
.login-header {
    background: var(--navy);
    /* Azul petróleo — alto contraste con texto blanco */
    padding: 40px 30px;
    text-align: center;
    color: var(--white);
}

.login-header h1 {
    font-family: 'Merriweather', serif;
    /* Tipografía secundaria para títulos */
    font-size: 26px;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

/* ============================================================
   CUERPO DEL LOGIN
   ============================================================ */
.login-body {
    padding: 40px 30px;
}

/* ============================================================
   GRUPOS DE FORMULARIO
   Bordes e interacciones con primary y primary-light.
   ============================================================ */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--navy);
    /* Contraste con el fondo blanco, mantiene coherencia cromática */
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--primary-light);
    /* Borde suave */
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

/* Estado focus con colores accesibles */
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    /* Enfatiza acción */
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.2);
    /* Microinteracción accesible */
}

/* ============================================================
   CHECKBOX Y LABEL
   accent-color usa el --primary como color institucional.
   ============================================================ */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-check input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
    /* Color institucional aplicado al checkbox */
}

.form-check label {
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

/* ============================================================
   BOTÓN PRIMARIO
   Filled button — fondo primary y microinteracción hover/active.
   ============================================================ */
.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    /* Acción principal */
    color: var(--white);
    /* Contraste WCAG */
    border: none;
    border-radius: 8px;
    /* Bordes suaves tipo UI moderna */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    /* Microinteracción */
}

/* Hover oscurece 8–12% siguiendo guías dadas */
.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-login:active {
    transform: translateY(0);
}

/* ============================================================
   ALERTAS (NO BASADAS EN LA PALETA INSTITUCIONAL)
   Se mantienen colores estándares para semántica universal.
   ============================================================ */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Error */
.alert-danger {
    background-color: #FFEBEE;
    border-left: 4px solid #D32F2F;
    color: #B71C1C;
}

/* Éxito */
.alert-success {
    background-color: #E8F5E9;
    border-left: 4px solid #2E7D32;
    color: #1B5E20;
}

/* ============================================================
   ENLACES SECUNDARIOS
   Ghost links — solo color primary.
   ============================================================ */
.text-center {
    text-align: center;
    margin-top: 20px;
}

.text-center a {
    color: var(--primary);
    /* Ghost style */
    text-decoration: none;
    font-weight: 600;
}

.text-center a:hover {
    text-decoration: underline;
}

/* Texto de error local */
.error-text {
    color: #D32F2F;
    font-size: 12px;
    margin-top: 5px;
}

/* ============================================================
   LOGO Y ANIMACIÓN
   ============================================================ */
.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    animation: fadeInUp 0.8s ease-out;
    /* Microinteracción */
}

.login-logo img {
    max-width: min(250px, 90%);
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    padding: 0.5rem;
}

/* Navegación principal */
.main-nav {
    background: var(--navy);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Logo / marca */
.nav-brand img {
    height: 60px;
    width: auto;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.nav-brand {
    color: var(--white);
    font-family: 'Merriweather', serif;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 20px 18px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--primary-light);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    border-bottom-color: var(--primary);
}

/* Usuario info */
.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--white);
    padding: 20px 0;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.usuarios-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text);
    opacity: 0.7;
    font-size: 16px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}


/* Contenido principal */
.main-content {
    flex: 1;
    padding: 0;
}

/* Responsive */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 20px 0;
}


.filters-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filters-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-group {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-group svg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--navy);
    opacity: 0.5;
}

.search-group input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-size: 14px;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-size: 14px;
    min-width: 180px;
    cursor: pointer;
}

.btn-filter,
.btn-clear {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-filter {
    background: var(--primary);
    color: var(--white);
    border: none;
}

.btn-filter:hover {
    background: var(--primary-dark);
}

.btn-clear {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--primary-light);
}

.btn-clear:hover {
    background: var(--muted);
}

.table-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.roles-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-director {
    background: rgba(244, 67, 54, 0.1);
    color: #D32F2F;
}

.badge-profesor {
    background: rgba(0, 150, 136, 0.1);
    color: var(--primary-dark);
}

.badge-revisor {
    background: rgba(33, 150, 243, 0.1);
    color: #1976D2;
}

.text-muted {
    color: #999;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.btn-edit {
    color: var(--primary);
}

.btn-edit:hover {
    background: rgba(0, 150, 136, 0.1);
}

.btn-delete {
    color: var(--danger);
}

.btn-delete:hover {
    background: rgba(244, 67, 54, 0.1);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state svg {
    color: var(--primary-light);
    margin-bottom: 16px;
}

.empty-state p {
    color: #999;
    font-size: 16px;
}

.pagination-container {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.module-content {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .35s ease, opacity .25s ease;
}

.module-content.active {
    max-height: 1000px;
    /* suficiente para cualquier tabla */
    opacity: 1;
}

.module-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-toggle i {
    transition: transform .3s ease;
}

.module-toggle.open i {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-group {
        min-width: 100%;
    }

    .filter-select {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--primary-dark);
        margin-top: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-user {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}


.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 8px;
}

.dashboard-header .subtitle {
    color: var(--text);
    opacity: 0.7;
    font-size: 16px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.info-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--primary-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.info-card.wide {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .info-card.wide {
        grid-column: span 1;
    }
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon.warning {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.card-icon.info {
    background: rgba(0, 150, 136, 0.1);
    color: var(--primary);
}

.card-icon.danger {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger);
}

.card-icon.success {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-description {
    color: var(--text);
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 8px;
}

.btn-view {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: background 0.2s ease;
    align-self: flex-start;
}

.btn-view:hover {
    background: var(--primary-dark);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--muted);
    border-radius: 8px;
}

.status-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.form-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.form-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 5px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--muted);
}

.form-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--muted);
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.section-description {
    color: var(--text);
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
}

.required {
    color: var(--danger);
}

.form-control {
    padding: 12px 16px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.help-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text);
    opacity: 0.6;
}

.error-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--danger);
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.role-card {
    position: relative;
    cursor: pointer;
}

.role-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.role-content {
    padding: 20px;
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
    background: var(--white);
}

.role-card:hover .role-content {
    border-color: var(--primary);
    background: rgba(0, 150, 136, 0.02);
}

.role-card input:checked~.role-content {
    border-color: var(--primary);
    background: rgba(0, 150, 136, 0.1);
}

.role-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--muted);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.role-card input:checked~.role-content .role-icon {
    background: var(--primary);
    color: var(--white);
}

.role-name {
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--muted);
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: var(--muted);
}

.planes-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.modules-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.expandable-module {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--primary-light);
}

.module-header {
    margin-bottom: 20px;
}

.module-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-title svg {
    color: var(--primary);
}

.module-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 20px;
    border-radius: 12px;
    background: var(--muted);
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.success {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

.stat-card.warning {
    border-color: #FF9800;
    background: rgba(255, 152, 0, 0.05);
}

.stat-card.danger {
    border-color: #F44336;
    background: rgba(244, 67, 54, 0.05);
}

.stat-card.info {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.05);
}

.stat-card.primary {
    border-color: var(--primary);
    background: rgba(0, 150, 136, 0.05);
}

.stat-card.wide {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .stat-card.wide {
        grid-column: span 1;
    }
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 12px;
}

.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mini-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.mini-label {
    font-size: 11px;
    color: var(--navy);
    text-align: center;
}

.btn-expand {
    width: 100%;
    padding: 10px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-expand:hover {
    background: var(--primary-dark);
}

.expandable-content {
    margin-top: 20px;
    padding: 20px;
    background: var(--muted);
    border-radius: 12px;
    border: 2px solid var(--primary-light);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.content-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.btn-close {
    padding: 8px 16px;
    background: var(--danger);
    color: var(--accent);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close:hover {
    color: var(--white);
    background: #D32F2F;
}

.data-container {
    min-height: 200px;
}

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: var(--primary);
    font-size: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.data-table thead {
    background: var(--navy);
    color: var(--white);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--muted);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: rgba(0, 150, 136, 0.02);
}

.pagination-ajax {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination-ajax button {
    padding: 8px 16px;
    background: var(--white);
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    color: var(--navy);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-ajax button:hover:not(:disabled) {
    background: var(--primary);
    color: var(--white);
}

.pagination-ajax button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ajax button.active {
    background: var(--primary);
    color: var(--white);
}

.badge-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pendiente {
    background: rgba(158, 158, 158, 0.1);
    color: #616161;
}

.badge-desarrollo {
    background: rgba(33, 150, 243, 0.1);
    color: #1976D2;
}

.badge-revision {
    background: rgba(255, 152, 0, 0.1);
    color: #F57C00;
}

.badge-revisado {
    background: rgba(76, 175, 80, 0.1);
    color: #388E3C;
}

.badge-validado {
    background: rgba(0, 150, 136, 0.1);
    color: var(--primary-dark);
}

.grupos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.grupos-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.grupo-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid var(--primary-light);
    transition: all 0.2s ease;
}

.grupo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.grupo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--muted);
}

.grupo-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.badge-activo {
    background: rgba(76, 175, 80, 0.1);
    color: #388E3C;
}

.badge-inactivo {
    background: rgba(158, 158, 158, 0.1);
    color: #616161;
}

.grupo-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text);
}

.info-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.grupo-actions {
    display: flex;
    gap: 8px;
}

.btn-view-full {
    flex: 1;
    padding: 10px;
    background: var(--muted);
    color: var(--navy);
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-full:hover {
    background: var(--primary-light);
    color: var(--white);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--muted);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.btn-close-modal {
    padding: 8px 12px;
    background: transparent;
    color: var(--navy);
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-modal:hover {
    color: var(--danger);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.carrera-item {
    padding: 16px;
    background: var(--muted);
    border-radius: 8px;
    margin-bottom: 12px;
}

.carrera-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
}

.carrera-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.cuatrimestres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 12px;
    padding-left: 32px;
}

.cuatrimestre-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.cuatrimestre-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

.preview-container {
    padding: 20px;
    background: var(--muted);
    border-radius: 8px;
    min-height: 200px;
}

.preview-grupo {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    background: var(--primary);
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
}

.info-box {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid #2196F3;
    border-radius: 8px;
    font-size: 14px;
}

.info-box svg {
    flex-shrink: 0;
    color: #2196F3;
}

.mt-2 {
    margin-top: 8px;
}

.asignaciones-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.resumen-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.resumen-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid var(--primary-light);
}

.resumen-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(0, 150, 136, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.resumen-content {
    flex: 1;
}

.resumen-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 4px;
}

.resumen-label {
    font-size: 14px;
    color: var(--text);
    opacity: 0.7;
}

.profesor-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profesor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.email-item {
    font-size: 13px;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 8px;
}

.badge-primary {
    background: rgba(0, 150, 136, 0.1);
    color: var(--primary-dark);
}

.badge-info {
    background: rgba(33, 150, 243, 0.1);
    color: #1976D2;
}

.profesores-card {
    margin-top: 30px;
    padding: 24px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid var(--primary-light);
}

.profesores-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
}

.profesores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.profesor-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--muted);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.profesor-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.profesor-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.profesor-info {
    flex: 1;
}

.profesor-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.profesor-info p {
    font-size: 13px;
    color: var(--text);
    opacity: 0.7;
    margin-bottom: 8px;
}

@media print {

    .page-header button,
    .page-header a {
        display: none;
    }

    .profesor-card {
        break-inside: avoid;
    }
}

.asignacion-item {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 16px;
    background: var(--muted);
    border-radius: 8px;
    margin-bottom: 12px;
}

.materia-info {
    flex: 1;
    font-size: 15px;
    color: var(--navy);
}

.profesor-select {
    flex: 2;
}

.asignaciones-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.materias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.materia-card {
    position: relative;
    display: block;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.materia-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.materia-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.materia-card input[type="checkbox"]:checked~.materia-content {
    background: #eff6ff;
}

.materia-card input[type="checkbox"]:checked~.materia-content .materia-name {
    color: #3b82f6;
    font-weight: 600;
}

.materia-content {
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s;
}

.materia-name {
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.materia-info {
    color: #6b7280;
}

.search-box {
    margin-bottom: 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border-radius: 12px;
    border: 2px solid #e1e5e9;
    font-size: 16px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: #ffffff;
    color: #2d3748;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-input:hover {
    border-color: #a5b4fc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}


.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border: 3px dashed var(--primary-light);
    border-radius: 12px;
    background: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: var(--navy);
}

.file-label:hover {
    border-color: var(--primary);
    background: rgba(0, 150, 136, 0.05);
}

.file-label svg {
    color: var(--primary);
}

.requisitos-box {
    padding: 16px;
    background: rgba(33, 150, 243, 0.05);
    border-left: 4px solid #2196F3;
    border-radius: 8px;
    margin: 16px 0;
}

.requisitos-box h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.requisitos-box svg {
    color: #2196F3;
    flex-shrink: 0;
}

.requisitos-box ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.requisitos-box li {
    padding: 4px 0;
    font-size: 13px;
    color: var(--text);
}

.progress-container {
    margin: 20px 0;
    padding: 20px;
    background: var(--muted);
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 150, 136, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.progress-text {
    margin-top: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}

.resultado-success {
    padding: 16px;
    background: #E8F5E9;
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    margin: 16px 0;
}

.resultado-error {
    padding: 16px;
    background: #FFEBEE;
    border-left: 4px solid #F44336;
    border-radius: 8px;
    margin: 16px 0;
}

.resultado-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.resultado-content {
    font-size: 13px;
}

.resultado-content p {
    margin: 6px 0;
}

.errores-lista,
.detalles-lista {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.errores-lista li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
    font-size: 13px;
}

.errores-lista li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #F44336;
    font-weight: 700;
}

.detalles-lista li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
    font-size: 13px;
}

.detalles-lista li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
    font-weight: 700;
}

.plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--muted);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.plan-item:hover {
    background: rgba(0, 150, 136, 0.05);
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.plan-info {
    flex: 1;
}

.plan-nombre {
    font-weight: 600;
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 6px;
}

.plan-fecha {
    font-size: 13px;
    color: var(--text);
    opacity: 0.7;
}

.plan-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-ver {
    background: rgba(33, 150, 243, 0.1);
    color: #1976D2;
}

.btn-ver:hover {
    background: rgba(33, 150, 243, 0.2);
    transform: translateY(-2px);
}

.btn-eliminar {
    background: rgba(244, 67, 54, 0.1);
    color: #D32F2F;
}

.btn-eliminar:hover {
    background: rgba(244, 67, 54, 0.2);
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state svg {
    color: var(--primary-light);
    margin-bottom: 16px;
}

.empty-state p {
    color: #999;
    font-size: 16px;
}

.loading-spinner {
    text-align: center;
    padding: 80px 20px;
    color: var(--primary);
    font-size: 16px;
}

@media (max-width: 768px) {
    .form-card {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

/* Animación suave */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   CONTAINER PRINCIPAL
   ============================================================ */
.container {
    max-width: 480px;
    width: 90%;
    margin: 2rem auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 77, 64, 0.08);
    border: 1px solid rgba(0, 150, 136, 0.1);
    animation: fadeIn 0.4s ease-out;
}

/* ============================================================
   TIPOGRAFÍA Y TÍTULOS
   ============================================================ */
.container h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    text-align: center;
}

.container h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.container p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 1rem;
}

/* ============================================================
   SECCIÓN DE CONFIGURACIÓN AUTHENTICATOR
   ============================================================ */
.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.font-semibold {
    font-weight: 600;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

/* ============================================================
   CÓDIGO QR
   ============================================================ */
.flex {
    display: flex;
}

.justify-center {
    justify-content: center;
}

/* Contenedor del QR */
.container .flex.justify-center {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.1);
    margin: 1rem 0;
}

/* SVG del QR */
.container .flex.justify-center svg {
    width: 180px !important;
    height: 180px !important;
    max-width: 100%;
}

/* ============================================================
   CLAVE SECRETA (CÓDIGO)
   ============================================================ */
code {
    display: inline-block;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    background-color: var(--muted);
    color: var(--navy);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--primary-light);
    letter-spacing: 0.05em;
    word-break: break-all;
}

.bg-gray-100 {
    background-color: var(--muted) !important;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.rounded {
    border-radius: 6px;
}

/* ============================================================
   FORMULARIO DE VERIFICACIÓN
   ============================================================ */


/* Etiquetas */
label.block {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

/* Campo de entrada */
input[type="text"] {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--primary-light);
    border-radius: 10px;
    background-color: var(--white);
    color: var(--text);
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

input[type="text"]::placeholder {
    color: #9ca3af;
}

/* Campo con error */
.border-red-500 {
    border-color: #ef4444 !important;
}

.border-red-500:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Mensajes de error */
.text-red-500 {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1.5rem;
        margin: 1.5rem auto;
        border-radius: 12px;
    }

    .container h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .container h3 {
        font-size: 1rem;
    }

    .container p {
        font-size: 0.9rem;
    }

    .container .flex.justify-center svg {
        width: 160px !important;
        height: 160px !important;
    }

    code {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    input[type="text"] {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    button[type="submit"] {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.75rem 1.25rem;
        width: 95%;
    }

    .container h2 {
        font-size: 1.35rem;
    }

    .container .flex.justify-center svg {
        width: 140px !important;
        height: 140px !important;
    }
}

/* ============================================================
   ANIMACIONES
   ============================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   ESTADOS DE CARGA (opcional)
   ============================================================ */
button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Indicador de carga */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-header h1 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    color: var(--navy);
    margin: 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-card {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--primary-light);
}

.profile-avatar-section {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--muted);
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 48px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(0, 150, 136, 0.3);
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.profile-email {
    color: var(--text);
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: var(--text);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-section {
    margin-bottom: 32px;
}


.section-title svg {
    color: var(--primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
}

.roles-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.materias-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.materia-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--muted);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.materia-item:hover {
    background: rgba(0, 150, 136, 0.05);
    transform: translateX(4px);
}

.materia-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.materia-info {
    flex: 1;
}

.materia-name {
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
    margin-bottom: 2px;
}

.materia-code {
    font-size: 12px;
    color: var(--text);
    opacity: 0.7;
}

.security-section {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--primary-light);
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--muted);
    border-radius: 12px;
    margin-bottom: 16px;
}

.security-info {
    flex: 1;
}

.security-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
}

.security-description {
    font-size: 13px;
    color: var(--text);
    opacity: 0.7;
}

.security-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: rgba(76, 175, 80, 0.1);
    color: #388E3C;
}

.status-inactive {
    background: rgba(158, 158, 158, 0.1);
    color: #616161;
}

.btn-security {
    padding: 8px 16px;
    border: 2px solid var(--primary-light);
    background: transparent;
    color: var(--navy);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-security:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-danger-security {
    border-color: #F44336;
    color: #D32F2F;
}

.btn-danger-security:hover {
    background: #F44336;
    color: var(--white);
    border-color: #F44336;
}

.empty-state-small {
    text-align: center;
    padding: 40px 20px;
    background: var(--muted);
    border-radius: 8px;
}

.empty-state-small svg {
    color: var(--primary-light);
    margin-bottom: 12px;
}

.empty-state-small p {
    color: #999;
    font-size: 14px;
}

@media (max-width: 968px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile-container {
        padding: 20px 15px;
    }

    .profile-header h1 {
        font-size: 24px;
    }

    .profile-card {
        padding: 20px;
    }

    .security-section {
        padding: 20px;
    }

    .security-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .security-status {
        width: 100%;
        justify-content: space-between;
    }
}

/* ============================================================
   Accesibilidad: Reduce Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .login-logo {
        animation: none;
    }
}