.password-control {
    position: relative;
    display: block;
    width: 100%;
}

.password-control input {
    width: 100%;
    padding-right: 3.5rem;
}

.workspace .password-toggle {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.workspace .password-toggle:hover {
    background: #ee994a22;
}

.password-toggle svg {
    width: 1.4rem;
    height: 1.4rem;
}

.password-toggle .eye-slash {
    display: none;
}

.password-toggle[aria-pressed="true"] .eye-slash {
    display: initial;
}

.mfa-qr {
    width: fit-content;
    margin: 1.5rem auto;
    padding: 1rem;
    background: white;
    border-radius: 0.75rem;
}

.mfa-secret {
    display: block;
    overflow-wrap: anywhere;
    margin-block: 1rem;
}

.mfa-codes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.7rem;
    padding: 1rem;
    list-style: none;
}

.auth-card .login-submit,
.auth-card .login-register {
    text-align: center;
}

.auth-card .password-strength-row {
    display: grid;
    grid-template-columns: minmax(3rem, 20%) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
}

.auth-card .password-strength-row meter {
    width: 100%;
}

.auth-card .password-strength-row .micro {
    margin: 0;
}

.auth-card .auth-action-spaced {
    margin-bottom: 10px;
}

.auth-card a.auth-action-spaced {
    display: inline-block;
}

.auth-card .recovery-return {
    display: flex;
    justify-content: center;
    margin: 0;
    padding-top: 10px;
}

/* Keep feedback readable and centered inside its owning card or panel. */
.workspace .notice,
.workspace [role="alert"],
.auth-card [role="status"],
.workspace .panel [role="status"] {
    text-align: center;
    overflow-wrap: anywhere;
}

.auth-card .notice,
.workspace .panel .notice {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Center authentication actions while keeping labels and fields aligned. */
.auth-shell .auth-card button:not(.password-toggle),
.auth-shell .auth-card > a.button {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    text-align: center;
    white-space: normal;
}

.auth-shell .auth-card form.stack > a,
.auth-shell .auth-card summary {
    text-align: center;
}

.auth-shell .auth-card form,
.auth-shell .auth-card .login-submit,
.auth-shell .auth-card .auth-action-spaced {
    margin-bottom: 0;
}

.auth-shell .auth-card .auth-secondary-action,
.auth-shell .auth-card .login-register {
    margin: 10px 0 0;
    padding: 0;
    text-align: center;
}

.auth-shell .auth-card .auth-secondary-action button {
    margin-block: 0;
}

/* Shared alignment for login, email verification, recovery and two-factor pages. */
.auth-shell .auth-card,
.auth-shell .auth-card :is(h1, h2, h3, p, summary, code, li, a) {
    text-align: center;
}

.auth-shell .auth-card :is(h1, h2, h3) {
    margin-inline: auto;
}

.auth-shell .auth-card label {
    text-align: left;
}

.auth-shell .auth-card .check {
    justify-content: flex-start;
}


.auth-shell .auth-card .auth-action-group {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.auth-shell .auth-card :is(input, textarea, select) {
    text-align: start;
}

.auth-shell .auth-card input.mfa-code-input {
    text-align: center;
}

.auth-shell .auth-card .auth-action-group > a {
    justify-self: start;
    text-align: left;
}

.auth-shell .auth-card :is(#password-rules, .password-rules) {
    font-size: 10px;
}

.auth-shell .login-card {
    max-width: 560px;
}

.auth-shell .login-card h1 {
    font-size: 33px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .auth-shell .login-card h1 {
        font-size: clamp(14px, 4vw, 24px);
    }
}

#assistant-ia [data-ai-fields]:disabled input,
#assistant-ia [data-ai-fields]:disabled .password-toggle {
    cursor: not-allowed;
}
