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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif
}

.bg {
    background: linear-gradient(135deg, #00c3ff, #eeef1c);
    background: linear-gradient(135deg, #fc00ff, #00dbde);
    background-image: url("../images/bg_login.jpg");
    background-size:     cover;                      
    background-repeat:   no-repeat;
    background-position: center center;  
    opacity: 1;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    z-index: -1; 
    min-height: 93vh
}
.wrapperr {
    width: 800px;
    margin:  auto;
}

.wrapperr .card {
    width: 800px;
    /* min-height: 450px; */
    margin: auto;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    cursor: pointer;
    padding: 0.8rem
}

.wrapper {
    max-width: 500px;
    margin:  auto;
}

.wrapper .card {
    max-width: 400px;
    min-height: 450px;
    margin: auto;
    margin-top: 30px;
    background: rgba(41, 41, 41, 0.486);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    cursor: pointer;
    padding: 0.8rem
}

.wrapper .card a {
    text-decoration: none;
    color: #eeeeee
}

.wrapper .card a:hover {
    color: #fff
}

.wrapper .card .input-field {
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #eee;
    padding: 0.3rem
}

.wrapper .card .input-field input {
    background-color: inherit
}

.wrapper .card .input-field input.form-control,
.wrapper .card .input-field input.form-control:focus {
    border: none;
    outline: none;
    box-shadow: none;
    color: #eee
}

.wrapper .card .input-field button.btn {
    color: #eee;
    padding: 0rem;
    padding-right: 0.5rem
}

.wrapper .card .input-field button.btn:hover {
    color: #fff
}

.wrapper .card .input-field button.btn:focus {
    border: none;
    outline: none;
    box-shadow: none
}

.wrapper .card .input-field input::placeholder {
    color: #eee
}

.wrapper .card .option {
    display: block;
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    user-select: none
}

.wrapper .card .option span.text-light-white:hover {
    color: #fff
}

.wrapper .card .option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0
}

.checkmark {
    position: absolute;
    top: 3px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border-radius: 2px
}

.wrapper .card .option:hover input~.checkmark {
    background-color: #f1f1f1
}

.wrapper .card .option input:checked~.checkmark {
    border: none;
    background-color: #333;
    transition: 300ms ease-in-out all
}

.checkmark:after {
    content: "\2713";
    position: absolute;
    display: none;
    color: #fff;
    font-size: 1rem
}

.wrapper .card .option input:checked~.checkmark:after {
    display: block
}

.wrapper .card .option .checkmark:after {
    left: 3px;
    top: -3px;
    width: 5px;
    height: 10px
}

.wrapper .card .btn.btn-primary {
    border-radius: 20px;
    width: 100px;
    background-color: #fff;
    color: #333;
    border: none
}

.wrapper .card .btn.btn-primary:hover {
    color: #fff;
    background: #333
}

.wrapper .card .btn.btn-primary:focus {
    border: none;
    box-shadow: none
}

.wrapper .card .text-light-white {
    color: #ddd
}

.wrapper .card .line span.connect {
    position: absolute;
    top: -12px;
    left: 37%;
    padding-left: 8px;
    padding-right: 8px;
    color: #000;
    padding: 0 0.3rem;
    z-index: 100;
    border-radius: 2px;
    background-color: #fff
}

.wrapper .card .connections a img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover
}

@media(max-width: 370px) {
    .wrapper .card .line:after {
        left: 27%
    }
}

@media(max-width: 350px) {
    .wrapper {
        margin: 10px auto
    }

    .wrapper .card {
        margin: 10px
    }
}

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

body {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

#mainForm {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
}

.bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;

    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;

    z-index: -1;
}

/* จอ Laptop / Desktop กว้าง */
@media (min-aspect-ratio: 16/9) {
    .bg {
        background-position: center top;
    }
}

/* จอแนวตั้งหรือ Tablet */
@media (max-aspect-ratio: 4/3) {
    .bg {
        background-position: 62% top;
    }
}

/* SUT logo above login panel */
.login-logo {
    position: fixed;
    left: 50%;
    top: 25%;
    transform: translate(-50%, -50%);
    z-index: 2;

    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Login panel */
.wrapper {
    position: fixed;
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* =========================================================
   RESPONSIVE LOGIN LAYOUT
   SUT Logo + Login Card move together
   ========================================================= */

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

body {
    min-height: 100vh;
    min-height: 100dvh;

    overflow-x: hidden;
}


/* =========================================================
   MAIN FORM
   ========================================================= */

#mainForm {
    position: relative;

    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    margin: 0;
    padding: 0;
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.bg {
    position: fixed !important;

    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;

    background-repeat: no-repeat !important;

    /*
        BG = 1920 x 1280 px
        cover = เต็มหน้าจอโดยไม่ยืดภาพ
    */
    background-size: cover !important;

    /*
        รักษาส่วนบนของภาพไว้
        เพราะมี Logo / Branding อยู่ด้านบน
    */
    background-position: center top !important;

    z-index: -1 !important;
}


/* =========================================================
   LOGIN STAGE
   Logo + Login Card เป็นกลุ่มเดียวกัน
   ========================================================= */

.login-stage {
    position: fixed;

    left: 50%;
    top: 53%;

    transform: translate(-50%, -50%);

    width: min(92vw, 370px);

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 14px;

    z-index: 10;
}


/* =========================================================
   SUT LOGO
   ========================================================= */

.login-logo {
    position: static !important;

    top: auto !important;
    left: auto !important;

    transform: none !important;

    width: 100%;
    height: 90px;

    margin: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    z-index: auto;
}


.login-logo img {
    display: block;

    width: auto;

    max-width: 105px;
    max-height: 90px;

    object-fit: contain;
}


/* =========================================================
   LOGIN WRAPPER
   ========================================================= */

.wrapper {
    position: static !important;

    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;

    transform: none !important;

    width: 100%;

    margin: 0 !important;
}


/* Login Card */
.wrapper .card {
    width: 100%;

    margin: 0 auto;
}


/* =========================================================
   NOTEBOOK / SHORT SCREEN
   เช่น 1366 x 768
   ========================================================= */

@media (max-height: 800px) {

    .login-stage {
        top: 54%;
        gap: 8px;
    }

    .login-logo {
        height: 65px;
    }

    .login-logo img {
        max-width: 78px;
        max-height: 65px;
    }

}


/* =========================================================
   VERY SHORT SCREEN
   ========================================================= */

@media (max-height: 650px) {

    .login-stage {
        position: absolute;

        top: 20px;

        transform: translateX(-50%);

        padding-bottom: 20px;
    }

    .login-logo {
        height: 55px;
    }

    .login-logo img {
        max-height: 55px;
        max-width: 70px;
    }

}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .login-stage {
        width: calc(100vw - 32px);

        top: 52%;

        gap: 10px;
    }

    .login-logo {
        height: 65px;
    }

    .login-logo img {
        max-width: 80px;
        max-height: 65px;
    }

}
