.auth-page {
    min-width: 320px;
    min-height: 100dvh;
    margin: 0;
    padding: 28px 16px;
    display: grid;
    place-items: center;
    color: var(--ui-text);
    background: var(--ui-bg);
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    letter-spacing: 0;
}

.auth-shell {
    width: min(440px, 100%);
    display: grid;
    gap: 14px;
}

.auth-brand {
    padding: 0 2px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.auth-brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: var(--ui-radius);
    background: var(--ui-brand-strong);
    color: #fff;
}

.auth-brand-mark .lucide {
    width: 21px;
    height: 21px;
}

.auth-brand > div {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.auth-brand strong {
    color: var(--ui-text);
    font-size: 15px;
    font-weight: 780;
}

.auth-brand span:last-child {
    color: var(--ui-text-faint);
    font-size: 12px;
}

.auth-panel {
    overflow: hidden;
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-md);
}

.auth-heading {
    padding: 24px 24px 18px;
    display: grid;
    gap: 7px;
    border-bottom: 1px solid var(--ui-line);
}

.auth-kicker {
    color: var(--ui-brand);
    font-size: 12px;
    font-weight: 750;
}

.auth-heading h1 {
    margin: 0;
    color: var(--ui-text);
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0;
}

.auth-heading p,
.auth-security-note p {
    margin: 0;
    color: var(--ui-text-soft);
    font-size: 13px;
    line-height: 1.6;
}

.auth-form {
    padding: 22px 24px 24px;
    display: grid;
    gap: 15px;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field label {
    color: var(--ui-text);
    font-size: 13px;
    font-weight: 700;
}

.auth-field > input,
.auth-password-field {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--ui-line-strong);
    border-radius: var(--ui-radius);
    background: var(--ui-surface);
}

.auth-field > input,
.auth-password-field input {
    min-width: 0;
    height: 44px;
    padding: 0 13px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ui-text);
    font: inherit;
    font-size: 16px;
    letter-spacing: 0;
}

.auth-field > input:focus,
.auth-password-field:focus-within {
    border-color: var(--ui-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-focus) 18%, transparent);
}

.auth-password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
}

.auth-password-field button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--ui-radius);
    background: transparent;
    color: var(--ui-text-faint);
}

.auth-password-field button:hover {
    color: var(--ui-brand);
    background: var(--ui-brand-soft);
}

.auth-password-field .lucide {
    width: 18px;
    height: 18px;
}

.auth-field-help {
    color: var(--ui-text-faint);
    font-size: 12px;
}

.auth-submit,
.auth-secondary {
    min-height: 46px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--ui-radius);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
}

.auth-submit {
    border: 1px solid var(--ui-brand-strong);
    background: var(--ui-brand-strong);
    color: #fff;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.68;
}

.auth-secondary {
    border: 1px solid var(--ui-line-strong);
    background: var(--ui-surface);
    color: var(--ui-text-soft);
}

.auth-submit .lucide,
.auth-secondary .lucide {
    width: 17px;
    height: 17px;
}

.auth-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.auth-actions.single {
    grid-template-columns: 1fr;
}

.auth-message {
    padding: 11px 12px;
    border: 1px solid;
    border-radius: var(--ui-radius);
    font-size: 13px;
    line-height: 1.55;
}

.auth-message[hidden],
.auth-actions [hidden] {
    display: none;
}

.auth-message.error {
    border-color: color-mix(in srgb, var(--ui-danger) 35%, var(--ui-line));
    background: var(--ui-danger-soft);
    color: var(--ui-danger);
}

.auth-message.success {
    border-color: color-mix(in srgb, var(--ui-success) 35%, var(--ui-line));
    background: var(--ui-success-soft);
    color: var(--ui-success);
}

.auth-security-note {
    margin: 0 24px 22px;
    padding-top: 14px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 9px;
    border-top: 1px solid var(--ui-line);
}

.auth-security-note .lucide {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    color: var(--ui-brand);
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--ui-text-faint);
    font-size: 11px;
}

.auth-footer strong {
    color: var(--ui-text-soft);
}

@media (max-width: 520px) {
    .auth-page {
        padding: 18px 10px;
        place-items: start center;
    }

    .auth-heading,
    .auth-form {
        padding-inline: 18px;
    }

    .auth-security-note {
        margin-inline: 18px;
    }

    .auth-actions {
        grid-template-columns: 1fr;
    }
}
