body.auth-page {
    margin: 0;
    background: #fff;
    color: #222;
    min-height: 100dvh;
}

.auth-screen {
    position: relative;
    min-height: 100dvh;
    overflow-x: hidden;
    background: #fff;
}

.auth-gradient {
    position: absolute;
    inset: 0 0 auto 0;
    height: 42%;
    background: linear-gradient(180deg, #d9efff 0%, #eaf6ff 55%, #fff 100%);
    pointer-events: none;
}

.auth-deco {
    position: absolute;
    top: 2.5rem;
    right: 1rem;
    width: 7rem;
    height: 7rem;
    pointer-events: none;
    opacity: 0.7;
}

.auth-deco span {
    position: absolute;
    display: block;
    border-radius: 0.6rem;
}

.auth-deco span:nth-child(1) {
    top: 0;
    right: 0.5rem;
    width: 3.5rem;
    height: 3.5rem;
    transform: rotate(12deg);
    background: rgba(185, 224, 255, 0.4);
}

.auth-deco span:nth-child(2) {
    top: 2rem;
    right: 2.5rem;
    width: 4rem;
    height: 4rem;
    transform: rotate(-6deg);
    background: rgba(159, 210, 255, 0.55);
}

.auth-deco span:nth-child(3) {
    right: 0;
    bottom: 0;
    width: 3rem;
    height: 3rem;
    transform: rotate(20deg);
    background: rgba(204, 233, 255, 0.7);
}

.auth-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 28rem;
    min-height: 100dvh;
    margin: 0 auto;
    padding: max(0.75rem, env(safe-area-inset-top)) 1.25rem 2rem;
    box-sizing: border-box;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-left: -0.5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #222;
    cursor: pointer;
}

.auth-back:hover {
    background: rgba(0, 0, 0, 0.05);
}

.auth-title {
    margin: 0.25rem 0 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #111;
}

.auth-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-top: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-field {
    display: flex;
    align-items: center;
    height: 3rem;
    padding: 0 0.875rem;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #fff;
}

.auth-field input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #222;
    font-size: 15px;
    box-shadow: none;
}

.auth-field input::placeholder {
    color: #b0b0b0;
}

.auth-eye,
.auth-code-btn {
    flex: 0 0 auto;
    margin-left: 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #c0c0c0;
    cursor: pointer;
}

.auth-code-btn {
    color: #5bb8f5;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.auth-code-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.auth-message {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.auth-message.is-error {
    color: #ef4444;
}

.auth-message.is-info {
    color: #5bb8f5;
}

.auth-message[hidden] {
    display: none;
}

.auth-submit {
    height: 3rem;
    margin-top: 0.5rem;
    border: 0;
    border-radius: 999px;
    background: #5bb8f5;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-submit:disabled {
    opacity: 0.55;
    cursor: default;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    color: #8a8a8a;
    font-size: 14px;
}

.auth-links a,
.auth-inline-link {
    color: #5bb8f5;
    text-decoration: none;
}

.auth-center {
    margin-top: 1rem;
    color: #8a8a8a;
    font-size: 14px;
    text-align: center;
}

.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
    color: #666;
    font-size: 13px;
    line-height: 1.45;
}

.auth-terms input {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: #5bb8f5;
}

.auth-hint {
    margin: -0.25rem 0 0;
    color: #8a8a8a;
    font-size: 13px;
    line-height: 1.45;
}

.auth-google {
    margin-top: auto;
    padding-top: 4rem;
}

.auth-google.is-compact {
    margin-top: 2rem;
    padding-top: 0;
}

.auth-divider {
    position: relative;
    margin-bottom: 1.5rem;
    color: #b0b0b0;
    font-size: 13px;
    text-align: center;
}

.auth-divider span {
    position: relative;
    z-index: 1;
    padding: 0 0.75rem;
    background: #fff;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    border-top: 1px solid #ececec;
}

.auth-google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.auth-google-btn svg {
    width: 1.75rem;
    height: 1.75rem;
}

.auth-google-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.auth-google-row {
    display: flex;
    justify-content: center;
}

.auth-extra {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .auth-deco {
        right: 2.5rem;
    }
}
