:root {
    --color-primary: #042144;
    --color-secondary: #6c757d; 
    --color-background: #f8f9fa; 
    --color-text: #212529; 
    --color-success: #06AE70;
    --color-danger: #dc3545; 
    --color-border: #dee2e6;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-family); line-height: 1.6; color: var(--color-text); background-color: var(--color-background); }

/* --- HEADER Y NAVEGACIÓN --- */
header { background-color: #ffffff; padding: 15px 30px; border-bottom: 1px solid var(--color-border); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }
.logo img { height: 40px; }
nav ul { list-style: none; display: flex; }
nav ul li { position: relative; }
nav ul li a { text-decoration: none; color: var(--color-text); padding: 8px 15px; margin-left: 10px; border-radius: 4px; display: block; transition: 0.3s; }
nav ul li a:hover { background-color: var(--color-border); }
nav ul li a.active { background-color: var(--color-primary); color: white !important; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 10px; min-width: 180px; background-color: #ffffff; border: 1px solid var(--color-border); box-shadow: 0 4px 8px rgba(0,0,0,0.1); z-index: 900; }
.dropdown-menu li { border-bottom: 1px solid var(--color-border); }
nav ul li:hover > .dropdown-menu { display: block; }

main { padding: 30px; max-width: 1200px; margin: 0 auto; }
section { margin-bottom: 30px; padding: 20px; background-color: white; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.05); }

/* --- TARJETAS DE INDICADORES (KPIs) --- */
.kpi-cards { 
    display: flex; 
    gap: 25px; 
    margin-bottom: 35px; 
}

.card { 
    flex: 1; 
    padding: 30px 20px;
    background: linear-gradient(145deg, var(--color-primary) 0%, #063163 100%);
    color: white !important; 
    border-radius: 12px;
    text-align: center; 
    box-shadow: 0 6px 12px rgba(4, 33, 68, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(4, 33, 68, 0.2);
}

.card h3 { 
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.card p { 
    color: white !important; 
    font-size: 2.2rem;
    font-weight: 800; 
    margin: 0;
    line-height: 1.2;
}

/* --- TABLAS Y BOTONES DE ACCIÓN --- */
table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0;
    margin-top: 20px; 
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table thead tr { 
    background-color: var(--color-primary); 
    color: white; 
    text-align: left; 
}

table th, table td { 
    padding: 15px 20px; 
    border-bottom: 1px solid var(--color-border); 
}

table tr:last-child td { border-bottom: none; }

/* Botones de la tabla */
.action-btn { 
    padding: 8px 14px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.85rem; 
    font-weight: 600; 
    margin-right: 5px;
    transition: opacity 0.2s;
}

.action-btn:hover { opacity: 0.9; }

.view-btn { background-color: #e9ecef; color: var(--color-primary); }
.liquidate-btn { background-color: #fff3cd; color: #856404; }
.delete-btn { background-color: #f8d7da; color: #721c24; }
.rehire-btn { background-color: #d1e7dd; color: #0f5132; }

/* Botón Añadir Empleado (Principal) */
#abrir-modal-empleado {
    background-color: var(--color-success);
    color: white;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(6, 174, 112, 0.2);
}

/* --- MODALES Y FORMULARIOS --- */
.modal-overlay { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal-content { background-color: #ffffff; padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); width: 90%; max-width: 650px; position: relative; }
.close-btn { font-size: 28px; font-weight: bold; cursor: pointer; position: absolute; top: 10px; right: 20px; color: var(--color-secondary); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.form-group label { margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select { padding: 10px; border: 1px solid var(--color-border); border-radius: 4px; }

/* --- ESTILOS DE BOTONES EN MODALES (CORREGIDO) --- */

/* Base para botones del modal */
.submit-btn { 
    background-color: var(--color-primary); /* Azul por defecto */
    color: white !important; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 6px; 
    font-weight: bold; 
    font-size: 1rem;
    cursor: pointer; 
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.submit-btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    filter: brightness(1.1);
}

/* Botón Cancelar/Cerrar (Gris) */
.cancel-btn {
    background-color: var(--color-secondary) !important;
}

/* Botón Guardar/Confirmar (Verde) */
#save-employee-btn, 
#final-confirm-save,
button[type="submit"] {
    background-color: var(--color-success) !important;
}

/* Botón Modificar (Azul Claro) */
.view-btn {
    background-color: #3498db !important;
    color: white !important;
}

/* Estado Deshabilitado */
.submit-btn:disabled, 
button:disabled {
    background-color: #e0e0e0 !important;
    color: #888 !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- TABS Y ESTADOS --- */
.tabs-header { display: flex; border-bottom: 2px solid var(--color-border); margin-bottom: 20px; }
.tab-btn { padding: 10px 15px; background: none; border: none; cursor: pointer; color: var(--color-secondary); border-bottom: 2px solid transparent; }
.tab-btn.active { color: var(--color-primary); font-weight: bold; border-bottom: 2px solid var(--color-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; }
.status-activo { background-color: var(--color-success); color: white; }
.status-retirado { background-color: var(--color-danger); color: white; }

footer { text-align: center; padding: 20px; border-top: 1px solid var(--color-border); font-size: 0.8rem; color: var(--color-secondary); }
/* =========================================
   ESTILOS ESPECÍFICOS LANDING PAGE
   ========================================= */

/* Header Landing */
.landing-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.landing-nav li a {
    font-weight: 500;
    color: var(--color-primary);
}

.login-btn-nav {
    background-color: var(--color-primary);
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(4, 33, 68, 0.2);
}

.login-btn-nav:hover {
    background-color: #063163;
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 0 50px 50px;
    margin-bottom: 50px;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    padding-right: 40px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary-hero {
    background-color: var(--color-success);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(6, 174, 112, 0.3);
}

.btn-primary-hero:hover {
    background-color: #059660;
    transform: translateY(-3px);
}

.btn-secondary-hero {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-secondary-hero:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Hero Visual (Mockup) */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.mockup-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
    transform: rotate(-3deg);
    border: 1px solid var(--color-border);
    max-width: 300px;
}

/* Servicios */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--color-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border-top: 5px solid var(--color-primary);
}

.service-card:hover {
    transform: translateY(-10px);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* Valor Agregado */
.value-section {
    background-color: var(--color-primary);
    color: white;
    padding: 80px 20px;
    border-radius: 20px;
    margin: 60px 0;
}

.value-container {
    display: flex;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
    gap: 50px;
}

.value-list {
    list-style: none;
    margin-top: 30px;
}

.value-list li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.value-list i {
    font-size: 1.5rem;
    color: var(--color-success);
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 50%;
    height: fit-content;
}

.value-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.stat-box span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--color-success);
}

/* Footer Landing */
.landing-footer {
    background-color: #021226;
    color: white;
    padding: 60px 20px 20px;
    border-top: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-col h4 {
    margin-bottom: 20px;
    color: var(--color-success);
}

.footer-col a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: white;
}

/* Responsive básico para la landing */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 30px;
    }
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
    }
    .hero-buttons {
        justify-content: center;
    }
    .value-container {
        flex-direction: column;
    }
}
/* =========================================
   ESTILOS DE PÁGINA DE LOGIN
   ========================================= */

body.login-page {
    background: linear-gradient(135deg, var(--color-primary) 0%, #021226 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    height: 50px;
    margin-bottom: 15px;
}

.login-header h2 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--color-secondary);
    font-size: 0.95rem;
}

/* Inputs con Iconos */
.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.login-page input {
    width: 100%;
    padding: 12px 12px 12px 40px; /* Espacio para el icono */
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-page input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 33, 68, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
}

/* Enlaces y Botones */
.forgot-password-link {
    font-size: 0.85rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.login-submit-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    font-size: 1.1rem;
}

/* Separador */
.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #ccc;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eee;
}

.login-divider span {
    padding: 0 10px;
    font-size: 0.9rem;
}

/* Sección Nuevo Cliente */
.new-client-section {
    text-align: center;
}

.new-client-section p {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--color-secondary);
}

.create-account-link {
    color: var(--color-success);
    font-weight: bold;
    text-decoration: none;
    border: 1px solid var(--color-success);
    padding: 8px 15px;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s;
}

.create-account-link:hover {
    background-color: var(--color-success);
    color: white;
}

/* Footer Login */
.login-footer {
    margin-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}
/* Ajuste específico para el modal de la Landing Page */
.landing-modal-content {
    max-width: 500px; /* Un poco más angosto que el de empleados para que se vea como un formulario de contacto */
    border-top: 5px solid var(--color-success); /* Detalle estético verde arriba */
}
/* =========================================
   ESTILOS PÁGINAS DE DETALLE DE SERVICIOS
   ========================================= */

.service-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #021226 100%);
    color: white;
    padding: 100px 20px 60px;
    text-align: center;
    border-radius: 0 0 50px 50px;
}

.service-hero h1 { font-size: 3rem; margin-bottom: 15px; }
.service-hero p { font-size: 1.2rem; opacity: 0.9; max-width: 700px; margin: 0 auto; }

.detail-section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; }

.feature-row {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 80px;
}

/* Alternar orden imagen-texto */
.feature-row:nth-child(even) { flex-direction: row-reverse; }

.feature-text { flex: 1; }
.feature-text h2 { color: var(--color-primary); margin-bottom: 20px; font-size: 2rem; }
.feature-text p { color: var(--color-secondary); margin-bottom: 20px; font-size: 1.05rem; }

.feature-visual {
    flex: 1;
    background: #f8f9fa;
    height: 350px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.check-list { list-style: none; margin-top: 15px; }
.check-list li { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px; color: var(--color-text); }
.check-list i { color: var(--color-success); margin-top: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .feature-row, .feature-row:nth-child(even) { flex-direction: column; }
    .feature-visual { width: 100%; height: 250px; }
}
/* =========================================
   NOTIFICACIONES FLOTANTES (TOAST)
   ========================================= */

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--color-success); /* Fondo Verde */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000; /* Para que quede encima de todo */
    font-weight: 500;
    min-width: 300px;
    
    /* Animación de entrada */
    animation: slideInRight 0.4s ease-out forwards;
}

/* Animación para que entre deslizándose */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%); /* Viene desde fuera de la pantalla */
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación de salida (se usará con JS) */
.toast-hiding {
    animation: fadeOutUp 0.4s ease-in forwards;
}

@keyframes fadeOutUp {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}
/* Busca esta clase en styles.css y asegúrate que tenga estas propiedades */
.modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    width: 500px;         /* Ancho del modal */
    max-width: 90%;       /* Para que no se salga en celulares */
    
    /* --- ESTO ES LO NUEVO PARA EL SCROLL --- */
    max-height: 85vh;     /* Altura máxima: 85% del alto de la pantalla */
    overflow-y: auto;     /* Activa el scroll vertical si el contenido es largo */
    /* --------------------------------------- */

    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    
    /* Aseguramos que se vea bien la barra de scroll */
    scrollbar-width: thin; /* Para Firefox */
}

/* Opcional: Para que la barra de scroll se vea más elegante en Chrome/Edge */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
/* --- AGREGAR AL FINAL DE TU ARCHIVO styles.css --- */

/* ESTILOS PARA TABS EN NÓMINA */
.payroll-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e9ecef;
}

.payroll-tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.payroll-tab-btn:hover {
    color: var(--color-primary);
    background-color: #f8f9fa;
}

.payroll-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.payroll-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.payroll-section.active {
    display: block;
}

/* TARJETAS DE LIQUIDACIÓN */
.liquidation-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 6px solid var(--color-danger);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.liquidation-card:hover {
    transform: translateX(5px);
}

.liq-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--color-text);
}

.liq-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.liq-actions {
    text-align: right;
}

.liq-total {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-success);
    margin-bottom: 10px;
}
/* Estilos para Pestañas del Modal */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.modal-tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #888;
    transition: all 0.2s;
}

.modal-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background-color: #f8f9fa;
}

.modal-tab-content {
    display: none; /* Ocultos por defecto */
}
.modal-tab-content.active {
    display: block; /* Solo el activo se ve */
    animation: fadeIn 0.3s;
}
/* Nuevo estilo para indicador de estado */
.status-badge-success {
    background-color: #e8f5e9; 
    color: #2e7d32; 
    border: 1px solid #c8e6c9;
    padding: 8px; 
    border-radius: 6px; 
    font-size: 0.85rem; 
    margin-top: 10px;
    display: flex; 
    align-items: center; 
    gap: 5px;
}
/* --- NUEVA LISTA ORDENADA (GRID) --- */
.check-list { 
    list-style: none; 
    margin-top: 20px; 
}

.check-list li { 
    display: grid;
    /* Columna 1: Icono (30px), Columna 2: Texto (Resto) */
    grid-template-columns: 30px 1fr; 
    gap: 10px;
    margin-bottom: 25px; /* Más espacio entre items */
    align-items: start; /* Alineados arriba */
}

/* El Icono */
.check-list i { 
    color: var(--color-success); 
    font-size: 1.2rem;
    margin-top: 3px; /* Ajuste fino para que cuadre con el título */
}

/* El contenedor del texto (Título + Descripción) */
.check-list div {
    display: flex;
    flex-direction: column; /* Pone el título arriba y texto abajo */
}

/* El Título en Negrita */
.check-list strong {
    color: var(--color-primary);
    font-size: 1rem;
    margin-bottom: 4px; /* Espacio entre título y descripción */
    display: block;
}

/* La Descripción */
.check-list span {
    color: #555; /* Un gris un poco más suave para jerarquía */
    font-size: 0.95rem;
    line-height: 1.5;
}
