:root {
    --primary: #4a8ef5;
    --primary-light: #7cc3ff;
    --primary-dark: #2d6bc8;
    --secondary: #6c5ce7;
    --accent: #e91e63;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e17055;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #231f20;
    --text-light: #666666;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 6px 20px rgba(12, 20, 36, 0.06);
    --shadow-md: 0 8px 30px rgba(12, 20, 36, 0.12);
    --shadow-lg: 0 15px 50px rgba(12, 20, 36, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(74, 142, 245, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(108, 92, 231, 0.05) 0%, transparent 20%);
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel izquierdo - Branding */
.login-background {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.brand-logo i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.brand-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 300px;
    position: relative;
    z-index: 1;
}

/* Panel derecho - Login */
.login-card {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.avatar-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 20px rgba(74, 142, 245, 0.3);
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 700;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Formulario */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 0.9rem;
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--bg);
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.input-container input:focus ~ .input-focus-line {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Opciones del formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    user-select: none;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Botón de login */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 142, 245, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.loading {
    background: var(--text-muted);
    cursor: not-allowed;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer del login */
.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    justify-content: center;
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Info de seguridad */
.security-info {
    margin-top: 30px;
    padding: 15px;
    background: rgba(74, 142, 245, 0.05);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.security-info i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.3rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--danger);
    background: rgba(225, 112, 85, 0.1);
}

.modal-body {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-info {
    margin-top: 20px;
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-sm);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    
    .login-background {
        padding: 30px 20px;
        min-height: 200px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .brand-logo {
        font-size: 2rem;
    }
    
    .brand-logo i {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-container {
        min-height: auto;
    }
    
    .avatar-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .form-group input {
        padding: 12px 15px;
    }
}
/* Estilos para el modal de recuperación */
.modal-step {
    animation: fadeIn 0.3s ease;
}

.recovery-message {
    margin: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.3s ease;
}

.recovery-message.error {
    background: #ffe6e6;
    border: 1px solid #ff9999;
    color: #cc0000;
}

.recovery-message.success {
    background: #e6ffe6;
    border: 1px solid #99ff99;
    color: #009900;
}

.recovery-message i {
    font-size: 1.1rem;
}

.help-text {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    transition: all 0.3s;
}

.btn-text:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-text:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    text-decoration: none;
}

@keyframes slideInDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos para inputs del modal */
.input-container {
    position: relative;
    margin-bottom: 5px;
}

.input-container input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.3s;
}

.input-container input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.input-container input:focus ~ .input-focus-line {
    width: 100%;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
/* Estructura Principal */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Montserrat', sans-serif;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Columna Izquierda (Login) */
.login-side-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8faff;
    padding: 2rem;
}

/* Columna Derecha (Identidad) */
.login-side-right {
    flex: 1.2; /* Un poco más ancha que la izquierda */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); /* Ajusta a tus colores */
    color: white;
    padding: 4rem;
    overflow: hidden;
}

/* Efecto de fondo (Opcional: imagen de spa suave) */
.brand-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: none; /* Puedes usar una imagen de fondo aquí */
    opacity: 0.15;
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 500px;
}

.brand-logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.brand-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.brand-features {
    display: flex;
    gap: 20px;
}

.brand-features span {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

/* Responsive: En móviles se oculta el panel derecho */
@media (max-width: 992px) {
    .login-side-right {
        display: none;
    }
}