/* ── Login shell: dos paneles ─────────────────────────────────────────── */

.login-shell {
    display: flex;
    min-height: 100vh;
    background: var(--fv-sidebar-bg);
}

/* Panel izquierdo: branding */
.login-panel-brand {
    display: none;
    flex: 1;
    background: linear-gradient(145deg, var(--fv-sidebar-bg) 0%, #162032 55%, #1a2a50 100%);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-panel-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fv-secondary) 0%, var(--fv-primary) 50%, transparent 100%);
    pointer-events: none;
}

.login-panel-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.login-brand-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 420px;
}

.login-brand-badge {
    width: 48px;
    height: 48px;
    background: var(--fv-secondary);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.375rem;
    color: var(--fv-sidebar-bg);
    margin-bottom: 1.5rem;
}

.login-brand-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--fv-bg);
    margin: 0 0 1rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.login-brand-desc {
    font-size: 1rem;
    color: var(--fv-text-subtle);
    line-height: 1.65;
    margin-bottom: 2rem;
}

.login-brand-desc strong { color: var(--fv-border-strong); }

.login-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--fv-text-subtle);
    font-size: 0.9375rem;
}

.login-check { color: var(--fv-success); flex-shrink: 0; }

/* Panel derecho: formulario */
.login-panel-form {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    background: var(--fv-bg);
}

@media (min-width: 900px) {
    .login-panel-brand {
        display: flex;
        align-items: center;
    }

    .login-panel-form {
        width: 520px;
        max-width: 520px;
        flex-shrink: 0;
        padding: 3rem 2.5rem;
    }
}

@media (min-width: 1200px) {
    .login-panel-form {
        width: 560px;
        max-width: 560px;
    }
}

/* ── Contenedor de página auth (wrapper heredado) ─────────────────────── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
}

/* ── Flecha volver al inicio ──────────────────────────────────────────── */

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--fv-text-muted);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.15s;
}

.auth-back:hover { color: var(--fv-primary); }

/* ── Tarjeta del formulario ───────────────────────────────────────────── */

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--fv-surface);
    border: 1px solid var(--fv-border);
    border-top: 2px solid var(--fv-primary);
    border-radius: 0 0 var(--fv-radius-md) var(--fv-radius-md);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 2.5rem;
}

.auth-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fv-text);
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: var(--fv-text-muted);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

/* ── Alertas ──────────────────────────────────────────────────────────── */

.auth-error {
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.25);
    color: var(--fv-danger-text);
    border-radius: var(--fv-radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.auth-success {
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.25);
    color: var(--fv-success-text);
    border-radius: var(--fv-radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ── Campo de formulario ──────────────────────────────────────────────── */

.auth-field { margin-bottom: 1.125rem; }

/* ── Labels compartidos (auth / landing / registro) ──────────────────── */

.auth-field label,
.lp-field label,
.rg-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fv-text-label);
    margin-bottom: 0.375rem;
}

/* ── Inputs compartidos (auth / landing / registro) ───────────────────── */

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.lp-field input[type="text"],
.lp-field input:not([type]),
.rg-field input:not([type]),
.rg-field input[type="text"],
.rg-field input[type="password"],
.rg-field input[type="date"] {
    width: 100%;
    height: 42px;
    padding: 0 0.875rem;
    border: 1.5px solid var(--fv-border);
    border-radius: 3px;
    font-size: 0.9375rem;
    color: var(--fv-text);
    background: var(--fv-bg);
    font-family: var(--fv-font);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
}

.rg-field select {
    width: 100%;
    height: 42px;
    padding: 0 0.875rem;
    border: 1.5px solid var(--fv-border);
    border-radius: 3px;
    font-size: 0.9375rem;
    color: var(--fv-text);
    background: var(--fv-bg);
    font-family: var(--fv-font);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.rg-field select:focus {
    border-color: var(--fv-primary);
    background: var(--fv-surface);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.auth-field textarea,
.lp-field textarea,
.rg-field textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--fv-border);
    border-radius: 3px;
    font-size: 0.9375rem;
    color: var(--fv-text);
    background: var(--fv-bg);
    font-family: var(--fv-font);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    resize: vertical;
}

.auth-field input:focus,
.lp-field input:focus,
.lp-field textarea:focus,
.rg-field input:focus,
.rg-field textarea:focus {
    border-color: var(--fv-primary);
    background: var(--fv-surface);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.auth-field input::placeholder,
.auth-field textarea::placeholder,
.lp-field input::placeholder,
.lp-field textarea::placeholder,
.rg-field input::placeholder,
.rg-field textarea::placeholder {
    color: var(--fv-text-placeholder);
}

.auth-field .validation-message {
    color: var(--fv-danger-text);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* ── Campo contraseña con toggle ──────────────────────────────────────── */

.auth-password-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
}

.auth-password-wrapper input { padding-right: 3rem !important; }

.auth-toggle-pwd {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 2.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fv-text-placeholder);
    transition: color 0.15s;
    border-radius: 0 3px 3px 0;
}

.auth-toggle-pwd:hover { color: var(--fv-primary); }

/* ── Recordarme ───────────────────────────────────────────────────────── */

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--fv-text-label);
    cursor: pointer;
    user-select: none;
}

/* ── Checkboxes compartidos ───────────────────────────────────────────── */

.auth-remember input[type="checkbox"],
.rg-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--fv-primary);
    flex-shrink: 0;
    cursor: pointer;
}

.rg-check label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--fv-text-label);
    cursor: pointer;
    user-select: none;
}

/* ── Radios de registro ───────────────────────────────────────────────── */

.rg-radio-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fv-text-label);
    margin-bottom: 0.5rem;
}

.rg-radio { display: flex; gap: 1rem; flex-wrap: wrap; }

.rg-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--fv-text-label);
    cursor: pointer;
    user-select: none;
}

.rg-radio-option input[type="radio"] {
    accent-color: var(--fv-primary);
    cursor: pointer;
}

/* ── Botón principal ──────────────────────────────────────────────────── */

.auth-btn-submit {
    width: 100%;
    height: 44px;
    background: var(--fv-primary);
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: var(--fv-font);
    cursor: pointer;
    transition: background 0.12s;
    margin-bottom: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-btn-submit:hover  { background: var(--fv-primary-dark); }
.auth-btn-submit:active { transform: translateY(1px); box-shadow: none; }

/* ── Enlace a pie de tarjeta ──────────────────────────────────────────── */

.auth-links { text-align: center; font-size: 0.875rem; }

.auth-links a {
    color: var(--fv-primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    color: var(--fv-primary-dark);
    text-decoration: underline;
}

.auth-links--register {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    color: var(--fv-text-placeholder);
    margin-top: 0.25rem;
}

/* ── Mensajes de error de campo (landing / registro) ─────────────────── */

.lp-field-error,
.rg-field-error {
    font-size: 0.75rem;
    color: var(--fv-danger-text);
    margin-top: 0.25rem;
    display: block;
}

.lp-required,
.rg-required { color: var(--fv-danger); }
