/* Estilos para Sistema de Autenticación */

/* ===== BOTÓN ACCEDER EN NAVBAR ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.login-btn i {
    font-size: 1rem;
}

.login-text {
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

/* ===== MODALES DE AUTENTICACIÓN ===== */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.auth-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.4s ease;
}

.account-content {
    max-width: 500px;
}

/* ===== HEADER DEL MODAL ===== */
.auth-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px 16px 0 0;
}

.auth-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-auth {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-auth:hover {
    background: #f8f9fa;
    color: #2c3e50;
    transform: scale(1.1);
}

/* ===== BODY DEL MODAL ===== */
.auth-body {
    padding: 2rem;
}

.recover-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    text-align: center;
}

/* ===== FORMULARIOS ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1rem;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

/* ===== OPCIONES DEL FORMULARIO ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background: #4CAF50;
    border-color: #4CAF50;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #4CAF50;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #45a049;
    text-decoration: underline;
}

/* ===== BOTONES ===== */
.auth-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.auth-btn.primary:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* ===== DIVISOR ===== */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* ===== FOOTER DEL MODAL ===== */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer p {
    color: #6c757d;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* ===== MI CUENTA ===== */
.account-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.user-avatar {
    font-size: 3rem;
    color: #4CAF50;
}

.user-details h3 {
    margin: 0 0 0.25rem 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.user-details p {
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.user-type {
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: none;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 0.9rem;
    color: #2c3e50;
}

.account-option:hover {
    background: #f8f9fa;
    border-color: #4CAF50;
    transform: translateX(5px);
}

.account-option.logout {
    color: #dc3545;
    border-color: #dc3545;
}

.account-option.logout:hover {
    background: #fff5f5;
    border-color: #dc3545;
}

.account-option i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .login-text {
        display: none;
    }
    
    .login-btn {
        padding: 0.5rem;
        border-radius: 50%;
        min-width: 40px;
        min-height: 40px;
        justify-content: center;
    }
    
    .auth-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .auth-header,
    .auth-body {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .account-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-actions {
        gap: 0.5rem;
    }
    
    .auth-header,
    .auth-body {
        padding: 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.25rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ESTADOS DE VALIDACIÓN ===== */
.form-group input.valid {
    border-color: #28a745;
    background: #f8fff9;
}

.form-group input.invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message {
    color: #28a745;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== MODO OSCURO ===== */
@media (prefers-color-scheme: dark) {
    .auth-modal-content {
        background: #2c3e50;
        color: white;
    }
    
    .auth-header {
        background: linear-gradient(135deg, #34495e, #2c3e50);
        border-color: #34495e;
    }
    
    .auth-header h2 {
        color: white;
    }
    
    .form-group input,
    .form-group select {
        background: #34495e;
        border-color: #34495e;
        color: white;
    }
    
    .form-group input:focus,
    .form-group select:focus {
        background: #2c3e50;
        border-color: #4CAF50;
    }
    
    .account-info {
        background: linear-gradient(135deg, #34495e, #2c3e50);
        border-color: #34495e;
    }
    
    .account-option {
        border-color: #34495e;
        color: white;
    }
    
    .account-option:hover {
        background: #34495e;
    }
}