/* ==========================================================================
   Estilos Generales y del Body
   ========================================================================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* --- ESTILO ESPECIAL PARA PÁGINAS CENTRADAS (LOGIN, RECOVER, RESET) --- */
body.centered-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* ==========================================================================
   Encabezado y Navegación Principal
   ========================================================================== */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 24px;
    font-weight: bold;
}
.user-info {
    display: flex;
    align-items: center;
}
.user-name {
    margin-right: 15px;
}
.container {
    display: flex;
    min-height: calc(100vh - 60px);
}
.sidebar {
    width: 250px;
    background-color: #34495e;
    color: white;
    padding: 20px 0;
    flex-shrink: 0;
}
.main-content {
    flex-grow: 1;
    padding: 20px;
}
.menu-header {
    padding: 12px 20px;
    font-weight: bold;
    background-color: #2c3e50;
    margin-top: 10px;
}
.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}
.menu-item:hover {
    background-color: #2c3e50;
    color: white;
}
.menu-item.active {
    background-color: #2980b9;
    color: white;
    font-weight: bold;
    border-left: 4px solid #e74c3c;
}

/* ==========================================================================
   Formularios y Contenedores Centrados
   ========================================================================== */
.login-container, .recover-container, .reset-container {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 350px;
}
.login-header, .recover-header, .reset-header {
    text-align: center;
    margin-bottom: 20px;
}
.login-header h1, .recover-header h1, .reset-header h1 {
    color: #2c3e50; margin-bottom: 5px; font-size: 24px;
}
.login-header .logo, .recover-header .logo, .reset-header .logo {
    font-size: 32px; font-weight: bold; color: #2c3e50; margin-bottom: 10px;
}
hr {
    border: none; border-top: 1px solid #eee; margin: 20px 0;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label, label {
    display: block; margin-bottom: 5px; color: #333; font-weight: bold;
}
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="tel"], .form-group select, textarea {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; font-size: 14px; font-family: Arial, sans-serif; resize: vertical;
}
.forgot-password, .back-link {
    text-align: center; margin-top: 15px;
}
.forgot-password a, .back-link a {
    color: #3498db; text-decoration: none;
}
.forgot-password a:hover, .back-link a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Botones
   ========================================================================== */
button {
    border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; font-weight: bold;
}
/* --- Botón de formulario principal (ancho completo) --- */
.login-container button, .recover-container button, .reset-container button {
    width: 100%;
    margin-top: 10px;
    background-color: #3498db; /* Color azul solicitado */
    color: white;
}
.login-container button:hover, .recover-container button:hover, .reset-container button:hover {
    background-color: #2980b9;
}
/* --- Botones de propósito general --- */
.btn-primary { background-color: #3498db; color: white; }
.btn-primary:hover { background-color: #2980b9; }
.btn-success { background-color: #2ecc71; color: white; }
.btn-success:hover { background-color: #27ae60; }
.btn-warning { background-color: #f39c12; color: white; }
.btn-warning:hover { background-color: #d35400; }
.btn-danger { background-color: #e74c3c; color: white; }
.btn-danger:hover { background-color: #c0392b; }
button:disabled { background-color: #cccccc; cursor: not-allowed; }

/* ==========================================================================
   Dashboard Layout
   ========================================================================== */
.welcome-banner {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white; padding: 20px; border-radius: 5px; margin-bottom: 30px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.welcome-title { font-size: 24px; margin-bottom: 10px; }
.welcome-message { margin-bottom: 0; line-height: 1.5; }

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.card {
    background-color: white; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); padding: 20px;
    transition: transform 0.2s ease-in-out;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.card-header { font-size: 18px; font-weight: bold; margin-bottom: 15px; color: #2c3e50; display: flex; align-items: center; }
.card-icon { margin-right: 10px; width: 24px; height: 24px; background-color: #3498db; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; }
.card-content { font-size: 24px; font-weight: bold; color: #34495e; }
.card-footer { margin-top: 15px; font-size: 12px; color: #7f8c8d; }
.color-1 { border-top: 3px solid #3498db; } .color-1 .card-icon { background-color: #3498db; }
.color-2 { border-top: 3px solid #e74c3c; } .color-2 .card-icon { background-color: #e74c3c; }
.color-3 { border-top: 3px solid #2ecc71; } .color-3 .card-icon { background-color: #2ecc71; }
.color-4 { border-top: 3px solid #f39c12; } .color-4 .card-icon { background-color: #f39c12; }

.recent-activity { background-color: white; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); padding: 20px; }
.activity-item { padding: 10px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 30px; height: 30px; background-color: #3498db; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; margin-right: 15px; flex-shrink: 0; }
.activity-content { flex-grow: 1; }
.activity-title { font-weight: bold; margin-bottom: 5px; }
.activity-time { font-size: 12px; color: #7f8c8d; }

/* ==========================================================================
   Página de Gestión de Usuarios
   ========================================================================== */
.user-actions { display: flex; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px;}
.search-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px;}
.search-bar input { width: 300px; }
.user-table { width: 100%; border-collapse: collapse; background-color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.user-table th, .user-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; }
.user-table th { background-color: #f2f2f2; font-weight: bold; }
.user-table tr:hover { background-color: #f9f9f9; }
.action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.status-active, .status-inactive { padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; text-align: center; }
.status-active { background-color: #dff0d8; color: #3c763d; }
.status-inactive { background-color: #f2dede; color: #a94442; }
.pagination { display: flex; justify-content: center; margin-top: 20px; }
.pagination button { margin: 0 5px; background-color: #f5f5f5; color: #333; }
.pagination button.active { background-color: #3498db; color: white; }
.pagination button.disabled { opacity: 0.5; cursor: not-allowed; }
.pagination-ellipsis { margin: 0 5px; align-self: center; }

/* ==========================================================================
   Modal (Crear/Editar Usuario)
   ========================================================================== */
#userModal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal-content { background-color: white; width: 500px; max-width: 90%; padding: 20px; border-radius: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.modal-title { margin-top: 0; margin-bottom: 20px; color: #2c3e50; }
.form-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
/* Anulamos el ancho completo para los botones dentro del modal */
.modal-content button {
    width: auto;
}

/* ==========================================================================
   Mensajes y Criterios
   ========================================================================== */
#mensaje-respuesta { margin-top: 15px; text-align: center; padding: 10px; border-radius: 4px; }
.mensaje-error { background-color: #f8d7da; color: #721c24; }
.mensaje-exito { background-color: #d4edda; color: #155724; }
.mensaje-info { background-color: #d1ecf1; color: #0c5460; }

.password-criteria { margin-top: 10px; font-size: 12px; color: #666; }
.criteria-item { margin: 5px 0; }
.criteria-met { color: #28a745; }
.criteria-not-met { color: #dc3545; }

/* ==========================================================================
   Estilos de la Página de Perfil
   ========================================================================== */
.section-title {
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.profile-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.profile-info, .password-change {
    flex: 1;
    min-width: 300px;
}

.info-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.label {
    font-weight: bold;
    color: #7f8c8d;
    display: block;
    margin-bottom: 5px;
}

.value {
    color: #2c3e50;
    font-size: 16px;
}

/* ==========================================================================
   Estilos para Diseño Responsivo (MEDIA QUERIES)
   ========================================================================== */

/* --- Estilos base para el botón de menú (oculto en escritorio) --- */
.menu-toggle-button {
    display: none; /* Oculto por defecto */
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* --- Breakpoint para Tablets y Móviles (768px o menos) --- */
@media (max-width: 768px) {

    .action-buttons {
        display: flex;
        flex-wrap: wrap; /* Permite que los botones pasen a la siguiente línea */
        gap: 8px;
        justify-content: flex-end; /* Alinea los botones a la derecha */
    }

    /* Mostrar el botón de hamburguesa y ocultar info de usuario si es necesario */
    .menu-toggle-button {
        display: block; /* Lo hacemos visible */
        order: 2; /* Cambiamos el orden para que aparezca después del logo */
    }
    .user-info {
        order: 3;
    }
    .logo {
        order: 1;
    }
    .header {
        justify-content: space-between;
    }

    /* Ocultar la barra lateral por defecto y prepararla para animación */
    .sidebar {
        position: fixed;
        left: -250px; /* La movemos fuera de la pantalla */
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
    }

    /* Clase que JavaScript añadirá para mostrar la barra lateral */
    .sidebar.visible {
        left: 0;
    }

    /* El contenido principal ahora ocupa todo el ancho */
    .main-content {
        margin-left: 0;
    }

    /* Apilar las tarjetas del dashboard verticalmente */
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    /* Hacer que la barra de acciones de usuario se apile */
    .user-actions {
        flex-direction: column;
        gap: 15px;
    }

    .user-table thead {
        display: none; /* Ocultamos los encabezados, esto es correcto */
    }

    .user-table tr {
        display: block; /* Cada fila es un bloque/tarjeta */
        width: 100%;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        background-color: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }

    .user-table td {
        display: flex;            /* <--- LA MAGIA ESTÁ AQUÍ */
        justify-content: space-between; /* <--- Y AQUÍ */
        align-items: center;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
    }

    .user-table tr td:last-child {
        border-bottom: none; /* Quitar el borde de la última celda de cada tarjeta */
    }

    .user-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        padding-right: 1em; /* Espacio entre etiqueta y dato */
    }

    /* Para que los botones se alineen bien dentro de la celda flex */
    .user-table .action-buttons {
        justify-content: flex-end; /* Alinea los botones a la derecha */
    }
}

/* ==========================================================================
   ESTILOS PARA MÓDULO DE EXPEDIENTES - AGREGADOS
   ========================================================================== */

/* --- Header del expediente --- */
.expediente-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.expediente-header h1 {
    margin: 0;
    font-size: 24px;
}

/* --- Layout para formularios en dos columnas --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* --- Displays de información (vista de solo lectura) --- */
.info-display {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    margin-bottom: 15px;
}

.info-label {
    font-weight: bold;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-size: 14px;
    display: block;
}

.info-value {
    color: #2c3e50;
    font-size: 16px;
}

/* --- Headers de secciones con botones --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.section-header h3 {
    margin: 0;
    color: #2c3e50;
}

/* --- Items de listas (formación, experiencia) --- */
.list-item {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid #2ecc71;
    line-height: 1.5;
}

.list-item strong {
    color: #2c3e50;
}

.list-item em {
    color: #7f8c8d;
}

/* --- Modales simples para expedientes --- */
.simple-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.simple-modal-content {
    background: white;
    padding: 30px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.simple-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* --- Clase de utilidad para ocultar elementos --- */
.hidden {
    display: none !important;
}

/* --- Responsive Design para Expedientes --- */
@media (max-width: 768px) {
    /* Formularios en una sola columna en móviles */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Headers de sección apilados en móviles */
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    /* Expediente header más compacto */
    .expediente-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .expediente-header h1 {
        font-size: 20px;
    }
    
    /* Info displays más compactos */
    .info-display {
        padding: 12px;
    }
    
    /* List items más compactos */
    .list-item {
        padding: 12px;
    }
    
    /* Modal más grande en móviles */
    .simple-modal-content {
        width: 95%;
        padding: 20px;
    }

    /* Estilos para los registros de formación y experiencia */
.records-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.record-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #2ecc71;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.record-item:hover {
    background-color: #e8f5e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.record-content {
    flex-grow: 1;
    margin-right: 15px;
}

.record-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Botones pequeños para acciones */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-small.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-small.btn-primary:hover {
    background-color: #2980b9;
}

.btn-small.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-small.btn-danger:hover {
    background-color: #c0392b;
}

.btn-small.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-small.btn-success:hover {
    background-color: #229954;
}

/* Estilos para los modales de edición */
.simple-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.simple-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.simple-modal h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Formularios en modales */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .record-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .record-actions {
        align-self: flex-end;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .simple-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
}

/* Animaciones para los modales */
.simple-modal[style*="flex"] {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.simple-modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Estilos para la sección de documentos */
.documents-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.document-item:hover {
    background: #e8f4f8;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.document-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 15px;
}

.document-icon {
    font-size: 2rem;
    opacity: 0.7;
}

.document-details {
    flex-grow: 1;
}

.document-details strong {
    color: #2c3e50;
    font-size: 1rem;
}

.document-name {
    color: #34495e;
    font-size: 0.9rem;
}

.document-details small {
    color: #7f8c8d;
    font-size: 0.8rem;
}

.file-info {
    color: #95a5a6 !important;
    font-weight: 500;
}

.document-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Modal de subida de documentos */
.simple-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.simple-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.simple-modal h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    font-size: 1.4rem;
}

/* Estilos del formulario de upload */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input[type="file"] {
    padding: 8px;
    background: #f8f9fa;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Botones mejorados */
.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.btn-primary.btn-small {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary.btn-small:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-danger.btn-small {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger.btn-small:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #219a52, #1e8449);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .document-item {
        flex-direction: column;
        gap: 15px;
        text-align: left;
    }
    
    .document-info {
        width: 100%;
    }
    
    .document-actions {
        justify-content: center;
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .simple-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
}

/* === ESTILOS PARA VALIDACIÓN === */
.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
    font-weight: 400;
}

/* Estados de validación */
input.invalid, 
textarea.invalid, 
select.invalid {
    border-color: #dc3545 !important;
    background-color: #fff5f5;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input.valid, 
textarea.valid, 
select.valid {
    border-color: #28a745 !important;
    background-color: #f8fff8;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Indicador de formulario seguro */
.secure-form::before {
    content: "Formulario Protegido";
    position: absolute;
    top: -25px;
    right: 0;
    background: #28a745;
    color: white;
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.secure-form {
    position: relative;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background: #fafafa;
}

/* Animaciones para retroalimentación */
.invalid {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mensajes de validación en tiempo real */
.error-message:not(:empty) {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}




}



/* ===== ESTILOS PARA CONSTANCIAS ===== */

.constancia-section {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.constancia-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#generate-constancia-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
}

#generate-constancia-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#generate-constancia-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.status-message {
    text-align: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
}

.field-required::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}