/* ===== RESET Y ESTILOS BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #003e8a;           /* Color institucional */
    --primary-dark: #002b63;            /* Más oscuro para hover */
    --primary-light: #2a5caa;           /* Más claro para gradientes */
    --secondary-color: #f8f9fa;         /* Fondo claro */
    --accent-color: #ff6b00;            /* Color de acento naranja */
    --text-color: #333333;              /* Texto principal */
    --text-light: #666666;              /* Texto secundario */
    --border-color: #e0e0e0;            /* Bordes */
    --success-color: #28a745;           /* Verde */
    --warning-color: #ffc107;           /* Amarillo */
    --danger-color: #dc3545;            /* Rojo */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f7fa;
    min-height: 100vh;
}

/* ===== PÁGINA DE LOGIN ===== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: var(--transition);
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--accent-color);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo-img {
    display: block;
    max-width: 200px;
    margin: 0 auto 20px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

.login-form-container {
    padding: 40px;
}

.login-form {
    margin: 0 auto;
}

.login-form h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
    width: 20px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 62, 138, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 40px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    font-size: 1.2rem;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 62, 138, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:active::after {
    width: 300px;
    height: 300px;
}

.form-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

.version {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

.login-footer {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

.legal {
    margin-top: 10px;
}

.legal a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
}

.legal a:hover {
    text-decoration: underline;
}

/* ===== ALERTAS ===== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid transparent;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: #ffebee;
    border-color: var(--danger-color);
    color: #c62828;
}

.alert-success {
    background-color: #e8f5e9;
    border-color: var(--success-color);
    color: #2e7d32;
}

.alert i {
    font-size: 20px;
}

/* ===== FORMULARIOS ===== */
.form-container {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
}

.form-card {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    flex: 1;
    min-width: 300px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 20px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 62, 138, 0.1);
}

.form-group select {
    height: 52px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23003e8a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

/* Botones del formulario - MÁS GRANDES Y BONITOS */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition);
    text-decoration: none;
    min-width: 200px;
    height: 55px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border: 2px solid var(--primary-dark);
    box-shadow: 0 4px 15px rgba(0, 62, 138, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 62, 138, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 62, 138, 0.2);
}

/* Mensajes pequeños */
small {
    display: block;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 13px;
    font-style: italic;
}



.main-content {
    padding: 40px;
}

/* Títulos */
h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2.2rem;
}

h1 i {
    color: var(--primary-color);
    font-size: 2.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .form-container {
        padding: 25px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
}

/* Opciones del select */
select option {
    padding: 12px !important;
    font-size: 15px;
}

/* Placeholder */
::placeholder {
    color: #95a5a6;
    opacity: 0.7;
}

/* Select de procesos */
#id_proceso {
    opacity: 1;
    transition: var(--transition);
}

#id_proceso:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}



/* ===== SIDEBAR PROFESIONAL ===== */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: var(--transition);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-divider span,
.sidebar.collapsed .system-status span,
.sidebar.collapsed .server-time {
    display: none;
}

.sidebar.collapsed .coming-soon {
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    display: block !important;
}

.main-nav {
    padding: 20px 0;
    flex: 1;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
    padding: 0 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
    border-left: 4px solid transparent;
}

.nav-link:hover:not(.disabled) {
    background: rgba(0, 62, 138, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 25px;
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(0, 62, 138, 0.1), transparent);
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-link.disabled:hover {
    background: transparent;
    color: var(--text-color);
    padding-left: 20px;
}

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: inherit;
}

.coming-soon {
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: auto;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: none;
}

.nav-link.disabled .coming-soon {
    display: inline-block;
}

.nav-divider {
    padding: 25px 20px 10px;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-color);
    margin: 15px 15px 10px;
}

/* ===== FOOTER DEL SIDEBAR ===== */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 62, 138, 0.02);
    margin-top: auto;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
    position: relative;
}

.status-indicator.active::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid var(--success-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.status-indicator.active {
    background: var(--success-color);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.system-status span {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.server-time {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(0, 62, 138, 0.05);
    padding: 8px 12px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border-color);
}

/* ===== MAIN CONTENT CON SIDEBAR ===== */
.main-content {
    margin-left: 280px;
    padding: 40px;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: var(--transition);
}


/* ===== FOOTER GLOBAL ===== */
.app-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 20px 40px;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

.app-footer::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    height: 30px;
    opacity: 0.7;
}

.footer-right {
    display: flex;
    gap: 20px;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* ===== MENÚ TOGGLE ===== */
.menu-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 62, 138, 0.3);
}

.menu-toggle:hover {
    background: var(--primary-dark);
    transform: rotate(90deg);
    box-shadow: 0 6px 15px rgba(0, 62, 138, 0.4);
}

.menu-toggle i {
    font-size: 1.3rem;
}

/* ===== HEADER ACTUALIZADO ===== */
.main-header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-logo {
    height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 15px;
    border-radius: 50px;
    background: rgba(0, 62, 138, 0.05);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

.user-info:hover {
    background: rgba(0, 62, 138, 0.1);
    border-color: rgba(0, 62, 138, 0.2);
}

/* ===== USER AVATAR - CORRECCIÓN ===== */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Importante: recorta lo que sobresalga */
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    font-size: 1.2rem;
    position: relative;
}

/* Para la imagen dentro del avatar */
.user-avatar img.user-photo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cambia de 'contain' a 'cover' para llenar el círculo */
    object-position: center center;
    border-radius: 50%;
}

/* Para el ícono por defecto cuando no hay imagen */
.user-avatar i {
    font-size: 1.5rem;
    color: white;
}

/* Ajuste específico si la imagen se ve pixelada */
.user-avatar img {
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* Si quieres un borde alrededor del avatar */
.user-avatar {
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Para asegurar que la imagen se vea bien en todos los navegadores */
.user-avatar img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Si las imágenes PNG tienen fondo transparente que no se ve bien */
.user-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.user-avatar img {
    background-color: transparent;
}
.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

.dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-btn:hover {
    color: var(--primary-color);
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius);
    z-index: 1000;
    padding: 10px 0;
    border: 1px solid var(--border-color);
    margin-top: 10px;
}

.dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.dropdown-content a:hover {
    background: rgba(0, 62, 138, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 25px;
}

.dropdown-content a i {
    width: 20px;
    text-align: center;
}

/* ===== NOTIFICACIONES MEJORADAS ===== */
.notification {
    position: fixed;
    top: 100px;
    right: 30px;
    padding: 20px 25px;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    min-width: 350px;
    max-width: 450px;
    border-left: 5px solid;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-error {
    border-left-color: var(--danger-color);
    background: linear-gradient(90deg, #ffebee, white);
}

.notification-success {
    border-left-color: var(--success-color);
    background: linear-gradient(90deg, #e8f5e9, white);
}

.notification i {
    font-size: 1.5rem;
}

.notification-error i {
    color: var(--danger-color);
}

.notification-success i {
    color: var(--success-color);
}

.close-notification {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    color: var(--text-light);
    transition: var(--transition);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-notification:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--danger-color);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    

    
/* Para que el contenedor interno se alinee a la izquierda */
.main-content .container {
    margin-left: 0; /* Anula el margin: 0 auto */
    max-width: none; /* Permite que ocupe todo el ancho disponible */
    padding: 0;
    width: 100%;
}

/* Para los títulos dentro del contenido */
.main-content h1 {
    margin-left: 0;
}

/* Para el selector de secciones */
.seccion-selector {
    margin-left: 0;
}

/* Para formularios dentro del contenido */
.main-content .form-container {
    margin-left: 0;
    max-width: 100%;
}

/* Para pantallas pequeñas */
@media (max-width: 992px) {
    .main-content {
        margin-left: 0 !important;
        padding: 15px;
        width: 100%;
    }
    
    .main-content .container {
        padding: 0;
    }
}


    .app-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    
    .footer-left, .footer-right {
        width: 100%;
        justify-content: center;
    }
    
    .notification {
        min-width: 300px;
        max-width: 90%;
        right: 20px;
        left: 20px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 0 15px;
    }
    
    .header-title {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .notification {
        min-width: auto;
        width: calc(100% - 40px);
        padding: 15px 20px;
    }
}


/* ===== LOGO DEL HEADER - AJUSTE ===== */
.logo-header {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

.header-logo {
    height: 45px; /* Ajusta esta altura */
    width: auto;
    object-fit: contain; /* Mantiene proporciones */
    vertical-align: middle; /* Alinea verticalmente */
}

/* Si está dentro del header del login */
.login-header .logo-img {
    margin: 10px auto 20px; /* Ajusta márgenes */
    display: block;
    max-height: 80px; /* Limita altura máxima */
    width: auto;
}


.filters-bar {
    background: rgba(0, 62, 138, 0.05);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    display: block;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    height: 42px;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 62, 138, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto; /* Empuja los botones a la derecha */
    align-items: flex-end;
}

.filter-actions .btn {
    padding: 10px 20px;
    height: 42px;
    min-width: 120px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


/* ===== LOGO HEADER HORIZONTAL ===== */
.logo-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: 1.4rem;
    line-height: 1;
}

.tanning {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #003e8a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;

}

.os {
    font-family: 'Bank Gothic', 'Arial Narrow', 'Orbitron', sans-serif;
    font-weight: 500;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 5px;
}

.by {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
    color: #666666;
    font-weight: 400;
    font-style: italic;
}




/* ===== AVATAR EN TABLA - TAMAÑO MEDIANO ===== */
.table-user-avatar {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    margin: 0 auto;
}

.table-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Ajustar celda para avatar más grande */
.users-table tbody td:first-child {
    width: 80px;
    text-align: center;
    padding: 15px 10px !important;
}

/* Si la imagen no carga, mostrar ícono grande */
.table-user-avatar i {
    font-size: 2.5rem;
    color: white;
}





/* ===== STATS BAR ACTUALIZADO - TARJETAS MODERNAS ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-left: 5px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.stat-item:nth-child(1) {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 62, 138, 0.05), white);
}

.stat-item:nth-child(2) {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), white);
}

.stat-item:nth-child(3) {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05), white);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.stat-item:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.stat-item:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, var(--success-color), #4caf50);
    color: white;
}

.stat-item:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, var(--danger-color), #f44336);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-total {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

.stat-item:nth-child(1) .stat-total {
    color: var(--primary-color);
}

.stat-item:nth-child(2) .stat-total {
    color: var(--success-color);
}

.stat-item:nth-child(3) .stat-total {
    color: var(--danger-color);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ===== FIX PARA HEADER FIJO ===== */

/* TODAS las páginas que tengan header fijo necesitan esto */
.content-body,
main.main-content {
    margin-top: 80px !important; /* Compensa el header de 80px */
}

/* Asegurar que el body tenga suficiente espacio */
body {
    padding-top: 0; /* Asegurar que no haya padding extra */
}

/* Para login page (no necesita margin-top) */
.login-page .main-content {
    margin-top: 0 !important;
}


/* ===== ESTILOS PARA GESTIÓN DE USUARIOS/PERSONAL ===== */

/* Selector de secciones */
.seccion-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.seccion-btn {
    padding: 12px 25px;
    background: var(--secondary-color);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
}

.seccion-btn:hover {
    background: rgba(0, 62, 138, 0.1);
    transform: translateY(-2px);
}

.seccion-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 62, 138, 0.3);
}

/* Botón de tarjeta */
.btn-card {
    background: linear-gradient(135deg, #8e44ad, #9b59b6) !important;
    color: white !important;
    border: none !important;
}

.btn-card:hover {
    background: linear-gradient(135deg, #732d91, #8e44ad) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3) !important;
}

/* Modal para tarjeta */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background: white;
    border-radius: var(--radius);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 20px;
    border-radius: var(--radius) var(--radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

/* Estilos para la tarjeta de identificación */
.id-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 2px solid var(--border-color);
    margin: 0 auto;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.card-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.card-logo img {
    max-width: 100%;
    max-height: 100%;
}

.card-company {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
}

.card-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid white;
    margin: -55px auto 15px;
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 65px 25px 25px;
}

.card-info {
    margin-bottom: 20px;
}

.card-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.card-info-label {
    font-weight: 600;
    color: var(--text-color);
    flex: 1;
    font-size: 0.9rem;
}

.card-info-value {
    flex: 1.5;
    text-align: right;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-footer {
    background: #f8f9fa;
    padding: 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.card-qr {
    width: 90px;
    height: 90px;
    margin: 0 auto 12px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.card-qr-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.2;
    padding: 5px;
}

.card-id {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

/* Botones de impresión */
.print-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.print-btn {
    flex: 1;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Estado del usuario en tabla personal */
.status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

/* Acciones celda - Ajuste para más botones */
.actions-cell {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Responsive para gestión */
@media (max-width: 768px) {
    .seccion-selector {
        flex-direction: column;
    }
    
    .seccion-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-container {
        width: 95%;
        margin: 10px;
    }
    
    .print-actions {
        flex-direction: column;
    }
    
    .print-btn {
        width: 100%;
    }
    
    .card-photo {
        width: 90px;
        height: 90px;
        margin: -45px auto 10px;
    }
    
    .card-body {
        padding: 50px 15px 20px;
    }
    
    .actions-cell {
        gap: 3px;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.8rem;
    }
}

/* Impresión de tarjeta */
@media print {
    body * {
        visibility: hidden;
    }
    
    .id-card, .id-card * {
        visibility: visible;
    }
    
    .id-card {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        box-shadow: none;
        border: none;
        margin: 0;
        page-break-after: always;
    }
    
    .print-actions,
    .modal-overlay,
    .modal-container,
    .modal-header,
    .modal-body:not(.id-card) {
        display: none !important;
    }
}




.users-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    padding: 20px 40px;
    box-sizing: border-box;
}

.users-table-container {
    flex: 1;
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Bordes redondeados para la tabla */
.users-table th:first-child {
    border-top-left-radius: 12px;
}

.users-table th:last-child {
    border-top-right-radius: 12px;
}

/* Efecto de fila */
.users-table tr {
    transition: background-color 0.2s;
    text-align: center;
}

.users-table tr:hover {
    background-color: #f8f9ff;
}   