body.login-page {
    overflow-x: hidden;
}

.auth-shell {
    min-height: calc(100dvh - 64px);
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.08), transparent 42%),
        radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.16), transparent 24%),
        var(--sso-bg);
}

.auth-wrap {
    width: min(1000px, 100%);
    margin: 0 auto;
    padding: 2.75rem 1rem;
}

.auth-card {
    border: 1px solid rgba(15, 23, 42, 0.12);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.11);
}

/* ---------- left / brand panel ---------- */

.auth-info {
    padding: 2.4rem 2.2rem;
    background: linear-gradient(160deg, var(--sso-navy), var(--sso-navy-deep));
    color: #e5e7eb;
    position: relative;
    overflow: hidden;
}

.auth-info::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 70%);
    pointer-events: none;
}

.auth-service-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 1.1rem;
    background: rgba(96, 165, 250, 0.14);
    border: 1px solid rgba(147, 197, 253, 0.3);
    color: #bfdbfe;
    font-size: 0.8rem;
    font-weight: 600;
}

.auth-service-pill .dot {
    width: 6px;
    height: 6px;
    background: #60a5fa;
    border-radius: 50%;
    flex: none;
}

.auth-kicker {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: #93c5fd;
}

.auth-info h1 {
    margin: 0;
    font-family: "Montserrat", "Noto Sans KR", sans-serif;
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fff;
    min-height: 4.6rem;
    transition: opacity 0.2s ease;
}

.auth-info p.auth-copy {
    margin: 1rem 0 0;
    max-width: 30rem;
    color: #cbd5e1;
    line-height: 1.7;
    min-height: 3.4rem;
    transition: opacity 0.2s ease;
}

.auth-role-legend {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.auth-role-legend li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.auth-role-legend li svg {
    width: 18px;
    height: 18px;
    flex: none;
    opacity: 0.7;
}

.auth-role-legend li.is-active {
    color: #fff;
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(96, 165, 250, 0.5);
}

.auth-role-legend li.is-active svg {
    opacity: 1;
}

/* ---------- right / form panel ---------- */

.auth-panel {
    background: var(--sso-surface);
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--sso-border);
}

.auth-panel-head h2 {
    margin: 0;
    color: var(--sso-ink);
    font-family: "Montserrat", "Noto Sans KR", sans-serif;
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    letter-spacing: -0.02em;
}

.auth-panel-head p {
    margin: 0.45rem 0 0;
    color: var(--sso-muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.auth-alerts {
    margin-top: 1rem;
}

.auth-alerts .alert {
    border-radius: 0;
    font-size: 0.88rem;
    padding: 0.7rem 0.9rem;
}

/* role tabs */

.role-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 1.35rem 0 1.1rem;
}

.role-tab {
    position: relative;
}

.role-tab input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.role-tab label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 0.35rem;
    border: 1px solid var(--sso-border);
    background: #fff;
    color: var(--sso-muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.role-tab svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.role-tab input:checked + label {
    border-color: var(--sso-primary);
    background: var(--sso-primary-soft);
    color: var(--sso-primary-dark);
    box-shadow: inset 0 0 0 1px var(--sso-primary);
}

.role-tab input:focus-visible + label {
    outline: 2px solid var(--sso-primary);
    outline-offset: 2px;
}

.role-tab label:active {
    transform: scale(0.97);
}

.auth-form .form-label {
    margin-bottom: 0.4rem;
    color: var(--sso-ink);
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-form .form-control {
    border-radius: 0;
    border: 1px solid var(--sso-border);
    padding: 0.85rem 0.9rem;
    box-shadow: none;
}

.auth-form .form-control:focus {
    border-color: var(--sso-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.14);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 2.8rem;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    color: var(--sso-muted);
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--sso-ink);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
}

.auth-row .form-check {
    margin: 0;
}

.auth-row .form-check-label {
    color: var(--sso-muted);
    font-size: 0.88rem;
}

.auth-btn {
    width: 100%;
    margin-top: 1.1rem;
    border: 0;
    padding: 0.95rem 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--sso-primary), var(--sso-primary-dark));
    font-family: "Montserrat", "Noto Sans KR", sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.auth-footer-note {
    margin-top: 1.1rem;
    color: var(--sso-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
    .auth-wrap {
        padding: 0.85rem;
    }

    .auth-info {
        order: 2;
        padding: 1.1rem 1.1rem 1.3rem;
    }

    .auth-panel {
        order: 1;
        border-left: 0;
        border-top: 1px solid var(--sso-border);
        padding: 1.3rem 1.1rem 1.4rem;
    }

    .auth-role-legend {
        display: none;
    }

    .auth-info h1 {
        min-height: 0;
        font-size: clamp(1.4rem, 5vw, 1.9rem);
    }

    .auth-info p.auth-copy {
        min-height: 0;
        margin-top: 0.6rem;
    }
}

@media (max-width: 420px) {
    .role-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}
