/* ==========================================================================
   PEDULI ANAK V2 – LOGIN PAGE STYLES
   ========================================================================== */

.pa-login {
    position: relative;
    min-width: auto;
    background: #e9f4ec;
    overflow: hidden;
    padding: 110px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    align-items: flex-start;
    padding: 95px 24px 0px;
}

.pa-login--signup {
    align-items: flex-start;
    padding: 95px 24px 0px;
}

.pa-login--signup .pa-login__card {
    padding: 28px 40px;
}

.pa-login--signup .pa-login__logo {
    margin-bottom: 10px;
}

.pa-login--signup .pa-login__logo img {
    height: 32px;
}

.pa-login--signup .pa-login__title {
    margin-bottom: 14px;
}

.pa-login--signup .pa-login__google {
    padding: 10px 16px;
}

.pa-login--signup .pa-login__divider {
    margin: 12px 0 12px;
}

.pa-login--signup .pa-login__field {
    margin-bottom: 10px;
}

.pa-login--signup .pa-login__hint {
    margin-top: 4px;
}

.pa-login--signup .pa-login__submit {
    padding: 12px;
    margin-top: 6px;
}

.pa-login--signup .pa-login__signup {
    margin-top: 14px;
}

.pa-login--signup .pa-login__legal {
    margin-top: 10px;
}

/* Decorative clouds */
.pa-login__cloud {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.pa-login__cloud svg {
    width: 100%;
    height: auto;
    display: block;
}

.pa-login__cloud svg path {
    fill: #0095511A;
    fill-opacity: 1;
    opacity: 1;
}

.pa-login__cloud--top-left {
    top: 300px;
    left: 40px;
    width: 280px;
}

.pa-login__cloud--mid-right {
    top: 20%;
    right: 80px;
    width: 250px;
}

.pa-login__photo-left {
    position: absolute;
    bottom: 0;
    left: -336px;
    z-index: 0;
    width: 50vw;
    height: auto;
    pointer-events: none;
    user-select: none;
}

.pa-login__photo-right {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    transform: scale(1.3) translateX(-20px);
}

/* Centered card */
.pa-login__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 24px;
    padding: 36px 40px;
    box-shadow: 0 8px 32px rgba(4, 149, 81, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.pa-login__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.pa-login__logo img {
    height: 38px;
    width: auto;
}

.pa-login__title {
    font-family: var(--pa-font-headline);
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--pa-text-primary);
    text-align: center;
    margin: 0 0 12px;
}

.pa-login__subtitle {
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 24px;
}

/* Continue with Google */
.pa-login__google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 12px 16px;
    font-family: var(--pa-font-default);
    font-size: 15px;
    font-weight: 600;
    color: var(--pa-text-primary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.pa-login__google:not([disabled]):hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.pa-login__google[disabled] {
    cursor: not-allowed;
    opacity: 0.92;
}

.pa-login__google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Or divider */
.pa-login__divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 18px;
    color: var(--pa-text-muted, #6b7280);
    font-size: 14px;
}

.pa-login__divider::before,
.pa-login__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.pa-login__divider span {
    flex-shrink: 0;
}

/* Fields */
.pa-login__field {
    margin-bottom: 16px;
}

.pa-login__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--pa-text-primary);
    margin-bottom: 6px;
}

.pa-login__input-wrap {
    position: relative;
}

.pa-login__input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    font-family: var(--pa-font-default);
    font-size: 14px;
    color: var(--pa-text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.pa-login__input:focus {
    border-color: var(--pa-primary);
    box-shadow: 0 0 0 3px rgba(4, 149, 81, 0.15);
}

.pa-login__input::placeholder {
    color: #9ca3af;
}

.pa-login__field--password .pa-login__input {
    padding-right: 44px;
}

.pa-login__eye-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: #6b7280;
    line-height: 1;
}

.pa-login__eye-btn svg {
    width: 18px;
    height: 18px;
}

.pa-login__eye-btn:focus {
    outline: none;
}

.login-eye-hide {
    display: block;
}

.login-eye-show {
    display: none;
}

.pa-login__error {
    display: block;
    font-size: 1.4rem;
    color: #dc2626;
    margin-top: 5px;
    padding: 0 4px;
}

.pa-login__error:empty {
    display: none;
}

/* Helper hint text below a field (e.g. password requirements on signup) */
.pa-login__hint {
    display: block;
    font-size: 1.25rem;
    color: #64748b;
    margin-top: 6px;
    padding: 0 4px;
    line-height: 1.4;
}

/* .pa-toast styles moved to global.css for site-wide reuse. */

/* Remember me + forgot row */
.pa-login__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 18px;
}

.pa-login__row--names {
    align-items: stretch;
    gap: 16px;
    margin: 0;
}

.pa-login__row--names .pa-login__field {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .pa-login__row--names {
        flex-direction: column;
        gap: 0;
    }
}

.pa-login__remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.pa-login__remember input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pa-login__checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s, background 0.2s;
}

.pa-login__checkbox-custom.is-checked {
    background: var(--pa-primary);
    border-color: var(--pa-primary);
}

.pa-login__checkbox-custom.is-checked::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.pa-login__remember-label {
    font-size: 13px;
    color: #4b5563;
}

.pa-login__forgot {
    font-size: 13px;
    color: var(--pa-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.pa-login__forgot:hover {
    color: var(--pa-primary-hover, #03773f);
    text-decoration: underline;
}

/* Submit + spinner */
.pa-login__submit {
    width: 100%;
    padding: 14px;
    background: var(--pa-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: var(--pa-font-default);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: block;
    text-align: center;
    border: 1px solid var(--pa-primary);
}

.pa-login__submit:hover {
    background: white;
    color: var(--pa-primary);
    border: 1px solid var(--pa-primary);
}

.pa-login__submit:active {
    transform: scale(0.99);
}

.pa-login__submit:focus:not(:hover) {
    color: #fff;
    text-decoration: none;
}

.pa-login__spinner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: var(--pa-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-family: var(--pa-font-default, 'Inter', sans-serif);
    font-weight: 600;
    text-align: center;
    cursor: not-allowed;
    opacity: 0.85;
}

.pa-login__spin-icon {
    flex-shrink: 0;
    animation: pa-spin 0.8s linear infinite;
}

@keyframes pa-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Sign-up + legal */
.pa-login__signup {
    text-align: center;
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--pa-text-primary);
}

.pa-login__signup-link {
    color: var(--pa-primary) !important;
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.pa-login__signup-link:hover {
    text-decoration: underline;
}

.pa-login__legal {
    text-align: center;
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: #6b7280;
}

.pa-login__legal a {
    color: inherit;
    text-decoration: underline;
}

.pa-login__info {
    background: #e8f6ea;
    color: #177D3F;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1.4rem;
    margin-bottom: 16px;
    text-align: center;
}

.pa-login__info--error {
    background: #fee2e2;
    color: #dc2626;
}

/* Submit rendered as a link (used by reset-password "Back to login" CTAs) */
.pa-login__submit--link {
    display: block;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
    box-sizing: border-box;
}

.pa-login__submit--link:hover {
    color: #fff;
}

@media (max-width: 1230px) {
    .pa-login {
        padding: 0;
        min-height: 100%;
        align-items: stretch;
        justify-content: stretch;
    }

    .pa-login__photo-left,
    .pa-login__photo-right {
        display: none;
    }

    .pa-login__cloud--top-left {
        width: 240px;
        top: 24px;
        left: -60px;
    }

    .pa-login__cloud--mid-right {
        width: 240px;
        top: auto;
        bottom: 24px;
        right: -60px;
    }

    .pa-login__card {
        width: 100%;
        max-width: none;
        min-height: 100%;
        border-radius: 0;
        box-shadow: none;
        padding: 56px 40px;
        display: flex;
        flex-direction: column;
        background: linear-gradient(180deg, #FFFFFF 0%, #E4FFEE 100%);
    }
}

@media (max-width: 1230px) {
    .pa-login__card {
        padding: 40px 22px;
    }

    .pa-login__title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .pa-login__logo img {
        height: 34px;
    }
}

@media (max-width: 1230px) {

    html:has(.pa-login--reset),
    body:has(.pa-login--reset) {
        height: 100%;
        height: 100dvh;
        overflow: hidden;
        overscroll-behavior: none;
    }

    body:has(.pa-login--reset) {
        background: #E4FFEE;
    }

    .pa-login--reset {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .pa-login--reset .pa-login__card {
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

body:has(.pa-login) .hv2-header__menu-pill {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.65),
        0 10px 26px rgba(0, 0, 0, 0.28);
}

/* FIGMA LOGIN ALIGNMENT — Account / 1. Sign in (5525:2668 / 5663:5500)
   + Account / 2. Forgot password (5525:2716 / 5663:5548): both pages share the card.
   Since 2026-09-21 the sign-up page (no frame of its own) and /account-setup/ share it too:
   the scope is plain `.pa-login`, later than every legacy `.pa-login--signup` rule. */
.pa-login {
    align-items: center;
    background: url('../images/login-sky-background.png') center / cover no-repeat;
    box-sizing: border-box;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
}

/* Frame: card top 105 at 900px (centred). On short viewports the centred card slid
   under the 80px overlay header pill, so keep at least 60px above it (logo starts
   16px below the pill) without adding page scroll: a top margin on a centred flex
   item shifts it down by half the margin → margin = 2·60 − (100vh − 690). */
@media (min-width: 1231px) {

    /* Desktop only: on a phone (100vh ≈ 664 with Safari's bars) the same formula
       pushed the card 176px down — and its specificity beat the mobile margin rule. */
    .pa-login:not(.pa-login--signup):not(.pa-login--reset):not(.pa-login--setup) .pa-login__card {
        margin-top: max(0px, calc(840px - 100vh));
    }
}

/* Browser autofill paints the field light blue/yellow; the frame's fields stay white. */
.pa-login .pa-login__input:-webkit-autofill,
.pa-login .pa-login__input:-webkit-autofill:hover,
.pa-login .pa-login__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #101828;
    caret-color: #101828;
    transition: background-color 9999s ease-out 0s;
}

.pa-login .pa-login__cloud,
.pa-login .pa-login__photo-right {
    display: none;
}

.pa-login__watermark {
    display: none;
}

.pa-login .pa-login__card {
    align-items: center;
    border-radius: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: none;
    padding: 36px 40px 32px;
    width: 480px;
}

.pa-login .pa-login__logo {
    justify-content: center;
    margin: 0;
    width: 100%;
}

.pa-login .pa-login__logo img {
    height: 36px;
    width: 145px;
}

/* Heading = title + subtitle, gap 6 (Figma "Heading" frame) — a wrapper so the
   card's 20px gap is not inserted between the two lines. */
.pa-login .pa-login__heading {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.pa-login .pa-login__title {
    color: #101828;
    font: 600 24px/32px var(--pa-font-default);
    /* !important: global.css `.home-v2-page h1 { font-family: var(--pa-font-headline) !important }`
       (legacy homepage rule) otherwise forces Keep Calm on this Inter title. */
    font-family: var(--pa-font-default) !important;
    margin: 0;
    text-align: center;
}

.pa-login .pa-login__subtitle {
    color: #475467;
    font: 500 14px/20px var(--pa-font-default);
    margin: 0;
    text-align: center;
    width: 100%;
}

.pa-login .pa-login__google,
.pa-login .pa-login__submit,
.pa-login .pa-login__spinner {
    align-items: center;
    border-radius: 12px;
    box-sizing: border-box;
    display: flex;
    font: 600 16px/24px var(--pa-font-default);
    gap: 8px;
    height: 48px;
    justify-content: center;
    min-height: 48px;
    padding: 0 14px;
}

/* The spinner is a hidden twin of the submit button: the JS swaps them with inline
   `display` on submit, so the shared flex rule above must not make it visible. */
.pa-login .pa-login__spinner {
    display: none;
}

/* Sign in sits 20px under the form in Figma; the button lives inside the form (gap 14) */
.pa-login .pa-login__submit,
.pa-login .pa-login__spinner {
    margin-top: 6px;
}

.pa-login .pa-login__submit-icon {
    height: 18px;
    width: 18px;
}

.pa-login .pa-login__google {
    border-color: #d0d5dd;
    color: #344054;
    gap: 8px;
}

/* "— or —": two 10px stubs, left-aligned (Figma "Or" frame, not a full-width rule) */
.pa-login .pa-login__divider {
    color: #667085;
    font: 500 14px/20px var(--pa-font-default);
    gap: 12px;
    justify-content: center !important;
    margin: 0;
    width: 100%;
}

.pa-login .pa-login__divider::before,
.pa-login .pa-login__divider::after {
    background: #eaecf0;
    flex: 0 0 10px;
    width: 10px;
}

.pa-login #sign-in-form,
.pa-login #sign-up-form,
.pa-login #pa-2fa-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.pa-login .pa-login__field,
.pa-login .pa-login__row,
.pa-login .pa-login__remember {
    margin: 0;
    /* legacy `label { margin-bottom: 5px }` made the row 25px instead of 20 */
}

.pa-login .pa-login__label {
    color: #344054;
    font: 600 14px/20px var(--pa-font-default);
    margin-bottom: 6px;
}

.pa-login .pa-login__input {
    border-color: #d0d5dd;
    border-radius: 12px;
    color: #101828;
    font: 400 16px/24px var(--pa-font-default);
    height: 48px;
    padding: 0 14px;
}

/* Password eye: 18px icon, 15px from the box edge (14 pad + 1 border), 10px from the text.
   Logical properties so the `ae` RTL layout mirrors without an rtl.css rule. */
.pa-login .pa-login__field--password .pa-login__input {
    padding-inline-end: 42px;
}

.pa-login .pa-login__eye-btn {
    color: #667085;
    inset-inline-end: 15px;
    inset-inline-start: auto;
    padding: 0;
}

/* Checkbox 20×20 r6. Unchecked keeps the existing 1.5px #d1d5db outline (state not in
   the frame); checked = #049551 fill + 12px check-thin icon (Figma stroke 2.5). */
.pa-login .pa-login__checkbox-custom {
    border-radius: 6px;
    height: 20px;
    width: 20px;
}

.pa-login .pa-login__checkbox-custom.is-checked {
    background: #049551;
    border-color: #049551;
}

.pa-login .pa-login__checkbox-custom.is-checked::after {
    content: none;
}

.pa-login .pa-login__checkbox-icon {
    color: #fff;
    display: none;
    height: 12px;
    stroke-width: 2.5;
    width: 12px;
}

.pa-login .pa-login__checkbox-custom.is-checked .pa-login__checkbox-icon {
    display: block;
}

.pa-login .pa-login__remember-label {
    color: #344054;
    font: 500 14px/20px var(--pa-font-default);
}

.pa-login .pa-login__forgot {
    color: var(--pa-primary-dark);
    font: 600 14px/20px var(--pa-font-default);
}

.pa-login .pa-login__submit,
.pa-login .pa-login__spinner {
    background: var(--pa-primary-dark);
    border-color: var(--pa-primary-dark);
}

/* Hover state is not in the frame; keep the existing inverse hover in the Figma colour */
.pa-login .pa-login__submit:hover {
    border-color: var(--pa-primary-dark);
    color: var(--pa-primary-dark);
    background: white;
}

/* "Don't have an account?" + 4px + "Create one" (Figma "Signup" frame, gap 4) */
.pa-login .pa-login__signup {
    color: #475467;
    display: flex;
    font: 500 14px/20px var(--pa-font-default);
    gap: 4px;
    justify-content: center;
    margin: 0;
    text-align: center;
    width: 100%;
}

.pa-login .pa-login__signup-link {
    color: var(--pa-primary-dark) !important;
    font-weight: 600;
    margin: 0;
}

.pa-login .pa-login__legal {
    color: #667085;
    font: 500 12px/18px var(--pa-font-default);
    margin: 0;
}

@media (max-width: 1230px) {

    /* The frame reserves the top 97px of the gradient for the site header: keep the
       overlay header floating (global.css makes it `position: relative` on phones),
       same per-page pattern as `body:has(.dash-page) .hv2-header--overlay`. */
    body:has(.pa-login) .hv2-header--overlay {
        background: none;
        pointer-events: auto;
        position: absolute;
    }

    /* Light menu tab, as the landing page and the other phone pages (user 2026-11-09): #e8f3ec, r 0 0 14 14,
       menu-01 / close #037a42 1.7143, the same on hover / tap; no white ring (that was for the green tab) */
    body:has(.pa-login) .hv2-header__menu-pill,
    body:has(.pa-login) .hv2-header__menu-pill:hover,
    body:has(.pa-login) .hv2-header__menu-pill:active,
    body:has(.pa-login) .hv2-header__menu-pill.is-open {
        background: #e8f3ec;
        color: #037a42;
        border-radius: 0 0 14px 14px;
        box-shadow: none;
    }

    body:has(.pa-login) .hv2-header__menu-pill svg,
    body:has(.pa-login) .hv2-header__menu-icon-close svg {
        stroke: #037a42;
        stroke-width: 1.7143;
    }

    .pa-login {
        align-items: flex-start;
        background: linear-gradient(180deg, var(--pa-primary) 0%, var(--pa-primary-deep) 100%);
        justify-content: stretch;
        min-height: 100vh;
        padding: 0;
    }

    .pa-login .pa-login__watermark {
        display: block;
        height: 376.425px;
        max-width: none;
        /* global `img { max-width: 100% }` shrank the 420px mark to 390 */
        pointer-events: none;
        position: absolute;
        right: -140px;
        top: -178px;
        width: 420px;
        z-index: 0;
    }

    /* 16px side margins, 97px above and below the card (keyboard-safe bottom spacing) */
    .pa-login .pa-login__card {
        background: #fff;
        /* the legacy phone rule paints a white→#E4FFEE gradient; the frame is solid white */
        border-radius: 24px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        gap: 16px;
        margin: 97px 16px 97px;
        min-height: 0;
        padding: 28px 20px;
        width: calc(100% - 32px);
    }

    .pa-login .pa-login__logo {
        justify-content: center;
    }

    .pa-login .pa-login__heading {
        align-items: flex-start;
        gap: 6px;
    }

    .pa-login .pa-login__title {
        font: 600 24px/32px var(--pa-font-default);
        text-align: center;
        width: 100%;
    }

    .pa-login .pa-login__subtitle {
        font: 500 14px/20px var(--pa-font-default);
        margin: 0;
        text-align: center;
    }

    .pa-login .pa-login__divider {
        justify-content: center;
    }

    .pa-login .pa-login__google,
    .pa-login .pa-login__submit,
    .pa-login .pa-login__spinner,
    .pa-login .pa-login__input {
        height: 48px;
        min-height: 48px;
    }

    /* card gap is 16 on phones: form gap 14 + 2 */
    .pa-login .pa-login__submit,
    .pa-login .pa-login__spinner {
        margin-top: 2px;
    }

    .pa-login .pa-login__signup {
        justify-content: center;
        text-align: left;
        width: 100%;
    }
}

/* FIGMA RESET ALIGNMENT — Account / 2. Forgot password (5525:2716 / 5663:5548).
   Shares the card system above; only the pieces the login frame does not have. */

/* Focused field as drawn in the frame: 2px primary outline, no ring
   (padding stays 14 → text at 16 like the metadata). */
.pa-login .pa-login__input:focus {
    border: 2px solid #049551;
    box-shadow: none;
}

/* the set-new-password form has no id — same column as #sign-in-form */
.pa-login--reset form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

/* "← Back to sign in": 16px arrow · 6 · 600 14/20 primary-dark, 20px tall */
.pa-login .pa-login__back {
    align-items: center;
    color: var(--pa-primary-dark);
    display: inline-flex;
    font: 600 14px/20px var(--pa-font-default);
    gap: 6px;
    height: 20px;
    text-decoration: none;
}

.pa-login .pa-login__back:hover {
    text-decoration: underline;
}

.pa-login .pa-login__back-icon {
    flex-shrink: 0;
    height: 16px;
    stroke-width: 2;
    width: 16px;
}

/* Note box: #eef6f1 r12, pad 12/14, gap 8, icon 16 top-aligned, 500 12/18 #475467 */
.pa-login .pa-login__note {
    align-items: flex-start;
    background: #eef6f1;
    border-radius: 12px;
    box-sizing: border-box;
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    width: 100%;
}

.pa-login .pa-login__note-icon {
    color: var(--pa-primary-dark);
    flex-shrink: 0;
    height: 16px;
    width: 16px;
}

.pa-login .pa-login__note p {
    color: #475467;
    flex: 1 1 0;
    font: 500 12px/18px var(--pa-font-default);
    margin: 0;
    min-width: 0;
}

/* error variant (invalid / expired link, mismatch) — not in the frame, preserved state */
.pa-login .pa-login__note--error {
    background: #fee2e2;
}

.pa-login .pa-login__note--error .pa-login__note-icon,
.pa-login .pa-login__note--error p {
    color: #dc2626;
}

.pa-login .pa-login__submit--link {
    line-height: 24px;
}

@media (max-width: 1230px) {

    /* The legacy phone rules lock the page to 100dvh and scroll the card by itself;
       the frame is a centred card on the gradient, like the sign-in page. */
    html:has(.pa-login--reset),
    body:has(.pa-login--reset) {
        height: auto;
        overflow: visible;
        overscroll-behavior: auto;
    }

    body:has(.pa-login--reset) {
        background: none;
    }

    .pa-login--reset {
        height: auto;
        min-height: 100vh;
        overflow: hidden;
    }

    .pa-login--reset .pa-login__card {
        height: auto;
        overflow: visible;
    }

    /* Both frames centre the card in the 844 viewport (sign-in 97, reset 196). The
       symmetric 97px padding keeps those numbers exact there and, on shorter phones
       (Safari bars: ~664), keeps the card 97px clear of the 80px floating header —
       64 sat right under the menu (user, 2026-09-21). */
    .pa-login {
        align-items: center;
        box-sizing: border-box;
        justify-content: center;
        padding: 97px 0;
    }

    .pa-login .pa-login__card {
        margin: 0 16px;
    }

    /* frame 5663:5548 puts the mark at −40 (sign-in: −178); specificity must beat
       `.pa-login .pa-login__watermark` above */
    .pa-login.pa-login--reset .pa-login__watermark {
        top: -40px;
    }

    .pa-login .pa-login__back {
        align-self: center;
    }
}

@media (min-width: 1231px) {
    .pa-login.pa-login--setup .pa-login__card {
        margin-top: clamp(0px, calc(894px - 100vh), 75px);
    }
}

.pa-login.pa-login--setup .pa-setup__children {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.pa-login.pa-login--setup .pa-setup__child {
    align-items: center;
    background: #eef6f1;
    border-radius: 12px;
    box-sizing: border-box;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    width: 100%;
}

.pa-login.pa-login--setup .pa-setup__photo {
    background: #fff;
    border: 1.5px solid var(--pa-primary);
    border-radius: 10px;
    box-sizing: border-box;
    flex: 0 0 40px;
    height: 40px;
    overflow: hidden;
    width: 40px;
}

.pa-login.pa-login--setup .pa-setup__photo img {
    display: block;
    height: 100%;
    object-fit: cover;
    /* the uncropped 'medium' portrait, top kept so the head is never cut (user 2026-10-28) */
    object-position: 50% 10%;
    width: 100%;
}

.pa-login.pa-login--setup .pa-setup__child[hidden] {
    display: none;
}

/* "+3 more": the rows after the first two, shown on click (user 2026-10-28) */
.pa-login.pa-login--setup .pa-setup__more {
    background: none;
    border: 1px dashed #b7dcc6;
    border-radius: 12px;
    color: var(--pa-primary);
    cursor: pointer;
    font: 600 14px/20px var(--pa-font-default);
    padding: 10px 12px;
    width: 100%;
}

.pa-login.pa-login--setup .pa-setup__more:hover,
.pa-login.pa-login--setup .pa-setup__more:focus-visible {
    background: #eef6f1;
}

.pa-login.pa-login--setup .pa-setup__child-text {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
}

.pa-login.pa-login--setup .pa-setup__name {
    color: #101828;
    font: 600 14px/20px var(--pa-font-default);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pa-login.pa-login--setup .pa-setup__type {
    display: none;
    /* desktop: inline after the name */
}

.pa-login.pa-login--setup .pa-setup__meta {
    color: #475467;
    font: 500 12px/18px var(--pa-font-default);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pa-login.pa-login--setup .pa-setup__meta--short,
.pa-login.pa-login--setup .pa-setup__cta--short {
    display: none;
}

/* Form: same column as #sign-in-form (gap 14); hint 500 12/18 #667085, 6 under the input */
.pa-login.pa-login--setup #pa-setup-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.pa-login.pa-login--setup .pa-login__hint {
    color: #667085;
    font: 500 12px/18px var(--pa-font-default);
    margin: 6px 0 0;
    padding: 0;
    white-space: nowrap;
}

/* the pre-filled address is read-only but drawn like any field */
.pa-login.pa-login--setup .pa-login__input[readonly] {
    background: #fff;
    color: #101828;
    cursor: default;
}

.pa-login.pa-login--setup .pa-login__input[readonly]:focus {
    border: 1px solid #d0d5dd;
}

/* Google sits after the CTA in this frame — no divider, card gap 20 */
.pa-login.pa-login--setup .pa-login__google {
    margin: 0;
}

@media (max-width: 1230px) {

    /* Frame: card top 64 / bottom 52 on the 914 frame. Top follows the sign-in
       ruling (97 — 64 sat right under the floating menu, user 2026-09-21). */
    .pa-login.pa-login--setup {
        padding: 97px 0 52px;
    }

    /* mark at −268 in this frame (sign-in −178, reset −40) */
    .pa-login.pa-login--setup .pa-login__watermark {
        top: -268px;
    }

    /* centred like the title and the sign-in / reset subtitles (user 2026-10-31: phones stay centred; frame 5663:5584 is left) */
    .pa-login.pa-login--setup .pa-login__subtitle {
        text-align: center;
        width: 100%;
    }

    /* Child row: pad 12/14, gap 12, photo 48; three lines 600 15/22 · 500 13/18 · 400 12/18, gap 1 */
    .pa-login.pa-login--setup .pa-setup__child {
        gap: 12px;
        padding: 12px 14px;
    }

    .pa-login.pa-login--setup .pa-setup__photo {
        flex-basis: 48px;
        height: 48px;
        width: 48px;
    }

    .pa-login.pa-login--setup .pa-setup__child-text {
        gap: 1px;
    }

    .pa-login.pa-login--setup .pa-setup__name {
        font: 600 15px/22px var(--pa-font-default);
        white-space: normal;
    }

    .pa-login.pa-login--setup .pa-setup__type-inline {
        display: none;
    }

    .pa-login.pa-login--setup .pa-setup__type {
        color: #344054;
        display: block;
        font: 500 13px/18px var(--pa-font-default);
        margin: 0;
    }

    .pa-login.pa-login--setup .pa-setup__meta {
        font: 400 12px/18px var(--pa-font-default);
        white-space: normal;
    }

    .pa-login.pa-login--setup .pa-setup__meta--long,
    .pa-login.pa-login--setup .pa-setup__cta--long {
        display: none;
    }

    .pa-login.pa-login--setup .pa-setup__meta--short,
    .pa-login.pa-login--setup .pa-setup__cta--short {
        display: inline;
    }

    .pa-login.pa-login--setup .pa-login__hint {
        white-space: normal;
    }

    .pa-login.pa-login--setup .pa-login__submit {
        padding: 0 20px;
    }
}

/* FIGMA SIGNUP ALIGNMENT — sign-up page on the sign-in card system (user, 2026-09-21;
   no Figma frame: every number is the sign-in frame's). Only what sign-in does not have. */

/* card 766 tall (one-line subtitle, two-line hint) → ≥75px under the header pill, no page scroll from 916px up */
@media (min-width: 1231px) {
    .pa-login.pa-login--signup .pa-login__card {
        margin-top: clamp(0px, calc(916px - 100vh), 75px);
    }
}

/* First / last name side by side: two equal columns, 16 gap (the donor-card row) */
.pa-login .pa-login__row--names {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    width: 100%;
}

.pa-login .pa-login__row--names .pa-login__field {
    min-width: 0;
}

/* hint under a field: 500 12/18 #667085, 6 under the input (frame 3's rule) */
.pa-login .pa-login__hint {
    color: #667085;
    display: block;
    font: 500 12px/18px var(--pa-font-default);
    margin: 6px 0 0;
    padding: 0;
}

@media (max-width: 1230px) {

    /* stacked names on phones, same 14 rhythm as the other fields */
    .pa-login .pa-login__row--names {
        gap: 14px;
        grid-template-columns: 1fr;
    }
}

/* ===========================================================================
   TWO-STEP VERIFICATION: the code step (2026-09-28). No frame: this card's
   own field / checkbox / button, plus text links in the "Forgot password?" style.
   =========================================================================== */
.pa-login .pa-2fa-code {
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 6px;
    text-align: center;
}

.pa-login .pa-2fa-alert[hidden] {
    display: none;
}

.pa-login .pa-2fa-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pa-login .pa-2fa-link {
    padding: 0;
    border: 0;
    background: none;
    font: 600 14px/20px var(--pa-font-default);
    color: var(--pa-primary-dark);
    text-decoration: none;
    cursor: pointer;
}
