/* import font มาใช้ (poppins)  */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');



*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:  'Poppins', sans-serif;
}
body{
     background-image: url("../images/bg.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}



/* Auto color มันคือการกำหนดสีพื้นฐาน */
:root{
    --primary-color: #c6c3c3;
    --second-color: #ffffff;
    --black-color: #000000;
}

/* Reusable CSS มันคือเหล่าคำสั่งที่สามารถใช้ซ้ำได้แบบง่ายๆ */
a{
    text-decoration: none ;
    color: var(--second-color);
}
a:hover{
    text-decoration: underline;
}

/* wrapper  */
.wrapper{
    width: 100%;
    display: flex;
    justify-content: center;   /* 🔥 แก้ตรงนี้ */
    align-items: center;
    min-height: 100vh;
    background-color: rgba(111, 74, 118, 0.2);
}

.login_box{
    position: relative;
    width: 90%;               /* 🔥 responsive */
    max-width: 400px;        /* 🔥 ไม่ให้ใหญ่เกิน */
    backdrop-filter: blur(25px);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 6em 2em 3em 2em; /* 🔥 ลด padding ให้พอดีมือถือ */
    color: var(--second-color);
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.2); 
    margin-left: 0;          /* 🔥 ลบ 500px */
}

.login-header{
    position: absolute;
    top: 0;
    left: 50%;               /* 🔥 แก้จาก 35% */
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    width: 120px;
    height: 60px;
    border-radius: 0 0 20px 20px;
}

.login-header span{
    font-size: 24px;         /* 🔥 ลดให้พอดอมือถือ */
    color: var(--black-color);
}
.login-header::before{
    content: "";
    position: absolute;
    top: 0;
    left: -30px;
    width: 30px;
    height: 30px;
    border-top-right-radius: 50%;
    background: transparent;
    box-shadow: 15px 0 0 0 var(--primary-color);
}
.login-header::after{
    content: "";
    position: absolute;
    top: 0;
    right: -30px;
    width: 30px;
    height: 30px;
    border-top-left-radius: 50%;
    background: transparent;
    box-shadow: -15px 0 0 0 var(--primary-color);
}
.input_box{
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 20px 0;
}

.input-field {
    width: 100%;
    height: 55px;
    font-size: 16px;

    background: transparent !important;
    color: var(--black-color) !important;
    padding-inline: 20px 50px;

    border: 2px solid var(--primary-color);
    border-radius: 30px;
    outline: none;

    /* 🔥 สำคัญ: ลบเงา/พื้นหลังจาก browser เอง */
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#user{
    margin-bottom: 10px;
}
.label{
    position: absolute;
    top: 25px;
    left: 20px; 
    transition: 0.2s;
    transform: translateY(-50%);
} 

.input-field:focus ~ .label,
.input-field:valid ~ .label{
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 14px;
    background-color: var(--primary-color);
    border-radius: 30px;
    color: var(--black-color);
    padding: 0 10px;
}

.icon{
    position: absolute;
    top: 18px;
    right: 25px;
    font-size: 20px;
}

.remember-forgot{
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}
.input-submit{
    width: 100%;
    height: 50px;
    background: #ececec;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 30px;
    cursor: pointer ;
    transition: .3s;
}
.input-submit:hover{
    background-color: var(--second-color);
}
.register{
    text-align: center;
}
.register a{
font-weight: 500;
}
@media only screen and (max-width: 564px ) {

    body{
        background-attachment: scroll; /* 🔥 แก้กระตุกมือถือ */
    }

    .wrapper{
        padding: 15px;
    }

    .login_box{
        width: 100%;
        padding: 5em 1.5em 2.5em 1.5em;
    }

    .input-field{
        height: 50px;
        font-size: 14px;
    }

    .input-submit{
        height: 48px;
        font-size: 15px;
    }

    .icon{
        font-size: 18px;
        top: 16px;
    }
}
/* ซ่อนขอบสี่เหลี่ยมสีขาวที่ไม่ต้องการ */
.box,
.square,
.left-box,
.bg-box,
.shape-left {
  display: none !important;
}
