/* Đối chiếu KiotViet (27/10/2026) — phần Hàng hoá + Mua hàng: kiểu dùng chung cho các màn mới */
/* Khung "Khởi tạo: n/9 bước" (góc phải dưới) che nút Lưu ở chân biểu mẫu → ẩn khi trang có chân biểu mẫu dính đáy */
body:has(.pfoot) .starter,body:has(.pos-bottom) .starter{display:none}
@media(max-width:700px){
/* P0-9: ba nút chân biểu mẫu hàng hoá gọn một dòng, chữ không xuống 3 hàng */
body.mob .pfoot{gap:8px;padding:8px 12px}
body.mob .pfoot button{white-space:nowrap;padding:10px 6px;font-size:15px;min-height:44px}
body.mob .pfoot .chk{flex:1 0 100%;margin:0}
}

/* P2-11: màn lập phiếu kho (Nhập hàng / Trả hàng nhập / Kiểm kho / Xuất…) trên điện thoại: dòng hàng thành THẺ, nút Hoàn thành dính đáy màn hình */
@media(max-width:700px){
body .pos-app .pos-layout{display:block}
body .pos-app{padding-bottom:92px}
body .pos-main .scroll,body .pos-main{overflow:visible}
body .pos-main table,body .pos-main tbody{display:block;width:100%}
body .pos-main table tr:first-child:has(th){display:none}
body .pos-main table tr{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:10px;background:var(--card)}
body .pos-main table td{display:block;padding:0;border:0;min-width:0}
body .pos-main table td[data-l]:not([data-l=""])::before{content:attr(data-l);display:block;font-size:11px;color:var(--mut);margin-bottom:2px}
body .pos-main table td[data-l="Mã"],body .pos-main table td[data-l="STT"],body .pos-main table td:has(input[aria-label="Ghi chú dòng hàng"]),body .pos-main table td[data-l=""]{grid-column:1/-1}
body .pos-main table td[data-l="Mã"]::before,body .pos-main table td[data-l="STT"]::before{display:none}
body .pos-main table td[data-l="Tên hàng"]{grid-column:1/-1;font-weight:600}
body .pos-main table td[data-l="Tên hàng"]:not([data-l=""])::before,body .pos-main table td[data-l="Mã"]:not([data-l=""])::before,body .pos-main table td[data-l="STT"]:not([data-l=""])::before{display:none}
body .pos-main table td input,body .pos-main table td select{width:100%!important;max-width:none!important}
body .pos-main table td[data-l=""] button{width:100%}
body .pos-pay{position:fixed;left:12px;right:12px;width:auto;bottom:12px;z-index:40;box-shadow:0 4px 14px rgba(0,0,0,.25)}
body .pos-bottom{display:none}
}

/* Điện thoại: bảng data-card (Bảng giá, Nhóm khách…) thành thẻ */
@media (max-width: 700px) {
  table.ctable { display: block; border: 0; }
  table.ctable tbody { display: block; }
  table.ctable tr:first-child { display: none; }
  table.ctable tr { display: block; border: 1px solid var(--line, #e5e7eb); border-radius: 12px; margin: 8px 0; padding: 8px 12px; background: var(--card, #fff); }
  table.ctable td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 0; padding: 3px 0; text-align: right; }
  table.ctable td:first-child { font-weight: 700; display: block; text-align: left; padding-bottom: 4px; }
  table.ctable td[data-l]::before { content: attr(data-l); color: var(--muted, #6b7280); font-size: 12px; text-align: left; flex: none; }
  table.ctable td:first-child::before { content: none; }
  table.ctable td[data-l=""]::before { content: none; }
  table.ctable td:empty { display: none; }
  table.ctable td input, table.ctable td select { max-width: 55%; }
}

/* Điện thoại: liên kết dạng chữ trong biểu mẫu/trang thiết lập cần vùng chạm ≥ 36px */
@media (max-width: 700px) {
  p > a[href^="#/"]:not([class]), .psec a:not([class]), .pos-side a:not([class]), .card a[href="#"]:not([class]) { display: inline-block; padding: 10px 6px; min-height: 36px; box-sizing: border-box; }
  .pos-top .sm, .pos-top button.sm, .pos-top button { min-width: 40px !important; min-height: 40px; }
  section a:not([class]), .psh a:not([class]) { display: inline-block; padding: 10px 6px; min-height: 36px; box-sizing: border-box; }
}
@media (max-width: 700px) { button[aria-label="Phím tắt"] { min-width: 40px !important; min-height: 40px; } }
