/* Variables CSS - Paleta Profesional Negro/Gris/Rojo/Blanco */
:root {
    --primary-color: #dc3545;
    --secondary-color: #666666;
    --success-color: #808080;
    --danger-color: #e74c3c;
    --warning-color: #c82333;
    --info-color: #666666;
    --light-color: #f5f5f5;
    --dark-color: #1a1a1a;
    --gray-color: #808080;
    --white-color: #ffffff;
    --black-color: #000000;
    --dark-gray: #2d2d2d;
    --medium-gray: #666666;
    --light-gray: #cccccc;
    --red-primary: #dc3545;
    --red-dark: #c82333;
    --red-light: #f8d7da;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
    min-height: 100vh;
}

/* Header */
.main-header {
    background: #9c1e13;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header * {
    color: white !important;
}

.main-header .dropdown-menu * {
    color: #2c3e50 !important;
}

.main-header .user-dropdown * {
    color: #2c3e50 !important;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: white !important;
}

.logo i {
    font-size: 2rem;
    color: #e74c3c;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: #3d0b08;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white !important;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle i.fa-chevron-down {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: white !important;
}

.nav-dropdown:hover .dropdown-toggle i.fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid #e0e6ed;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
    font-weight: 500;
}

.dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-menu .dropdown-item:hover {
    background: #f8f9fa;
    color: #57100b;
    padding-left: 1.5rem;
}

.dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    color: #7f8c8d;
}

.dropdown-menu .dropdown-item:hover i {
    color: #57100b;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: white !important;
}

.user-role {
    font-size: 0.8rem;
    color: white !important;
    font-weight: 500;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid #e0e6ed;
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
    font-weight: 500;
}

.user-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.user-dropdown .dropdown-item:hover {
    background: #f8f9fa;
    color: #57100b;
    padding-left: 1.5rem;
}

.user-dropdown .dropdown-item i {
    width: 16px;
    text-align: center;
    color: #7f8c8d;
}

.user-dropdown .dropdown-item:hover i {
    color: #57100b;
}

.user-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #e0e6ed;
}

/* Container y layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.page-header p {
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

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

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

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

.btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Formularios */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Login */
.login-body {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.stat-content p {
    color: var(--gray-color);
    font-size: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.card-header {
    background: var(--light-color);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Header Controls y Filtros */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    color: var(--dark-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.filter-label i {
    color: var(--primary-color);
    margin-right: 0.25rem;
}

#departmentFilter {
    min-width: 180px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    background-color: var(--white-color);
    color: var(--dark-color);
    transition: var(--transition);
}

#departmentFilter:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    outline: none;
}

#departmentFilter option {
    padding: 0.5rem;
}

/* Transiciones suaves para filtrado */
.attendance-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.attendance-item:not([style*="display: none"]) {
    transform: translateY(0);
}

.attendance-item[style*="display: none"] {
    transform: translateY(-10px);
}

/* Contador de asistencias */
#attendanceCounter {
    transition: all 0.3s ease;
}

/* Responsive para filtros */
@media (max-width: 768px) {
    .header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    
    #departmentFilter {
        min-width: 100%;
        width: 100%;
    }
    
    .filter-label {
        font-size: 0.85rem;
    }
}

.card-body {
    padding: 1.5rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.status-item {
    text-align: center;
}

.status-badge {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 50px;
    margin-bottom: 0.5rem;
}

.status-active { background: var(--success-color); }
.status-vacation { background: var(--info-color); }
.status-sick { background: var(--warning-color); }
.status-subsidy { background: var(--danger-color); }
.status-permit { background: var(--gray-color); }

.status-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.attendance-list {
    max-height: 400px;
    overflow-y: auto;
}

.attendance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    min-height: 80px;
}

.attendance-item:last-child {
    border-bottom: none;
}

.attendance-info h4 {
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.attendance-info p {
    margin-bottom: 0.25rem;
    color: var(--gray-color);
}

.attendance-info small {
    color: var(--gray-color);
    font-size: 0.8rem;
}

.attendance-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 220px;
}

/* Dropdown de acciones en historial de asistencias */
.attendance-actions {
    margin-top: 0.5rem;
}

.custom-dropdown {
    position: relative;
    display: inline-block;
}

.actions-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    font-family: inherit;
    font-weight: 500;
}

.actions-btn:hover {
    background: #e9ecef;
    border-color: #57100b;
    color: #57100b;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.actions-btn .fa-chevron-down {
    font-size: 10px;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.custom-dropdown.active .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 9999 !important;
    min-width: 240px;
    background: white !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 8px 0;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    transition: all 0.15s ease;
    cursor: pointer;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #57100b;
    padding-left: 20px;
}

.dropdown-content a i {
    width: 18px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.dropdown-content a:hover i {
    color: #57100b;
}

/* Estado activo del botón */
.custom-dropdown.active .actions-btn {
    background: #e9ecef;
    border-color: #57100b;
    color: #57100b;
}

.time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Asistencia */
.attendance-main {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.employee-info {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    height: fit-content;
}

.employee-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.employee-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.employee-details h2 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.employee-details p {
    color: var(--gray-color);
    margin-bottom: 0.25rem;
}

.employee-details small {
    color: var(--gray-color);
    font-size: 0.8rem;
}

/* Placeholder para foto del colaborador */
.employee-photo-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px dashed #e0e0e0;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    color: #6c757d;
    width: 100%;
    max-width: 200px;
    text-align: center;
    transition: all 0.3s ease;
}

.photo-placeholder:hover {
    border-color: #57100b;
    background: #fef5f5;
    color: #57100b;
}

.photo-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

.photo-placeholder span {
    font-size: 0.85rem;
    font-weight: 500;
}

.attendance-actions {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.current-status {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.status-indicator {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.status-message {
    font-size: 1.1rem;
    font-weight: 500;
}

.action-buttons {
    display: grid;
    gap: 2rem;
}

.action-card {
    padding: 2rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    background: #fafafa;
}

.action-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-input {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.photo-input input[type="file"] {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
}

/* Botón de cámara mejorado */
.camera-btn {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--black-color) 100%);
    color: white;
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--box-shadow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.camera-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--danger-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
    border-color: var(--white-color);
}

.camera-btn:active {
    transform: translateY(0);
}

.camera-btn i {
    font-size: 18px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.photo-preview {
    margin-top: 1rem;
}

.photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: var(--border-radius);
    border: 2px solid var(--light-gray);
    box-shadow: var(--box-shadow);
}

.attendance-history {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    min-width: 500px;
}

.attendance-history h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
    width: 100%;
}

/* Empleados */
.employees-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 1rem;
}

.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.employee-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    transition: var(--transition);
}

.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.employee-meta {
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-color);
    font-size: 0.9rem;
}

.meta-item i {
    width: 16px;
    color: var(--secondary-color);
}

.employee-actions {
    display: flex;
    gap: 1rem;
}

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

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    background: var(--light-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--primary-color);
}

.close {
    color: var(--gray-color);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

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

.modal-body {
    padding: 1.5rem;
}

/* Mensajes */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: var(--transition);
}

.message.show {
    opacity: 1;
    transform: translateX(0);
}

.message.success {
    background: var(--success-color);
}

.message.error {
    background: var(--danger-color);
}

.message.info {
    background: var(--info-color);
}

.message.warning {
    background: var(--warning-color);
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .attendance-main {
        grid-template-columns: 1fr;
    }
    
    .employees-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .employees-grid {
        grid-template-columns: 1fr;
    }
    
    .employee-actions {
        flex-direction: column;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utilidades */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

/* =========================
   SISTEMA DE PERFILES
   ========================= */

/* Profile Selection Styles */
.profile-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    background: #e3f2fd;
    color: #1976d2;
    margin-left: 8px;
}

.user-role {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Navigation improvements for different profiles */
.main-nav .nav-link[href="profile-selection.php"] {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    border-radius: 6px;
    padding: 8px 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.main-nav .nav-link[href="profile-selection.php"]:hover {
    background: linear-gradient(45deg, #ff5252, #ff9800);
    transform: translateY(-2px);
}

/* Profile selection page animations */
.profile-selection-container {
    animation: fadeIn 0.5s ease;
}

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

.selection-card {
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.option-card {
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Access level indicators */
.access-level-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.access-level-admin {
    background: #e3f2fd;
    color: #1976d2;
}

.access-level-supervisor {
    background: #f3e5f5;
    color: #7b1fa2;
}

.access-level-employee {
    background: #e8f5e8;
    color: #388e3c;
}

.access-level-operative {
    background: #fff3e0;
    color: #f57c00;
}

/* =========================
   SUPERVISOR MODE STYLES
   ========================= */

/* Supervisor badge in dashboard */
.supervisor-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    animation: supervisorPulse 2s ease-in-out infinite;
}

.supervisor-badge i {
    color: #f1c40f;
    animation: supervisorGlow 2s ease-in-out infinite alternate;
}

/* Supervisor badge animations */
@keyframes supervisorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes supervisorGlow {
    0% { text-shadow: 0 0 5px rgba(241, 196, 15, 0.5); }
    100% { text-shadow: 0 0 10px rgba(241, 196, 15, 0.8); }
}

/* Team stats styling for supervisors */
.supervisor-mode .stat-card {
    border-left: 4px solid #3498db;
    position: relative;
}

.supervisor-mode .stat-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.supervisor-mode .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
}

/* Dashboard header modifications for supervisor */
.page-header .supervisor-badge {
    margin-left: 15px;
    vertical-align: middle;
}

/* Supervisor-specific stat card styling */
.supervisor-stats .stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(52, 152, 219, 0.1);
}

/* Team indicator styling */
.team-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #3498db;
    font-weight: 500;
    margin-left: 10px;
}

.team-indicator i {
    color: #3498db;
}

/* Responsive adjustments for supervisor mode */
@media (max-width: 768px) {
    .supervisor-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-top: 5px;
        margin-left: 0;
        display: flex;
        justify-content: center;
        width: fit-content;
    }
    
    .page-header .supervisor-badge {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* =====================================================
   ESTILOS PARA SISTEMA DE APROBACIONES
   ===================================================== */

/* Notificaciones flotantes */
.notification-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Tarjetas de solicitudes */
.request-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.request-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Estados de solicitudes */
.status-pending {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #2d3436;
}

.status-approved {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
}

.status-rejected {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    color: white;
}

/* Drag and drop para archivos */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e8f2ff;
    transform: scale(1.02);
}

/* Pestañas personalizadas */
.custom-nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.custom-nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: #6c757d;
    font-weight: 500;
    padding: 15px 20px;
    transition: all 0.3s ease;
}

.custom-nav-tabs .nav-link:hover {
    background: #f8f9fa;
    color: #495057;
}

.custom-nav-tabs .nav-link.active {
    background: none;
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

/* Contadores en pestañas */
.tab-counter {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

/* Alertas de validación */
.validation-alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.2);
}

/* Formularios mejorados */
.form-floating {
    position: relative;
}

.form-floating input,
.form-floating textarea {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-floating input:focus,
.form-floating textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Botones de acción */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 120px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
}

/* Approval cards specific */
.approval-card {
    border-radius: 15px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.approval-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.approval-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-approve {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-approve:hover {
    background: linear-gradient(135deg, #00a085 0%, #00b7ba 100%);
    transform: translateY(-2px);
}

.btn-reject {
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-reject:hover {
    background: linear-gradient(135deg, #dc5f48 0%, #c52d2d 100%);
    transform: translateY(-2px);
}

/* Responsive para aprobaciones */
@media (max-width: 768px) {
    .notification-alert {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        min-width: 100%;
    }
    
    .approval-actions {
        flex-direction: column;
    }
    
    .approval-actions .btn {
        width: 100%;
    }
}

/* ===== ESTILOS MEJORADOS PARA TABLA DEPARTAMENTOS ===== */

/* Contenedor de tabla mejorado */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

/* Tabla principal con mejor espaciado */
#departmentStatsTable {
    margin-bottom: 0;
    background: white;
}

#departmentStatsTable thead th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: white !important;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
    padding: 0.7rem 0.5rem;
    vertical-align: middle;
}

/* Filas de departamentos mejoradas */
.dept-row {
    transition: all 0.3s ease;
    border: none;
}

.dept-row:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Celdas de datos mejoradas - COMPACTAS */
.data-cell {
    padding: 0.8rem 0.5rem !important;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #f1f3f4;
}

.data-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

/* Números grandes y medianos - REDUCIDOS */
.number-large {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.number-medium {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

/* Celda del nombre del departamento - COMPACTA */
.dept-name-cell {
    padding: 0.8rem 0.7rem !important;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #f1f3f4;
}

.dept-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.dept-name {
    font-size: 0.95rem;
    color: #2c3e50;
    margin-bottom: 0.3rem;
}

/* Badges modernos - COMPACTOS */
.badge-modern {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Progreso circular mejorado para % Asistencia */
.attendance-progress {
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-circle-container {
    position: relative;
    width: 60px;
    height: 60px;
}

.progress-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #f1f3f4;
    position: relative;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.progress-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #28a745, #20c997);
    transition: height 0.5s ease;
    border-radius: 0 0 50px 50px;
}

.progress-excellent {
    background: linear-gradient(to top, #28a745, #20c997) !important;
}

.progress-good {
    background: linear-gradient(to top, #17a2b8, #138496) !important;
}

.progress-regular {
    background: linear-gradient(to top, #ffc107, #e0a800) !important;
}

.progress-critical {
    background: linear-gradient(to top, #dc3545, #c82333) !important;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.percentage-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Celda de acciones mejorada - COMPACTA */
.actions-cell {
    padding: 0.7rem 0.4rem !important;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #f1f3f4;
}

.actions-cell .btn {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.actions-cell .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Indicador especial para tardanzas */
.late-indicator {
    width: 8px;
    height: 8px;
    background: #ffc107;
    border-radius: 50%;
    margin: 0.25rem auto 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Colores específicos para diferentes tipos de datos */
.total-employees .number-large {
    color: #495057;
}

.present-employees .number-large {
    color: #28a745;
}

.absent-employees .number-large {
    color: #dc3545;
}

.vacation-employees .number-medium {
    color: #17a2b8;
}

.rest-employees .number-medium {
    color: #ffc107;
}

.subsidy-employees .number-medium {
    color: #6c757d;
}

.permission-employees .number-medium {
    color: #007bff;
}

.late-employees .number-medium {
    color: #fd7e14;
}

/* Textos pequeños más compactos */
.data-value small {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive para tabla de departamentos */
@media (max-width: 1200px) {
    .number-large {
        font-size: 1.2rem;
    }
    
    .number-medium {
        font-size: 1rem;
    }
    
    .progress-circle-container {
        width: 50px;
        height: 50px;
    }
    
    .percentage-number {
        font-size: 0.85rem;
    }
    
    .data-value small {
        font-size: 0.65rem;
    }
}

@media (max-width: 992px) {
    .table-container {
        overflow-x: auto;
    }
    
    #departmentStatsTable {
        min-width: 900px;
    }
    
    .data-cell {
        padding: 0.7rem 0.4rem !important;
    }
    
    .dept-name-cell {
        padding: 0.7rem 0.6rem !important;
    }
    
    .dept-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .dept-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .number-large {
        font-size: 1.1rem;
    }
    
    .number-medium {
        font-size: 0.9rem;
    }
    
    .progress-circle-container {
        width: 45px;
        height: 45px;
    }
    
    .percentage-number {
        font-size: 0.8rem;
    }
    
    .dept-icon {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }
    
    .dept-name {
        font-size: 0.85rem;
    }
    
    .actions-cell .btn {
        font-size: 0.6rem;
        padding: 0.25rem 0.4rem;
    }
    
    .data-value small {
        font-size: 0.6rem;
    }
    
    .badge-modern {
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
    }
}

/* Animaciones suaves */
.dept-row, .data-value, .progress-fill {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects mejorados */
.dept-row:hover .dept-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.dept-row:hover .badge-modern {
    transform: scale(1.05);
}

.dept-row:hover .progress-circle {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
} 