/* Variables CSS */
:root {
    --color-blue: #2563eb;
    --color-blue-dark: #1d4ed8;
    --color-blue-light: #3b82f6;
    --color-red: #ef4444;
    --color-green: #10b981;
    --color-yellow: #f59e0b;
    --color-gray: #6b7280;
    --color-gray-light: #f3f4f6;
    --color-gray-dark: #374151;
    --color-white: #ffffff;
    --color-black: #111827;
    --color-pink: #ec4899;
    --color-brown: #a16207;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

/* Contenedor principal */
.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Panel izquierdo - Formulario */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--color-white);
    padding: 2rem;
    overflow-y: auto;
}

.form-container {
    max-width: 480px;
    width: 100%;
    padding: 2rem 1rem;
}

/* Estilos específicos para sign-up */
.signup-form .form-group {
    margin-bottom: 0.875rem;
}

.signup-form {
    margin-bottom: 1rem;
}

body:has(.signup-form) .logo-section {
    margin-bottom: 1.25rem;
}

body:has(.signup-form) .welcome-message {
    margin-bottom: 1.25rem;
}

body:has(.signup-form) .logo-container {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

body:has(.signup-form) .logo-image {
    height: 100px;
}

body:has(.signup-form) .form-container {
    padding: 1.5rem 1rem;
}

/* Alertas de sesión */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #10B981;
    color: #065F46;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #EF4444;
    color: #991B1B;
}

.alert-warning {
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    color: #92400E;
}

.alert-info {
    background: #EFF6FF;
    border: 1px solid #3B82F6;
    color: #1E40AF;
}

.resend-link {
    color: var(--color-blue);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.resend-link:hover {
    color: var(--color-blue-dark);
}

/* Logo */
.logo-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-container {
    display: inline-block;
    background: transparent; /* Sin fondo azul */
    border-radius: 0;
    padding: 0;
    margin-bottom: 0.75rem;
}

.logo-image {
    height: 120px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Mensaje de bienvenida */
.welcome-message {
    text-align: center;
    margin-bottom: 1.5rem;
}

.welcome-message p {
    font-size: 1.125rem;
    color: var(--color-gray-dark);
    line-height: 1.6;
}

.highlight {
    color: var(--color-blue);
    font-weight: 600;
}

/* Formulario */
.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-gray-light);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--color-black);
    background: var(--color-white);
    transition: all 0.2s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error {
    border-color: var(--color-red);
}

.error-message {
    display: block;
    font-size: 0.875rem;
    color: var(--color-red);
    margin-top: 0.5rem;
}

/* Grupo de contraseña */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray);
    padding: 0.25rem;
    transition: color 0.2s ease-in-out;
}

.password-toggle:hover {
    color: var(--color-blue);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Opciones del formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-dark);
    cursor: pointer;
}

.form-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--color-blue);
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--color-blue);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.forgot-link:hover {
    color: var(--color-blue-dark);
}

.terms-link {
    color: var(--color-blue);
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

.terms-link:hover {
    color: var(--color-blue-dark);
}

/* Botón de login */
.login-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--color-blue);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background: var(--color-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Sección de registro */
.register-section {
    text-align: center;
    margin-top: 1rem;
}

.register-section p {
    font-size: 0.875rem;
    color: var(--color-gray-dark);
}

.register-link {
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.register-link:hover {
    color: var(--color-blue-dark);
}

/* Panel derecho - Ilustración */
.illustration-panel {
    flex: 1;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.illustration-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    animation: fadeInImage 1s ease-out 0.3s forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.illustration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.3) 0%, rgba(51, 65, 85, 0.3) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-form-panel {
        order: 2;
        min-height: auto;
        padding: 1rem;
    }
    
    .illustration-panel {
        order: 1;
        min-height: 300px;
    }
    
    .form-container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .form-container {
        max-width: 100%;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .illustration-panel {
        min-height: 250px;
    }

    .background-image {
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 0.5rem;
    }
    
    .form-container {
        padding: 0.5rem;
    }
    
    .welcome-message p {
        font-size: 1rem;
    }
    
    .illustration-panel {
        min-height: 200px;
    }

    .background-image {
        object-fit: contain;
        padding: 1rem;
    }
} 