/*
⚠️ IMPORTANTE: Sigue las directrices del framework Vibe.
Ver: /.github/copilot-instructions.md

Auth Login Styles - Estilos de inicio de sesión
Vibe Framework Implementation
*/

/* ============================================
   Variables CSS (compartidas con signup)
   ============================================ */
:root {
    /* Colores Base */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    
    /* Textos */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    
    /* Acentos */
    --color-primary: #3B82F6;
    --color-success: #10B981;
    --color-danger: #EF4444;
    --color-warning: #F59E0B;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Sombras */
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ============================================
   Reset y Base (igual que signup)
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

/* ============================================
   Container y Card
   ============================================ */
.auth-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.auth-tagline {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.auth-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.4s ease-out;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ============================================
   Alertas
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--color-danger);
    color: #FCA5A5;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--color-warning);
    color: #FCD34D;
}

.alert p {
    margin: 0;
}

/* ============================================
   Formulario
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-input {
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

/* ============================================
   Password Input
   ============================================ */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

.eye-icon {
    font-size: 1.25rem;
    display: block;
}

/* ============================================
   Checkbox (para remember me futuro)
   ============================================ */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* ============================================
   Botones
   ============================================ */
.btn {
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Links
   ============================================ */
.auth-forgot {
    text-align: center;
    margin-top: -0.5rem;
}

.auth-link-small {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.auth-link-small:hover {
    color: var(--color-primary);
}

.auth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--bg-tertiary);
}

.auth-separator span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: #60A5FA;
    text-decoration: underline;
}

/* ============================================
   Copyright
   ============================================ */
.auth-copyright {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ============================================
   Loading State
   ============================================ */
.loading .btn-primary {
    position: relative;
    color: transparent;
}

.loading .btn-primary::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================
   Animaciones
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-logo h1 {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}

/* ============================================
   Accesibilidad
   ============================================ */
.form-input:focus-visible,
.btn:focus-visible,
.auth-link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
