/* --- General Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    min-height: 100vh; /* ใช้ min-height เพื่อรองรับจอเล็ก */
    height: auto;
    display: flex;
}

/* --- Main Container --- */
.login-container {
    display: flex;
    width: 100%;
}

/* --- Left Panel (Logo) --- */
.left-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.logo-container img {
    max-width: 100%;
    width: 31.25rem; /* 500px */
}

/* --- Right Panel (Form) --- */
.right-panel {
    flex: 1;
    background: linear-gradient(to top, #FFE800, #BEA000);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem; /* 40px */
}

form {
    width: 100%;
    max-width: 25rem; /* 400px */
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

form h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5625rem; /* 25px */
    color: #ffffff;
    text-align: center;
}

.input-group {
    width: 100%;
    margin-bottom: 1.25rem; /* 20px */
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px */
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem; /* 8px */
    color: #ffffff;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1.25rem; /* 14px 20px */
    border: none;
    border-radius: 50rem;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
    outline: none;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 1.25rem; /* 20px */
    transform: translateY(-50%);
    cursor: pointer;
    color: #aaa;
}

.btn {
    width: 100%;
    padding: 0.875rem; /* 14px */
    border: none;
    border-radius: 50rem;
    font-size: 1.1rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.625rem; /* 10px */
}

.btn-login {
    background-color: #635A00;
    color: #ffffff;
    margin-top: 0.625rem; /* 10px */
}

.btn-login:hover {
    background-color: #3D380B;
}

.link-phone {
    color: #000000;
    text-decoration: underline;
    margin-top: 0.9375rem; /* 15px */
    font-size: 1rem; /* 16px */
}

.divider {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(56, 56, 56, 0.2);
    line-height: 0.1em;
    margin: 1.5625rem 0; /* 25px */
}

.divider span {
    background: #e9c401;
    padding: 0 0.625rem; /* 10px */
    color: #383838;
    font-size: 0.9rem;
}

.social-login {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.625rem; /* 10px */
}

.btn-social img {
    height: 1.5rem; /* 24px */
    width: 1.5rem;
}

.btn-social.google {
    background-color: #ffffff;
    color: #333;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.1); /* 2px 4px */
}
.btn-social.google:hover {
    background-color: #f1f1f1;
}

.btn-social.facebook {
    background-color: #1877F2;
    color: #ffffff;
}
.btn-social.facebook:hover {
    background-color: #166fe5;
}

.btn-social.line {
    background-color: #06C755;
    color: #ffffff;
}
.btn-social.line:hover {
    background-color: #05b14c;
}

.signup-link {
    margin-top: 1.5625rem; /* 25px */
    font-size: 1rem; /* 16px */
    color: #000000;
}

.signup-link a {
    color: #383838;
    text-decoration: none;
    font-weight: 700;
}

/* --- START: Responsive Design Section --- */

/* --- สำหรับจอ Tablet (ขนาดไม่เกิน 768px) --- */
@media screen and (max-width: 768px) {
    .login-container {
        flex-direction: column; /* เปลี่ยน Layout เป็นแนวตั้ง */
    }

    .left-panel {
        display: none; /* ซ่อน Panel ซ้ายเพื่อประหยัดพื้นที่ */
    }

    .right-panel {
        padding: 2rem 1.5rem; /* ลด padding */
    }

    form h1 {
        font-size: 2rem; /* ลดขนาดหัวข้อ */
    }
}

/* --- สำหรับจอ Mobile (ขนาดไม่เกิน 430px) --- */
@media screen and (max-width: 430px) {
    .right-panel {
        padding: 1.5rem 1rem; /* ลด padding ลงอีกสำหรับจอที่เล็กมาก */
    }

    form h1 {
        font-size: 1.8rem;
    }

    .btn, .input-group input {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        font-size: 0.95rem; /* ลดขนาดฟอนต์ในปุ่มและ input */
    }

    .link-phone, .signup-link {
        font-size: 0.9rem;
    }
}