.auth-page {
    background: #eef3f6;
    overflow-x: clip;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-page .app-top {
    display: none;
}

.auth-page .app-content {
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-layout {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(420px, .95fr) minmax(480px, 1.05fr);
    overflow-x: clip;
    color: #16233a;
}

.auth-story {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    min-width: 0;
    padding: clamp(28px, 4vw, 58px);
    overflow: hidden;
    color: #f4fbfa;
    background:
        radial-gradient(circle at 88% 12%, rgba(111, 198, 187, .2), transparent 34%),
        radial-gradient(circle at 0 88%, rgba(72, 126, 170, .22), transparent 38%),
        linear-gradient(145deg, #0c2f50 0%, #114473 47%, #155c58 100%);
}

.auth-story::after {
    content: "";
    position: absolute;
    right: -130px;
    bottom: -170px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    box-shadow:
        0 0 0 54px rgba(255, 255, 255, .025),
        0 0 0 108px rgba(255, 255, 255, .018);
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: #fff;
    text-decoration: none;
}

.auth-brand__mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: 11px;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 10px 24px rgba(4, 22, 39, .2);
    font-size: 17px;
    font-weight: 800;
}

.auth-brand strong,
.auth-brand small {
    display: block;
}

.auth-brand strong {
    font-size: 15px;
    letter-spacing: .03em;
}

.auth-brand small {
    margin-top: 2px;
    color: rgba(234, 250, 248, .68);
    font-size: 10px;
    letter-spacing: .06em;
}

.auth-story__content {
    position: relative;
    z-index: 1;
    width: min(610px, 100%);
    margin: auto 0;
    padding: 54px 0;
}

.auth-eyebrow {
    color: #70c6bb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-story h1 {
    max-width: 600px;
    margin: 13px 0 18px;
    color: #fff;
    font-size: clamp(34px, 4.5vw, 58px);
    line-height: 1.06;
    letter-spacing: -.045em;
}

.auth-story__content > p {
    max-width: 560px;
    margin: 0;
    color: rgba(237, 251, 249, .77);
    font-size: clamp(14px, 1.5vw, 17px);
    line-height: 1.7;
}

.auth-points {
    display: grid;
    gap: 13px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}

.auth-points li {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.auth-points li > span {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    flex: none;
    border: 1px solid rgba(112, 198, 187, .35);
    border-radius: 8px;
    color: #9fddd5;
    background: rgba(13, 42, 66, .28);
    font-size: 9px;
    font-weight: 800;
}

.auth-points strong,
.auth-points small {
    display: block;
}

.auth-points strong {
    color: #fff;
    font-size: 13px;
}

.auth-points small {
    margin-top: 3px;
    color: rgba(237, 251, 249, .66);
    font-size: 11.5px;
    line-height: 1.45;
}

.auth-story__foot {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(237, 251, 249, .5);
    font-size: 10.5px;
}

.auth-panel {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: clamp(24px, 5vw, 72px);
    background:
        linear-gradient(rgba(255,255,255,.64), rgba(255,255,255,.64)),
        radial-gradient(circle at 90% 10%, #dbece9, transparent 34%);
}

.auth-card {
    width: min(440px, 100%);
    max-width: 100%;
    min-width: 0;
    padding: clamp(24px, 4vw, 38px);
    background: rgba(255, 255, 255, .92);
    border: 1px solid #dbe4ee;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(13, 35, 57, .12);
}

.auth-card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.auth-card__head > div {
    min-width: 0;
}

.auth-card__icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: none;
    color: #16625d;
    background: #e8f3f1;
    border-radius: 12px;
}

.auth-card__icon svg {
    width: 23px;
    height: 23px;
}

.auth-card h2 {
    margin: 3px 0 0;
    color: #16233a;
    font-size: 23px;
    letter-spacing: -.025em;
}

.auth-google,
.auth-submit {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
}

.auth-google {
    color: #27364b;
    background: #fff;
    border: 1px solid #cfd9e4;
}

.auth-google:hover {
    background: #f7fafc;
    border-color: #aebdca;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #8496a9;
    font-size: 10.5px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e3eaf1;
}

.auth-form,
.auth-field {
    display: grid;
    gap: 8px;
}

.auth-form {
    gap: 16px;
}

.auth-field label {
    color: #36475d;
    font-size: 11.5px;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: #16233a;
    background: #fff;
    border: 1px solid #cfd9e4;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13.5px;
}

.auth-field input:focus,
.auth-google:focus-visible,
.auth-submit:focus-visible {
    outline: none;
    border-color: #16625d;
    box-shadow: 0 0 0 4px rgba(22, 98, 93, .12);
}

.auth-submit {
    margin-top: 3px;
    color: #fff;
    background: #16625d;
    border: 1px solid #16625d;
    box-shadow: 0 10px 20px rgba(22, 98, 93, .18);
}

.auth-submit:hover {
    background: #124f4b;
    border-color: #124f4b;
}

.auth-submit svg {
    width: 17px;
    height: 17px;
}

.auth-alerts {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-alert {
    padding: 10px 12px;
    border: 1px solid #cfdff5;
    border-radius: 9px;
    color: #1f4d8f;
    background: #e9f0fb;
    font-size: 12px;
    line-height: 1.5;
}

.auth-alert--error {
    color: #a4322c;
    background: #fdecea;
    border-color: #f3c6c1;
}

.auth-alert--success {
    color: #10693f;
    background: #e7f6ee;
    border-color: #b9dfcd;
}

.auth-help {
    margin: 20px 0 0;
    padding: 12px;
    color: #5c6b80;
    background: #f4f7fa;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.auth-links a {
    color: #6b7d90;
    font-size: 10.5px;
    text-decoration: none;
}

.auth-links a:hover {
    color: #16625d;
}

@media (max-width: 920px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-story {
        min-height: auto;
        padding: 24px;
    }

    .auth-story__content {
        padding: 54px 0 22px;
    }

    .auth-story h1 {
        font-size: clamp(32px, 8vw, 46px);
    }

    .auth-points,
    .auth-story__foot {
        display: none;
    }

    .auth-panel {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .auth-story {
        padding:
            max(16px, env(safe-area-inset-top))
            max(18px, env(safe-area-inset-right))
            16px
            max(18px, env(safe-area-inset-left));
    }

    .auth-story__content {
        margin: 0;
        padding: 28px 0 4px;
    }

    .auth-story h1 {
        margin: 10px 0 0;
        font-size: clamp(26px, 7.7vw, 32px);
        line-height: 1.08;
        letter-spacing: -.035em;
    }

    .auth-story__content > p {
        display: none;
    }

    .auth-panel {
        place-items: start center;
        padding:
            12px
            max(12px, env(safe-area-inset-right))
            max(16px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
    }

    .auth-card {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .auth-card__head {
        gap: 11px;
        margin-bottom: 20px;
    }

    .auth-card__icon {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }

    .auth-card h2 {
        font-size: clamp(19px, 5.8vw, 22px);
    }

    .auth-google,
    .auth-submit,
    .auth-field input {
        min-height: 48px;
    }

    .auth-field input {
        /* iOS Safari tự zoom khi input nhỏ hơn 16px. */
        font-size: 16px;
    }

    .auth-divider {
        gap: 8px;
        margin: 17px 0;
    }

    .auth-divider span {
        white-space: nowrap;
    }

    .auth-form {
        gap: 14px;
    }

    .auth-help {
        margin-top: 16px;
    }

    .auth-links {
        gap: 8px 14px;
        margin-top: 14px;
    }
}

@media (max-width: 350px) {
    .auth-brand small {
        display: none;
    }

    .auth-story__content .auth-eyebrow {
        display: none;
    }

    .auth-story__content {
        padding-top: 22px;
    }

    .auth-card__icon {
        display: none;
    }

    .auth-card h2 {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-google,
    .auth-submit {
        transition: none;
    }
}
