/* ==========================================================================
   Bổ sung cho module báo giá: nút Đơn hàng, danh sách đơn, ▲ ▼ đổi vị trí.
   Nạp bằng quote.js (link[data-quote-extra]) — không sửa stage.css dùng chung.
   ========================================================================== */

/* --- nút Đơn hàng cạnh giỏ hàng ------------------------------------------ */
#btn-orders {
  position: relative;
}
#btn-orders span {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #c0392b;
  color: #fff;
  font: 700 11px/18px "Be Vietnam Pro", Arial, sans-serif;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
#btn-orders span.is-empty {
  display: none;
}

/* --- trên modal lập báo giá: cột STT kiêm nút đổi vị trí ------------------ */
.qtable .q-idx {
  width: 46px;
  padding: 4px 2px;
  vertical-align: middle;
}
.q-ord {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.q-ord-n {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.q-ord-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.q-ord-btn {
  width: 24px;
  height: 18px;
  padding: 0;
  border: 1px solid #ded2c1;
  border-radius: 5px;
  background: #fbf7f1;
  color: #8a5a2b;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.q-ord-btn:hover:not(:disabled) {
  background: #f3e3d2;
  border-color: #c9a67a;
}
.q-ord-btn:active:not(:disabled) {
  background: #ecd8c0;
}
.q-ord-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

/* --- modal Đơn hàng ------------------------------------------------------ */
.qmodal-orders .qshell-orders {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
}
.qorders-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qorders-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.qorders-search {
  flex: 1 1 260px;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid #ded2c1;
  border-radius: 999px;
  background: #fdfbf7;
  font: 500 14.5px/1.3 "Be Vietnam Pro", Arial, sans-serif;
  color: #2b2118;
}
.qorders-search:focus {
  outline: none;
  border-color: #c9a67a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 166, 122, 0.22);
}
.qorders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 62vh;
  overflow-y: auto;
  padding: 2px;
}
.qorder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 16px;
  padding: 14px 16px;
  border: 1px solid #e6ded2;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.qorder:hover {
  border-color: #c9a67a;
  box-shadow: 0 3px 14px rgba(90, 60, 30, 0.08);
}
.qorder-main {
  min-width: 0;
}
.qorder-code {
  font: 700 16px/1.25 "Be Vietnam Pro", Arial, sans-serif;
  letter-spacing: 0.3px;
  color: #3d2a1c;
}
.qorder-cust {
  margin-top: 2px;
  font: 600 14.5px/1.35 "Be Vietnam Pro", Arial, sans-serif;
  color: #2b2b2b;
}
.qorder-sub {
  margin-top: 3px;
  font: 400 12.8px/1.4 "Be Vietnam Pro", Arial, sans-serif;
  color: #7a6a5c;
}
.qorder-total {
  font: 700 17px/1.2 "Be Vietnam Pro", Arial, sans-serif;
  color: #b3261e;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.qorder-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.qorder-empty {
  margin: 0;
  padding: 34px 14px;
  text-align: center;
  font: 400 14.5px/1.6 "Be Vietnam Pro", Arial, sans-serif;
  color: #7a6a5c;
  border: 1px dashed #e0d5c6;
  border-radius: 14px;
  background: #fdfbf7;
}
.qbtn-danger {
  color: #b3261e;
  border-color: #f0cfcb;
  background: #fdf4f3;
}
.qbtn-danger:hover {
  background: #fbe8e6;
  border-color: #e0a49d;
}

@media (max-width: 620px) {
  .qorder {
    grid-template-columns: 1fr;
  }
  .qorder-total {
    text-align: left;
  }
  .qorders-list {
    max-height: 66vh;
  }
}
