
:root{--bg:#050712;--panel:#0b1020;--panel2:#11182d;--line:#22304f;--txt:#e8f1ff;--muted:#8ea4c8;--brand:#31a8ff;--brand2:#8b5cf6;--good:#34d399;--bad:#fb7185;--warn:#fbbf24;--card:rgba(16,24,44,.78)}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top left,#12305a 0,#050712 38%,#03040a 100%);color:var(--txt);font-family:Inter,system-ui,Segoe UI,Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}.app{display:grid;grid-template-columns:260px 1fr;min-height:100vh}.side{background:rgba(5,8,19,.92);border-right:1px solid var(--line);padding:18px;position:sticky;top:0;height:100vh;overflow:auto}.brand{display:flex;gap:10px;align-items:center;margin-bottom:18px}.logo{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--brand),var(--brand2));display:grid;place-items:center;font-weight:900;overflow:hidden}.logo img{width:100%;height:100%;object-fit:cover}.brand h1{font-size:16px;margin:0}.brand small{color:var(--muted)}.userbox{display:flex;gap:10px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:16px;background:var(--card);margin-bottom:14px}.ava{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#22d3ee,#8b5cf6);display:grid;place-items:center;font-weight:800}.nav button{width:100%;display:flex;align-items:center;gap:10px;border:0;color:#cde2ff;background:transparent;padding:11px 12px;border-radius:14px;text-align:left;margin:3px 0}.nav button:hover,.nav button.active{background:linear-gradient(90deg,rgba(49,168,255,.18),rgba(139,92,246,.15));color:#fff}.main{min-width:0}.top{height:72px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid var(--line);background:rgba(5,8,19,.55);backdrop-filter:blur(12px);position:sticky;top:0;z-index:5}.top h2{margin:0;font-size:20px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.content{padding:22px}.grid{display:grid;gap:14px}.cards{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:16px;box-shadow:0 14px 40px rgba(0,0,0,.22)}.card h3{margin:0 0 8px;font-size:13px;color:var(--muted);font-weight:600}.num{font-size:24px;font-weight:850}.muted{color:var(--muted)}.good{color:var(--good)}.bad{color:var(--bad)}.warn{color:var(--warn)}.btn{border:1px solid var(--line);background:#121a31;color:#eaf4ff;border-radius:12px;padding:9px 12px}.btn.primary{border:0;background:linear-gradient(135deg,var(--brand),var(--brand2));color:white;font-weight:700}.btn.danger{background:#3a1420;border-color:#703047;color:#fecdd3}.btn.good{background:#0f3329;border-color:#246b59;color:#bbf7d0}.btn.small{padding:6px 9px;border-radius:10px;font-size:12px}.input,.select,textarea{width:100%;background:#0b1224;border:1px solid var(--line);color:var(--txt);border-radius:12px;padding:10px 11px;outline:none}textarea{min-height:80px}.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:18px;background:rgba(9,14,28,.7)}table{width:100%;border-collapse:collapse;min-width:900px}th,td{padding:12px 13px;border-bottom:1px solid rgba(34,48,79,.65);text-align:left;font-size:13px;vertical-align:middle}th{color:#9eb7dc;font-size:12px;text-transform:uppercase;letter-spacing:.04em;background:rgba(11,16,32,.75);position:sticky;top:0}tr:hover td{background:rgba(49,168,255,.035)}.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;background:#13213d;border:1px solid #263c68;font-size:12px}.modal{position:fixed;inset:0;background:rgba(0,0,0,.68);display:none;align-items:center;justify-content:center;z-index:99;padding:18px}.modal.show{display:flex}.dialog{width:min(980px,100%);max-height:92vh;overflow:auto;background:#0b1020;border:1px solid var(--line);border-radius:24px;padding:18px;box-shadow:0 25px 100px rgba(0,0,0,.55)}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.formgrid .full{grid-column:1/-1}.login{min-height:100vh;display:grid;place-items:center;padding:20px}.loginbox{width:min(420px,100%);background:rgba(11,16,32,.88);border:1px solid var(--line);border-radius:28px;padding:24px}.pos{display:grid;grid-template-columns:1.15fr .85fr;gap:16px}.searchResults{position:absolute;background:#0b1224;border:1px solid var(--line);border-radius:14px;max-height:240px;overflow:auto;z-index:20;width:100%;box-shadow:0 20px 50px rgba(0,0,0,.4)}.result{padding:10px 12px;border-bottom:1px solid #17233d;cursor:pointer}.result:hover{background:#13213d}.rel{position:relative}.invoice{background:white;color:#111;border-radius:16px;padding:16px}.invoice *{color:#111}.qrbox{width:150px;height:150px;background:#e5e7eb;border-radius:12px;display:grid;place-items:center;margin:auto;overflow:hidden}.qrbox img{max-width:100%;max-height:100%;object-fit:contain}.hidden{display:none!important}.mobilebar{display:none}.pillrow{display:flex;gap:8px;flex-wrap:wrap}.tabs{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}.tabs button.active{background:linear-gradient(135deg,var(--brand),var(--brand2));border:0}.notice{padding:16px;border:1px dashed #385b91;background:#0b1429;border-radius:18px}.two{grid-template-columns:1fr 1fr}.three{grid-template-columns:repeat(3,1fr)}
@media(max-width:980px){.app{grid-template-columns:1fr}.side{display:none}.top{height:auto;min-height:64px}.content{padding:14px 14px 80px}.cards{grid-template-columns:repeat(2,1fr)}.pos,.two,.three{grid-template-columns:1fr}.formgrid{grid-template-columns:1fr}.mobilebar{display:flex;position:fixed;bottom:0;left:0;right:0;background:#070b16;border-top:1px solid var(--line);z-index:50;gap:4px;padding:8px;overflow:auto}.mobilebar button{min-width:78px;border:0;background:transparent;color:#cde2ff;padding:8px;border-radius:12px;font-size:12px}.mobilebar button.active{background:#13213d}.top{padding:10px 14px}.actions{justify-content:flex-end}.cards{grid-template-columns:1fr 1fr}}@media(max-width:560px){.cards{grid-template-columns:1fr}.num{font-size:20px}table{min-width:760px}}

/* ===== POS V3 PRO - Bán hàng hoàn thiện ===== */
.posPro{display:grid;grid-template-columns:1.08fr .92fr;gap:16px;align-items:start}.posKpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.posKpi{background:linear-gradient(180deg,rgba(17,28,53,.9),rgba(10,17,34,.86));border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:0 18px 45px rgba(0,0,0,.18)}.posKpi small{display:block;color:var(--muted);margin-bottom:8px}.posKpi b{font-size:22px}.posTabs{display:flex;gap:10px;border-bottom:1px solid rgba(34,48,79,.75);margin:-4px -16px 16px;padding:0 16px}.posTabs button{border:0;background:transparent;color:#bfd6fb;padding:13px 8px;border-bottom:2px solid transparent}.posTabs button.active{color:#4fc3ff;border-bottom-color:#7c6dff;font-weight:800}.posTools{display:grid;grid-template-columns:1fr 140px;gap:10px;margin-bottom:14px}.searchIcon{position:relative}.searchIcon:before{content:'⌕';position:absolute;left:12px;top:50%;transform:translateY(-52%);color:var(--muted);font-size:20px}.searchIcon .input{padding-left:38px}.posProductList{border:1px solid var(--line);border-radius:18px;overflow:hidden;background:rgba(8,14,28,.62)}.posProductHead,.posProductRow{display:grid;grid-template-columns:1.35fr .55fr .6fr .55fr .42fr;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid rgba(34,48,79,.58)}.posProductHead{color:#a9c0e6;font-size:12px;background:rgba(11,16,32,.78);text-transform:uppercase;letter-spacing:.04em}.posProductRow:hover{background:rgba(49,168,255,.05)}.prodCell{display:flex;align-items:center;gap:10px}.prodThumb,.cartThumb{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:radial-gradient(circle at 30% 20%,#1d8cff,#0c1427 65%);font-size:24px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);overflow:hidden}.prodName b{display:block}.prodName small{color:var(--muted)}.posPager{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 4px 0;color:var(--muted)}.pagerBtns{display:flex;gap:8px}.pagerBtns button{min-width:38px}.cartCard{padding:0;overflow:hidden}.cartTitle{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid rgba(34,48,79,.7)}.cartRows{max-height:330px;overflow:auto}.cartRow{display:grid;grid-template-columns:1.1fr .55fr .7fr .22fr;gap:10px;align-items:center;padding:12px 16px;border-bottom:1px solid rgba(34,48,79,.55)}.qtyBox{display:inline-grid;grid-template-columns:32px 34px 32px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#0b1224}.qtyBox button{border:0;background:transparent;color:#fff}.qtyBox span{display:grid;place-items:center;border-left:1px solid var(--line);border-right:1px solid var(--line)}.cartNote{padding:12px 16px}.cartSummary{padding:0 16px 16px}.sumLine{display:flex;justify-content:space-between;align-items:center;padding:9px 0}.sumLine.total{border-top:1px solid var(--line);margin-top:6px;padding-top:14px;font-size:20px;font-weight:900}.sumLine.total b{font-size:26px;color:#60a5ff}.payGrid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:10px}.payActions{display:grid;grid-template-columns:1fr 1.15fr;gap:10px;margin-top:14px}.emptyCart{padding:26px 16px;color:var(--muted);text-align:center}.deleteMini{border:0;background:transparent;color:#fb7185;font-size:18px}.posCustomerBox{margin:0 0 14px}.selectedMini{margin-top:10px;padding:10px 12px;border-radius:14px;border:1px dashed #385b91;background:#0b1429}.selectedMini b{color:#fff}.posInvoiceMini{display:none}
@media(max-width:1100px){.posKpis{grid-template-columns:repeat(2,1fr)}.posPro{grid-template-columns:1fr}.cartRows{max-height:none}}@media(max-width:620px){.posTools{grid-template-columns:1fr}.posProductHead{display:none}.posProductRow{grid-template-columns:1fr auto;gap:8px}.posProductRow>*:nth-child(2),.posProductRow>*:nth-child(3),.posProductRow>*:nth-child(4){display:none}.cartRow{grid-template-columns:1fr;align-items:start}.payActions{grid-template-columns:1fr}.posKpis{grid-template-columns:1fr 1fr}.posKpi b{font-size:18px}}


/* === POS BILL / RECEIPT UPGRADE V3.2 === */
.customerPanel{margin:10px 0 14px;padding:12px;border:1px dashed #385b91;background:#0b1429;border-radius:16px;line-height:1.55}.customerPanel b{color:#fff}.customerMeta{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:8px}.customerMeta span{color:var(--muted)}.cartCustomerCard{border:1px solid var(--line);border-radius:16px;background:#0b1429;padding:12px;margin:0 0 12px}.cartCustomerCard h4{margin:0 0 8px;font-size:15px}.cartCustomerGrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:13px}.cartCustomerGrid div{padding:7px 8px;border-radius:10px;background:rgba(255,255,255,.03)}.billActions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.billActions .full{grid-column:1/-1}.receiptWrap{margin-top:12px;background:#fff;border-radius:14px;padding:10px;max-height:520px;overflow:auto}.receipt{width:430px;max-width:100%;margin:auto;background:#fff;color:#111;font-family:Arial,Helvetica,sans-serif;border-radius:0;padding:10px 10px 22px}.receipt *{color:#111!important}.receipt .rLogo{text-align:center;margin-bottom:8px}.receipt .rLogo img{width:72px;height:72px;object-fit:contain}.receipt .rShop{text-align:center;font-size:26px;font-weight:500;letter-spacing:.2px}.receipt .rSub{text-align:center;font-size:23px;font-style:italic;margin-top:6px}.receipt .rLine{border:0;border-top:1px solid #111;margin:10px 0}.receipt .rDash{border:0;border-top:1px dashed #111;margin:9px 0}.receipt .rTitle{text-align:center;font-size:30px;font-weight:500;margin:8px 0 12px}.receipt .rCode{text-align:center;font-size:22px;margin-bottom:10px}.receipt .rInfo{display:grid;grid-template-columns:118px 1fr;row-gap:10px;font-size:27px}.receipt .rTableHead,.receipt .rItem{display:grid;grid-template-columns:1.6fr .75fr .28fr .75fr;gap:8px;align-items:start;font-size:27px}.receipt .rTableHead{font-weight:500}.receipt .rItem small{display:block;color:#888!important;text-decoration:line-through;text-align:center;margin-top:4px}.receipt .rMoney{display:grid;grid-template-columns:1fr auto;gap:14px;font-size:27px;line-height:1.55}.receipt .rMoney b{font-weight:500}.receipt .rPay{display:grid;grid-template-columns:190px 1fr;gap:12px;align-items:start;margin-top:8px}.receipt .rQr img{width:178px;height:178px;object-fit:contain}.receipt .rBank{text-align:right;font-size:24px;line-height:1.65}.receipt .rTransfer{display:grid;grid-template-columns:1fr 1fr;font-size:24px;margin-top:8px}.receipt .rNote{text-align:center;font-size:26px;line-height:1.45;margin:14px 18px}.receipt .rThanks{text-align:center;font-size:26px;font-weight:600;margin-top:28px}.receiptDesignPreview{background:#fff;border-radius:14px;padding:10px;overflow:auto}.receiptDesignPreview .receipt{transform-origin:top left}.hiddenExport{position:fixed;left:-9999px;top:0;z-index:-1}
@media(max-width:980px){.cartCustomerGrid,.billActions{grid-template-columns:1fr}.receipt{width:390px}.receipt .rShop{font-size:23px}.receipt .rTitle{font-size:27px}.receipt .rInfo,.receipt .rTableHead,.receipt .rItem,.receipt .rMoney{font-size:24px}.receipt .rPay{grid-template-columns:160px 1fr}.receipt .rQr img{width:150px;height:150px}.receipt .rNote,.receipt .rThanks{font-size:23px}}


/* === BILL FIX V3.3 - giống mẫu, đủ thông tin khách, QR tự nhập tiền === */
.receipt{width:430px;padding:16px 10px 26px;font-family:Arial,Helvetica,sans-serif}
.receipt .rLogo img{width:58px;height:58px}.receipt .rShop{font-size:26px;line-height:1.2}.receipt .rSub{font-size:24px}.receipt .rTitle{font-size:32px;margin:10px 0 12px}.receipt .rCode{font-size:22px}.receipt .rInfo{grid-template-columns:126px 1fr;row-gap:9px;font-size:27px;align-items:start}.receipt .rInfo b{font-weight:700}.receipt .rTableHead,.receipt .rItem{grid-template-columns:1.55fr .78fr .28fr .78fr;font-size:27px;gap:8px}.receipt .rItem{padding:2px 0}.receipt .rMoney{font-size:27px}.receipt .rPay{grid-template-columns:185px 1fr}.receipt .rQr img{width:178px;height:178px}.receipt .rBank{font-size:24px}.receipt .rTransfer{font-size:25px}.receipt .rNote{font-size:26px}.receipt .rThanks{font-size:26px}.settingsHint{font-size:12px;color:var(--muted);line-height:1.45;margin-top:6px}

.customerPanel{margin-top:10px;padding:10px 12px;border-radius:14px;border:1px dashed #385b91;background:#0b1429}.customerMeta{display:grid;grid-template-columns:1fr 1fr;gap:7px 14px;margin-top:8px}.customerMeta span{color:var(--muted)}.billActions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.billActions .full{grid-column:1/-1}.cartCustomerCard{padding:12px 16px;background:rgba(12,20,39,.8);border-bottom:1px solid rgba(34,48,79,.55)}.cartCustomerCard h4{margin:0 0 8px}.cartCustomerGrid{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px;font-size:12px}.settingsHint{margin-top:10px;padding:10px;border:1px dashed #385b91;background:#0b1429;border-radius:14px;color:#bfd6fb}.receiptWrap{margin-top:10px;max-height:310px;overflow:auto;background:white;border-radius:14px}.receiptDesignPreview{background:white;display:flex;justify-content:center;padding:16px;border-radius:14px}.receipt{width:560px;background:#fff;color:#111;padding:26px 28px;font-family:Arial,sans-serif}.receipt *{color:#111}.rLogo{text-align:center;height:54px}.rLogo img{max-height:54px;max-width:90px}.rShop{text-align:center;font-size:26px;margin-top:8px}.rSub{text-align:center;font-size:22px;font-style:italic;margin-top:6px}.rLine{border:0;border-top:2px solid #111;margin:12px 0}.rDash{border:0;border-top:1px dashed #111;margin:7px 0}.rTitle{text-align:center;font-size:30px;font-weight:500}.rCode{text-align:center;font-size:22px;margin:10px 0}.rInfo{display:grid;grid-template-columns:135px 1fr;gap:8px;font-size:24px}.rTableHead,.rItem{display:grid;grid-template-columns:1.4fr .7fr .3fr .75fr;gap:8px;font-size:24px}.rMoney{display:grid;grid-template-columns:1fr 1fr;gap:10px;font-size:24px}.rMoney b{text-align:right}.rPay{display:grid;grid-template-columns:1fr 1.2fr;gap:16px;align-items:center}.rQr img{width:210px;max-width:100%}.rBank{text-align:center;font-size:24px;line-height:1.55}.rTransfer{display:grid;grid-template-columns:1fr 1fr;font-size:22px}.rNote{text-align:center;font-size:24px;line-height:1.45;margin:14px 0}.rThanks{text-align:center;font-size:24px;font-weight:800;margin-top:28px}.posTabs button{cursor:pointer}@media(max-width:980px){.customerMeta,.cartCustomerGrid{grid-template-columns:1fr}.posKpis{grid-template-columns:1fr 1fr}.posPro{grid-template-columns:1fr}}

/* === MOBILE FIRST FIX V3.11 === */
.hamb{display:none;border:1px solid var(--line);background:#121a31;color:#fff;border-radius:12px;padding:8px 11px;font-size:20px;line-height:1}
.mobileShade{display:none}
@media(max-width:980px){
  .hamb{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}
  .top{gap:10px;align-items:center}.top .brand .logo{width:38px;height:38px}.top h2{font-size:17px}.top small{font-size:12px}.actions .btn.small:last-child{display:none}
  .side{display:block;position:fixed;left:0;top:0;bottom:0;width:280px;height:100vh;z-index:90;transform:translateX(-105%);transition:.22s ease;box-shadow:20px 0 70px rgba(0,0,0,.5)}
  body.menuOpen .side{transform:translateX(0)}
  .mobileShade{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:80}
  body.menuOpen .mobileShade{display:block}
  .mobilebar{display:none!important}
  .content{padding-bottom:24px}
}
@media(max-width:720px){
  .content{padding:10px}.card{border-radius:16px;padding:12px}.cards{grid-template-columns:1fr 1fr;gap:10px}.num{font-size:19px}
  .productTableWrap{border:0;background:transparent;overflow:visible}.productTable{min-width:0}.productTable thead,.productTable tbody,.productTable tr,.productTable th,.productTable td{display:block}.productTable tr:first-child{display:none}.productTable tr{background:var(--card);border:1px solid var(--line);border-radius:16px;margin:10px 0;padding:12px}.productTable td{border:0;padding:6px 0;font-size:13px;display:flex;justify-content:space-between;gap:12px}.productTable td:before{color:var(--muted);font-weight:700;min-width:118px}.productTable td:nth-child(1):before{content:'Tên hàng'}.productTable td:nth-child(2):before{content:'Nhóm'}.productTable td:nth-child(3):before{content:'Giá bán'}.productTable td:nth-child(4):before{content:'Giá vốn'}.productTable td:nth-child(5):before{content:'Tổng nhập'}.productTable td:nth-child(6):before{content:'Doanh thu'}.productTable td:nth-child(7):before{content:'Lợi nhuận'}.productTable td:nth-child(8):before{content:'SL còn'}.productTable td:nth-child(9):before{content:'SL chết'}.productTable td:nth-child(10):before{content:'Tổng tiền nhập'}.productTable td:nth-child(11):before{content:'Tỷ lệ lãi/lỗ'}.productTable td:nth-child(12):before{content:'Thao tác'}
  .actions{gap:6px}.btn{padding:8px 10px}.top{padding:8px 10px}.top .actions .btn:first-child{padding:8px 10px;font-size:12px}
}
@media(max-width:420px){.cards{grid-template-columns:1fr}.top h2{font-size:16px}.top small{display:none}}

/* === POS V3.13: bill export fixed width for iPhone/mobile === */
.receiptWrap,.receiptDesignPreview{
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
}
.receipt{
  width:720px!important;
  min-width:720px!important;
  max-width:none!important;
  padding:42px 46px 46px!important;
  background:#fff!important;
  color:#111!important;
  font-family:Arial,Helvetica,sans-serif!important;
  border-radius:0!important;
  box-sizing:border-box!important;
  transform:none!important;
}
.receipt .rLogo{height:70px!important;text-align:center!important;margin-bottom:8px!important}
.receipt .rLogo img{max-height:70px!important;max-width:115px!important;object-fit:contain!important}
.receipt .rShop{font-size:33px!important;line-height:1.16!important;text-align:center!important;white-space:nowrap!important;margin-top:8px!important}
.receipt .rSub{font-size:27px!important;line-height:1.2!important;text-align:center!important;font-style:italic!important;margin-top:7px!important}
.receipt .rTitle{font-size:40px!important;line-height:1.12!important;text-align:center!important;margin:14px 0 12px!important;white-space:nowrap!important;font-weight:500!important}
.receipt .rCode{font-size:27px!important;line-height:1.25!important;text-align:center!important;margin:8px 0 14px!important;white-space:nowrap!important}
.receipt .rLine{border:0!important;border-top:2px solid #111!important;margin:14px 0!important}
.receipt .rDash{border:0!important;border-top:1px dashed #111!important;margin:8px 0!important}
.receipt .rInfo{display:grid!important;grid-template-columns:145px 1fr!important;gap:8px 16px!important;font-size:29px!important;line-height:1.22!important}
.receipt .rInfo b{font-weight:700!important;word-break:normal!important;overflow-wrap:break-word!important}
.receipt .rTableHead,.receipt .rItem{display:grid!important;grid-template-columns:2fr 1fr .42fr 1.15fr!important;gap:10px!important;align-items:start!important;font-size:29px!important;line-height:1.22!important}
.receipt .rTableHead{font-weight:500!important;white-space:nowrap!important}
.receipt .rItem>div:nth-child(2),.receipt .rItem>div:nth-child(4){white-space:nowrap!important}
.receipt .rMoney{display:grid!important;grid-template-columns:1fr auto!important;gap:12px 20px!important;font-size:30px!important;line-height:1.45!important}
.receipt .rMoney b{font-weight:500!important;white-space:nowrap!important}
.receipt .rPay{display:grid!important;grid-template-columns:260px 1fr!important;gap:22px!important;align-items:center!important;margin-top:10px!important;overflow:hidden!important}
.receipt .rQr img{width:240px!important;height:240px!important;object-fit:contain!important;display:block!important}
.receipt .rBank{text-align:right!important;font-size:29px!important;line-height:1.42!important;word-break:normal!important;overflow-wrap:break-word!important}
.receipt .rTransfer{display:grid!important;grid-template-columns:1fr 1fr!important;font-size:29px!important;line-height:1.25!important;margin-top:10px!important}
.receipt .rTransfer b{white-space:nowrap!important;text-align:right!important}
.receipt .rNote{text-align:center!important;font-size:30px!important;line-height:1.45!important;margin:18px 36px!important}
.receipt .rThanks{text-align:center!important;font-size:31px!important;font-weight:700!important;margin-top:32px!important;line-height:1.3!important}
@media(max-width:980px){
  .receipt{width:720px!important;min-width:720px!important;max-width:none!important;transform:none!important}
  .receiptWrap{max-height:420px!important;overflow:auto!important}
  .receiptDesignPreview{justify-content:flex-start!important;overflow:auto!important}
}

.posCustomerBox .searchResults{max-height:70vh;overflow:auto}
.posNewCustomer{padding:12px;background:#0b1429}
.posNewCustomerHead{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px}
.posNewCustomerHead b{color:#fff}
.posNewCustomerHead span{color:var(--muted);font-size:13px}
.posCustomerCreateGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.posCustomerCreateGrid label{color:#bfd6fb;font-size:12px}
.posCustomerCreateGrid .full{grid-column:1/-1}
.posCustomerCreateGrid .input{margin-top:4px;min-height:38px;padding:8px 10px}
.posCustomerCreateGrid textarea.input{min-height:66px}
.posNewCustomerActions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
@media(max-width:620px){.posCustomerCreateGrid{grid-template-columns:1fr}}
.cartPriceView{display:grid;gap:3px;justify-items:start;border:1px solid transparent;background:transparent;color:var(--txt);border-radius:10px;padding:6px 8px;text-align:left}
.cartPriceView:hover,.cartPriceView:focus{border-color:#385b91;background:#0b1429;outline:none}
.cartPriceView b{font-size:16px;color:#eaf4ff}
.cartPriceView small{color:#93c5fd}
.cartTankCell{display:grid;gap:4px;min-width:0}.cartTankCell>small{color:#93a9c8;font-size:10px}.cartTankCell .select{width:100%;min-width:0;padding:7px 8px;font-size:11px;text-overflow:ellipsis}.cartTankCell .select:focus{border-color:#38bdf8;box-shadow:0 0 0 2px rgba(56,189,248,.14)}
.cartPriceEdit{display:grid;gap:4px}
.cartPriceEdit .input{min-height:34px;padding:6px 8px;text-align:right}
.cartRow{grid-template-columns:minmax(180px,1.1fr) auto minmax(105px,.7fr) minmax(115px,.55fr) 28px}.cartItemDiscount{display:grid;gap:3px}.cartItemDiscount .input{min-height:32px;padding:5px 7px;text-align:right}.cartItemDiscount small{font-size:10px}.rTableHead,.rItem{grid-template-columns:1.4fr .7fr .35fr .55fr .7fr!important}
.qtyBox{grid-template-columns:32px 46px 32px}.qtyBox .cartQtyInput{width:46px;min-width:46px;border:0;border-inline:1px solid var(--line);border-radius:0;background:#0b1224;color:#fff;text-align:center;padding:2px 0;outline:none;appearance:textfield;-moz-appearance:textfield}.qtyBox .cartQtyInput::-webkit-inner-spin-button,.qtyBox .cartQtyInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.customer-rank{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;padding:6px 10px;border:1px solid;border-radius:999px;font-weight:750}.customer-rank-vip{color:#d8b4fe;background:#2e1065;border-color:#7e22ce}.customer-rank-gold{color:#fde68a;background:#422006;border-color:#a16207}.customer-rank-silver{color:#dbeafe;background:#172554;border-color:#3b82f6}.customer-rank-new{color:#bbf7d0;background:#052e24;border-color:#15803d}
.loyalty-static-poster{padding:18px;border-radius:18px;background:radial-gradient(circle at top,#1e3a8a33,#030712);display:grid;place-items:center}.loyalty-static-poster img{display:block;width:min(620px,100%);height:auto;border-radius:18px;box-shadow:0 24px 70px #0009}.loyalty-poster-card-head a.btn{text-decoration:none;text-align:center}
.loyalty-poster-card{margin-top:16px}.loyalty-poster-card-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.loyalty-poster-card-head h3{margin-bottom:5px}.loyalty-poster-stage{overflow:auto;padding:18px;border-radius:18px;background:radial-gradient(circle at top,#1e3a8a33,#030712);display:grid;place-items:center}.loyalty-poster{position:relative;isolation:isolate;overflow:hidden;width:720px;height:900px;padding:54px 58px 48px;color:#fff;background:linear-gradient(155deg,#071126 0%,#0b1e45 55%,#080b1a 100%);font-family:Inter,Arial,sans-serif;box-shadow:0 30px 80px #0008}.loyalty-poster-glow{position:absolute;z-index:-1;border-radius:50%;filter:blur(2px)}.loyalty-poster-glow.one{width:440px;height:440px;right:-180px;top:-170px;background:radial-gradient(circle,#7c3aed77,transparent 70%)}.loyalty-poster-glow.two{width:420px;height:420px;left:-210px;bottom:60px;background:radial-gradient(circle,#0ea5e955,transparent 70%)}.loyalty-poster header{display:flex;align-items:center;gap:18px}.loyalty-poster header b{display:block;font-size:24px;letter-spacing:.06em}.loyalty-poster header small{display:block;margin-top:5px;color:#bcd1f3;font-size:11px;letter-spacing:.14em}.loyalty-poster-logo{width:62px;height:62px;border-radius:18px;display:grid;place-items:center;overflow:hidden;background:linear-gradient(135deg,#31a8ff,#8b5cf6);font-size:20px;font-weight:900}.loyalty-poster-logo img{width:100%;height:100%;object-fit:cover}.loyalty-poster main{text-align:center;padding-top:58px}.loyalty-poster-kicker{display:inline-flex;padding:8px 16px;border:1px solid #60a5fa66;border-radius:999px;color:#93c5fd;font-size:13px;font-weight:800;letter-spacing:.14em}.loyalty-poster h2{margin:22px 0 13px;font-size:52px;line-height:1.08;letter-spacing:-.04em}.loyalty-poster h2 em{font-style:normal;color:#facc15}.loyalty-poster-rate{margin:0 auto 38px;color:#cbdcf6;font-size:18px}.loyalty-poster-rate strong{color:#fff}.loyalty-poster-ranks{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.loyalty-poster-ranks article{min-height:245px;padding:23px 12px 18px;border:1px solid;border-radius:24px;display:flex;flex-direction:column;align-items:center;background:#081329dd}.loyalty-poster-ranks article.silver{border-color:#60a5fa88}.loyalty-poster-ranks article.gold{border-color:#fbbf2488;background:linear-gradient(180deg,#3b290e,#101426)}.loyalty-poster-ranks article.vip{border-color:#c084fc88;background:linear-gradient(180deg,#28104a,#101426)}.loyalty-poster-ranks i{font-style:normal;font-size:37px}.loyalty-poster-ranks b{margin:8px 0 15px;font-size:20px;letter-spacing:.1em}.loyalty-poster-ranks strong{font-size:30px}.loyalty-poster-ranks small{margin-top:3px;color:#9fb3d2;letter-spacing:.14em}.loyalty-poster-ranks span{margin-top:auto;width:100%;padding:9px 7px;border-radius:12px;background:#ffffff10;font-weight:800;color:#fff}.loyalty-poster-note{margin-top:27px;color:#bcd1f3;font-size:14px}.loyalty-poster footer{position:absolute;left:58px;right:58px;bottom:43px;display:flex;align-items:center;justify-content:space-between;padding:17px 21px;border-radius:17px;background:linear-gradient(90deg,#2563eb,#7c3aed)}.loyalty-poster footer b{font-size:17px}.loyalty-poster footer span{font-size:12px;color:#e0e7ff}
@media(max-width:800px){.loyalty-poster-card-head{align-items:stretch;flex-direction:column}.loyalty-poster-stage{display:block}.loyalty-poster{transform-origin:top left}.customer-rank{padding:5px 8px}}

/* Unified sidebar count badge + leave/late request module */
.nav-count,.menu-count{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:auto;padding:0 7px;border-radius:999px;color:#fff;background:linear-gradient(135deg,#ff2d55,#ff477e);font-size:12px;font-weight:900;line-height:1;box-shadow:0 6px 18px rgba(255,45,85,.35)}
.nav-count[hidden]{display:none!important}
.lr-page{display:grid;gap:16px}.lr-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.lr-head h1{margin:0 0 6px;font-size:28px}.lr-head p{margin:0;color:var(--muted)}.lr-tabs{display:grid;grid-template-columns:1fr 1fr;gap:10px}.lr-tabs button{border:1px solid var(--line);border-radius:14px;padding:13px;color:#cde2ff;background:#101a31;font-weight:800}.lr-tabs button.active{border:0;color:#fff;background:linear-gradient(135deg,var(--brand),var(--brand2));box-shadow:0 12px 30px rgba(49,168,255,.22)}.lr-card h3{font-size:18px;color:#fff}.lr-card .muted{margin-top:10px}.lr-date-choice{display:grid;grid-template-columns:130px minmax(220px,340px);align-items:center;gap:12px;margin:12px 0 14px;padding:14px;border:1px solid #2c4776;border-radius:16px;background:linear-gradient(135deg,rgba(49,168,255,.12),rgba(139,92,246,.08))}.lr-date-choice span{color:#cde2ff;font-weight:800}.lr-date-choice .input{background:#081426}
@media(max-width:720px){.lr-head{align-items:flex-start;flex-direction:column}.lr-tabs{grid-template-columns:1fr}}
/* Shared responsive safety layer for every module. */
:where(.main,.content,.card,.ly-page,[class$="-page"],[class$="-panel"]){min-width:0}
:where(button,.btn){max-width:100%;box-sizing:border-box;line-height:1.25}
:where(.actions,.emp-head-actions,.emp-actions,.emp-task-actions,.nh-head-actions,.nh-row-actions,.dc-head-actions,.dc-form-actions,.dc-actions,.tc-header-actions,.tc-form-actions,.tc-actions,.ly-detail-actions,.ly-section-head,.ly-modal-actions,.ly-invoice-actions,.ly-payment-actions,.ra-dash-actions,.fo-detail-actions,.fo-invoice-actions,.posNewCustomerActions,.shift-admin-actions){flex-wrap:wrap;max-width:100%}

/* === BANK ACCOUNT SETTINGS + CASH FLOW REPORT === */
.bank-settings-head,.bank-account-title,.bank-account-flow,.bank-report-filter,.bank-report-tabs{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.bank-settings-head,.bank-account-title{justify-content:space-between}.bank-settings-head h3,.bank-setting-card h3{margin:0}.bank-settings-list{display:grid;gap:14px;margin:16px 0}.bank-setting-card{padding:16px;border:1px solid var(--line);border-radius:16px;background:rgba(7,15,31,.55)}.bank-setting-card label{display:grid;gap:7px}.bank-setting-card label:has(input[type=checkbox]){display:flex;align-items:center}.bank-user-picker{display:grid;gap:10px;padding:13px;border:1px solid #25395e;border-radius:14px;background:rgba(5,12,27,.55)}.bank-user-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.bank-user-check{display:flex!important;align-items:center;gap:10px;min-height:54px;padding:9px 11px;border:1px solid #2b4168;border-radius:12px;background:#0b1429;cursor:pointer}.bank-user-check:has(input:checked){border-color:#3b82f6;background:linear-gradient(135deg,rgba(37,99,235,.22),rgba(124,58,237,.18))}.bank-user-check input{width:19px;height:19px;accent-color:#3b82f6}.bank-user-check span{display:grid;gap:3px}.bank-user-check small{color:var(--muted)}.bank-report{display:grid;gap:16px}.bank-report-tabs{margin-bottom:0}.bank-report-filter{padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--card)}.bank-report-filter label{display:grid;gap:5px;min-width:170px}.bank-summary-grid,.bank-account-grid,.bank-entry-grid{display:grid;gap:14px}.bank-summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.bank-account-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.bank-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bank-entry-grid .card{display:grid;gap:14px;align-content:start}.bank-entry-grid .card h3{margin:0}.bank-account-card{padding:18px;border:1px solid #29446d;border-radius:20px;background:linear-gradient(145deg,rgba(18,39,71,.95),rgba(8,17,35,.95));box-shadow:0 18px 44px rgba(0,0,0,.22)}.bank-account-title h3{margin:3px 0 0}.bank-account-title small,.bank-account-number{color:var(--muted)}.bank-account-title span{padding:5px 9px;border:1px solid #2f5b8d;border-radius:999px;font-size:12px}.bank-account-balance{margin:20px 0 6px;font-size:29px;font-weight:850}.bank-account-flow{justify-content:space-between;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.bank-account-flow span{display:grid;gap:5px}.bank-report-table{margin-top:2px}.bank-report-loading{padding:35px;text-align:center;color:var(--muted)}#posBankAccountLabel{min-width:240px}
@media(max-width:1180px){.bank-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bank-account-grid{grid-template-columns:1fr}.bank-entry-grid{grid-template-columns:1fr}}
@media(max-width:700px){.bank-summary-grid{grid-template-columns:1fr}.bank-report-filter>*{width:100%}.bank-report-tabs{display:grid;grid-template-columns:1fr 1fr}.bank-report-tabs .btn{white-space:normal}.bank-account-balance{font-size:25px}.bank-setting-card .formgrid,.bank-user-checks{grid-template-columns:1fr}.bank-entry-grid .formgrid{grid-template-columns:1fr}.bank-entry-grid .full{grid-column:auto}}
:where(.actions,.emp-head-actions,.nh-head-actions,.dc-head-actions,.tc-header-actions,.ly-detail-actions,.ra-dash-actions)>button{flex:0 1 auto;white-space:normal}
:where(.tablewrap,.ly-tablewrap,.fo-tablewrap,.tw,[class$="table-wrap"],[class$="tablewrap"]){max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

/* A 1366px laptop has only about 1060px of content beside the sidebar. */
@media (min-width:981px) and (max-width:1450px){
  .content{padding:16px}.top{padding-inline:16px}.btn{padding:8px 10px}.btn.small{padding:6px 8px}
  .posPro{grid-template-columns:1fr}.posKpis{grid-template-columns:repeat(2,minmax(0,1fr))}.posTools{grid-template-columns:minmax(0,1fr) minmax(120px,160px)}.cartRows{max-height:none}.cartCard{min-width:0}.cartRow{grid-template-columns:minmax(180px,1fr) auto minmax(110px,.7fr) 32px}.payActions,.billActions{grid-template-columns:repeat(2,minmax(0,1fr))}.payActions button,.billActions button{min-width:0;white-space:normal}.sumLine{gap:12px}.sumLine>*{min-width:0}
  .ly-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.ly-alert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ly-form,.ly-detailgrid{grid-template-columns:1fr}.ly-form aside,.ly-detailgrid aside{position:static}.ly-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.ly-detailhead{flex-wrap:wrap}.ly-detail-actions{width:100%;justify-content:flex-end}.ly-detail-actions .btn{min-width:0}
  .nh-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.nh-main,.nh-grid{grid-template-columns:1fr}.nh-product-toolbar{grid-template-columns:minmax(200px,1fr) minmax(150px,190px)}.nh-product-toolbar>:last-child{grid-column:1/-1}
  .dc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dc-main-grid{grid-template-columns:1fr}.dc-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.tc-main{grid-template-columns:1fr}.tc-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .emp-work-layout,.emp-report-layout,.emp-salary-layout,.emp-kpi-layout{grid-template-columns:1fr}.emp-day-cards,.emp-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fo-head{flex-wrap:wrap}.fo-filters{flex-wrap:wrap}.fo-filters>*{min-width:min(210px,100%);flex:1 1 180px}
  .pg{grid-template-columns:220px minmax(0,1fr)}.pg main,.pg aside{min-width:0}
}
@media (max-width:980px){.top{flex-wrap:wrap}.top>*{min-width:0}.top .actions{margin-left:auto}.posPro{grid-template-columns:1fr}.cartRows{max-height:none}}
@media (max-width:760px){
  :where(.emp-head-actions,.nh-head-actions,.dc-head-actions,.dc-form-actions,.tc-header-actions,.tc-form-actions,.ly-detail-actions,.ra-dash-actions,.posNewCustomerActions){display:grid;grid-template-columns:1fr;width:100%}
  :where(.emp-head-actions,.nh-head-actions,.dc-head-actions,.dc-form-actions,.tc-header-actions,.tc-form-actions,.ly-detail-actions,.ra-dash-actions,.posNewCustomerActions)>button,.ra-dash-actions>select{width:100%;min-width:0}
  .posTools,.payActions,.billActions{grid-template-columns:1fr}.billActions .full{grid-column:auto}.cartRow{grid-template-columns:1fr}.sumLine{align-items:stretch;flex-direction:column}.sumLine>input,.sumLine>div{max-width:none!important;width:100%!important}.fo-filters{overflow:visible}
}

/* POS receipt: keep Product, Price, Qty, CK and Total on one row. */
.receipt .rTableHead,.receipt .rItem{display:grid!important;grid-template-columns:minmax(0,1.65fr) minmax(70px,.72fr) minmax(30px,.28fr) minmax(48px,.48fr) minmax(76px,.78fr)!important;column-gap:7px!important;align-items:start!important;font-size:23px!important;line-height:1.22!important}
.receipt .rTableHead>div,.receipt .rItem>div{min-width:0!important}
.receipt .rTableHead>div:not(:first-child),.receipt .rItem>div:not(:first-child){white-space:nowrap!important}
.receipt .rTableHead>div:nth-child(3),.receipt .rItem>div:nth-child(3){text-align:center!important}
.receipt .rTableHead>div:nth-child(n+4),.receipt .rItem>div:nth-child(n+4){text-align:right!important}
.customer-care{display:inline-flex;white-space:nowrap;border-radius:999px;padding:5px 9px;color:#475569;background:#e2e8f0;font-size:12px;font-weight:700}
.customer-care-immediate{color:#fff;background:#dc2626}.customer-care-urgent{color:#b91c1c;background:#fee2e2}.customer-care-follow_up{color:#c2410c;background:#ffedd5}.customer-care-completed{color:#15803d;background:#dcfce7}
.customer-master-table{min-width:1480px}.customer-master-table th{vertical-align:middle}.customer-sort-button{display:inline-flex;align-items:center;gap:6px;border:0;padding:0;color:inherit;background:transparent;font:inherit;font-weight:inherit;text-align:left;text-transform:inherit;cursor:pointer}.customer-sort-button span{color:#8fa2c4;font-size:10px;opacity:.55}.customer-sort-button:hover,.customer-sort-button.active{color:#fff}.customer-sort-button.active span{color:#60a5fa;opacity:1}.customer-activity-cell{min-width:126px}.customer-activity-cell strong,.customer-activity-cell small{display:block;white-space:nowrap}.customer-activity-cell small{margin-top:4px;color:var(--muted);font-size:11px}.customer-membership-head{min-width:130px;background:#111c37}.customer-membership-cell{min-width:130px;color:#c4b5fd;font-weight:750}.customer-data-protected,.customer-data-protected *{-webkit-user-select:none!important;user-select:none!important}.customer-data-lock{display:inline-flex;align-items:center;padding:8px 11px;border:1px solid #334766;border-radius:10px;color:#9fb0ca;background:#0b1429;font-size:12px;font-weight:750}
.customer-profile{display:grid;gap:16px}.customer-profile-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.customer-profile-head h2{margin:4px 0 10px;font-size:26px}.customer-profile-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.customer-profile-kpis article{display:grid;gap:6px;min-height:88px;padding:13px;border:1px solid #263c63;border-radius:15px;background:linear-gradient(145deg,#111c35,#091225)}.customer-profile-kpis small{color:var(--muted)}.customer-profile-kpis b{font-size:18px}.customer-profile-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px}.customer-profile-info{display:grid;grid-template-columns:145px minmax(0,1fr);gap:9px 12px;margin:12px 0 0}.customer-profile-info dt{color:var(--muted)}.customer-profile-info dd{min-width:0;margin:0;overflow-wrap:anywhere}.customer-profile-info a{color:#7dd3fc}.customer-profile-subtitle{margin-top:22px!important}.customer-profile-wallet-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:12px 0}.customer-profile-wallet-grid span,.customer-profile-payment span{display:grid;gap:4px;padding:10px;border:1px solid #25395e;border-radius:12px;background:#0b1429}.customer-profile-wallet-grid b{font-size:16px}.customer-profile-payment{display:grid;grid-template-columns:1fr 1fr;gap:9px}.customer-profile-section{display:grid;gap:9px}.customer-profile-section h3{margin:0}.customer-profile-section table{min-width:760px}.customer-profile-section td{vertical-align:top}.customer-profile-section small{display:inline-block;margin-top:4px}@media(max-width:1050px){.customer-profile-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.customer-profile-grid{grid-template-columns:1fr}}@media(max-width:650px){.customer-profile-head{flex-direction:column}.customer-profile-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-profile-info{grid-template-columns:1fr}.customer-profile-info dt{margin-top:6px}.customer-profile-wallet-grid,.customer-profile-payment{grid-template-columns:1fr}}
.admin-lock-button{width:44px;height:42px;border:1px solid #314565;border-radius:12px;background:#111c31;color:#f8fafc;font-size:20px;display:grid;place-items:center}.admin-lock-button:hover{border-color:#60a5fa;background:#172846}.admin-lock-screen{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 50% 15%,#17345e 0,#070c18 42%,#02040a 100%)}.admin-lock-card{width:min(430px,100%);display:grid;gap:18px;padding:30px;border:1px solid #29466f;border-radius:28px;background:rgba(8,16,32,.96);box-shadow:0 30px 100px rgba(0,0,0,.65);text-align:center}.admin-lock-logo{width:76px;height:76px;margin:auto;border-radius:24px;display:grid;place-items:center;background:linear-gradient(135deg,var(--brand),var(--brand2));font-size:27px;font-weight:900}.admin-lock-card h1{margin:5px 0 8px}.admin-lock-card p{margin:0;color:var(--muted)}.admin-lock-card form{display:grid;gap:12px}.admin-lock-pin{width:100%;padding:15px;border:1px solid #36557e;border-radius:14px;background:#071022;color:#fff;text-align:center;font-size:22px;letter-spacing:8px;outline:none}.admin-lock-pin:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.14)}.admin-lock-error{min-height:22px!important;color:#fda4af!important}.admin-lock-logout{width:100%}.admin-pin-setup{display:grid;gap:15px;max-width:460px;margin:auto}.admin-pin-setup label{display:grid;gap:7px}.admin-lock-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:5px}@media(max-width:600px){.admin-lock-card{padding:22px}.admin-lock-button{width:40px;height:40px}.admin-lock-actions{display:grid;grid-template-columns:1fr 1fr}}
/* POS fish source tank selector */
.cartRow{grid-template-columns:minmax(150px,1fr) minmax(150px,.9fr) auto minmax(105px,.7fr) minmax(115px,.55fr) 28px}
.cartTankCell{display:grid;gap:4px;min-width:0}.cartTankCell small{font-size:10px;color:var(--muted)}.cartTankCell .select{min-width:0;width:100%;padding:7px 8px}
.cartTankMissing{padding:7px 9px;border:1px solid rgba(251,113,133,.45);border-radius:10px;background:rgba(127,29,29,.18)}.cartTankMissing b{color:#fda4af;font-size:11px}
.cartTankChecks{display:grid;gap:4px;max-height:120px;overflow:auto}.cartTankChecks label{display:flex;align-items:center;gap:6px;padding:5px 7px;border:1px solid rgba(54,85,126,.55);border-radius:8px;background:#0b1429;font-size:11px}.cartTankChecks input{margin:0}.cartTankChecks b{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#2563eb;color:#fff;font-size:10px}.cartTankAllocation{color:#7dd3fc!important;line-height:1.35}
@media(max-width:760px){.cartRow{grid-template-columns:1fr}.cartTankCell .select{width:100%}}

/* POS cart: never let the quantity stepper lose its + button. */
.cartRow{grid-template-areas:"product tank qty price discount delete";grid-template-columns:minmax(145px,1fr) minmax(165px,1fr) 100px minmax(105px,.7fr) minmax(112px,.55fr) 30px}
.cartRow>.prodCell{grid-area:product;min-width:0}.cartRow>.cartTankCell{grid-area:tank}.cartRow>.qtyBox{grid-area:qty}.cartRow>.cartPriceView,.cartRow>.cartPriceEdit{grid-area:price}.cartRow>.cartItemDiscount{grid-area:discount}.cartRow>.deleteMini{grid-area:delete}
.qtyBox{width:100px!important;min-width:100px!important;max-width:100px!important;grid-template-columns:32px 34px 32px!important;justify-self:start;flex:none;overflow:visible!important}
.qtyBox button{display:grid;place-items:center;width:32px;min-width:32px;height:38px;padding:0;cursor:pointer;font-size:18px;line-height:1}.qtyBox span{width:34px;min-width:34px;height:38px}.qtyBox button:hover{background:rgba(59,130,246,.2)}
@media (min-width:761px) and (max-width:1450px){
  .cartRow{grid-template-areas:"product tank qty delete" "product tank price discount";grid-template-columns:minmax(155px,1fr) minmax(190px,1.15fr) 100px minmax(118px,.65fr);align-items:center}
  .cartRow>.deleteMini{justify-self:end}.cartRow>.cartPriceView,.cartRow>.cartPriceEdit,.cartRow>.cartItemDiscount{width:100%;min-width:0}
}
@media(max-width:760px){
  .cartRow{grid-template-areas:"product delete" "tank tank" "qty price" "discount discount";grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;padding:12px}
  .cartRow>.deleteMini{justify-self:end}.cartRow>.cartTankCell,.cartRow>.cartItemDiscount{width:100%}.cartRow>.cartPriceView,.cartRow>.cartPriceEdit{justify-self:end;min-width:110px}
}

/* Let the POS cart grow with its contents; the page itself handles scrolling. */
.cartCard{overflow:visible!important}
.cartRows{max-height:none!important;height:auto!important;overflow:visible!important}
.cartTankChecks{max-height:none!important;height:auto!important;overflow:visible!important}
.cartRow{grid-template-areas:"product tank qty delete" "product tank price discount";grid-template-columns:145px 165px 100px minmax(145px,1fr);column-gap:8px;width:100%;max-width:100%;box-sizing:border-box}
.cartRow>*{min-width:0}
.cartRow>.prodCell{gap:8px}.cartRow>.prodCell .prodName{min-width:0}.cartRow>.prodCell .prodName b,.cartRow>.prodCell .prodName small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cartTankChecks label{min-width:0;padding-inline:6px}.cartTankChecks label span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cartTankAllocation{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(min-width:761px) and (max-width:1050px){.cartRow{grid-template-columns:130px 150px 100px minmax(130px,1fr)}}
@media(max-width:760px){.cartRow{grid-template-areas:"product delete" "tank tank" "qty price" "discount discount";grid-template-columns:minmax(0,1fr) auto}}

/* Compact one-line cart order: product, tank, quantity, price, delete, discount. */
@media(min-width:761px){
  .cartRow{grid-template-areas:"product tank qty price delete discount";grid-template-columns:140px 160px 100px 105px 28px minmax(90px,1fr);column-gap:6px;align-items:center}
  .cartRow>.deleteMini{justify-self:center}.cartRow>.cartItemDiscount{width:95px;max-width:95px;justify-self:end}.cartRow>.cartItemDiscount .input{width:95px;min-width:95px;padding:5px 6px;font-size:11px}.cartRow>.cartItemDiscount small{white-space:nowrap}
  .cartRow>.cartPriceView,.cartRow>.cartPriceEdit{min-width:100px;text-align:left;justify-self:start}
}
@media(max-width:760px){
  .cartRow{font-size:16px}.cartRow>.prodCell .prodName b{font-size:16px}.cartRow>.prodCell .prodName small,.cartTankCell>small,.cartTankAllocation{font-size:13px}.cartTankChecks label{font-size:13px}.qtyBox button{font-size:20px}.qtyBox span{font-size:16px}.cartPriceView b,.cartPriceEdit{font-size:16px}.cartPriceView small{font-size:13px}.cartItemDiscount .input{font-size:14px}.cartItemDiscount small{font-size:12px}
}
.cartTankPending{display:flex!important;align-items:center;gap:6px;margin-top:5px;padding:5px 6px;border:1px dashed #f59e0b!important;border-radius:8px;background:rgba(146,64,14,.16)!important;color:#fde68a;cursor:pointer}.cartTankPending input{margin:0;accent-color:#f59e0b}.cartTankPending span{white-space:normal!important;overflow:visible!important;font-size:10px;font-weight:700}.cartTankPendingActive{padding:7px 9px;border:1px solid rgba(245,158,11,.55);border-radius:10px;background:rgba(146,64,14,.18)}.cartTankPendingActive b{color:#fde68a;font-size:11px}.tankPendingShortcut{border-color:#d97706;color:#fde68a;background:rgba(146,64,14,.24)}.tankPendingList{display:grid;gap:10px}
.admin-lock-logo{overflow:hidden}.admin-lock-logo img{width:100%;height:100%;object-fit:cover}

/* Horizontal Royal Aqua logo with white tagline for the dark ERP shell. */
.logo{width:120px;height:42px;border-radius:0;background:transparent;flex:0 0 120px}
.logo img{width:100%;height:100%;object-fit:contain}
.admin-lock-logo{width:280px;height:70px;border-radius:0;background:transparent}
.admin-lock-logo img{width:100%;height:100%;object-fit:contain}
.loginbox>.brand{justify-content:center;margin-bottom:24px}
.loginbox>.brand .logo{width:280px;height:64px;flex-basis:280px}
.side>.brand{justify-content:center}
.side>.brand .logo{width:210px;height:48px;flex-basis:210px}
.top>.brand .logo{width:150px;height:42px;flex-basis:150px}
@media(max-width:980px){.top>.brand .logo{width:120px;height:38px;flex-basis:120px}}
.posCustomerPanelHead{display:flex;align-items:center;justify-content:space-between;gap:12px}.posCustomerPanelHead .btn{flex:0 0 auto}@media(max-width:560px){.posCustomerPanelHead{align-items:flex-start;flex-direction:column}.posCustomerPanelHead .btn{width:100%}}

/* Keep unrecorded tanks collapsed and bound long expanded lists. */
.cartTankCell .cartTankChecks{max-height:160px!important;overflow-y:auto!important}
.cartEmptyTanks{min-width:0;border:1px solid rgba(54,85,126,.55);border-radius:8px;padding:6px}
.cartEmptyTanks summary{cursor:pointer;font-size:11px;color:#a9bdd9;line-height:1.5}
.cartEmptyTanks[open] summary{margin-bottom:6px}
.cartEmptyTanks .cartTankChecks{max-height:180px!important}

/* Global light/dark appearance control. Theme-specific rules live last so all modules inherit it. */
.theme-control{position:relative;flex:0 0 auto}.theme-toggle{display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid var(--line);border-radius:50%;color:var(--txt);background:var(--panel2);font-size:19px;line-height:1;transition:transform .18s ease,background .18s ease}.theme-toggle:hover{transform:translateY(-1px);background:#1a2947}.theme-menu{position:absolute;top:calc(100% + 12px);right:0;z-index:120;display:none;width:min(390px,calc(100vw - 24px));padding:12px;border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:0 24px 80px rgba(0,0,0,.48)}.theme-menu.show{display:block}.theme-menu-head{display:grid;gap:3px;padding:6px 8px 12px}.theme-menu-head b{font-size:17px}.theme-menu-head small{color:var(--muted)}.theme-option{display:grid;grid-template-columns:42px minmax(0,1fr) 20px;align-items:center;gap:11px;width:100%;padding:10px 8px;border:0;border-radius:13px;color:var(--txt);background:transparent;text-align:left}.theme-option:hover{background:rgba(49,168,255,.1)}.theme-option-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--panel2);font-size:18px}.theme-option>span:nth-child(2){display:grid;gap:3px}.theme-option small{color:var(--muted);font-size:12px}.theme-option i{width:19px;height:19px;border:2px solid var(--muted);border-radius:50%}.theme-option.active i{border:5px solid var(--brand);background:#fff}

html[data-theme="light"]{color-scheme:light;--bg:#f4f7fb;--panel:#ffffff;--panel2:#edf2f8;--line:#d5deea;--txt:#162033;--muted:#607087;--brand:#1877f2;--brand2:#6366f1;--good:#079669;--bad:#e11d48;--warn:#b86b00;--card:#ffffff}
html[data-theme="light"] body{background:linear-gradient(145deg,#eef4fb,#f8fafc 42%,#edf2f7);color:var(--txt)}
html[data-theme="light"] .side{background:rgba(255,255,255,.96);box-shadow:8px 0 28px rgba(15,23,42,.05)}
html[data-theme="light"] .top{background:rgba(255,255,255,.88);box-shadow:0 5px 20px rgba(15,23,42,.04)}
html[data-theme="light"] :where(.card,.dialog,.loginbox,.tablewrap,.posProductList,.posKpi,.bank-setting-card,.bank-report-filter,.bank-account-card,.customer-profile-kpis article,.ly-page section,.inv-card,.fo-card,.tc-card,.dc-card,.emp-card){background:#fff;color:var(--txt);border-color:var(--line);box-shadow:0 10px 30px rgba(15,23,42,.07)}
html[data-theme="light"] :where(.input,.select,textarea,.qtyBox,.qtyBox .cartQtyInput,.searchResults,.selectedMini,.notice,.customerPanel,.cartCustomerCard,.bank-user-picker,.bank-user-check,.customer-profile-wallet-grid span,.customer-profile-payment span){background:#f8fafc;color:var(--txt);border-color:var(--line)}
html[data-theme="light"] :where(.btn,.hamb,.admin-lock-button){background:#fff;color:#26364d;border-color:#cbd6e4}
html[data-theme="light"] .btn:hover{background:#edf4ff}html[data-theme="light"] .btn.primary{color:#fff;background:linear-gradient(135deg,var(--brand),var(--brand2))}html[data-theme="light"] .btn.danger{color:#be123c;background:#fff1f2;border-color:#fecdd3}html[data-theme="light"] .btn.good{color:#047857;background:#ecfdf5;border-color:#a7f3d0}
html[data-theme="light"] .nav button{color:#34445b}html[data-theme="light"] .nav button:hover,html[data-theme="light"] .nav button.active{color:#0b5fd7;background:linear-gradient(90deg,rgba(24,119,242,.13),rgba(99,102,241,.08))}
html[data-theme="light"] th{color:#53657d;background:#eef3f8}html[data-theme="light"] td{border-color:#e2e8f0}html[data-theme="light"] tr:hover td{background:rgba(24,119,242,.035)}
html[data-theme="light"] :where(.posTabs button,.lr-tabs button,.mobilebar button){color:#41536c}html[data-theme="light"] :where(.posTabs button.active,.lr-tabs button.active){color:#0b63d8}html[data-theme="light"] :where(.num,.card h2,.card h3,.selectedMini b,.customerPanel b,.lr-card h3,.cartPriceView b){color:var(--txt)}
html[data-theme="light"] :where(.badge,.customer-data-lock,.theme-option-icon){color:#334155;background:#edf2f7;border-color:#d2dce8}html[data-theme="light"] .theme-menu{box-shadow:0 24px 65px rgba(15,23,42,.2)}html[data-theme="light"] .theme-toggle:hover{background:#e6eef8}
html[data-theme="light"] .mobilebar{background:#fff}html[data-theme="light"] .modal{background:rgba(15,23,42,.45)}html[data-theme="light"] .progressive-page-sentinel{color:#40536c!important;background:#fff!important;border-color:#d2dce8!important}
html[data-theme="light"] :where(.invoice,.receipt,.receiptWrap,.receiptDesignPreview,.loyalty-poster){color:#111}
@media(max-width:560px){.theme-menu{position:fixed;top:68px;right:10px}.theme-toggle{width:38px;height:38px}.top .actions{flex-wrap:nowrap}.top .actions>.btn:first-child{display:none}}

/* Products table: the dark theme uses neon data colors; use ink colors on light surfaces. */
html[data-theme="light"] .productTableWrap{background:#fff!important;border-color:#cbd5e1!important}
html[data-theme="light"] .productTable thead th{background:#e7eef7!important;color:#334155!important;box-shadow:inset 0 -1px 0 #cbd5e1!important}
html[data-theme="light"] .productTable tbody tr td{background:#fff!important;color:#0f172a!important;border-bottom-color:#dbe3ed!important}
html[data-theme="light"] .productTable tbody tr:nth-child(even) td{background:#f1f5f9!important}
html[data-theme="light"] .productTable tbody tr:hover td{background:#e8f1fc!important}
html[data-theme="light"] .productTable .productColName{color:#172033!important;font-weight:650!important}
html[data-theme="light"] .productClassificationSummary{color:#0369a1!important}
html[data-theme="light"] .productTable .productColTank{color:#0e7490!important;font-weight:700!important}
html[data-theme="light"] .productNumber--blue{color:#0369a1!important}
html[data-theme="light"] .productNumber--red{color:#b91c1c!important}
html[data-theme="light"] .productNumber--green{color:#1d4ed8!important}
html[data-theme="light"] .productNumber--purple{color:#a21caf!important}
html[data-theme="light"] .productNumber--yellow{color:#b45309!important}
html[data-theme="light"] .productNumber--profit{color:#047857!important}
html[data-theme="light"] .productNumber--neutral{color:#334155!important}
html[data-theme="light"] .productNoHistory{color:#64748b!important}
html[data-theme="light"] .productColImport{color:#c2410c!important}
html[data-theme="light"] .productTicker--loss{color:#be123c!important;background:#fff1f2!important;border-color:#fda4af!important}
html[data-theme="light"] .productTicker--gain{color:#047857!important;background:#ecfdf5!important;border-color:#6ee7b7!important}
html[data-theme="light"] .productTicker--strong{color:#7e22ce!important;background:#faf5ff!important;border-color:#d8b4fe!important}
html[data-theme="light"] .productSortButton:hover,html[data-theme="light"] .productSortButton.active{color:#0f172a!important}
html[data-theme="light"] .productSortArrow{color:#2563eb!important}
html[data-theme="light"] .productSortButton.active .productSortArrow{color:#a16207!important}
html[data-theme="light"] .productSearchBox input{background:#fff!important;color:#0f172a!important;border-color:#cbd5e1!important}
html[data-theme="light"] .productSearchBox input::placeholder{color:#64748b!important}
html[data-theme="light"] .productSearchBox button{background:#e2e8f0!important;color:#334155!important}
html[data-theme="light"] .productSearchEmpty{color:#64748b!important}
html[data-theme="light"] .productTable .btn{background:#fff!important;color:#1e3a5f!important;border-color:#cbd5e1!important}
html[data-theme="light"] .productTable .btn.danger{background:#fff1f2!important;color:#be123c!important;border-color:#fecdd3!important}
@media(max-width:720px){html[data-theme="light"] .productTable tbody tr,html[data-theme="light"] .productTable tbody tr:first-child{background:#fff!important;border-color:#d5deea!important}html[data-theme="light"] .productTable tbody tr:nth-child(even){background:#f1f5f9!important}}

/* Readable system typography, shared by both appearances. */
body{font-family:"Segoe UI",Arial,Helvetica,sans-serif;font-size:15px;line-height:1.4;font-weight:400}
button,input,select,textarea{font-family:inherit}
.nav button{font-size:15px}
:is(.ra-dashboard,.ts-page,.lr-page,.nh-page,.tc-page) :is(td,th,label,input,select,textarea){font-size:15px}
:is(.ra-dashboard,.ts-page,.lr-page,.nh-page,.tc-page) :is(small,.muted,.ra-kpi-label,.ra-kpi-change,.ts-card>div,.ts-card>b,.ts-card p){font-size:13px}
/* The lock screen keeps its dark background in either selected theme. */
.admin-lock-card{color:#f8fafc;color-scheme:dark}
.admin-lock-card h1{color:#f8fafc}
.admin-lock-card p,.admin-lock-card .muted{color:#b8c8df}
.admin-lock-card .admin-lock-pin{background:#071022;color:#fff;border-color:#6685b0}
.admin-lock-pin::placeholder{color:#b8c8df;opacity:1;font-size:18px;letter-spacing:3px}
.admin-lock-card .admin-lock-error{color:#ffb4c0!important}
.admin-lock-card .admin-lock-logout{background:#fff;color:#26364d;color-scheme:light}

.emp-tabs button.emp-leave-pending{border-color:#fb7185!important;color:#be123c!important;background:#fff1f2!important}.emp-tabs button .nav-count{margin-left:8px;color:#fff!important}.emp-tabs{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}

.receipt{font-size:17px}.cartTitle{flex-wrap:wrap;gap:12px}.pos-sales-employee{display:grid;gap:3px;font-size:11px;flex:1;min-width:150px;max-width:230px}.pos-sales-employee select{width:100%;min-height:34px}

/* POS history: one subdued color per calendar day. */
#orderHistoryTable .order-history-day > td{background:var(--order-day-bg)}
#orderHistoryTable .order-history-day-start > td{border-top:2px solid var(--order-day-border)}
#orderHistoryTable .order-history-day > td:first-child{white-space:nowrap}
html[data-theme="light"] #orderHistoryTable .order-history-day > td{background:var(--order-day-light)}

.pos-customer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:nowrap;overflow-x:auto;margin-bottom:12px}
.pos-customer-heading h4{margin:0;white-space:nowrap;flex-shrink:0}
.pos-sale-datetime{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);white-space:nowrap;flex-shrink:0}
.pos-sale-datetime .input{width:210px;max-width:100%;color-scheme:dark}
html[data-theme="light"] .pos-sale-datetime .input{color-scheme:light}

/* Mobile POS cart: identity and lot above the three editable fields. */
.cartRow .cartMobileCaption,
.cartRow .cartMobileLot,
.cartRow .cartMobileUnitPrice { display: none; }
@media (max-width: 760px) {
  .cartRow {
    grid-template-columns: minmax(0, 1.15fr) minmax(76px, 1fr) minmax(28px, .42fr) 30px;
    grid-template-areas: "product tank tank delete"
                         "price-label qty-label discount discount"
                         "price qty discount discount";
    gap: 3px 6px;
    align-items: center;
    padding: 8px 0;
  }
  .cartRow > .prodCell { gap: 5px; }
  .cartRow > .prodCell .prodName b { font-size: 13px; }
  .cartRow .prodName small,
  .cartRow .cartPriceView small,
  .cartRow .cartPriceEdit small,
  .cartRow .cartLinePrice,
  .cartRow .cartItemDiscount .muted,
  .cartRow .cartTankCell:has(.cartMobileLot) > small,
  .cartRow .cartTankCell > b + small { display: none; }
  .cartRow .cartTankCell { position: relative; }
  .cartRow .cartMobileLot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 34px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 11px;
  }
  .cartMobileLot > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cartRow .cartMobileLot + select { position: absolute; inset: 0; height: 100%; opacity: 0; cursor: pointer; }
  .cartTankCell:focus-within .cartMobileLot { outline: 2px solid #38bdf8; }
  .cartRow .cartMobileCaption { display: block; margin-top: 5px; }
  .cartRow .cartMobilePriceCaption { grid-area: price-label; }
  .cartRow .cartMobileQtyCaption { grid-area: qty-label; }
  .cartRow .cartMobileCaption,
  .cartRow .cartItemDiscount > small:first-child { font-size: 11px; color: var(--muted); }
  .cartRow > .cartItemDiscount { align-self: end; }
  .cartRow .cartMobileUnitPrice { display: block; font-size: 13px; }
  .cartRow > .cartPriceView, .cartRow > .cartPriceEdit { width: 100%; min-width: 0; }
  .cartRow .cartPriceView { min-height: 36px; align-items: center; border-color: var(--line); padding-inline: 6px; }
  .cartRow .cartPriceEdit .input, .cartRow .cartItemDiscount .input { min-width: 0; min-height: 36px; }
  .cartRow .qtyBox { width: 100% !important; min-width: 0 !important; grid-template-columns: 1fr minmax(22px, 1fr) 1fr !important; }
  .cartRow .qtyBox button, .cartRow .qtyBox .cartQtyInput { width: 100%; min-width: 0; height: 34px; }
}
