:root {
    --auth-brand-950: #3b0764;
    --auth-brand-900: #581c87;
    --auth-brand-800: #6d28d9;
    --auth-brand-700: #7c3aed;
    --auth-brand-600: #8b5cf6;
    --auth-brand-500: #af52de;
    --auth-ink-950: #0b1020;
    --auth-ink-800: #1e293b;
    --auth-ink-600: #475569;
    --auth-ink-500: #64748b;
    --auth-line: #dbe2ef;
    --auth-bg: #f7f9fc;
    --auth-card-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body.auth-page {
    font-family: "Pretendard", "Inter", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    color: var(--auth-ink-950);
    letter-spacing: -0.02em;
    background:
        radial-gradient(760px 420px at 8% 10%, rgba(175, 82, 222, 0.26) 0%, transparent 58%),
        radial-gradient(720px 380px at 96% 92%, rgba(124, 58, 237, 0.16) 0%, transparent 60%),
        linear-gradient(180deg, #fcfbff 0%, var(--auth-bg) 100%);
    display: grid;
    place-items: center;
    padding: 18px;
}

.auth-shell {
    width: min(1120px, 100%);
    border-radius: 30px;
    border: 1px solid rgba(219, 226, 239, 0.9);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--auth-card-shadow);
    overflow: hidden;
}

.auth-shell--split {
    min-height: 700px;
    display: grid;
    grid-template-columns: 1.16fr 0.84fr;
}

.auth-shell--compact {
    width: min(620px, 100%);
}

.auth-panel-brand {
    position: relative;
    background:
        radial-gradient(420px 260px at 74% 22%, rgba(255, 255, 255, 0.16) 0%, transparent 66%),
        linear-gradient(145deg, var(--auth-brand-950) 0%, var(--auth-brand-900) 24%, var(--auth-brand-700) 70%, var(--auth-brand-500) 100%);
    color: #fff;
    padding: 58px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel-brand::after {
    content: "";
    position: absolute;
    right: -76px;
    bottom: -90px;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(8px);
}

.auth-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.auth-brand-title {
    margin: 18px 0 10px;
    font-size: clamp(2.1rem, 1.9rem + 1.25vw, 3.6rem);
    line-height: 1.06;
}

.auth-brand-desc {
    margin: 0;
    max-width: 460px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    line-height: 1.66;
}

.auth-brand-list {
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    max-width: 420px;
}

.auth-brand-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.94);
}

.auth-panel-form {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(251, 248, 255, 0.96) 100%);
    padding: 42px 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-panel-form--compact-pad {
    padding: 34px 20px;
}

.auth-card {
    width: min(430px, 100%);
    border-radius: 20px;
    border: 1px solid rgba(219, 226, 239, 0.94);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    padding: 24px;
}

.auth-card--wide {
    width: min(560px, 100%);
}

.auth-mobile-brand {
    display: none;
    color: var(--auth-brand-900);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.auth-heading {
    margin: 0;
    font-size: clamp(1.7rem, 1.35rem + 1vw, 2.25rem);
    line-height: 1.08;
}

.auth-subtitle {
    margin: 8px 0 22px;
    color: var(--auth-ink-500);
    font-size: 14px;
    line-height: 1.55;
}

.auth-field {
    margin-bottom: 12px;
}

.auth-label {
    margin-bottom: 6px;
    display: block;
    color: var(--auth-ink-800);
    font-weight: 700;
    font-size: 12px;
}

.auth-input-wrap {
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid var(--auth-line);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-input-wrap:focus-within {
    border-color: var(--auth-brand-500);
    box-shadow: 0 0 0 4px rgba(175, 82, 222, 0.14);
}

.auth-input-wrap i {
    color: #94a3b8;
    font-size: 15px;
}

.auth-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--auth-ink-950);
    font-size: 14px;
}

.auth-icon-btn {
    border: 0;
    background: transparent;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-icon-btn:hover {
    color: var(--auth-brand-900);
    background: rgba(175, 82, 222, 0.12);
}

.auth-row-between {
    margin: 3px 0 16px;
    font-size: 13px;
    color: var(--auth-ink-500);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.auth-row-between label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-row-between input[type="checkbox"] {
    accent-color: var(--auth-brand-600);
}

.auth-link {
    color: var(--auth-brand-900);
    text-decoration: none;
    font-weight: 700;
}

.auth-btn--spaced {
    margin-top: 10px;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--auth-brand-900) 0%, var(--auth-brand-500) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.3);
    transition: transform .16s ease, box-shadow .16s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(124, 58, 237, 0.36);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-note {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--auth-ink-500);
}

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

.auth-grid .full {
    grid-column: 1 / -1;
}

.auth-help-text {
    margin-top: 8px;
    color: var(--auth-ink-500);
    font-size: 12px;
}

.auth-topbar {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-topbar .brand-mini {
    color: var(--auth-brand-900);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-toast-wrap {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 9999;
    display: grid;
    gap: 10px;
}

.auth-toast {
    min-width: 280px;
    max-width: 340px;
    border-radius: 14px;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: auth-toast-in .24s ease-out;
}

.auth-toast__icon {
    margin-top: 1px;
    font-size: 18px;
    color: var(--auth-brand-700);
}

.auth-toast.error .auth-toast__icon {
    color: #ef4444;
}

.auth-toast.success .auth-toast__icon {
    color: #16a34a;
}

.auth-toast strong {
    display: block;
    margin-bottom: 2px;
    color: var(--auth-ink-950);
    font-size: 13px;
}

.auth-toast span {
    color: var(--auth-ink-500);
    font-size: 12px;
    line-height: 1.4;
}

@keyframes auth-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1040px) {
    .auth-shell--split {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-panel-brand {
        display: none;
    }

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

    .auth-mobile-brand {
        display: block;
    }
}

@media (max-width: 760px) {
    .auth-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-shell--compact {
        border-radius: 22px;
    }

    .auth-card,
    .auth-card--wide {
        padding: 20px;
    }
}
