/* =========================================
   1. Imports & Fonts
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;600;700&family=Prompt:wght@300;400;600;700&display=swap');

/* =========================================
   2. Main Layout & Body
   ========================================= */
body {
    font-family: 'Noto Sans Thai', sans-serif;
    background-image: url('https://images.unsplash.com/photo-1524995997946-a1c2e315a42f?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* =========================================
   3. Navbar
   ========================================= */
.navbar-custom {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    padding: 15px 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* =========================================
   4. Split Login Wrapper (New Section)
   ========================================= */
.login-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 900px;
    margin: auto; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    
}
/* เพิ่มเอฟเฟกต์ให้รูปเล็กดูน่ากดมากขึ้น */
.qr-trigger {
    cursor: zoom-in;
    transition: all 0.3s ease;
}
.qr-trigger:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* ฝั่งซ้าย: ฟอร์ม Login */
.login-side {
    flex: 1;
    padding: 50px;
    background: white;
}

/* ฝั่งขวา: LINE QR Code */
.line-side {
    flex: 1;
    padding: 50px;
    background: rgba(248, 250, 252, 0.5); /* พื้นหลังเทาอ่อนโปร่งแสง */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* กรอบ QR Code */
.qr-frame {
    background: white;
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.qr-frame:hover {
    transform: scale(1.05); /* เอฟเฟกต์ขยายเมื่อชี้ */
}

.qr-frame img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

/* =========================================
   5. Components (Inputs, Buttons)
   ========================================= */
.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input {
    width: 100%;
    height: 48px;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 0 1rem;
    border: 2px solid #e9ecef;
    font-size: 1rem;
    font-family: 'Noto Sans Thai', sans-serif;
    transition: all .3s ease;
    box-sizing: border-box;
}

.input:focus {
    outline: none;
    border-color: #0d6efd;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.btg {
    display: block;
    width: 100%;
    text-align: center;
    color: #0d6efd;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #0d6efd;
    padding: 12px 0;
    font-size: 16px;
    cursor: pointer;
    font-weight: 700;
    background: transparent;
    position: relative;
    transition: all 0.5s;
    overflow: hidden;
    border-radius: 50px;
    font-family: 'Prompt', sans-serif;
}

.btg:hover { color: white; box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3); }

.btg::before {
    content: "";
    position: absolute;
    height: 100%; width: 0%;
    top: 0; left: -10px;
    transform: skewX(45deg);
    background-color: #0d6efd;
    z-index: -1;
    transition: all 0.5s;
}

.btg:hover::before { width: 150%; }

/* =========================================
   6. Responsive
   ========================================= */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column; /* เรียงเป็นแนวตั้งในมือถือ */
        margin: 20px;
        max-width: 400px;
    }
    .login-side, .line-side { padding: 35px 25px; }
    .line-side { border-top: 1px solid #edf2f7; }
}