/* Estilos para modal de actualización de foto */
.btn-update-photo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-update-photo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.profile-pic-actions {
    text-align: center;
}

/* Estilos para modal de foto */
#photo-update-modal .modal-content {
    width: min(95vw, 800px);
    max-height: min(92vh, 900px);
    margin: 16px auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#photo-update-modal .modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.photo-upload-section {
    padding: 16px 0;
}

.upload-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateY(-2px);
}

.upload-zone i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 16px;
    display: block;
}

.upload-zone h4 {
    color: #2d3748;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.upload-zone p {
    color: #718096;
    margin: 0 0 16px 0;
}

.upload-zone small {
    color: #a0aec0;
}

/* Mobile-first crop area */
.crop-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.image-container {
    position: relative;
    max-width: 100%;
    flex: 1;
    overflow: hidden;
    border-radius: 12px;
    touch-action: none;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    touch-action: none;
}

.crop-box {
    position: absolute;
    border: 2px solid #667eea;
    background: transparent;
    cursor: move;
    min-width: 80px;
    min-height: 80px;
    touch-action: none;
}

.crop-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    background: #667eea;
    border: 2px solid white;
    border-radius: 50%;
    touch-action: none;
}

.crop-handle.top-left { top: -9px; left: -9px; cursor: nw-resize; }
.crop-handle.top-right { top: -9px; right: -9px; cursor: ne-resize; }
.crop-handle.bottom-left { bottom: -9px; left: -9px; cursor: sw-resize; }
.crop-handle.bottom-right { bottom: -9px; right: -9px; cursor: se-resize; }
.crop-handle.top { top: -9px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.crop-handle.bottom { bottom: -9px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.crop-handle.left { left: -9px; top: 50%; transform: translateY(-50%); cursor: w-resize; }
.crop-handle.right { right: -9px; top: 50%; transform: translateY(-50%); cursor: e-resize; }

.preview-result {
    flex: none;
    text-align: center;
    align-self: center;
}

.preview-result h5 {
    color: #2d3748;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.final-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e2e8f0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#crop-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Desktop enhancements */
@media (min-width: 769px) {
    .crop-container {
        flex-direction: row;
        gap: 28px;
        align-items: flex-start;
    }

    .preview-result {
        flex: 0 0 200px;
        text-align: left;
        align-self: flex-start;
    }

    #photo-update-modal .modal-content {
        margin: 24px auto;
    }

    .image-container {
        max-width: 420px;
    }
}

/* Correcciones generales de contenedores */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Mejoras en el header */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Corrección del centrado en login */
#login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.login-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    transition: var(--transition);
    margin: 0 auto;
}

/* Mejoras en dashboard */
.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
}

.dashboard-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Correcciones para las tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Mejoras en modales */
.modal-content {
    background-color: white;
    margin: 50px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    animation: modalFadeIn 0.3s;
    box-sizing: border-box;
}

/* Correcciones para el calendario */
.calendar-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    min-height: 400px;
    width: 100%;
}

/* Corrección de las estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
}

/* Corrección de la configuración */
.config-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Mejoras en notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 350px;
    width: calc(100% - 40px);
    z-index: 1000;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.5s ease;
    box-sizing: border-box;
}

/* Correcciones para perfiles y fotos */
.profile-pic-container {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Mejoras en responsividad */
@media (max-width: 992px) {
    .config-container,
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-nav {
        width: 100%;
        margin: 15px 0;
        overflow-x: auto;
    }
    
    .dashboard-nav ul {
        display: flex;
        width: max-content;
        padding-bottom: 5px;
    }
    
    .calendar-container {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-actions {
        margin-top: 15px;
        width: 100%;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 30px auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .recluta-details-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .recluta-details-header .profile-pic-container {
        margin: 0 auto 15px;
    }
    
    .view-mode-buttons,
    .edit-mode-buttons {
        flex-direction: column;
    }
    
    .view-mode-buttons button,
    .edit-mode-buttons button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Mejoras en modo oscuro */
.dark-mode .dashboard-content, 
.dark-mode .dashboard-header, 
.dark-mode .login-card,
.dark-mode .modal-content,
.dark-mode .notification,
.dark-mode .card {
    background-color: var(--light-color);
    color: var(--text-color);
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background-color: #2a2b3d;
    color: var(--text-color);
    border-color: #3f3f3f;
}

/* Mejoras en espaciados y elementos del dashboard */
.dashboard-content-section {
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

.dashboard-nav {
    flex: 1;
    margin: 0 20px;
    overflow-x: auto;
}

.dashboard-nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    gap: 10px;
}

/* Formularios y controles */
.form-group {
    margin-bottom: 20px;
    width: 100%;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: white;
    color: var(--text-color);
    box-sizing: border-box;
}

/* Correcciones para botones */
.btn-primary, .btn-secondary, .btn-danger {
    box-sizing: border-box;
}

/* Corrección para dropdown */
.profile-dropdown {
    position: relative;
    margin-left: auto;
}

/* Ajuste de z-index para menús y modales */
.modal {
    z-index: 1000;
}

.dropdown-content {
    z-index: 999;
}

.notification {
    z-index: 1001;
}

/* Nota: variables :root y body.dark-mode definidas en styles.css */

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 350px;
    z-index: 1000;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.5s ease;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

#notification-message {
    flex: 1;
    padding-right: 10px;
}

#notification-close {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

#notification-close:hover {
    color: var(--danger-color);
}

/* Encabezado */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container i {
    font-size: 24px;
    margin-right: 10px;
}

.logo-container h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.header-button {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.header-button i {
    margin-right: 5px;
}

.header-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Login */
#login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;  
}

.login-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    transition: var(--transition);
    justify-content: center; /* Centra verticalmente los elementos dentro */
    align-items: center;    /* Centra horizontalmente los elementos dentro */
}

.dark-mode .login-card {
    background-color: var(--light-color);
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.card-header i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.card-header h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    width: auto;
    padding: 0;
}

.toggle-password:hover {
    color: var(--primary-color);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: white;
    color: var(--text-color);
}

.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background-color: #2a2b3d;
    color: var(--text-color);
    border-color: #3f3f3f;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

textarea {
    min-height: 100px;
    padding-left: 14px;
    resize: vertical;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.checkbox-container {
    display: flex;
    align-items: center;
}

input[type="checkbox"] {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Botones */
.btn-primary, .btn-secondary, .btn-danger {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-primary i, .btn-secondary i, .btn-danger i {
    margin-right: 8px;
}

/* Dashboard */
#dashboard-section {
    min-height: calc(100vh - 120px);
}

.dashboard-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.dark-mode .dashboard-header {
    background-color: var(--light-color);
}

.profile-section {
    display: flex;
    align-items: center;
}

.profile-pic-container {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    padding: 5px 0;
    opacity: 0;
    transition: var(--transition);
}

.profile-pic-container:hover .profile-pic-overlay {
    opacity: 1;
}

.profile-pic-edit {
    color: white;
    cursor: pointer;
}

.profile-info h2 {
    font-size: 18px;
    margin: 0;
    color: var(--text-color);
}

.profile-role {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* Navegación del dashboard */
.dashboard-nav {
    flex: 1;
    margin: 0 20px;
}

.dashboard-nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

.dashboard-nav li {
    position: relative;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.dashboard-nav a i {
    margin-right: 8px;
}

.dashboard-nav a:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.dashboard-nav li.active a {
    background-color: var(--primary-color);
    color: white;
}

/* Dropdown de perfil */
.profile-dropdown {
    position: relative;
}

.profile-dropdown-button {
    display: flex;
    align-items: center;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.profile-dropdown-button i {
    margin-right: 8px;
    color: var(--primary-color);
}

.profile-dropdown-button .fa-chevron-down {
    margin-left: 8px;
    margin-right: 0;
    font-size: 12px;
    color: var(--text-light);
}

.profile-dropdown-button:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 45px;
    width: 200px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: none;
}

.dark-mode .dropdown-content {
    background-color: var(--light-color);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-content a i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.dropdown-content a:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 5px 0;
}

.dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

/* Contenido del dashboard */
.dashboard-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.dark-mode .dashboard-content {
    background-color: var(--light-color);
}

.dashboard-content-section {
    display: none;
    padding: 20px;
}

.dashboard-content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h3 {
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.section-header h3 i {
    margin-right: 10px;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 10px 15px 10px 35px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 240px;
    font-size: 14px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Tabla de reclutas */
.reclutas-container {
    margin-top: 20px;
}

.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dark-mode .card {
    background-color: var(--light-color);
}

.card-content {
    padding: 20px;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-color);
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: white;
    min-width: 150px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: #f8f9fa;
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.dark-mode th {
    background-color: #2a2b3d;
}

td {
    border-bottom: 1px solid var(--border-color);
}

.recluta-foto {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #d39e00;
}

.badge-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
}

.action-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary-dark);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pagination-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pagination-numbers {
    padding: 0 10px;
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.dark-mode .stat-card {
    background-color: var(--light-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.stat-icon i {
    font-size: 22px;
    color: var(--primary-color);
}

.stat-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px;
    color: var(--text-light);
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 5px;
    color: var(--text-color);
}

.stat-growth {
    font-size: 12px;
    margin: 0;
    display: flex;
    align-items: center;
}

.stat-growth i {
    margin-right: 5px;
}

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--danger-color);
}

.neutral {
    color: var(--text-light);
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.dark-mode .chart-card {
    background-color: var(--light-color);
}

.chart-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-color);
}

.chart-placeholder {
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.dark-mode .chart-placeholder {
    background-color: #2a2b3d;
}

.chart-placeholder i {
    font-size: 40px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.chart-placeholder p {
    color: var(--text-light);
    margin: 0;
}

/* Calendario */
.calendar-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.calendar-sidebar {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.dark-mode .calendar-sidebar {
    background-color: var(--light-color);
}

.calendar-month {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-month h4 {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

.calendar-nav-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.upcoming-events h5 {
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.event-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.event-date {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.event-day {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    font-size: 12px;
    text-transform: uppercase;
}

.event-details h6 {
    margin: 0 0 5px;
    font-weight: 600;
    color: var(--text-color);
}

.event-details p {
    margin: 0;
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.event-details p i {
    margin-right: 5px;
}

.calendar-main {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.dark-mode .calendar-main {
    background-color: var(--light-color);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.day-name {
    font-weight: 600;
    color: var(--text-color);
    padding: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 5px;
    height: 400px;
}

.calendar-day {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px;
    min-height: 60px;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.calendar-day.today {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: var(--primary-color);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 5px;
}

.calendar-event {
    background-color: var(--primary-color);
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Color-coded calendar days based on interview count */
.calendar-day.interview-count-1 {
    background-color: rgba(40, 167, 69, 0.15) !important; /* Verde claro */
    border-color: #28a745 !important;
}

.calendar-day.interview-count-2-4 {
    background-color: rgba(255, 193, 7, 0.15) !important; /* Amarillo claro */
    border-color: #ffc107 !important;
}

.calendar-day.interview-count-5-plus {
    background-color: rgba(220, 53, 69, 0.15) !important; /* Rojo claro */
    border-color: #dc3545 !important;
}

/* Hover states for interview count days */
.calendar-day.interview-count-1:hover {
    background-color: rgba(40, 167, 69, 0.25) !important;
}

.calendar-day.interview-count-2-4:hover {
    background-color: rgba(255, 193, 7, 0.25) !important;
}

.calendar-day.interview-count-5-plus:hover {
    background-color: rgba(220, 53, 69, 0.25) !important;
}

/* Configuración */
.config-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.config-section {
    margin-bottom: 25px;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-section h5 {
    font-weight: 600;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.config-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.color-options {
    display: flex;
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.color-option input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.color-option.selected::after {
    content: "\\2713";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    animation: modalFadeIn 0.3s;
}

.dark-mode .modal-content {
    background-color: var(--light-color);
}

.modal-sm {
    max-width: 400px;
}

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

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

.close-modal {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer button {
    width: auto;
}

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

.modal-profile {
    margin: 0 auto 20px;
}

.profile-pic-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
    margin: 0 auto;
}

.dark-mode .profile-pic-preview {
    background-color: #2a2b3d;
}

/* Detalles de recluta */
.recluta-details-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.recluta-info {
    flex: 1;
}

.recluta-info h4 {
    margin: 0 0 5px;
    font-weight: 600;
    color: var(--text-color);
}

.recluta-info p {
    margin: 0 0 10px;
    color: var(--text-light);
}

.detail-row {
    display: flex;
    margin-bottom: 15px;
}

.detail-label {
    width: 120px;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.detail-label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.detail-value {
    flex: 1;
}

.view-mode-buttons,
.edit-mode-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.interview-candidate {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.interview-candidate-info {
    margin-left: 15px;
}

.interview-candidate-info h4 {
    margin: 0 0 5px;
    font-weight: 600;
    color: var(--text-color);
}

.interview-candidate-info p {
    margin: 0;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 992px) {
    .config-container,
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-buttons {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .dashboard-header {
        flex-direction: column;
    }
    
    .profile-section {
        margin-bottom: 15px;
        width: 100%;
        justify-content: center;
    }
    
    .dashboard-nav {
        width: 100%;
        margin: 15px 0;
    }
    
    .dashboard-nav ul {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .profile-dropdown {
        width: 100%;
    }
    
    .profile-dropdown-button {
        width: 100%;
        justify-content: center;
    }
    
    .calendar-container {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-actions {
        margin-top: 15px;
        width: 100%;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 30px auto;
    }
    
    .recluta-details-header {
        flex-direction: column;
        text-align: center;
    }
    
    .recluta-details-header .profile-pic-container {
        margin: 0 auto 15px;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .view-mode-buttons,
    .edit-mode-buttons {
        flex-direction: column;
    }
}

/* ===== DASHBOARD NAV: ESTILO DE SCROLLER Y PESTANAS ===== */
.dashboard-nav {
    flex: 1;
    margin: 0 20px;
    position: relative;
}

.dashboard-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 4px 6px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.12);
}

.dashboard-nav ul::-webkit-scrollbar {
    height: 10px;
}

.dashboard-nav ul::-webkit-scrollbar-button:horizontal {
    width: 0;
}

.dashboard-nav ul::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
}

.dashboard-nav ul::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-accent-color));
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dashboard-nav ul::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--secondary-accent-color), var(--primary-color));
}

.dashboard-nav li {
    position: relative;
    flex: 0 0 auto;
}

.dashboard-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    transition: var(--transition);
}

.dashboard-nav a i {
    margin-right: 0;
}

.dashboard-nav a:hover {
    transform: translateY(-1px);
    background: rgba(16, 182, 174, 0.14);
    border-color: rgba(16, 182, 174, 0.35);
}

.dashboard-nav li.active a,
.dashboard-nav a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-accent-color));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 20px rgba(16, 182, 174, 0.22);
}

@media (max-width: 768px) {
    .dashboard-nav {
        width: 100%;
        margin: 12px 0;
    }

    .dashboard-nav ul {
        padding: 4px 4px 10px;
        gap: 8px;
    }

    .dashboard-nav a {
        padding: 10px 14px;
    }
}

/* ===== POPUP DE BIENVENIDA POR ROL ===== */
.role-welcome-popup {
    position: fixed;
    top: 92px;
    right: 22px;
    z-index: 2500;
    width: min(460px, calc(100vw - 28px));
    border-radius: 14px;
    padding: 16px 18px 14px 42px;
    color: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.22);
    animation: rolePopupSlideIn .28s ease-out;
}

.role-welcome-popup--admin {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-accent-color));
}

.role-welcome-popup--gerente {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.role-welcome-popup--asesor {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.role-welcome-popup__close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.24);
}

.role-welcome-popup__close:hover {
    background: rgba(0, 0, 0, 0.4);
}

.role-welcome-popup__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
}

.role-welcome-popup__message {
    margin: 0;
    opacity: 0.96;
    font-size: 16px;
    line-height: 1.4;
}

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

@media (max-width: 768px) {
    .role-welcome-popup {
        top: 76px;
        right: 12px;
        width: calc(100vw - 24px);
        padding: 14px 14px 12px 40px;
    }

    .role-welcome-popup__title {
        font-size: 18px;
    }

    .role-welcome-popup__message {
        font-size: 14px;
    }
}

/* ===== REDISEÑO GESTION DE RECLUTAS ===== */
#reclutas-section {
    --reclutas-accent: var(--primary-color);
    --reclutas-accent-soft: rgba(var(--secondary-accent-color-rgb), 0.18);
    --reclutas-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(226, 246, 245, 0.78));
    --reclutas-stroke: rgba(255, 255, 255, 0.55);
    position: relative;
    border-radius: 22px;
    padding: 22px;
    background: var(--reclutas-bg);
    border: 1px solid var(--reclutas-stroke);
    box-shadow: 0 18px 34px rgba(4, 36, 38, 0.14);
    overflow: hidden;
}

body.admin-view #reclutas-section {
    --reclutas-accent: var(--secondary-accent-color);
    --reclutas-accent-soft: rgba(var(--secondary-accent-color-rgb), 0.18);
}

body.gerente-view #reclutas-section {
    --reclutas-accent: #f59e0b;
    --reclutas-accent-soft: rgba(245, 158, 11, 0.2);
}

body.asesor-view #reclutas-section {
    --reclutas-accent: #2dbf71;
    --reclutas-accent-soft: rgba(45, 191, 113, 0.18);
}

#reclutas-section::before,
#reclutas-section::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
}

#reclutas-section::before {
    width: 240px;
    height: 240px;
    right: -70px;
    top: -90px;
    background: radial-gradient(circle, var(--reclutas-accent-soft), transparent 68%);
}

#reclutas-section::after {
    width: 200px;
    height: 200px;
    left: -60px;
    bottom: -80px;
    background: radial-gradient(circle, rgba(14, 107, 189, 0.12), transparent 70%);
}

#reclutas-section .section-header,
#reclutas-section .reclutas-container,
#reclutas-section .role-welcome-popup {
    position: relative;
    z-index: 1;
}

#reclutas-section .section-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
}

#reclutas-section .section-header h3 {
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

#reclutas-section .section-header h3 i {
    color: var(--reclutas-accent);
}

#reclutas-section .section-actions {
    gap: 12px;
}

#reclutas-section .search-container {
    min-width: 320px;
}

#reclutas-section .search-container input {
    height: 50px;
    border-radius: 999px;
    border: 1px solid rgba(5, 28, 33, 0.16);
    background: rgba(255, 255, 255, 0.86);
    padding-left: 46px;
    font-size: 15px;
}

#reclutas-section .search-container i {
    color: var(--reclutas-accent);
}

#reclutas-section .btn-primary,
#reclutas-section .btn-secondary,
#reclutas-section .filter-button {
    border-radius: 12px;
    min-height: 46px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform .2s ease, box-shadow .2s ease;
}

#reclutas-section .btn-primary:hover,
#reclutas-section .btn-secondary:hover,
#reclutas-section .filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

#reclutas-section .card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(7px);
    box-shadow: 0 14px 32px rgba(7, 45, 52, 0.12);
}

#reclutas-section .card-content {
    padding: 18px;
}

#reclutas-section .filter-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(245, 249, 251, 0.88);
    border: 1px solid rgba(10, 45, 50, 0.08);
}

#reclutas-section .filter-group {
    margin: 0;
}

#reclutas-section .filter-group label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5568;
    margin-bottom: 6px;
}

#reclutas-section .filter-group select,
#reclutas-section .filter-group input,
#reclutas-section .filter-button {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(5, 28, 33, 0.16);
    background: #fff;
}

#reclutas-section .reclutas-table-shell {
    border-radius: 14px;
    border: 1px solid rgba(9, 43, 48, 0.12);
    background: #fff;
    overflow: auto;
    max-height: 63vh;
}

#reclutas-section #reclutas-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#reclutas-section #reclutas-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(241, 248, 250, 0.98), rgba(234, 245, 247, 0.98));
    color: #0c2f36;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid rgba(8, 52, 60, 0.12);
}

#reclutas-section #reclutas-table td {
    border-bottom: 1px solid rgba(13, 63, 73, 0.08);
    padding-top: 14px;
    padding-bottom: 14px;
}

#reclutas-section #reclutas-table .cell-truncate {
    display: block;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#reclutas-section #reclutas-table tbody tr {
    transition: transform .18s ease, background-color .2s ease;
}

#reclutas-section #reclutas-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(242, 252, 252, 1), rgba(249, 254, 254, 1));
    transform: translateX(3px);
}

#reclutas-section #reclutas-table .badge {
    padding: 7px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

#reclutas-section #reclutas-table .folio-display {
    border-radius: 999px;
    border: 1px dashed rgba(8, 53, 61, 0.28);
    background: rgba(246, 250, 252, 0.95);
    font-weight: 700;
    padding: 7px 12px;
}

#reclutas-section #reclutas-table .actions-column {
    display: flex;
    align-items: center;
    gap: 8px;
}

#reclutas-section #reclutas-table .action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(4, 45, 55, 0.12);
    background: #fff;
}

#reclutas-section #reclutas-table .action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

#reclutas-section .reclutas-pagination {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(5, 31, 36, 0.1);
}

#reclutas-section .pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

@media (max-width: 1200px) {
    #reclutas-section .filter-controls {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 900px) {
    #reclutas-section {
        padding: 14px;
    }

    #reclutas-section .section-header {
        grid-template-columns: 1fr;
    }

    #reclutas-section .section-header h3 {
        font-size: 24px;
    }

    #reclutas-section .search-container {
        min-width: 100%;
    }

    #reclutas-section .filter-controls {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    #reclutas-section .filter-controls {
        grid-template-columns: 1fr;
    }

    #reclutas-section .card-content {
        padding: 12px;
    }

    #reclutas-section .reclutas-table-shell {
        max-height: 56vh;
    }
}

@media (max-width: 768px) {
    #reclutas-section .reclutas-table-shell {
        overflow: visible;
        max-height: none;
        border: 0;
        background: transparent;
    }

    #reclutas-section #reclutas-table thead {
        display: none;
    }

    #reclutas-section #reclutas-table,
    #reclutas-section #reclutas-table tbody,
    #reclutas-section #reclutas-table tr,
    #reclutas-section #reclutas-table td {
        display: block;
        width: 100%;
    }

    #reclutas-section #reclutas-table tbody tr {
        margin: 12px 0;
        border-radius: 14px;
        border: 1px solid rgba(9, 43, 48, 0.12);
        background: #fff;
        box-shadow: 0 10px 18px rgba(7, 45, 52, 0.12);
        overflow: hidden;
    }

    #reclutas-section #reclutas-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px dashed rgba(13, 63, 73, 0.12);
    }

    #reclutas-section #reclutas-table td::before {
        content: attr(data-label);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-weight: 700;
        color: #0c2f36;
        opacity: 0.7;
    }

    #reclutas-section #reclutas-table td[data-label=""]::before {
        display: none;
        content: '';
    }

    #reclutas-section #reclutas-table td:last-child {
        border-bottom: none;
    }

    #reclutas-section #reclutas-table .cell-truncate {
        max-width: 60vw;
    }

    #reclutas-section #reclutas-table td[data-label="Acciones"] {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #reclutas-section #reclutas-table .actions-column {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* ===== REDISEÑO GLOBAL PARA TODAS LAS SECCIONES ===== */
#dashboard-section .dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#dashboard-section .dashboard-content-section {
    --section-accent: var(--primary-color);
    --section-accent-rgb: var(--secondary-accent-color-rgb);
    position: relative;
    border-radius: 22px;
    padding: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(231, 246, 245, 0.76));
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 16px 34px rgba(8, 41, 45, 0.12);
    overflow: hidden;
}

body.admin-view #dashboard-section .dashboard-content-section {
    --section-accent: var(--secondary-accent-color);
    --section-accent-rgb: var(--secondary-accent-color-rgb);
}

body.gerente-view #dashboard-section .dashboard-content-section {
    --section-accent: #f59e0b;
    --section-accent-rgb: 245, 158, 11;
}

body.asesor-view #dashboard-section .dashboard-content-section {
    --section-accent: #2dbf71;
    --section-accent-rgb: 45, 191, 113;
}

#dashboard-section .dashboard-content-section::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    top: -100px;
    right: -85px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(var(--section-accent-rgb), 0.22), transparent 70%);
    pointer-events: none;
}

#dashboard-section .dashboard-content-section > * {
    position: relative;
    z-index: 1;
}

#dashboard-section .dashboard-content-section .section-header,
#dashboard-section .dashboard-content-section .section-header-v2 {
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(7px);
}

#dashboard-section .dashboard-content-section .section-header h2,
#dashboard-section .dashboard-content-section .section-header h3,
#dashboard-section .dashboard-content-section .section-header-v2 h3 {
    letter-spacing: -0.02em;
}

#dashboard-section .dashboard-content-section .section-header i,
#dashboard-section .dashboard-content-section .section-header-v2 i {
    color: var(--section-accent);
}

#dashboard-section .dashboard-content-section .card,
#dashboard-section .dashboard-content-section .content-card,
#dashboard-section .dashboard-content-section .chart-container-v2,
#dashboard-section .dashboard-content-section .kpi-card-v2,
#dashboard-section .dashboard-content-section .admin-management-controls,
#dashboard-section .dashboard-content-section .calendar-sidebar,
#dashboard-section .dashboard-content-section .calendar-main {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 26px rgba(6, 39, 45, 0.1);
}

#dashboard-section .dashboard-content-section .card-content,
#dashboard-section .dashboard-content-section .card-body-custom,
#dashboard-section .dashboard-content-section .tabs-content-container,
#dashboard-section .dashboard-content-section .tab-content-v2 {
    padding: 16px;
}

#dashboard-section .dashboard-content-section .filter-controls,
#dashboard-section .dashboard-content-section .search-filters,
#dashboard-section .dashboard-content-section .section-toolbar {
    border-radius: 14px;
    border: 1px solid rgba(9, 46, 53, 0.08);
    background: rgba(245, 250, 251, 0.92);
    padding: 12px;
    gap: 10px;
}

#dashboard-section .dashboard-content-section input[type="text"],
#dashboard-section .dashboard-content-section input[type="email"],
#dashboard-section .dashboard-content-section input[type="password"],
#dashboard-section .dashboard-content-section input[type="tel"],
#dashboard-section .dashboard-content-section input[type="date"],
#dashboard-section .dashboard-content-section select,
#dashboard-section .dashboard-content-section textarea {
    border-radius: 10px;
    border: 1px solid rgba(5, 30, 36, 0.16);
    background: rgba(255, 255, 255, 0.96);
}

#dashboard-section .dashboard-content-section .btn-primary,
#dashboard-section .dashboard-content-section .btn-secondary,
#dashboard-section .dashboard-content-section .btn-warning,
#dashboard-section .dashboard-content-section .btn-danger,
#dashboard-section .dashboard-content-section .btn-icon-v2,
#dashboard-section .dashboard-content-section .btn-primary-v2,
#dashboard-section .dashboard-content-section .btn-secondary-v2,
#dashboard-section .dashboard-content-section .btn-action {
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
}

#dashboard-section .dashboard-content-section .btn-primary:hover,
#dashboard-section .dashboard-content-section .btn-secondary:hover,
#dashboard-section .dashboard-content-section .btn-warning:hover,
#dashboard-section .dashboard-content-section .btn-danger:hover,
#dashboard-section .dashboard-content-section .btn-icon-v2:hover,
#dashboard-section .dashboard-content-section .btn-primary-v2:hover,
#dashboard-section .dashboard-content-section .btn-secondary-v2:hover,
#dashboard-section .dashboard-content-section .btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

#dashboard-section .dashboard-content-section table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;
    overflow: hidden;
}

#dashboard-section .dashboard-content-section table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(241, 248, 250, 0.98), rgba(234, 245, 247, 0.98));
    border-bottom: 1px solid rgba(8, 50, 58, 0.12);
}

#dashboard-section .dashboard-content-section table tbody tr {
    transition: background-color .2s ease, transform .18s ease;
}

#dashboard-section .dashboard-content-section table tbody tr:hover {
    background-color: rgba(240, 251, 250, 0.96);
}

#dashboard-section .dashboard-content-section .pagination {
    border-radius: 12px;
    border: 1px solid rgba(5, 31, 36, 0.1);
    background: rgba(255, 255, 255, 0.76);
    padding: 10px 12px;
}

#dashboard-section .dashboard-content-section .pagination .pagination-btn {
    border-radius: 10px;
}

#calendario-section .calendar-grid .day {
    border-radius: 12px;
}

#estadisticas-section .metricas-tabs-navigation {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.75);
    padding: 8px;
}

#estadisticas-section .tab-button-v2 {
    border-radius: 12px;
}

#estadisticas-section .kpi-card-v2 {
    overflow: hidden;
}

#configuracion-section .config-option,
#configuracion-section .sessions-header,
#gestion-gerentes-section .gerentes-actions,
#admin-reclutas-management .bulk-actions,
#gerente-panel-section .bulk-actions {
    border-radius: 12px;
    border: 1px solid rgba(8, 48, 58, 0.1);
    background: rgba(252, 255, 255, 0.84);
    padding: 10px 12px;
}

@media (max-width: 900px) {
    #dashboard-section .dashboard-content-section {
        padding: 14px;
        border-radius: 16px;
    }

    #dashboard-section .dashboard-content-section .section-header,
    #dashboard-section .dashboard-content-section .section-header-v2 {
        padding: 12px;
    }
}

/* =====================================================================
   PASO 4: CORRECCIONES MÓVIL COMPLETAS
   ===================================================================== */

/* --- Header responsive mejorado --- */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }

    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 0 12px;
    }

    .logo-container h1 {
        font-size: 16px;
    }

    .logo-container i {
        font-size: 18px;
        margin-right: 6px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
    }

    .header-button {
        padding: 6px 8px;
        font-size: 13px;
    }

    .header-button span {
        display: none;
    }

    .header-button i {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 8px;
    }

    .logo-container h1 {
        font-size: 14px;
    }
}

/* --- Dashboard header y perfil en móvil --- */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }

    .profile-section {
        justify-content: flex-start;
        margin-bottom: 0;
        width: 100%;
    }

    .profile-pic-container {
        width: 56px;
        height: 56px;
        margin-right: 12px;
    }

    .profile-info h2 {
        font-size: 15px;
    }

    .profile-role {
        font-size: 12px;
    }

    .profile-dropdown {
        width: 100%;
    }

    .profile-dropdown-button {
        width: 100%;
        justify-content: center;
    }

    .dropdown-content {
        width: 100%;
        left: 0;
        right: 0;
    }
}

/* --- Modales en móvil --- */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    .modal-lg .modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer button {
        width: 100%;
    }
}

/* --- Sección de estadísticas en móvil --- */
@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }
}

/* --- Configuración en móvil --- */
@media (max-width: 768px) {
    .config-container {
        grid-template-columns: 1fr;
    }
}

/* --- Section header en móvil --- */
@media (max-width: 640px) {
    #reclutas-section .section-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #reclutas-section .section-header h3 {
        font-size: 20px;
    }

    #reclutas-section .section-actions {
        flex-direction: column;
        width: 100%;
    }

    #reclutas-section .search-container {
        min-width: unset;
        width: 100%;
    }
}

/* =====================================================================
   PASO 5: DARK MODE EN SECCIONES GLASSMORPHIC
   ===================================================================== */

/* Secciones del dashboard con glassmorphism en dark mode */
body.dark-mode #dashboard-section .dashboard-content-section {
    background: linear-gradient(160deg, rgba(30, 30, 44, 0.95), rgba(37, 40, 54, 0.92));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
}

body.dark-mode #dashboard-section .dashboard-content-section::before {
    opacity: 0.4;
}

/* Section headers en dark mode */
body.dark-mode #dashboard-section .dashboard-content-section .section-header,
body.dark-mode #dashboard-section .dashboard-content-section .section-header-v2 {
    background: rgba(37, 40, 54, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #dashboard-section .dashboard-content-section .section-header h2,
body.dark-mode #dashboard-section .dashboard-content-section .section-header h3,
body.dark-mode #dashboard-section .dashboard-content-section .section-header-v2 h3 {
    color: var(--text-color);
}

/* Cards y contenidos en dark mode */
body.dark-mode #dashboard-section .dashboard-content-section .card,
body.dark-mode #dashboard-section .dashboard-content-section .content-card,
body.dark-mode #dashboard-section .dashboard-content-section .chart-container-v2,
body.dark-mode #dashboard-section .dashboard-content-section .kpi-card-v2,
body.dark-mode #dashboard-section .dashboard-content-section .admin-management-controls,
body.dark-mode #dashboard-section .dashboard-content-section .calendar-sidebar,
body.dark-mode #dashboard-section .dashboard-content-section .calendar-main {
    background: rgba(37, 40, 54, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Filter controls en dark mode */
body.dark-mode #dashboard-section .dashboard-content-section .filter-controls,
body.dark-mode #dashboard-section .dashboard-content-section .search-filters,
body.dark-mode #dashboard-section .dashboard-content-section .section-toolbar {
    background: rgba(42, 43, 61, 0.9);
    border-color: rgba(255, 255, 255, 0.07);
}

/* Inputs dentro del dashboard en dark mode */
body.dark-mode #dashboard-section .dashboard-content-section input[type="text"],
body.dark-mode #dashboard-section .dashboard-content-section input[type="email"],
body.dark-mode #dashboard-section .dashboard-content-section input[type="password"],
body.dark-mode #dashboard-section .dashboard-content-section input[type="tel"],
body.dark-mode #dashboard-section .dashboard-content-section input[type="date"],
body.dark-mode #dashboard-section .dashboard-content-section select,
body.dark-mode #dashboard-section .dashboard-content-section textarea {
    background: rgba(42, 43, 61, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* Tablas en dark mode */
body.dark-mode #dashboard-section .dashboard-content-section table thead th {
    background: linear-gradient(180deg, rgba(42, 43, 61, 0.98), rgba(37, 40, 54, 0.98));
    color: var(--text-color);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode #dashboard-section .dashboard-content-section table tbody tr:hover {
    background-color: rgba(42, 43, 61, 0.8);
}

body.dark-mode #dashboard-section .dashboard-content-section table td {
    border-bottom-color: rgba(255, 255, 255, 0.07);
    color: var(--text-color);
}

/* Paginación en dark mode */
body.dark-mode #dashboard-section .dashboard-content-section .pagination {
    background: rgba(37, 40, 54, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Sección de reclutas en dark mode */
body.dark-mode #reclutas-section {
    background: linear-gradient(160deg, rgba(30, 30, 44, 0.95), rgba(37, 40, 54, 0.92));
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #reclutas-section .section-header {
    background: rgba(37, 40, 54, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #reclutas-section .card {
    background: rgba(37, 40, 54, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #reclutas-section .filter-controls {
    background: rgba(42, 43, 61, 0.9);
    border-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode #reclutas-section .reclutas-table-shell {
    background: rgba(30, 30, 44, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #reclutas-section #reclutas-table th {
    background: linear-gradient(180deg, rgba(42, 43, 61, 0.98), rgba(37, 40, 54, 0.98));
    color: var(--text-color);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode #reclutas-section #reclutas-table td {
    border-bottom-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode #reclutas-section #reclutas-table td::before {
    color: var(--text-light);
}

body.dark-mode #reclutas-section #reclutas-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(42, 43, 61, 0.9), rgba(37, 40, 54, 0.9));
}

body.dark-mode #reclutas-section #reclutas-table .action-btn {
    background: rgba(42, 43, 61, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

body.dark-mode #reclutas-section #reclutas-table .folio-display {
    background: rgba(42, 43, 61, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--primary-color);
}

body.dark-mode #reclutas-section .reclutas-pagination {
    background: rgba(37, 40, 54, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode #reclutas-section .search-container input {
    background: rgba(42, 43, 61, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

body.dark-mode #reclutas-section .filter-group select,
body.dark-mode #reclutas-section .filter-group input {
    background: rgba(37, 40, 54, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

/* Config y otras secciones en dark mode */
body.dark-mode #configuracion-section .config-option,
body.dark-mode #configuracion-section .sessions-header,
body.dark-mode #gestion-gerentes-section .gerentes-actions,
body.dark-mode #admin-reclutas-management .bulk-actions,
body.dark-mode #gerente-panel-section .bulk-actions {
    background: rgba(42, 43, 61, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
}

/* Tarjetas de recluta en mobile dark mode */
@media (max-width: 768px) {
    body.dark-mode #reclutas-section #reclutas-table tbody tr {
        background: rgba(37, 40, 54, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
    }

    body.dark-mode #reclutas-section #reclutas-table td {
        border-bottom-color: rgba(255, 255, 255, 0.07);
        color: var(--text-color);
    }
}

/* Notificación en dark mode */
body.dark-mode .notification {
    background-color: var(--light-color);
    color: var(--text-color);
}

/* Dropdown en dark mode */
body.dark-mode .profile-dropdown-button {
    color: var(--text-color);
    border-color: var(--border-color);
}

/* Sidebar del calendario en dark mode */
body.dark-mode .calendar-sidebar,
body.dark-mode .calendar-main {
    background-color: var(--light-color);
    color: var(--text-color);
}

body.dark-mode .calendar-day {
    border-color: var(--border-color);
    color: var(--text-color);
}

body.dark-mode .calendar-day.today {
    background-color: rgba(0, 123, 255, 0.2);
}

body.dark-mode .day-name {
    color: var(--text-color);
}

/* Scroll del nav en dark mode */
body.dark-mode .dashboard-nav ul::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .dashboard-nav ul::-webkit-scrollbar-thumb {
    border-color: rgba(30, 30, 44, 0.8);
}

body.dark-mode .dashboard-nav a {
    background: rgba(37, 40, 54, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

body.dark-mode .dashboard-nav a:hover {
    background: rgba(42, 43, 61, 0.9);
    border-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .dashboard-nav li.active a,
body.dark-mode .dashboard-nav a.active {
    color: #fff;
}
