/* ── Login page ─────────────────────────────────────── */

.auth-fluid {
    min-height: 100vh;
    display: flex;
    background: var(--upf-color-bg);
    overflow: hidden;
}

.auth-fluid-form-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 480px;
    min-width: 380px;
    flex-shrink: 0;
    background: var(--upf-color-surface);
    padding: var(--upf-space-7) var(--upf-space-6);
    position: relative;
    z-index: 2;
}

    .auth-fluid-form-box .card-body {
        max-width: 380px;
        width: 100%;
    }

    .auth-fluid-form-box .auth-brand {
        margin-bottom: var(--upf-space-7);
    }

    .auth-fluid-form-box h4 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--upf-text-primary);
    }

    .auth-fluid-form-box .login-subtitle {
        color: var(--upf-text-secondary);
        margin-bottom: var(--upf-space-6);
        font-size: 0.9rem;
    }

    .auth-fluid-form-box .login-form-fields {
        display: flex;
        flex-direction: column;
        gap: var(--upf-space-4);
    }

    .auth-fluid-form-box .login-actions {
        margin-top: var(--upf-space-5);
    }

        .auth-fluid-form-box .login-actions .mud-button-root {
            padding-top: 10px;
            padding-bottom: 10px;
            border-radius: var(--upf-radius-sm);
            font-weight: 600;
            font-size: 0.95rem;
            letter-spacing: 0.02em;
        }

    .auth-fluid-form-box .login-forgot {
        text-align: right;
        margin-bottom: var(--upf-space-1);
    }

        .auth-fluid-form-box .login-forgot a {
            color: var(--upf-text-muted);
            font-size: 0.8rem;
            text-decoration: none;
            transition: color 0.15s;
        }

            .auth-fluid-form-box .login-forgot a:hover {
                color: var(--upf-primary);
            }

    .auth-fluid-form-box .footer-alt {
        margin-top: var(--upf-space-7);
        text-align: center;
        font-size: 0.85rem;
    }

        .auth-fluid-form-box .footer-alt a {
            color: var(--upf-primary);
            text-decoration: none;
            font-weight: 600;
        }

            .auth-fluid-form-box .footer-alt a:hover {
                text-decoration: underline;
            }

/* Right panel */
.auth-fluid-right {
    flex: 1;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    min-width: 0;
    background-image: url('../../img/login-bg.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 65% center;
    overflow: hidden;
}

    .auth-fluid-right::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient( 90deg, rgba(15, 23, 42, 0.22) 0%, rgba(15, 23, 42, 0.08) 30%, rgba(15, 23, 42, 0.00) 55% ), linear-gradient( to top, rgba(15, 23, 42, 0.30) 0%, rgba(15, 23, 42, 0.05) 45%, rgba(15, 23, 42, 0.00) 75% );
        pointer-events: none;
        z-index: 0;
    }

    .auth-fluid-right .auth-user-testimonial {
        position: relative;
        z-index: 1;
        align-self: flex-start;
        max-width: 640px;
        padding: 72px 64px;
    }

        .auth-fluid-right .auth-user-testimonial h2 {
            color: #ffffff;
            font-size: clamp(2rem, 3.8vw, 4.25rem);
            line-height: 1.02;
            font-weight: 800;
            letter-spacing: -0.03em;
            text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
            margin: 0;
        }

/* Responsive */
@media (max-width: 768px) {
    .auth-fluid {
        flex-direction: column;
    }

    .auth-fluid-form-box {
        width: 100%;
        min-width: unset;
        padding: var(--upf-space-6) var(--upf-space-4);
    }

    .auth-fluid-right {
        min-height: 240px;
        background-position: 65% center;
    }

        .auth-fluid-right .auth-user-testimonial {
            padding: 32px 24px;
        }

            .auth-fluid-right .auth-user-testimonial h2 {
                font-size: clamp(1.75rem, 7vw, 2.5rem);
            }
}

/* Dark mode adjustments */
[data-bs-theme=dark] .auth-fluid-form-box {
    background: var(--upf-color-surface);
}

/*
 * Fix logo visibility per il tema: app-saas.min.css usa [data-theme=dark],
 * ma hyper-config.js imposta data-bs-theme. Queste regole correggono il mismatch
 * per i logo nell'auth-brand della pagina login.
 */
html[data-bs-theme=dark] .auth-brand .logo-dark {
    display: none;
}
html[data-bs-theme=dark] .auth-brand .logo-light {
    display: block;
}
html:not([data-bs-theme=dark]) .auth-brand .logo-dark {
    display: block;
}
html:not([data-bs-theme=dark]) .auth-brand .logo-light {
    display: none;
}
