/* ================= LOGIN MODAL STYLES ================= */
.login-modal {
    display: none; /* ซ่อนไว้ก่อน */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000; /* อยู่บนสุด */
    
    /* พื้นหลังไล่สีเขียวเข้มตามรูป */
    /* background: linear-gradient(135deg, #345b63 0%, #1d363a 100%); */
    background: linear-gradient(135deg, #343b63 0%, #121e3f 100%);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-modal.show {
    display: block;
    opacity: 1;
}

.login-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 30px 50px;
    box-sizing: border-box; /* สำคัญ: ป้องกัน padding ดัน layout เพี้ยน */
}

/* Header (Back button & Sign up) */
.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
    transition: 0.3s;
}

.back-link:hover { opacity: 1; }

.signup-area span {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-right: 15px;
}

.btn-signup-outline {
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-signup-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Body (Logo & Form) */
.login-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-logo-icon {
    font-size: 3rem;
    margin-bottom: 50px;
    color: #e6e6e6; /* สีโลโก้ */
}

.login-form {
    width: 100%;
    max-width: 350px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5); /* สีเทาจางๆ */
    margin-bottom: 8px;
    text-transform: uppercase;
}

.input-group input {
    width: 100%;
    background: transparent;
    border: none;
    /* border-bottom: 1px solid rgba(255,255,255,0.1); */
    color: #fff;
    font-size: 1.1rem;
    padding: 5px 0;
    outline: none;
    border-radius: 0; /* ลบขอบมน default ของ browser */
}

.input-group input::placeholder {
    color: #fff;
    opacity: 1;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.help-icon {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 10px;
}

.btn-login-submit {
    width: 100%;
    /* background-color: #9abdc1; สีปุ่มเทาอมเขียว */
    background-color: #9a9bc1; /* สีปุ่มเทาอมเขียว */
    color: #1d363a;
    border: none;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: 0.3s;
}

.btn-login-submit:hover {
    background-color: #fff;
}

/* จัด Layout แนวนอนสำหรับ ชื่อ-นามสกุล */
.row-group {
    display: flex;
    gap: 15px;
}

.input-group.half {
    flex: 1; /* แบ่งครึ่งเท่ากัน */
}

/* ปรับ Scrollbar กรณีฟอร์มยาวเกินหน้าจอ */
.login-body {
    overflow-y: auto; /* ให้เลื่อนขึ้นลงได้ */
    max-height: 80vh; /* จำกัดความสูง */
    width: 100%;
    scrollbar-width: none; /* ซ่อน scrollbar (Firefox) */
}

.login-body::-webkit-scrollbar {
    display: none; /* ซ่อน scrollbar (Chrome/Safari) */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-container { padding: 20px; }
    .signup-area span { display: none; } /* ซ่อนข้อความ Not a member ในมือถือ */
}