/* ================= POPUP ROOT ================= */
#dieuhuo-popup,
#lendon-popup,
#lendon-batch-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.25);

  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}
#dieuhuo-popup.show,
#lendon-popup.show,
#lendon-batch-popup.show {
  opacity: 1;
  pointer-events: auto;
}

/* ================= BOX (NHỎ LẠI ~60%) ================= */

.ld-box {
  width: min(30vw, 420px); /* ⬅️ nhỏ hơn */
  padding: 16px 18px 18px; /* ⬅️ nhỏ hơn */

  border-radius: 12px;
  background: #fff;

  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);

  opacity: 0;
  transition: opacity 160ms ease;
}

#lendon-popup.show .ld-box,
#lendon-batch-popup.show .ld-box {
  opacity: 1;
}

/* ================= TEXT ================= */

#ld-chu {
  font-size: 15px; /* ⬅️ nhỏ hơn */
  color: #777;
  margin-bottom: 4px;
}

#ld-ten {
  font-size: 20px; /* ⬅️ nhỏ hơn */
  font-weight: 700;
  margin-bottom: 12px;
}

/* ================= INPUT + OK ROW ================= */

.ld-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ================= INPUT / SELECT ================= */

#ld-sl {
  flex: 1;
  height: 40px; /* ⬅️ nhỏ hơn */
  font-size: 22px; /* ⬅️ nhỏ hơn */
  font-weight: 600;

  text-align: center;
  padding-left: 28px;
  padding-right: 28px;

  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
}

#ld-sl:focus {
  border-color: #409eff;
}

/* ================= OK BUTTON ================= */

#ld-ok {
  width: 70px; /* ⬅️ nhỏ hơn */
  height: 40px;
  font-size: 14px;
  font-weight: 700;

  color: #fff;
  background: #409eff;

  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#ld-ok:active {
  background: #337ecc;
}

/* ================= BODY LOCK ================= */

body.popup-open {
  overflow: hidden;
  touch-action: none;
}

/* ================= BATCH POPUP ================= */

#lendon-batch-popup {
  z-index: 10000;
}

/* ================= BATCH BOX ================= */

#lendon-batch-popup .ld-box {
  width: min(40vw, 520px); /* ⬅️ nhỏ hơn */
  padding: 18px 22px 20px; /* ⬅️ nhỏ hơn */
}

/* ================= BATCH CONTENT ================= */

#lendon-batch-popup .ld-title {
  font-size: 22px; /* ⬅️ nhỏ hơn */
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
}

#lendon-batch-popup .ld-row:not(.actions) {
  display: grid;
  grid-template-columns: 100px 1fr;

  font-size: 16px; /* ⬅️ nhỏ hơn */
  margin-bottom: 10px;
}

#lendon-batch-popup .ld-row:not(.actions) span:first-child {
  text-align: right;
  padding-right: 8px;
  color: #777;
}

#lendon-batch-popup .ld-row:not(.actions) span:last-child {
  font-weight: 600;
}

/* tổng số lượng */
#batch-total {
  font-size: 22px; /* ⬅️ nhỏ hơn */
  font-weight: 700;
  color: #1677ff;
}

/* ================= ACTION BUTTONS ================= */

#lendon-batch-popup .actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

#lendon-batch-popup button {
  flex: 1;
  height: 40px; /* ⬅️ nhỏ hơn */
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}

/* OK */
#batch-ok {
  background: #409eff;
  color: #fff;
}

#batch-ok:active {
  background: #337ecc;
}

/* CANCEL */
#batch-cancel {
  background: #f2f2f2;
  color: #444;
}

#batch-cancel:active {
  background: #e0e0e0;
}
#dieuhuo-popup.show .ld-box {
  opacity: 1;
}

/*/* =========================
   POPUP 调货 (NHẬP TAY) – TO HƠN 50%
   ========================= */

#dieuhuo-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.3);

  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

#dieuhuo-popup.show {
  opacity: 1;
  pointer-events: auto;
}

/* ================= BOX ================= */

#dieuhuo-popup .ld-box {
  width: min(94vw, 560px); /* ⬅️ rộng hơn */
  padding: 26px 30px 30px; /* ⬅️ dày hơn */

  background: #ffffff;
  border-radius: 18px;

  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);

  display: flex;
  flex-direction: column;
  gap: 20px; /* ⬅️ giãn hơn */

  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

#dieuhuo-popup.show .ld-box {
  opacity: 1;
  transform: translateY(0);
}

/* ================= TITLE ================= */

#dieuhuo-popup .ld-title {
  font-size: 30px; /* ⬅️ +50% */
  font-weight: 900;
  text-align: center;
  color: #1e88e5;
  letter-spacing: 1.5px;
}

/* ================= FORM ROW ================= */

#dieuhuo-popup .ld-row {
  display: grid;
  grid-template-columns: 120px 1fr; /* ⬅️ label to hơn */
  align-items: center;
  gap: 16px;
}

/* label */
#dieuhuo-popup .ld-row label {
  font-size: 21px; /* ⬅️ +50% */
  font-weight: 600;
  color: #444;
  text-align: right;
  white-space: nowrap;
}

/* select + input */
#dieuhuo-popup select,
#dieuhuo-popup input {
  height: 60px; /* ⬅️ +50% */
  padding: 10px 14px;

  font-size: 27px; /* ⬅️ +50% */
  font-weight: 700;

  border-radius: 12px;
  border: 1px solid #cfd4dc;
  background: #fafafa;

  outline: none;
}

#dieuhuo-popup select:focus,
#dieuhuo-popup input:focus {
  border-color: #1e88e5;
  background: #ffffff;
}

/* số lượng cực rõ */
#dieuhuo-popup input[type="number"] {
  text-align: center;
  font-size: 32px; /* ⬅️ nổi bật hơn */
  font-weight: 800;
}

/* ================= ACTION BUTTONS ================= */

#dieuhuo-popup .actions {
  display: flex;
  gap: 18px;
  margin-top: 10px;
}

#dieuhuo-popup button {
  flex: 1;
  height: 64px; /* ⬅️ +50% */

  font-size: 24px; /* ⬅️ +50% */
  font-weight: 800;

  border-radius: 14px;
  border: none;
  cursor: pointer;

  transition: background 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}

/* OK */
#dieuhuo-popup .btn-ok {
  background: #1e88e5;
  color: #fff;
}

#dieuhuo-popup .btn-ok:hover {
  background: #1565c0;
}

#dieuhuo-popup .btn-ok:active {
  transform: scale(0.97);
}

/* CANCEL */
#dieuhuo-popup .btn-cancel {
  background: #eeeeee;
  color: #333;
}

#dieuhuo-popup .btn-cancel:hover {
  background: #e0e0e0;
}

#dieuhuo-popup .btn-cancel:active {
  transform: scale(0.97);
}
