* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    background-color: #428299;
}

/* Alert Message Custom Style */
.alert-msg {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: 600;
    animation: fadeIn 0.5s ease-out;
}
.alert-msg.success { background-color: #28a745; }
.alert-msg.error { background-color: #dc3545; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Side Navigation / Banner */
.sidenav {
    width: 100%;
    height: 40vh;
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.4)), url(../img/emoji.jpg) top center;
    background-size: cover;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    padding: 30px;
}

.sidenav label hr.lineunder {
    border: none;
    background-color: #428299;
    width: 60px;
    height: 4px;
    margin: 10px 0 0 0;
    border-radius: 2px;
}

/* Main Content Area */
.main {
    height: 60vh;
    background-color: #428299;
    position: relative;
}

/* Login Card Form */
.login-form {
    background-color: #c7e0de;
    padding: 40px 30px;
    border-radius: 16px;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.login-main-text {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: -150px 0 0 0;
}

.login-main-text .satisfy {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff; /* ปรับให้อ่านง่ายขึ้นบนพื้นหลังรูปภาพ */
    margin-bottom: 5px;
}

.login-main-text .room {
    font-size: 20px;
    font-weight: 500;
    color: #f0f0f0;
    margin-bottom: 15px;
}

.login-main-text .loginpage {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

/* Inputs & Labels */
.form-group label {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.userpass {
    color: #3f4745;
}

.forminput {
    border-radius: 8px;
    border: 1px solid #b2cdcc;
    padding: 12px 15px;
    width: 100%;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.forminput:focus {
    outline: none;
    border-color: #428299;
    box-shadow: 0 0 0 3px rgba(66, 130, 153, 0.2);
}

/* Icons inside labels */
.bi-person-fill,
.bi-key-fill {
    margin-right: 8px;
    color: #428299;
    font-size: 20px;
}

/* Button */
.btnLogin {
    background-color: #428299;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(66, 130, 153, 0.2);
}

.btnLogin:hover {
    background-color: #35697d;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(66, 130, 153, 0.3);
}

.btnLogin:active {
    transform: translateY(1px);
}

/* Back to index link */
.backtoindex {
    position: absolute;
    right: 20px;
    bottom: 20px;
}

.backtoindex a {
    color: #ffffff; /* เปลี่ยนเป็นสีขาวเพื่อให้ตัดกับพื้นหลังสีน้ำเงิน #428299 */
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.backtoindex a:hover {
    color: #ffffff;
    opacity: 0.8;
    text-decoration: none;
}

/* Responsive สำหรับหน้าจอคอมพิวเตอร์ (Tablet / Desktop) */
@media (min-width: 768px) {
    .sidenav {
        width: 40%;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        padding: 60px;
    }

    .main {
        width: 60%;
        height: 100vh;
        margin-left: 40%;
    }
    
    .login-main-text .satisfy {
        font-size: 36px;
        color: #428299; /* บน Desktop พื้นหลังข้อความอาจจะสว่างกว่า ปรับกลับเป็นสีเดิมของคุณ */
        text-shadow: none;
    }
    
    .login-main-text .room, 
    .login-main-text .loginpage {
        color: #3f4745;
        text-shadow: none;
    }
}