    body,
    input,
    select,
    textarea,
    button,
    .modal-content {
      font-family: 'Sarabun', sans-serif !important;
      font-size: 16px;
    }

    body {
      background-color: #f4f6f9;
    }

    /* UI typography: increase only about 2px from the original size.
       Keep the original compact layout and scale responsively on mobile. */
    #appRoot {
      font-size: 18px;
    }

    #appRoot .text-xs {
      font-size: 14px !important;
      line-height: 1.35 !important;
    }

    #appRoot .text-sm {
      font-size: 16px !important;
      line-height: 1.4 !important;
    }

    #appRoot .text-base {
      font-size: 18px !important;
      line-height: 1.45 !important;
    }

    #appRoot .text-lg {
      font-size: 20px !important;
      line-height: 1.4 !important;
    }

    #appRoot .text-xl {
      font-size: 22px !important;
      line-height: 1.35 !important;
    }

    #appRoot input,
    #appRoot select,
    #appRoot textarea,
    #appRoot button {
      font-size: 16px !important;
    }

    #appRoot label {
      font-size: 14px !important;
      line-height: 1.4 !important;
    }

    #appRoot table {
      font-size: 14px;
    }

    #appRoot .autocomplete-input {
      font-size: 16px !important;
    }

    @media (max-width: 768px) {
      #appRoot {
        font-size: 18px;
      }

      #appRoot .text-xs {
        font-size: 14px !important;
      }

      #appRoot .text-sm {
        font-size: 16px !important;
      }

      #appRoot .text-base {
        font-size: 18px !important;
      }

      #appRoot .text-lg {
        font-size: 20px !important;
      }

      #appRoot .text-xl {
        font-size: 22px !important;
      }

      #appRoot input,
      #appRoot select,
      #appRoot textarea,
      #appRoot button {
        font-size: 16px !important;
      }

      #appRoot label {
        font-size: 14px !important;
      }

      #appRoot table {
        font-size: 14px;
      }

      #appRoot .autocomplete-input {
        font-size: 16px !important;
      }
    }

    .tab-active {
      border-bottom: 3px solid #2563eb;
      color: #2563eb;
      font-weight: 600;
    }

    .tab-content-pane {
      display: none;
    }

    .tab-content-pane.active {
      display: block;
    }

    .sig-img {
      max-height: 50px;
      display: block;
      margin: 0 auto;
    }

    .custom-modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(2px);
    }

    .modal-content {
      background-color: #fff;
      margin: 15% auto;
      padding: 25px;
      border-radius: 12px;
      width: 360px;
      text-align: center;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
      animation: modalFadeIn 0.2s;
    }

    @keyframes modalFadeIn {
      from {
        transform: translateY(-15px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    /* หน้า Login: พื้นหลังเป็นรูปภาพถ้ามีไฟล์ frontend/assets/login-bg.png
       ถ้าไม่มีไฟล์ (โหลดรูปไม่สำเร็จ) เบราว์เซอร์จะ fallback ไปใช้สีขาวที่ระบุไว้แทนโดยอัตโนมัติ */
        #loginScreen {
  position: relative;
  background-color: #ffffff; /* fallback สีขาว */
  overflow: hidden; /* ป้องกันส่วนที่เบลอล้นออกนอกขอบ */
}

/* สร้างเลเยอร์ภาพพื้นหลังแยกต่างหาก */
#loginScreen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../assets/login-bg.png') center center / cover no-repeat;
  
  /* ปรับค่าตามต้องการตรงนี้ */
  filter: blur(2px) brightness(0.7); 
  
  /* ขยายขนาดเล็กน้อยเพื่อป้องกันขอบขาวจากการเบลอ */
  transform: scale(1.05);
  z-index: 0;
}

/* ปรับให้เนื้อหาภายในอยู่นับบนเลเยอร์พื้นหลัง */
#loginScreen > * {
  position: relative;
  z-index: 1;
}
