/* 2/10 (a Thinh chot): O BAN kieu macOS. Chi giao dien - markup do renderTables (app_events.js) sinh, class .tk.
   Nap SAU pc_v2.css / pc_head.css / pc_remind.css. Selector co "button.table.tk" de thang specificity cu. */
body.pc2 #tables button.table.tk{--st:#D3D1C7;--stb:#F1EFE8;--stt:#5F5E5A;
  position:relative !important;display:flex !important;flex-direction:column !important;align-items:stretch !important;justify-content:flex-start !important;
  gap:6px !important;text-align:left !important;min-height:150px !important;padding:10px 10px 8px !important;box-sizing:border-box !important;overflow:hidden !important;
  background:#fff !important;border:1px solid #E3E5E9 !important;border-radius:14px !important;color:#1d1d1f !important;
  /* NOI KHOI nhu 30/9: vien sang tren + day duoi day + bong do */
  background-image:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,0) 60%) !important;
  box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 3px 0 rgba(15,40,70,.10),0 6px 14px rgba(15,40,70,.10) !important;outline:none !important;
  /* KHONG !important o transition: __zoneSweep (song ban luot trai->phai khi doi khu) dat transition inline 0.6s */
  transition:transform .12s ease,box-shadow .12s ease,border-color .15s;font-family:inherit}
body.pc2 #tables button.table.tk::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:var(--st);border-radius:0;pointer-events:none}
body.pc2 #tables button.table.tk:hover{transform:translateY(-2px) !important;border-color:#C9CDD3 !important;box-shadow:0 1px 0 rgba(255,255,255,.9) inset,0 5px 0 rgba(15,40,70,.10),0 12px 22px rgba(15,40,70,.14) !important}
/* 18/10 (a Thinh chot: sua loi POS): bam xuong KHONG dich o ban nua (truoc -2px -> +2px = lech 4px, mousedown/mouseup roi vao khe -> mat click).
   Chi doi bong (cam giac "lun"), vi tri giu nguyen nhu luc re chuot. */
body.pc2 #tables button.table.tk:active{transform:none !important;box-shadow:0 1px 0 rgba(15,40,70,.12) inset,0 1px 0 rgba(15,40,70,.10),0 2px 6px rgba(15,40,70,.10) !important}
body.pc2 #tables button.table.tk:hover:active{transform:translateY(-2px) !important}
body.pc2:not(.pc2-order) #tables{grid-template-columns:repeat(auto-fill,minmax(160px,1fr)) !important;gap:10px !important}
/* trang thai */
body.pc2 #tables button.table.tk.tkEmptyT{background:#FBFBFC !important}
body.pc2 #tables button.table.tk.serving{--st:#1D9E75;--stb:#E1F5EE;--stt:#085041;background:#fff !important;border-color:#E3E5E9 !important}
body.pc2 #tables button.table.tk.paying{--st:#EF9F27;--stb:#FAEEDA;--stt:#633806;background:#fff !important;border-color:#E3E5E9 !important}
body.pc2 #tables button.table.tk.attn-red{--st:#E24B4A;--stb:#FCEBEB;--stt:#791F1F;background:#FFFBFB !important;border-color:#F09595 !important;border-width:1px !important}
body.pc2 #tables button.table.tk.serving:not(:hover):not(:active){box-shadow:0 1px 0 rgba(255,255,255,.8) inset,0 3px 0 rgba(15,110,86,.22),0 6px 14px rgba(15,110,86,.14) !important}
body.pc2 #tables button.table.tk.paying:not(:hover):not(:active),body.pc2 #tables button.table.tk.attn-red:not(:hover):not(:active){box-shadow:0 1px 0 rgba(255,255,255,.8) inset,0 3px 0 rgba(163,45,45,.22),0 6px 14px rgba(163,45,45,.14) !important}
body.pc2 #tables button.table.tk.selected,body.pc2 #tables button.table.tk.selected:not(:hover):not(:active){border-color:#378ADD !important;box-shadow:0 0 0 2px #378ADD,0 3px 0 rgba(24,95,165,.18),0 6px 14px rgba(24,95,165,.14) !important}
/* hang dau */
body.pc2 #tables .tk .tkHd{display:flex;align-items:center;gap:6px;min-width:0;margin-top:1px}
body.pc2 #tables .tk .tableId{font-size:20px !important;font-weight:600 !important;letter-spacing:-.3px;line-height:1.1 !important;color:#1d1d1f !important;white-space:nowrap}
body.pc2 #tables .tk .tkPill{font-size:11px;font-weight:600;line-height:1.2;padding:2px 7px;border-radius:999px;background:var(--stb);color:var(--stt);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
body.pc2 #tables .tk .tblQrBtn{position:static !important;margin-left:auto !important;flex:0 0 auto;width:26px;height:26px;padding:0 !important;display:inline-flex;align-items:center;justify-content:center;
  border-radius:8px !important;border:1px solid #E3E5E9 !important;background:#fff !important;color:#6e6e73 !important;box-shadow:none !important;font-size:0 !important}
body.pc2 #tables .tk .tblQrBtn:hover{background:#F2F3F5 !important;color:#1d1d1f !important}
body.pc2 #tables .tk .tblQrBtn .tkI{width:16px;height:16px}
/* icon net chung */
body.pc2 #tables .tk .tkI{width:13px;height:13px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;vertical-align:-2px}
/* nhan bao viec (1 nhan, uu tien nhu cu) */
body.pc2 #tables .tk .tblFlag{position:static !important;display:flex !important;align-items:center;gap:5px;max-width:none !important;margin:0 !important;
  font-size:11.5px !important;font-weight:600 !important;line-height:1.25 !important;padding:4px 8px !important;border-radius:8px !important;box-shadow:none !important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;animation:none}
body.pc2 #tables .tk .tblFlag.flCall{background:#A32D2D !important;color:#fff !important;animation:tkPulse 1.2s ease-in-out infinite}
body.pc2 #tables .tk .tblFlag.flQr{background:#FAECE7 !important;color:#712B13 !important}
body.pc2 #tables .tk .tblFlag.flDone{background:#EAF3DE !important;color:#27500A !important}
body.pc2 #tables .tk .tblFlag.flSlow{background:#FCEBEB !important;color:#791F1F !important}
@keyframes tkPulse{0%,100%{opacity:1}50%{opacity:.72}}
/* thong tin: gio ngoi / so mon / icon nhac + tam tinh */
body.pc2 #tables .tk .tblInfo{display:flex !important;flex-direction:column !important;align-items:stretch !important;gap:4px !important;margin:0 !important;flex:1 1 auto}
body.pc2 #tables .tk .tblInfoTop{display:flex !important;align-items:center;gap:10px !important;flex-wrap:nowrap !important;font-size:12px !important;font-weight:500 !important;color:#6e6e73 !important}
body.pc2 #tables .tk .tblSit,body.pc2 #tables .tk .tblCnt{display:inline-flex;align-items:center;gap:3px;white-space:nowrap;font-variant-numeric:tabular-nums}
body.pc2 #tables .tk .tblSitLong{color:#A32D2D !important;font-weight:600}
/* 18/10 (a Thinh chot: sua loi POS): ma ban dai / nhieu icon nhac -> khong tran o, cat "..." */
body.pc2 #tables .tk .tkHd > .tableId{min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis}
body.pc2 #tables .tk .tkHd > .tkPill{flex:0 1 auto}
body.pc2 #tables .tk .tblInfoTop{min-width:0;overflow:hidden}
body.pc2 #tables .tk .tblSit,body.pc2 #tables .tk .tblCnt{min-width:0;overflow:hidden;text-overflow:ellipsis}
body.pc2 #tables .tk .srIcons{min-width:0;overflow:hidden;flex:0 1 auto}
body.pc2 #tables .tk .srIcons{margin-left:auto !important;gap:3px !important}
body.pc2 #tables .tk .srI{width:20px !important;height:20px !important;border-radius:6px !important}
body.pc2 #tables .tk .tblAmt{margin-top:auto !important;text-align:right;font-size:17px !important;font-weight:600 !important;color:#1d1d1f !important;font-variant-numeric:tabular-nums;letter-spacing:-.2px}
/* thanh nut Xem / Bill / Kiem */
body.pc2 #tables .tk .quickPrintBtnRow{display:flex !important;gap:2px !important;margin:0 !important;padding:2px;background:#F2F3F5;border-radius:9px;width:100%;box-sizing:border-box}
body.pc2 #tables .tk .quickPrintBtnRow .quickPrintBtn{flex:1 1 0 !important;min-width:0;display:flex;align-items:center;justify-content:center;padding:5px 0 !important;
  border:0 !important;border-radius:7px !important;background:transparent !important;color:#3a3a3c !important;font-size:12px !important;font-weight:500 !important;box-shadow:none !important;cursor:pointer}
body.pc2 #tables .tk .quickPrintBtnRow .quickPrintBtn:hover{background:#fff !important;color:#1d1d1f !important;box-shadow:0 1px 2px rgba(16,24,40,.08) !important}
/* ban trong */
body.pc2 #tables .tk .tkEmpty{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:#B4B2A9}
body.pc2 #tables .tk .tkEmpty .tkI{width:30px;height:30px;stroke-width:1.5}
/* 3/10 (mo ban muot): o mon ngoai tam nhin KHONG ve cho toi khi cuon toi (thuc don dai, bo gioi han 360) */
body.pc2 #menuGrid > .v5ItemCard{content-visibility:auto;contain-intrinsic-size:auto 92px}
/* che do dang mo order (o nho): chi so ban + tien, giu mau trang thai */
body.pc2.pc2-order #tables button.table.tk{min-height:58px !important;padding:7px 6px 5px !important;gap:2px !important;text-align:center !important;align-items:center !important;border-radius:11px !important}
body.pc2.pc2-order #tables .tk .tkHd{justify-content:center}
body.pc2.pc2-order #tables .tk .tableId{font-size:16px !important}
body.pc2.pc2-order #tables .tk .tkPill,body.pc2.pc2-order #tables .tk .tblQrBtn,body.pc2.pc2-order #tables .tk .tblFlag,body.pc2.pc2-order #tables .tk .tblInfoTop,
body.pc2.pc2-order #tables .tk .quickPrintBtnRow,body.pc2.pc2-order #tables .tk .tkEmpty{display:none !important}
body.pc2.pc2-order #tables .tk .tblAmt{font-size:11.5px !important;text-align:center;margin-top:0 !important}

/* 3/10 (thang cot): "Can chu y" - cham | nhan rong co dinh | cot chip rieng (ghi de CSS index.html) */
.needBox .needItem{display:grid;grid-template-columns:8px 138px minmax(0,1fr);column-gap:7px;align-items:start}
.needBox .needItem .needDot{margin-top:5px}
.needBox .needItem .needLbl{margin-right:0;min-width:0;line-height:18px}
.needBox .needItem .needChips{display:flex;flex-wrap:wrap;gap:5px;min-width:0}
/* 3/10 (thang cot): Hoat dong gan nhat - ten | Ban (cot co dinh) | gio (cot co dinh, phai) */
.actRow .actTop{display:grid;grid-template-columns:minmax(0,1fr) 76px;column-gap:8px;align-items:baseline}
.actRow .actTop .actLabel{grid-column:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.actRow .actTop .actTable{grid-column:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.actRow .actTime{flex:0 0 42px;text-align:right}
/* 6/10 (cot phai khong tran ngang): "Can chu y" - bo cot nhan 138px co dinh. Ca hop = 1 luoi chung (moi dong display:contents)
   -> cot nhan rong theo nhan DAI NHAT (cac dong van thang cot chip), cot hep thi nhan tu xuong dong; cot chip toi thieu 96px;
   chip tu co theo chu, dai qua thi ... (khong bao gio day ngang) */
.needBox{display:grid;grid-template-columns:8px minmax(0,max-content) minmax(96px,1fr);column-gap:7px;row-gap:8px;align-items:start;min-width:0;box-sizing:border-box}
.needBox .needHead{grid-column:1/-1;margin-bottom:0;min-width:0}
.needBox .needItem{display:contents}
.needBox .needItem .needLbl{overflow-wrap:anywhere}
.needBox .needChip{max-width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 6/10 (cot phai khong tran ngang): Hoat dong gan nhat - gio toi thieu 42px (khong bi cat khi chu to), dong khong day ngang */
.actRow{min-width:0}
.actRow .actTop{min-width:0}
.actRow .actTime{flex:none;min-width:42px;white-space:nowrap}
/* 3/10 (thang cot): bang phieu thu chi - tieu de cot So tien canh phai theo o tien */
table:has(#cashListBody) th:nth-child(4){text-align:right}
