

        /* ================= ตัวแปรสีหลัก ================= */
        :root {
            --maroon: #7A1723;
            --maroon-dark: #520D15;
            --gold: #D4AF37;
            --bg-page: #F5F7FA;
            --white: #FFFFFF;
            --text-main: #2C3E50;
            --text-muted: #7F8C8D;
            --border-line: #E2E8F0;
            --input-bg: #F8FAFC;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Prompt', sans-serif; background-color: var(--bg-page); color: var(--text-main); display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
        a { text-decoration: none; transition: 0.3s; }
        .serif { font-family: 'Playfair Display', serif; }

        /* ================= เลย์เอาต์หลัก ================= */
        .login-wrapper { display: flex; width: 100%; max-width: 1050px; background: var(--white); border-radius: 24px; box-shadow: 0 20px 40px rgba(122, 23, 35, 0.08); overflow: hidden; min-height: 650px; }
       .login-image { 
            flex: 1.1; 
            background-color: var(--maroon-dark);
            background-image: linear-gradient(to bottom, rgba(122,23,35,0.3), rgba(44,62,80,0.85)), 
                              url('https://www.therichonline.com/templates-new/img/photo-1620916566398-39f1143ab7be.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            display: flex; 
            flex-direction: column; 
            justify-content: flex-end; 
            padding: 50px; 
            color: var(--white); 
        }
        .login-image h2 { font-size: 2.8rem; margin-bottom: 10px; color: var(--gold); line-height: 1.1; }
        .login-image p { font-size: 1.05rem; font-weight: 300; line-height: 1.6; color: rgba(255,255,255,0.9); max-width: 90%; }
        .login-form-container { flex: 1; padding: 50px 60px; display: flex; flex-direction: column; justify-content: center; }
        .brand-logo { font-size: 1.8rem; font-weight: 700; color: var(--maroon); text-align: center; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
        .brand-logo span { color: var(--gold); }
        .form-subtitle { text-align: center; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 30px; }

        /* ================= การจัดการช่อง Input ================= */
        .input-group { margin-bottom: 22px; width: 100%; }
        .label-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 8px; }
        .label-row label { font-size: 0.9rem; font-weight: 500; color: var(--text-main); }
        .forgot-link { font-size: 0.85rem; color: var(--text-muted); text-decoration: underline transparent; }
        .forgot-link:hover { color: var(--maroon); text-decoration-color: var(--maroon); }

        /* กล่อง Input พื้นฐาน */
        .input-box { display: flex; align-items: center; background: var(--input-bg); border: 1.5px solid var(--border-line); border-radius: 12px; transition: 0.3s; width: 100%; position: relative; }
        .input-box:focus-within { border-color: var(--maroon); background: var(--white); box-shadow: 0 0 0 4px rgba(122, 23, 35, 0.08); }
        
        /* สไตล์แจ้ง Error: กรอบแดง (ทำงานคู่กับ JS) */
        .input-box.input-error { border-color: #E74C3C !important; background: #FDEDEC !important; } 
        
        .input-prefix { padding: 0 15px; color: #A0ABC0; display: flex; align-items: center; }
        
        /* สไตล์ Input ธรรมดา (รหัสผ่าน) */
        .input-box input:not([type="tel"]) { flex: 1; border: none; padding: 14px 15px; background: transparent; font-family: 'Prompt', sans-serif; font-size: 1rem; color: var(--text-main); outline: none; width: 100%; }
        
        /* ================= ปรับแต่ง intl-tel-input ให้สวยงาม ================= */
        .iti { width: 100%; display: block; }
        .iti__flag-container { border-radius: 12px 0 0 12px; z-index: 10; }
        .iti input[type="tel"] {
            width: 100%;
            border: none !important;
            background: transparent !important;
            padding-top: 14px !important;
            padding-bottom: 14px !important;
            padding-right: 15px !important;
            font-family: 'Prompt', sans-serif; 
            font-size: 1rem; 
            color: var(--text-main); 
            outline: none !important;
            box-shadow: none !important;
        }

        /* ตกแต่งข้อความ Error สีแดงจาก JustValidate */
        .just-validate-error-label { color: #E74C3C !important; font-size: 0.85rem; margin-top: 6px; display: block; }

        /* ================= ปุ่ม และเส้นคั่น ================= */
        .cf-wrapper { display: flex; justify-content: center; margin-bottom: 25px; margin-top: 10px; }
        .btn { width: 100%; padding: 15px; border-radius: 12px; font-family: 'Prompt', sans-serif; font-size: 1.05rem; font-weight: 500; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 10px; border: none; }
        .btn-primary { background: var(--maroon); color: var(--white); box-shadow: 0 4px 15px rgba(122, 23, 35, 0.2); }
        .btn-primary:hover { background: var(--maroon-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(122, 23, 35, 0.3); }

        .divider { display: flex; align-items: center; text-align: center; margin: 25px 0 20px; color: #A0ABC0; font-size: 0.85rem; }
        .divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-line); }
        .divider span { padding: 0 15px; }
        .google-auth-wrapper { display: flex; justify-content: center; width: 100%; }

        @media (max-width: 900px) {
            .login-wrapper { flex-direction: column; max-width: 450px; min-height: auto; margin: 15px; }
            .login-image { display: none; }
            .login-form-container { padding: 40px 30px; }
        }
  