@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    --navy: #082b59;
    --navy-dark: #061f42;
    --blue: #1261b8;
    --blue-light: #eaf3ff;
    --blue-border: #c9ddf4;
    --text: #19324d;
    --muted: #718096;
    --white: #ffffff;
    --danger: #c62828;
    --danger-bg: #fff1f1;
    --shadow: 0 18px 55px rgba(8, 43, 89, 0.16);
}

* {
    box-sizing: border-box;
}

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

body {
    background: #eef4fa;
    color: var(--text);
    font-family: "Prompt", "Noto Sans Thai", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.page-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 43%) 1fr;
    background: var(--white);
}


/* =========================================================
   LEFT BRANDING PANEL
   ========================================================= */

.brand-panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(5, 29, 64, 0.98), rgba(8, 54, 106, 0.96));
    color: #fff;
}

.brand-panel::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    right: -250px;
    top: -210px;
    background: rgba(255, 255, 255, 0.055);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 430px;
    height: 430px;
    border-radius: 50%;
    left: -250px;
    bottom: -240px;
    background: rgba(255, 255, 255, 0.045);
}

.brand-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(6, 31, 66, 0.06),
            rgba(6, 31, 66, 0.24)
        );
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo-wrap {
    width: 128px;
    height: 128px;
    background: #fff;
    border-radius: 24px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

.brand-kicker {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2.5px;
    opacity: 0.78;
    margin-bottom: 10px;
}

.brand-text h1 {
    max-width: 620px;
    margin: 0 auto;
    font-size: clamp(29px, 3vw, 43px);
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.brand-text p {
    max-width: 500px;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.8;
    font-weight: 300;
}

.brand-footer {
    margin-top: 43px;
    display: flex;
    gap: 11px;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.64);
    font-size: 11px;
}

.brand-footer .dot {
    opacity: 0.45;
}


/* =========================================================
   RIGHT LOGIN PANEL
   ========================================================= */

.login-panel {
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.top-bar {
    min-height: 76px;
    padding: 22px clamp(28px, 5vw, 70px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf2f7;
}

.top-title {
    color: var(--navy);
    font-size: 14px;
    font-weight: 600;
}

.login-content {
    width: min(100%, 650px);
    margin: auto;
    padding: 50px clamp(28px, 5vw, 70px) 40px;
    flex: 1;
}

.welcome {
    margin-bottom: 30px;
}

.welcome-label {
    display: inline-block;
    color: var(--blue);
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 9px;
}

.welcome h2 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.25;
    font-weight: 600;
}

.welcome p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   STUDENT TYPE SWITCH
   ========================================================= */

.type-section {
    margin-bottom: 27px;
}

.section-heading {
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 11px;
}

.type-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.type-option {
    position: relative;
    min-width: 0;
    padding: 14px 14px;
    border: 1.5px solid #dce6f0;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    display: flex;
    align-items: center;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.type-option:hover {
    border-color: #a8c6e7;
    transform: translateY(-1px);
}

.type-option.active {
    border-color: var(--blue);
    background: #f3f8ff;
    box-shadow: 0 7px 20px rgba(18, 97, 184, 0.09);
}

.type-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf5ff;
    font-size: 20px;
    margin-right: 11px;
}

.type-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.type-info strong {
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.type-info small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.type-check {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccd8e5;
    color: transparent;
    font-size: 11px;
    font-weight: 700;
}

.type-option.active .type-check {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}


/* =========================================================
   LOGIN FORM
   ========================================================= */

.login-form {
    margin-top: 4px;
}

.form-title {
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid #edf2f7;
    color: var(--navy);
    font-size: 14px;
    font-weight: 600;
}

.field-group {
    margin-bottom: 20px;
}

.field-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #314b65;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.field-icon {
    width: 19px;
    height: 19px;
    border-radius: 5px;
    background: #eaf3ff;
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

.field-group input,
.field-group select {
    width: 100%;
    height: 48px;
    border: 1px solid #d8e2ed;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: var(--text);
    padding: 0 14px;
    font-size: 13px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.field-group input::placeholder {
    color: #a3afbc;
}

.field-group input:focus,
.field-group select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(18, 97, 184, 0.10);
    background: #fbfdff;
}

.field-hint {
    margin-top: 6px;
    color: #8a98a8;
    font-size: 10px;
    line-height: 1.55;
}

.birth-row {
    display: grid;
    grid-template-columns: 0.8fr 1.45fr 1fr;
    gap: 9px;
}

.birth-row select {
    cursor: pointer;
}


/* =========================================================
   ERROR
   ========================================================= */

.error-box {
    margin: 3px 0 17px;
    padding: 11px 13px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px solid #ffd2d2;
    border-radius: 10px;
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 12px;
    line-height: 1.55;
}

.error-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.login-button {
    width: 100%;
    height: 51px;
    border-radius: 11px;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(8, 43, 89, 0.18);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.login-button:hover {
    background: #0d3d79;
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(8, 43, 89, 0.22);
}

.login-button:active {
    transform: translateY(0);
}

.login-button .arrow {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}

.security-note {
    margin-top: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #98a5b4;
    font-size: 9.5px;
    text-align: center;
    line-height: 1.5;
}

.lock-icon {
    font-size: 11px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.login-footer {
    min-height: 62px;
    padding: 17px clamp(28px, 5vw, 70px);
    border-top: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #9aa7b5;
    font-size: 10px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {

    .page-shell {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: auto;
    }

    .brand-content {
        min-height: 390px;
        padding: 42px 28px 44px;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .logo-wrap {
        width: 92px;
        height: 92px;
        border-radius: 18px;
        margin-bottom: 23px;
    }

    .brand-text h1 {
        margin-left: auto;
        margin-right: auto;
        font-size: 30px;
    }

    .brand-text p {
        margin: 11px auto 0;
        font-size: 14px;
    }

    .brand-footer {
        margin-top: 27px;
    }

    .login-panel {
        min-height: auto;
    }

    .login-content {
        padding-top: 38px;
    }
}


@media (max-width: 620px) {

    .top-bar {
        min-height: 62px;
        padding: 17px 20px;
    }

    .login-content {
        padding: 32px 20px 30px;
    }

    .welcome {
        margin-bottom: 27px;
    }

    .welcome h2 {
        font-size: 28px;
    }

    .type-switch {
        grid-template-columns: 1fr;
    }

    .type-option {
        min-height: 68px;
    }

    .birth-row {
        grid-template-columns: 0.8fr 1.35fr 0.95fr;
        gap: 7px;
    }

    .birth-row select {
        padding-left: 9px;
        padding-right: 9px;
        font-size: 12px;
    }

    .login-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}


@media (max-width: 400px) {

    .brand-content {
        padding: 28px 22px 32px;
    }

    .brand-text h1 {
        font-size: 25px;
    }

    .brand-text p {
        font-size: 13px;
    }

    .login-content {
        padding-left: 17px;
        padding-right: 17px;
    }

    .welcome h2 {
        font-size: 25px;
    }

    .birth-row {
        grid-template-columns: 1fr;
    }

    .birth-row select {
        height: 45px;
    }
}
