/* src/static/css/accounts/login.css */

:root {
    /* Paleta Osiris */
    --brand-dark: #0b1020;      /* Fondo oscuro */
    --brand-blue: #1a2237;      /* Azul profundo */
    --brand-cyan: #0ea5c6;      /* Cyan Femto */
    --brand-gold: #dca54a;      /* Dorado Osiris */
    
    /* UI Colors */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --input-bg: #ffffff;
    --input-focus: rgba(14, 165, 198, 0.15);
    --error: #ef4444;
    
    /* Spacing & Radius */
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden; /* Evita scroll en desktop */
}

.login-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* =========================================
   Lado Izquierdo (Branding / Arte)
   ========================================= */
.brand-side {
    flex: 1;
    background-color: var(--brand-dark);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    /* Gradiente sutil */
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-blue) 100%);
}

.brand-bg-effect {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Patrón abstracto sutil */
    background-image: radial-gradient(circle at 80% 20%, rgba(220, 165, 74, 0.1) 0%, transparent 20%),
                      radial-gradient(circle at 20% 80%, rgba(14, 165, 198, 0.1) 0%, transparent 20%);
    z-index: 1;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.brand-logo {
    height: 80px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
}

.brand-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* =========================================
   Lado Derecho (Formulario)
   ========================================= */
.form-side {
    flex: 0 0 500px; /* Ancho fijo en desktop */
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    box-shadow: -5px 0 20px rgba(0,0,0,0.05);
    z-index: 10;
}

.form-container {
    width: 100%;
    max-width: 380px;
}

.form-header {
    margin-bottom: 2.5rem;
}

.mobile-logo {
    display: none;
    height: 40px;
    margin-bottom: 1rem;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Inputs y Grupos --- */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 45px; /* Espacio para el botón del ojo */
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 3px var(--input-focus);
}

/* --- Botón Ver Contraseña (FIX CLAVE) --- */
.toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer; /* Asegura que el mouse cambie a mano */
    color: var(--text-muted);
    padding: 8px;    /* Área de clic cómoda */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 20;     /* Por encima del input */
}

/* 🔥 ESTA REGLA ES LA QUE ARREGLA EL CLIC 🔥
   Hace que los clics en el SVG pasen directo al button */
.toggle-pass svg {
    pointer-events: none;
}

.toggle-pass:hover { color: var(--brand-cyan); }

/* --- Botón Submit --- */
.btn-submit {
    width: 100%;
    padding: 0.85rem;
    margin-top: 1rem;
    background-color: var(--brand-cyan);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(14, 165, 198, 0.2);
}

.btn-submit:hover {
    background-color: #0891b2; /* Tono más oscuro */
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(14, 165, 198, 0.3);
}

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

/* --- Alertas y Errores --- */
.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.error-msg {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.3rem;
}

/* --- Footer --- */
.form-footer {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* =========================================
   Responsive (Móvil)
   ========================================= */
@media (max-width: 900px) {
    .login-wrapper { flex-direction: column; }
    .brand-side { display: none; } /* Ocultar lado artístico */
    
    .form-side {
        flex: 1;
        width: 100%;
        padding: 1.5rem;
        box-shadow: none;
    }
    
    .mobile-logo { display: block; }
    .form-container { max-width: 100%; }
    
    body { overflow: auto; } /* Permitir scroll */
}