/* =========================================================
   장로회신학대학교 LMS 로그인 커스텀 스타일 (customloginview.php 전용)
   레이아웃: 클래식 좌우 분할 — 색감은 PUTS 메인 페이지 톤
   구조: xn-login-container > xn-integrated-login-container
         좌: SSO 영역 / 우: 일반 폼
   ========================================================= */

:root {
    --puts-navy: #122954;
    --puts-navy-deep: #0d1f3f;
    --puts-navy-soft: #1a3d6b;
    --puts-green: #34b292;
    --puts-orange: #ff7700;
    --sky: #e8f4fc;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f4f7fb;
    --r-md: 12px;
    --r-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul { list-style: none; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== 페이지 배경 (메인 페이지 sky 그라데이션 톤) ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 85% 55% at 12% 18%, rgba(52, 178, 146, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 55% 40% at 88% 78%, rgba(18, 41, 84, 0.07) 0%, transparent 60%),
        linear-gradient(165deg, #f8fbff 0%, #f4f8fc 24%, var(--sky) 50%, #f0f7fb 76%, #e8f0f7 100%);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(18,41,84,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18,41,84,0.05) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 65% 60% at 50% 45%, #000 0%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 45%, #000 0%, transparent 78%);
    opacity: 0.5;
    pointer-events: none;
}

/* ===== Top Bar (로고 정중앙) ===== */
.topbar {
    padding: 32px 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.topbar__brand {
    display: inline-flex;
    align-items: center;
}
.topbar__brand img {
    height: 56px;
    width: auto;
    display: block;
}

/* ===== Login container (.xn-login-container) ===== */
.xn-login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vh, 56px) 24px;
}
#login-input-container {
    width: 100%;
    max-width: 980px;
}
.xn-login-info-container {
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow:
        0 24px 60px -20px rgba(18, 41, 84, 0.22),
        0 8px 20px -8px rgba(18, 41, 84, 0.08);
    border: 1px solid rgba(18, 41, 84, 0.06);
    overflow: hidden;
    position: relative;
}
/* 상단 컬러 띠 */
.xn-login-info-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--puts-navy) 0%,
        var(--puts-navy-soft) 50%,
        var(--puts-green) 100%);
}
/* 상단 부드러운 spotlight */
.xn-login-info-container::after {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 220px;
    background: radial-gradient(ellipse at center, rgba(52, 178, 146, 0.10) 0%, transparent 70%);
    pointer-events: none;
}

/* ===== Integrated layout (.xn-integrated-login-container) ===== */
.xn-integrated-login-container {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    padding: clamp(36px, 4vw, 56px) 0;
    position: relative;
    z-index: 1;
}
.xn-integrated-login-container > .col {
    padding: 0 clamp(28px, 4vw, 56px);
    display: flex;
    flex-direction: column;
}
.col-divider {
    position: relative;
    background: linear-gradient(180deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}
/* 가운데 다이아몬드 오너먼트 */
.col-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #fff;
    border: 1.5px solid var(--puts-navy);
}

/* ===== Column Head (eyebrow + title + ornament) ===== */
.col-head {
    text-align: center;
    margin-bottom: 28px;
}
.col-head__eyebrow {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--puts-green);
    letter-spacing: 0.34em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.col-head h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--puts-navy);
    letter-spacing: -0.03em;
    line-height: 1.3;
}
.col-head__ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    color: var(--puts-navy);
}
.col-head__ornament::before,
.col-head__ornament::after {
    content: '';
    width: 32px;
    height: 1.5px;
    background: var(--puts-navy);
    opacity: 0.25;
}
.col-head__ornament-dot {
    width: 6px;
    height: 6px;
    transform: rotate(45deg);
    background: var(--puts-navy);
    opacity: 0.7;
}

/* ===== SSO 영역 ===== */
.xn-sso-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 17px 18px;
    background: var(--puts-navy);
    color: #fff;
    border-radius: var(--r-md);
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -0.01em;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 10px 22px -10px rgba(18, 41, 84, 0.55);
}
.xn-sso-login-btn:hover {
    background: var(--puts-navy-deep);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(18, 41, 84, 0.65);
}
.xn-sso-login-btn-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.xn-sso-login-btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ===== 안내 박스 ===== */
.sso-notice {
    margin-top: 18px;
    background: rgba(18, 41, 84, 0.035);
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    text-align: center;
}
.sso-notice strong {
    color: var(--puts-navy);
    font-weight: 700;
}

/* ===== 일반 폼 ===== */
form#login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.field {
    position: relative;
}
.field input[name="login_user_id"],
.field input[name="login_user_password"] {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    font-size: 14.5px;
    background: #f8fafc;
    color: var(--ink);
    outline: none;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.field input::placeholder { color: #94a3b8; }
.field input:focus {
    border-color: var(--puts-navy);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(18, 41, 84, 0.08);
}
.field__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}
.field:focus-within .field__icon { color: var(--puts-navy); }

.xn-common-blue-btn.xn-login-btn {
    width: 100%;
    padding: 15px;
    border-radius: var(--r-md);
    background: var(--puts-navy);
    color: #fff;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-top: 6px;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 10px 22px -10px rgba(18, 41, 84, 0.55);
}
.xn-common-blue-btn.xn-login-btn:hover {
    background: var(--puts-navy-deep);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -10px rgba(18, 41, 84, 0.65);
}

/* 에러 토스트 자리 (운영: #xnLoginTostMsgContainer) */
#xnLoginTostMsgContainer.alert {
    display: none;
    background: #fef3f2;
    border: 1px solid #fecdd3;
    color: #b42318;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin: 0 clamp(28px, 4vw, 56px) 16px;
}
#xnLoginTostMsgContainer.alert.is-visible {
    display: block;
}

/* ===== Footer ===== */
.site-footer {
    padding: 28px 24px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.site-footer__privacy {
    color: var(--puts-navy);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: color 0.18s ease;
}
.site-footer__privacy:hover {
    color: var(--puts-navy-deep);
}
.site-footer__copy {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.site-footer__motto {
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 0.34em;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
    .topbar {
        padding: 24px 22px 0;
    }
    .topbar__brand img { height: 44px; }

    .xn-integrated-login-container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 0;
    }
    .col-divider {
        height: 1px;
        width: auto;
        background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
        margin: 0 28px;
    }
    .col-divider::after {
        left: 50%;
        top: 50%;
    }
    .xn-integrated-login-container > .col {
        padding: 0 clamp(24px, 5vw, 36px);
    }
}
