/* ═══════════════════════════════════════════════════════
   econApp — Login Page
   ═══════════════════════════════════════════════════════ */

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

html, body.login-body-page {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Anuphan', system-ui, sans-serif;
}

/* ── split container ── */

.login-split {
    display: flex;
    height: 100vh;
    min-height: 100vh;
}

/* ── left panel ── */

.login-left {
    display: flex;
    flex-direction: column;
    width: 440px;
    min-width: 360px;
    max-width: 480px;
    background: #fff;
    padding: 48px 52px;
    position: relative;
    z-index: 100;
}

.login-left-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── logo ── */

.login-logo-wrap {
    margin-bottom: 28px;
}

.login-logo-img {
    width: 96px;
    height: auto;
    display: block;
}

/* ── heading ── */

.login-heading {
    margin-bottom: 36px;
}

.login-system-name {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.login-system-sub {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 16px;
    line-height: 1.5;
}

.login-accent-bar {
    width: 36px;
    height: 3px;
    background: #1B4F8A;
    border-radius: 2px;
}

/* ── alert / error ── */

.login-alert {
    display: block;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

/* ── main login button ── */

.btn-psu-login {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #1B4F8A;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Anuphan', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.1px;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(27, 79, 138, 0.25);
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.btn-psu-login:hover {
    background: #163F71;
    box-shadow: 0 4px 14px rgba(27, 79, 138, 0.35);
}

.btn-psu-login:active {
    transform: scale(0.99);
    box-shadow: 0 1px 4px rgba(27, 79, 138, 0.2);
}

/* ── retry section ── */

.login-retry-wrap {
    margin-top: 10px;
    text-align: center;
}

.btn-clear-session {
    background: transparent;
    color: #6B7280;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-family: 'Anuphan', system-ui, sans-serif;
    font-size: 12px;
    padding: 7px 14px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.btn-clear-session:hover {
    background: #F3F4F6;
    color: #374151;
}

/* ── passport note ── */

.login-passport-note {
    margin-top: 20px;
    font-size: 12px;
    color: #9CA3AF;
    text-align: center;
    line-height: 1.5;
}

/* ── footer ── */

.login-footer {
    padding-top: 24px;
    border-top: 1px solid #F3F4F6;
}

.login-footer p {
    margin: 0 0 3px;
    font-size: 11px;
    color: #9CA3AF;
    line-height: 1.5;
}

/* ── right panel — background image ── */

.login-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    pointer-events: none;
}

.login-right-bg {
    position: relative;
    background: url('/images/Background/econBG_fresh.png') center center / cover no-repeat;
}

.login-right-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(27, 79, 138, 0.18) 0%,
        rgba(27, 79, 138, 0.05) 50%,
        rgba(27, 79, 138, 0.12) 100%);
}

/* ── responsive (mobile: stack to single column) ── */

@media (max-width: 680px) {
    .login-split {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .login-left {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 40px 28px;
    }
    .login-right {
        display: none;
    }
}