body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(31, 99, 145, 0.18), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(190, 58, 50, 0.10), transparent 40%),
        var(--cg-body-bg);
    padding: 16px;
}
.login-container {
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--cg-shadow-2);
    padding: 36px 32px;
    width: 100%;
    max-width: 400px;
}
.login-header { text-align: center; margin-bottom: 24px; }
.login-logo {
    width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 12px; overflow: hidden;
}
.login-logo img { display: block; width: 100%; height: 100%; }
.login-header h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.login-header p { color: var(--cg-text-muted); margin: 0; }
.btn-login { background: var(--primary-accent); border: none; padding: 12px; font-weight: 600; }
.btn-login .loading { display: none; }
.btn-login.is-loading .login-text { display: none; }
.btn-login.is-loading .loading { display: inline; }
.login-footnote { color: var(--cg-text-muted); font-size: 0.78rem; text-align: center; margin: 0; }
.login-legal { text-align: center; font-size: 0.78rem; margin: 8px 0 0; }
.login-legal a { color: var(--cg-text-muted); }
.login-theme-toggle {
    position: fixed; top: 14px; right: 14px; border: 1px solid var(--cg-border);
    background: var(--cg-surface); color: var(--cg-text-muted); border-radius: 999px;
    width: 38px; height: 38px;
}

/* Phones: the sign-in is the app's first screen, not a box on a page. */
@media (max-width: 575.98px) {
    body { align-items: stretch; padding: 0; }
    .login-container {
        border: 0; box-shadow: none; background: transparent; max-width: none;
        display: flex; flex-direction: column; justify-content: center;
        padding: calc(48px + var(--app-safe-top, 0px)) 24px calc(32px + var(--app-safe-bottom, 0px));
        animation: app-rise 0.5s var(--app-ease) both;
    }
    .login-header { margin-bottom: 32px; }
    .login-logo {
        width: 76px; height: 76px; border-radius: 18px;
        box-shadow: 0 12px 28px rgba(31, 99, 145, 0.35);
    }
    .login-header h1 { font-size: 1.8rem; }
    .login-container .form-control, .login-container .input-group-text, .login-container .input-group .btn {
        min-height: 54px; font-size: 16px; background: var(--cg-surface);
    }
    .login-container .input-group > :first-child { border-radius: 14px 0 0 14px; }
    .login-container .input-group > :last-child { border-radius: 0 14px 14px 0; }
    .btn-login { min-height: 56px; border-radius: 16px; font-size: 1.05rem; box-shadow: 0 8px 20px rgba(31, 99, 145, 0.25); }
    .btn-login:active { transform: scale(0.97); }
    .login-theme-toggle { top: calc(14px + var(--app-safe-top, 0px)); width: 42px; height: 42px; }
}

/* Sign-in with WorkOS (docs/workos.md). The Google button wears Google's own
   look — white with the four-colour G, its dark twin in the dark theme —
   because that is the button people recognise. */
.btn-sso {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
    padding: 12px; font-weight: 600; border-radius: 12px; margin-bottom: 12px;
}
.btn-sso:hover, .btn-sso:focus { background: #f8faff; color: #1f1f1f; border-color: #c6cbd1; }
.btn-sso .sso-text { display: inline-flex; align-items: center; gap: 10px; }
.btn-sso .sso-logo { flex: none; }
.btn-sso .loading { display: none; }
.btn-sso.is-loading { pointer-events: none; opacity: 0.85; }
.btn-sso.is-loading .sso-text { display: none; }
.btn-sso.is-loading .loading { display: inline; }
[data-bs-theme="dark"] .btn-sso { background: #131314; color: #e3e3e3; border-color: #8e918f; }
[data-bs-theme="dark"] .btn-sso:hover, [data-bs-theme="dark"] .btn-sso:focus { background: #1d1e20; color: #e3e3e3; }
.sso-hint { color: var(--cg-text-muted); font-size: 0.85rem; text-align: center; margin: 0 0 12px; }
/* WorkOS's own page (authkit): the e-mail box, "ou", the provider buttons. */
.sso-email { margin-bottom: 14px; }
#ssoEmailToggle { margin-bottom: 14px; }
.sso-or {
    display: flex; align-items: center; gap: 12px; margin: 16px 0;
    color: var(--cg-text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.sso-or::before, .sso-or::after { content: ""; flex: 1; border-top: 1px solid var(--cg-border); }
.sso-social { margin-bottom: 0; }
.sso-social .btn-sso + .btn-sso { margin-top: 10px; }
.btn-sso .sso-icon { flex: none; width: 20px; text-align: center; font-size: 1.15rem; }
.login-switch { display: block; margin: 0 auto 8px; font-size: 0.9rem; color: var(--primary-accent); text-decoration: none; }
.login-switch:hover { text-decoration: underline; }
.sso-block.with-form .login-switch { display: none !important; }
.sso-block.with-form::after {
    content: "ou entre com e-mail e senha"; display: block; text-align: center;
    color: var(--cg-text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
    margin: 4px 0 16px; border-top: 1px solid var(--cg-border); padding-top: 14px;
}
.sso-progress { text-align: center; color: var(--cg-text-muted); padding: 18px 0; }

@media (max-width: 575.98px) {
    .btn-sso { min-height: 56px; border-radius: 16px; font-size: 1.05rem; }
    .btn-sso:active { transform: scale(0.97); }
    .login-switch { min-height: 48px; }
}

/* "Esqueci minha senha" (services/password-reset.service.js): a quiet link
   under the form, and the note after a new password was saved. */
.login-forgot { display: block; text-align: center; margin: -4px 0 16px; font-size: 0.9rem; }
.login-forgot a { color: var(--primary-accent); text-decoration: none; }
.login-forgot a:hover { text-decoration: underline; }
.login-forgot.is-note { color: var(--cg-text-muted); font-size: 0.82rem; }

@media (max-width: 575.98px) {
    .login-forgot a { display: inline-flex; align-items: center; min-height: 44px; }
}
