/**
 * Shared login / 2FA / passkey auth screens — mobile-first full viewport.
 */
body.login-body {
    margin: 0;
    background: #f2f4f8;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Inter", "Noto Sans", Arial, sans-serif;
}

.login-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    gap: 14px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    padding: 22px 18px;
    box-sizing: border-box;
}

.login-brand {
    text-align: center;
    margin-bottom: 16px;
}

.login-brand-logo-img {
    width: min(200px, 70vw);
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.login-brand-subtitle {
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 1.05rem;
}

.login-field {
    margin-bottom: 14px;
}

.login-field label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 600;
}

.login-field input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    min-height: 48px;
    height: auto;
    padding: 12px 14px;
    margin: 0;
    font-size: 16px; /* avoid iOS zoom */
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-field input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.login-field--otp input {
    font-size: 1.35rem;
    letter-spacing: 0.35em;
    text-align: center;
}

.login-helper {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0 0 16px;
}

.login-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-actions .cb-button,
.login-card .login-submit {
    width: 100%;
    min-height: 48px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

.login-back,
.login-alt {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 0.95rem;
}

.login-back a,
.login-alt a,
a.login-back {
    color: #1f5fd0;
    text-decoration: none;
}

.login-email-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: #0f172a;
    word-break: break-all;
}

.login-email-chip button {
    border: none;
    background: none;
    color: #1f5fd0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 0;
}

.login-step[hidden] {
    display: none !important;
}

.login-qr {
    display: block;
    margin: 0 auto 14px;
    width: min(220px, 70vw);
    height: auto;
    aspect-ratio: 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.login-secret {
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin: 0 0 14px;
}

#cb-2fa-status,
#cb-login-status {
    display: none;
    margin-bottom: 12px;
}

#cb-2fa-status.is-error,
#cb-login-status.is-error {
    display: block;
}

/* —— Mobile: form fills the screen —— */
@media (max-width: 720px) {
    body.login-body {
        background: #fff;
    }

    .login-screen {
        padding: 0;
        gap: 0;
        justify-content: stretch;
        align-items: stretch;
    }

    .login-lang-switcher-wrap {
        position: absolute;
        top: 10px;
        right: 12px;
        z-index: 2;
    }

    .login-card {
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 56px 22px 32px;
        display: flex;
        flex-direction: column;
    }

    .login-brand {
        margin-bottom: 28px;
    }

    .login-brand-logo-img {
        width: min(220px, 72vw);
    }

    .login-brand-subtitle {
        font-size: 1.15rem;
        margin-top: 12px;
    }

    .login-field {
        margin-bottom: 18px;
    }

    .login-field label {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .login-field input {
        min-height: 56px;
        padding: 14px 16px;
        font-size: 17px;
        border-radius: 12px;
    }

    .login-field--otp input {
        font-size: 1.5rem;
        min-height: 64px;
    }

    .login-helper {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .login-actions {
        margin-top: 12px;
        gap: 12px;
    }

    .login-actions .cb-button,
    .login-card .login-submit {
        min-height: 56px;
        font-size: 1.05rem;
        border-radius: 12px;
    }

    .login-back,
    .login-alt {
        margin-top: 22px;
        font-size: 1rem;
    }

    .login-email-chip {
        padding: 14px 14px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .login-card .login-form-footer {
        margin-top: auto;
        padding-top: 28px;
    }
}
