:root {
    /* Colores corporativos principales */
    --color-naranja: #ff681d;
    --color-gris: #54575a;
    --color-gris-420: #d1d3d4; /* Gris 420 PMS para fondos */
    
    /* Colores derivados del naranja */
    --color-naranja-claro: #ff8c42;
    --color-naranja-oscuro: #e55a0a;
    --color-naranja-suave: #fff4f0;
    
    /* Colores derivados del gris */
    --color-gris-claro: #f8f9fa;
    --color-gris-oscuro: #2c3e50;
    --color-gris-medio: #6c757d;
    --color-gris-suave: #e9ecef;
    
    /* Colores base */
    --color-blanco: #ffffff;
    --color-negro: #000000;
    
    /* Variables del sistema actualizadas */
    --color-primary: var(--color-naranja);
    --color-secondary: var(--color-gris);
    --color-accent: var(--color-naranja-claro);
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-light: var(--color-gris-420);
    --color-dark: var(--color-gris);
    --color-gray: var(--color-gris-medio);
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Typography helpers */
.lead {
    font-size: 1.1rem;
    color: var(--color-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Simple grid to support .row and .col-md-* used in templates */
.row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.col-md-8 { grid-column: span 1; }
.col-md-4 { grid-column: span 1; }

/* 3-column layout on very large screens */
@media (min-width: 1400px) {
    .row { grid-template-columns: repeat(3, 1fr); }
    .col-md-8 { grid-column: span 2; }
    .col-md-4 { grid-column: span 1; }
}

/* Spacing utilities used in templates */
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* Header */
.header {
    background: linear-gradient(135deg, var(--color-naranja), var(--color-naranja-oscuro));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

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


.header-feedback {
    max-width: 1200px;
    margin: 0.75rem auto 0;
    padding: 0 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}


.quick-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-icon i {
    font-size: 0.95rem;
}

.btn-icon:hover,
.btn-icon:focus {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.btn-icon:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.nav-menu {
    background-color: white;
    box-shadow: var(--box-shadow);
}

.nav-list {
    display: flex;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-dark);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--color-naranja);
    background-color: var(--color-gris-420);
}

/* Main Content */
.welcome-section {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.welcome-section h1 {
    color: var(--color-naranja);
    margin-bottom: 0.5rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    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);
}

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

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

/* Sections */
section {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

section h2 {
    color: var(--color-naranja);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-gris-420);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.news-card:hover {
    border-color: var(--color-naranja);
    transform: translateY(-2px);
}

.news-card h3 {
    color: var(--color-naranja);
    margin-bottom: 1rem;
}

.news-date {
    color: var(--color-gray);
    font-size: 0.9rem;
    margin-top: 1rem;
    display: block;
}

/* Events List */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.event-item:hover {
    border-color: var(--color-naranja);
}

.event-date {
    background: var(--color-naranja);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 60px;
}

.event-day {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.event-month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Spanish event/list classes used on index */
.eventos-lista { display: flex; flex-direction: column; gap: 1rem; }
.evento-item { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid #e9ecef; border-radius: var(--border-radius); transition: var(--transition); }
.evento-item:hover { border-color: var(--color-naranja); }
.evento-fecha { background: var(--color-naranja); color: white; padding: 0.5rem; border-radius: var(--border-radius); text-align: center; min-width: 60px; }
.evento-dia { display: block; font-size: 1.5rem; font-weight: bold; }
.evento-mes { font-size: 0.8rem; text-transform: uppercase; }

/* Quick Links */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--color-light);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-dark);
    transition: var(--transition);
    text-align: center;
}

.quick-link:hover {
    background: var(--color-naranja);
    color: white;
    transform: translateY(-5px);
}

.quick-link:focus-visible,
.btn:focus-visible,
.btn-primary:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(255,104,29,0.35);
    outline-offset: 2px;
}

.quick-link i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.quick-link span {
    font-weight: 600;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--color-gris), var(--color-gris-oscuro));
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-naranja);
    box-shadow: 0 0 0 0.2rem rgba(255, 104, 29, 0.25);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.9rem; }
.btn-outline-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.6);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.15); }

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

.btn-primary:hover {
    background: var(--color-naranja-oscuro);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background: #d1d5db;
}

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

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

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

/* Tables */
.table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    table-layout: fixed;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.table th,
.table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 0.9rem;
    line-height: 1.4;
}

.table th {
    background-color: var(--color-naranja);
    color: white;
    font-weight: 600;
}

.table tr:hover {
    background-color: var(--color-naranja-suave);
}

/* Contenedor responsive para tablas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-gris-420);
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

/* Celdas especiales */
.table td.actions {
    width: 140px;
    min-width: 140px;
    text-align: center;
}

.table td.status {
    width: 120px;
    min-width: 120px;
    text-align: center;
}

.table td.date {
    width: 140px;
    min-width: 140px;
    text-align: center;
}

.table td.name {
    max-width: 180px;
    min-width: 180px;
}

.table td.email {
    max-width: 220px;
    min-width: 220px;
}

.table td.description {
    max-width: 300px;
    min-width: 250px;
    white-space: normal;
    word-break: break-word;
}

/* Celdas con mÃ¡s espacio para contenido */
.table td.content {
    max-width: 250px;
    min-width: 200px;
    white-space: normal;
    word-break: break-word;
}

.table td.long-text {
    max-width: 350px;
    min-width: 300px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

/* Responsive para tablas */
@media (max-width: 768px) {
    .table th,
    .table td {
        max-width: 150px;
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }
    
    .table td.actions {
        width: 80px;
        min-width: 80px;
    }
    
    .table td.status {
        width: 80px;
        min-width: 80px;
    }
    
    .table td.date {
        width: 100px;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .table th,
    .table td {
        max-width: 120px;
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
    }
    
    .table td.actions {
        width: 60px;
        min-width: 60px;
    }
    
    .table td.status {
        width: 60px;
        min-width: 60px;
    }
    
    .table td.date {
        width: 80px;
        min-width: 80px;
    }
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    background: var(--color-light);
    border-bottom: 1px solid #e9ecef;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body {
    padding: 1.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}
/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    margin-top: 3rem;
    padding: 2rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 40px;
}

.footer-logo h3 {
    margin: 0;
    color: #3498db;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #3498db;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #bdc3c7;
}

.contact-item i {
    color: #3498db;
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legals {
    display: flex;
    gap: 1.5rem;
}

.footer-legals a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legals a:hover {
    color: #3498db;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legals {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .contact-item {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1.5rem 0 0;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-legals {
        flex-direction: column;
        gap: 0.5rem;
    }
}
/* Upload Styles */
.upload-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .upload-grid {
        grid-template-columns: 1fr;
    }
}

.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.radio-label:hover {
    border-color: var(--color-primary);
}

.radio-label input[type="radio"] {
    margin: 0;
}

.radio-label input[type="radio"]:checked + .radio-label {
    border-color: var(--color-primary);
    background-color: rgba(26, 79, 126, 0.1);
}

.file-upload-container {
    position: relative;
    margin-bottom: 0.5rem;
}

.file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-upload-label {
    display: block;
    padding: 2rem;
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.file-upload-label:hover {
    border-color: var(--color-primary);
    background-color: rgba(26, 79, 126, 0.05);
}

.file-upload-label.has-file {
    border-color: var(--color-success);
    background-color: rgba(40, 167, 69, 0.05);
}

.file-upload-label i {
    font-size: 2rem;
    color: var(--color-gray);
    margin-bottom: 0.5rem;
    display: block;
}

.file-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.limits-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.limit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
}

.limit-item i {
    font-size: 1.5rem;
    color: var(--color-primary);
    width: 40px;
    text-align: center;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.file-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.file-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--box-shadow);
}

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

.file-info {
    flex: 1;
}

.file-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info p {
    margin: 0 0 0.25rem 0;
    color: var(--color-gray);
    font-size: 0.8rem;
}

.file-info small {
    color: var(--color-gray);
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.alert-dynamic {
    animation: slideDown 0.3s ease;
}

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

/* Progress bar for future enhancements */
.upload-progress {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
    display: none;
}

.progress-bar {
    height: 100%;
    background-color: var(--color-primary);
    width: 0%;
    transition: width 0.3s ease;
}
/* AuditorÃ­a Styles */
.stats-grid-audit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card-audit {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border-left: 4px solid var(--color-primary);
}

.stat-card-audit:hover {
    transform: translateY(-2px);
}

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

.stat-info-audit h3 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.chart-container {
    position: relative;
    height: 200px;
}

.filter-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-audit {
    font-size: 0.9rem;
}

.table-audit th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.audit-row:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.modulo-login { background: #3498db; color: white; }
.badge.modulo-usuarios { background: #2ecc71; color: white; }
.badge.modulo-incidencias { background: #e74c3c; color: white; }
.badge.modulo-checador { background: #f39c12; color: white; }
.badge.modulo-bonos { background: #9b59b6; color: white; }
.badge.modulo-intranet { background: #1abc9c; color: white; }
.badge.modulo-organigrama { background: #34495e; color: white; }

.badge.accion-login { background: #27ae60; color: white; }
.badge.accion-logout { background: #c0392b; color: white; }
.badge.accion-crear { background: #2980b9; color: white; }
.badge.accion-editar { background: #f39c12; color: white; }
.badge.accion-eliminar { background: #e74c3c; color: white; }
.badge.accion-aprobar { background: #27ae60; color: white; }
.badge.accion-rechazar { background: #c0392b; color: white; }

/* 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);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.modal-header h3 {
    margin: 0;
}

.close {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ecf0f1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 1.5rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h4 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

.detail-section pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    overflow-x: auto;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: auto;
}

/* PaginaciÃ³n */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

.page-info {
    color: var(--color-gray);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .table-audit {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stats-grid-audit {
        grid-template-columns: 1fr;
    }
    
    .stat-card-audit {
        flex-direction: column;
        text-align: center;
    }
}
/* ConfiguraciÃ³n Styles */
.config-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 968px) {
    .config-container {
        grid-template-columns: 1fr;
    }
}

.config-sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.config-sidebar h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-light);
}

.config-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--color-dark);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
}

.config-nav-link:hover {
    background: var(--color-light);
    color: var(--color-primary);
}

.config-nav-link.active {
    background: var(--color-primary);
    color: white;
}

.config-nav-link .badge {
    margin-left: auto;
    background: var(--color-gray);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

.config-nav-link.active .badge {
    background: rgba(255,255,255,0.3);
}

.config-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-light);
}

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

.config-section {
    padding: 2rem;
    border-bottom: 1px solid var(--color-light);
}

.config-section:last-child {
    border-bottom: none;
}

.config-section-header {
    margin-bottom: 2rem;
}

.config-section-header h2 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

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

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-label {
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-tooltip {
    color: var(--color-gray);
    cursor: help;
}

.config-input-container {
    position: relative;
}

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

.config-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 79, 126, 0.25);
}

.config-input.error {
    border-color: var(--color-danger);
}

.config-help {
    color: var(--color-gray);
    font-size: 0.8rem;
}

.config-error {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Color Picker Styles */
.color-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-picker {
    width: 60px !important;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.color-value {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--color-gray);
}

.config-actions-bottom {
    padding: 2rem;
    background: var(--color-light);
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid #e9ecef;
}

/* Theme Preview */
.theme-preview {
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.preview-header {
    background: var(--color-primary);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.preview-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.preview-logo i {
    font-size: 1.5rem;
}

.preview-content {
    padding: 2rem;
    background: white;
}

.preview-card {
    border-left: 4px solid var(--color-secondary);
    padding: 1.5rem;
    background: var(--color-light);
    border-radius: var(--border-radius);
}

.preview-card h4 {
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.preview-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    color: white;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.preview-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* System Info */
.system-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--color-light);
    border-radius: var(--border-radius);
}

.info-item strong {
    color: var(--color-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .config-actions-bottom {
        flex-direction: column;
    }
    
    .system-info {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .config-section {
        padding: 1rem;
    }
    
    .theme-preview {
        font-size: 0.9rem;
    }
    
    .preview-header {
        padding: 1rem;
    }
    
    .preview-content {
        padding: 1rem;
    }
}
/* Usuarios Management Styles */
.users-management {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* Table Styles */
.table-users {
    font-size: 0.9rem;
}

.table-users th {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}

.user-inactive {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.user-inactive:hover {
    opacity: 0.8;
}

/* Badges */
.badge.rol-empleado { background: #6c757d; color: white; }
.badge.rol-jefe { background: #17a2b8; color: white; }
.badge.rol-rh { background: #28a745; color: white; }
.badge.rol-admin { background: #dc3545; color: white; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-badge i {
    font-size: 0.6rem;
}

.team-count {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Stats Grid */
.stats-grid-users {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

/* Field Errors */
.field-error {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-control.error {
    border-color: var(--color-danger);
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stats-grid-users {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid-users {
        grid-template-columns: 1fr;
    }
    
    .table-users {
        font-size: 0.8rem;
    }
    
    .action-buttons .btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}
/* Estilos para funcionalidades de main.js */

/* Modo oscuro */
body.tema-oscuro {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.tema-oscuro .header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

body.tema-oscuro .card {
    background: #2d2d2d;
    color: #ffffff;
}

/* Dark mode for sections and hero */
body.tema-oscuro section,
body.tema-oscuro .seccion-gaceta {
    background: #262626;
    box-shadow: none;
}

body.tema-oscuro .seccion-titulo,
body.tema-oscuro .hero-title { color: #a9c9ff; }
body.tema-oscuro .hero-gaceta { background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%); }

body.tema-oscuro .form-control {
    background: #3d3d3d;
    border-color: #555;
    color: #ffffff;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalAppear 0.3s ease;
}

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

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

.modal-body {
    padding: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tooltips */
.tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1001;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

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

/* Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    z-index: 1000;
    right: 0;
    top: 100%;
}

.dropdown.active .dropdown-content {
    display: block;
    animation: dropdownAppear 0.2s ease;
}

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

/* Cards clickables */
.card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.card.clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Notificaciones */
.alert {
    position: relative;
    padding: 1rem 1rem 1rem 3rem;
}

.alert::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.alert-success::before {
    content: '\f058';
}

.alert-danger::before {
    content: '\f06a';
}

.alert-warning::before {
    content: '\f071';
}

.alert-info::before {
    content: '\f05a';
}

.alert-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Badge de notificaciones con animaciÃ³n */
.notification-badge {
    display: none;
    background: var(--color-danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
}

.notification-badge.pulse {
    animation: pulse 1s ease-in-out;
}

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

/* MenÃº mÃ³vil */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--box-shadow);
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Formularios */
.field-error {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.form-control.error {
    border-color: var(--color-danger);
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilidades de texto */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Responsive helpers */
.vista-mobile .hide-mobile { display: none !important; }
.vista-desktop .hide-desktop { display: none !important; }

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

body.tema-oscuro ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

body.tema-oscuro ::-webkit-scrollbar-thumb {
    background: #555;
}

body.tema-oscuro ::-webkit-scrollbar-thumb:hover {
    background: #777;
}
/* Estilos especÃ­ficos para la intranet estilo gaceta */
.hero-gaceta {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.seccion-gaceta {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #283593;
}

.seccion-titulo {
    color: #283593;
    border-bottom: 2px solid #e8eaf6;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.tarjeta-noticia {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.tarjeta-noticia:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-leer-mas {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
}

.btn-leer-mas:hover { background: var(--color-secondary); }

.empleados-destacados {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tarjeta-empleado {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #4caf50;
}

.cumpleanos-hoy {
    text-align: center;
    padding: 1rem;
    background: #fff3e0;
    border-radius: 8px;
}

.entrevista-destacada {
    background: #e3f2fd;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .noticias-grid {
        grid-template-columns: 1fr;
    }
}



