/* EmmaLLM — pagine auth dedicate (/login, /register) — iterazione 08.
   Riusa i token e le classi dei form di app.css (incluso PRIMA di questo file). */
.auth-body {
    margin: 0;
    min-height: 100dvh;
    /* Override di app.css (`body { overflow: hidden }`, regola della chat): con form lunghi
       o viewport bassi queste pagine devono scrollare (propagazione fix scroll, 2026-06-12). */
    height: auto;
    overflow-x: hidden;
    overflow-y: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: linear-gradient(160deg, var(--brand-10, rgba(11,146,133,.10)), #ffffff 60%);
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink, #0f1f1c);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid var(--brand-20, rgba(11,146,133,.20));
    border-radius: 22px;
    padding: 32px 28px;
    box-shadow: 0 18px 48px rgba(7,33,30,.10);
}
.auth-card--wide { max-width: 660px; }   /* registrazione (form profilo aziendale) */
.google-setup__identity { margin: 0 0 18px; overflow-wrap: anywhere; color: var(--text-2); }
.google-setup__hint { margin: 4px 0 8px; font-size: 13px; color: var(--text-2); }
.google-setup__birth-date { display: grid; gap: 12px; }
.google-setup .auth-link-btn, .google-setup .auth-switch a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-dark); }
.google-setup [hidden] { display: none !important; }
.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--brand-dark, #06695f);
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 18px;
}
/* La mascotte è 617×379 (non quadrata): mai forzarla a un box quadrato (la
   schiaccia). Si dimensiona in altezza con larghezza automatica, come fa la
   home (empty-state/limit-logo: object-fit contain, height auto). */
.auth-logo img { height: 30px; width: auto; object-fit: contain; }
.auth-title { margin: 0 0 4px; font-size: 22px; line-height: 1.2; }
.auth-subtitle { margin: 0 0 22px; font-size: 13.5px; line-height: 1.5; color: #5a6b67; }
.auth-subtitle a { color: var(--brand-dark, #06695f); }
.auth-switch { margin: 18px 0 0; font-size: 13.5px; text-align: center; color: #5a6b67; }
.auth-switch a { color: var(--brand, #0b9285); font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
/* bottone reso come link inline (iter. 40, "Richiedi un nuovo link") */
.auth-link-btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--brand, #0b9285); font-weight: 700; }
.auth-link-btn:hover { text-decoration: underline; }

/* Sulle pagine auth dedicate il submit è a tutta larghezza: la pill allineata a
   destra (default di .login-form__actions per le modali home) galleggia sbilanciata
   su una card stretta. Scoped a .auth-card → le modali della home restano intatte. */
.auth-card .login-form__actions { justify-content: stretch; padding-top: 8px; }
.auth-card .login-form__submit { width: 100%; }

/* --- Accesso con Google (iter. 18). Nascosto finché il provider non è attivo (JS). --- */
.auth-alt { margin-top: 18px; }
.auth-alt[hidden] { display: none; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    color: #8a9894;
    font-size: 12.5px;
    text-transform: lowercase;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--brand-20, rgba(11,146,133,.18));
}
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 16px;
    border: 1px solid #dadce0;
    border-radius: 12px;
    background: #fff;
    color: #3c4043;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.google-btn:hover { background: #f7f8f8; box-shadow: 0 1px 3px rgba(60,64,67,.16); border-color: #d2d5d9; }
.google-btn:focus-visible { outline: 2px solid var(--brand, #0b9285); outline-offset: 2px; }
.google-btn__icon { width: 18px; height: 18px; flex: none; }

/* --- 2FA: secondo passaggio, codice OTP (iter. 19) --- */
#otpStep[hidden], #loginStep[hidden] { display: none; }
.otp-code-input {
    text-align: center;
    font-family: "Courier New", monospace;
    font-size: 28px;
    letter-spacing: 12px;
    font-weight: 700;
    padding-left: 12px; /* compensa il letter-spacing per centrare otticamente */
}
.otp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 0;
    font-size: 13px;
    color: #5a6b67;
}
.otp-resend {
    border: none;
    background: none;
    padding: 0;
    color: var(--brand, #0b9285);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.otp-resend:disabled { color: #9aa8a4; cursor: default; font-weight: 600; }
.otp-resend:not(:disabled):hover { text-decoration: underline; }
.otp-dev-echo {
    margin: 10px 0 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff7e6;
    border: 1px dashed #e0b34d;
    color: #7a5b12;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.otp-dev-echo[hidden] { display: none; }
@media (max-width: 480px) { .auth-card { padding: 24px 18px; } }
