/* ===== RESET Y CONFIGURACIÓN GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== ESTILOS GENERALES ===== */
body {
    background: linear-gradient(135deg, #001993 0%, #001566 100%);
    min-height: 100vh;
    padding: 20px;
}

/* ===== LOGOS Y MARCA ===== */
.logo-container {
    margin-bottom: 20px;
    text-align: center;
}

.main-logo {
    max-width: 180px;
    height: auto;
}

.dashboard-logo {
    max-height: 80px;
    width: auto;
}

.logo-image {
    max-width: 80px;
    height: auto;
    display: block;
}

.brand-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.brand-text {
    flex: 1;
}

/* ===== PÁGINA DE AUTENTICACIÓN (INDEX) ===== */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.auth-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    min-height: 600px;
}

.brand-section {
    flex: 1;
    background: linear-gradient(135deg, #001566 0%, #001993 100%);
    color: white;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brand-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.20) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.brand-logo img {
    max-width: 100%;
    height: auto;
}

.brand-section h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-section .tagline {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 20px;
    font-weight: 300;
}

.brand-section .description {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 300px;
}

.features-list {
    margin-top: 30px;
    text-align: left;
    max-width: 300px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.feature-item::before {
    content: '✓';
    color: #4d62ff;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.1rem;
}

.form-section {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fafafa;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    color: #001993;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-header p {
    color: #666;
    font-size: 1rem;
}

.form-toggle {
    display: flex;
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 12px;
    padding: 6px;
    border: 2px solid #e8eaff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.toggle-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
    font-size: 0.95rem;
}

.toggle-btn.active {
    background: #001993;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 25, 147, 0.3);
}

.toggle-btn:not(.active):hover {
    background: rgba(0, 25, 147, 0.08);
    color: #001993;
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
    animation: slideIn 0.4s ease;
}

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

/* ===== ESTILOS PARA REGISTRO POR PASOS ===== */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #666;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: #001993;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 25, 147, 0.3);
}

.step-indicator.completed {
    background: #43b02a;
    color: white;
}

.register-step {
    display: none;
}

.register-step.active {
    display: block;
    animation: slideIn 0.4s ease;
}

.register-step h3 {
    color: #001993;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 600;
}

.register-step p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
}

.step-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.step-btn {
    padding: 12px 24px;
    border: 2px solid #001993;
    border-radius: 8px;
    background: transparent;
    color: #001993;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.step-btn.next-btn {
    background: #001993;
    color: white;
}

.step-btn.next-btn:hover {
    background: #001566;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 25, 147, 0.3);
}

.step-btn.prev-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.field-help {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e8eaff;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-group input:focus {
    outline: none;
    border-color: #001993;
    box-shadow: 0 4px 15px rgba(0, 25, 147, 0.15);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #999;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #001993;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 25, 147, 0.3);
    margin-top: 10px;
}

.submit-btn:hover {
    background: #001566;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 25, 147, 0.4);
}

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

.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: #e8eaff;
    color: #001993;
    border: 1px solid #d0d4ff;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== DASHBOARD ===== */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

.dashboard-header {
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    flex: 1;
}

.user-info h1 {
    color: #001993;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.user-details {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.4;
}

.user-profile-details {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #43b02a;
}

.profile-field {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-field strong {
    color: #333;
    min-width: 120px;
}

.profile-field span {
    color: #666;
}

.logout-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #b71c1c;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.dashboard-card h3 {
    color: #001993;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-action {
    display: inline-block;
    background: #001993;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.card-action:hover {
    background: #001566;
}

.welcome-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.welcome-section h2 {
    color: #001993;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #e8eaff;
    border-radius: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #001993;
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Auth Page */
    .auth-container {
        flex-direction: column;
    }
    
    .brand-section {
        padding: 30px 20px;
    }

    .logo-image {
        max-width: 60px;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .step-btn {
        flex: none;
    }
    
    /* Dashboard */
    .dashboard-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dashboard-brand {
        flex-direction: column;
        text-align: center;
    }
    
    .welcome-section {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 20px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .user-info h1 {
        font-size: 1.5rem;
    }
    
    .step-indicator {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .register-step h3 {
        font-size: 1.2rem;
    }
}

/* ===== VALIDACIÓN DE CONTRASEÑA ===== */
.password-requirements {
    margin-top: 10px;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.password-requirements.valid {
    background: #e8eaff;
    border-color: #001993;
}

.password-requirements.invalid {
    background: #fff3e0;
    border-color: #ff9800;
}

.requirements-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.requirement {
    margin: 4px 0;
    color: #666;
    transition: color 0.3s ease;
}

.requirement.met {
    color: #001993;
    font-weight: 500;
}

.requirement.met::before {
    content: '✓ ';
    font-weight: bold;
}
.file-item {
    transition: all 0.3s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.delete-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.delete-btn:hover {
    background: #b71c1c;
}

.download-btn {
    background: #43b02a;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
}

.download-btn:hover {
    background: #3a9e23;
}

.step-btn:disabled,
.submit-btn:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    border-color: #cccccc !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    transform: none !important;
    box-shadow: none !important;
}

.step-btn:disabled:hover {
    background-color: #cccccc !important;
    color: #666666 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Estilos para el dropdown de usuarios */
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: #001993;
    box-shadow: 0 0 0 3px rgba(0, 25, 147, 0.1);
}

.user-info-card {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8eaff 100%);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #001993;
    margin-top: 10px;
}
/* 🔥 NUEVO: Estilos para búsqueda de usuarios */
.user-search-container {
    position: relative;
}

.user-result-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.user-result-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.user-result-company {
    font-weight: 600;
    color: #001993;
    font-size: 1rem;
}

.user-result-nit {
    background: #e8eaff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
}

.user-result-contact {
    font-size: 0.85rem;
    color: #666;
    margin-top: 3px;
}

.selected-user-info {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8eaff 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #001993;
}

.user-avatar {
    background: #001993;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.search-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.search-divider-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.search-divider-text {
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* 🔥 CORRECCIÓN: Estilos para el botón de enviar enlace */
#forgot-password-form .submit-btn {
    background: #001993 !important;
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

#forgot-password-form .submit-btn:hover:not(:disabled) {
    background: #001566 !important;
    transform: translateY(-2px);
}

#forgot-password-form .submit-btn:disabled {
    background: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
    transform: none;
}

.step-btn.next-btn:not(:disabled) {
    background: #001993;
    color: white;
}

.step-btn.next-btn:not(:disabled):hover {
    background: #001566;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 25, 147, 0.3);
}

.step-btn.prev-btn {
    background: transparent;
    color: #001993;
    border: 2px solid #001993;
}

.step-btn.prev-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* 🔥 CORRECCIÓN: Estilos específicos para el botón de enviar enlace */
#forgot-password-form .submit-btn {
    background: #001993 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

#forgot-password-form .submit-btn:hover:not(:disabled) {
    background: #001566 !important;
    transform: translateY(-2px);
    color: white !important;
}

#forgot-password-form .submit-btn:disabled {
    background: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed;
    transform: none;
}
/* Estilos para el panel de Admin */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.admin-tabs .toggle-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-tabs .toggle-btn.active {
    background: var(--lyza-blue);
    color: white;
    border-color: var(--lyza-blue);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
/* ===== ESTILOS DEL MODAL DE SOLICITUDES ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000; /* Z-index alto para estar sobre todo */
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: white; width: 90%; max-width: 500px;
    border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden; animation: slideUp 0.3s ease;
    position: relative;
}
.modal-header {
    background: #001993; color: white; padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-body { padding: 20px; }
.close-btn { background: none; border: none; color: white; font-size: 24px; cursor: pointer; }
.form-input {
    width: 100%; padding: 10px; border: 2px solid #e0e0e0; border-radius: 8px;
    margin-top: 5px; font-size: 14px;
}
.form-input:focus { border-color: #001993; outline: none; }
.submit-btn-modal {
    background: #43b02a; color: white; width: 100%; padding: 12px;
    border: none; border-radius: 8px; font-weight: bold; font-size: 16px;
    cursor: pointer; margin-top: 20px; transition: 0.3s;
}
.submit-btn-modal:hover { background: #3a9e23; }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }