*{box-sizing:border-box}html,body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f6f8;color:#20252b}body{min-height:100vh}.topbar{height:62px;background:#075b94;color:#fff;display:flex;align-items:center;gap:14px;padding:0 16px;position:fixed;top:0;left:0;right:0;z-index:50}.top-title{flex:1;display:flex;flex-direction:column}.top-title small{font-size:11px;opacity:.85}.icon-btn{border:0;background:transparent;color:inherit;font-size:27px;cursor:pointer}.sidebar{position:fixed;z-index:60;top:0;bottom:0;left:0;width:310px;background:#fff;box-shadow:3px 0 20px #0002;transform:translateX(-102%);transition:.25s;overflow:auto}.sidebar.open{transform:translateX(0)}.side-head{height:160px;background:#272727;color:#fff;display:flex;align-items:center;gap:14px;padding:20px}.side-head small{display:block;color:#ddd;margin-top:5px}.avatar{width:78px;height:78px;border-radius:50%;background:#fff;display:grid;place-items:center;font-size:42px}.menu{display:flex;align-items:center;gap:24px;width:100%;height:69px;padding:0 25px;border:0;border-bottom:1px solid #ddd;background:#fff;font-size:21px;font-weight:700;text-align:left;cursor:pointer}.menu.active{background:#c7191f;color:#fff}.logout-link{display:block;padding:22px 25px;color:#b30000;text-decoration:none;font-weight:700}.overlay{display:none;position:fixed;inset:0;background:#0008;z-index:55}.overlay.show{display:block}.main{padding:82px 20px 30px;max-width:1500px;margin:auto}.page{display:none}.page.active{display:block}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.page-head h1{margin:0 0 5px;font-size:27px}.muted{color:#68717b;margin:0}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stat,.panel{background:#fff;border-radius:12px;box-shadow:0 2px 10px #0000000d;border:1px solid #e6e9ec}.stat{padding:18px;display:flex;flex-direction:column;gap:8px}.stat span{color:#69727c;font-size:14px}.stat b{font-size:23px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px}.panel{padding:18px;margin-bottom:18px}.panel-title{font-weight:800;font-size:17px;margin-bottom:14px}.big-number{font-size:30px;font-weight:800}.btn{border:0;border-radius:8px;padding:11px 16px;background:#e9edf1;color:#222;font-weight:700;cursor:pointer}.btn.primary{background:#c7191f;color:#fff}.btn.full{width:100%}.search-row,.toolbar{display:flex;gap:10px}.search-row input,.toolbar input{flex:1}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pos-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.8fr);gap:16px}.product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:15px}.product-card{border:1px solid #ddd;border-radius:10px;background:#fff;text-align:left;padding:14px;cursor:pointer;display:flex;flex-direction:column;gap:7px}.product-card strong{color:#c7191f}.product-card small{color:#6b747c}.product-card.disabled{opacity:.5}.cart-panel{position:sticky;top:78px;height:max-content}.cart-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;border-bottom:1px solid #eee;padding:10px 0}.cart-row small{display:block;color:#777;margin-top:4px}.qty{display:flex;align-items:center;gap:8px}.qty button,.delete{border:0;border-radius:6px;padding:5px 9px;cursor:pointer}.delete{background:#fee;color:#b00}.cart-total{display:flex;justify-content:space-between;font-size:21px;padding:16px 0}.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.quick-item{min-height:110px;border:0;border-radius:12px;background:#fff;box-shadow:0 2px 8px #0001;padding:15px;text-align:left;cursor:pointer}.quick-item span{display:block;color:#c7191f;font-weight:800;margin-top:10px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px 10px;border-bottom:1px solid #e5e7e9;text-align:left;white-space:nowrap}th{font-size:13px;color:#69727c;background:#fafafa}td small{display:block;color:#777;margin-top:3px}.mini{border:0;border-radius:5px;padding:6px 9px;cursor:pointer;background:#edf1f4}.danger-btn{background:#ffe8e8;color:#a40000}.stock-low,.stock-ok{font-weight:800}.stock-low{color:#c00}.stock-ok{color:#18833a}.pager{display:flex;gap:6px;align-items:center;justify-content:center;margin-top:15px;flex-wrap:wrap}.pager button{border:1px solid #ddd;background:#fff;padding:7px 11px;border-radius:6px;cursor:pointer}.pager button.active{background:#075b94;color:#fff}.pager span{margin-left:8px;color:#666}.badge{background:#e8eef5;border-radius:20px;padding:3px 8px;font-size:12px}.badge.success{background:#dff6e8;color:#16743a}.badge.warning{background:#fff0c9;color:#875900}.list-row{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid #eee}.danger-text{color:#c7191f}.empty{text-align:center;padding:25px;color:#7a838c}.modal-wrap{display:none;position:fixed;z-index:100;inset:0;background:#0008;align-items:center;justify-content:center;padding:15px}.modal-wrap.show{display:flex}.modal{width:min(560px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:14px;padding:20px}.modal-head{display:flex;justify-content:space-between;align-items:center;font-size:20px;margin-bottom:15px}.settings-form{max-width:700px}.login-page{display:grid;place-items:center;min-height:100vh;background:linear-gradient(135deg,#075b94,#eef4f8);padding:20px}.login-card{width:min(430px,100%);background:#fff;border-radius:18px;padding:30px;box-shadow:0 20px 50px #0003}.brand-big{font-size:50px;text-align:center}.login-card h1{text-align:center;margin:8px 0}.login-card form{display:flex;flex-direction:column;gap:8px}.login-card label,.modal label,.settings-form label{font-size:13px;font-weight:700;margin-top:7px}input,select,textarea{width:100%;padding:12px;border:1px solid #ccd3d9;border-radius:8px;font:inherit;background:#fff}textarea{resize:vertical}.alert{padding:12px;border-radius:8px;margin:12px 0}.alert.danger{background:#ffe6e6;color:#a00}.alert.success{background:#e2f8e9;color:#16713a}.toast{position:fixed;right:18px;bottom:18px;z-index:200;background:#1e873f;color:#fff;padding:12px 17px;border-radius:9px;box-shadow:0 5px 20px #0003}.toast.danger{background:#bd1e25}.date-filter{display:flex;gap:8px}.date-filter input{width:auto}.date-filter select{width:auto}
@media(max-width:900px){.stats-grid{grid-template-columns:1fr 1fr}.pos-layout{grid-template-columns:1fr}.cart-panel{position:static}.product-grid{grid-template-columns:repeat(3,1fr)}.quick-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.main{padding:76px 10px 20px}.page-head{align-items:flex-start}.page-head h1{font-size:23px}.stats-grid,.grid-2{grid-template-columns:1fr 1fr;gap:9px}.stat{padding:13px}.stat b{font-size:18px}.panel{padding:13px}.product-grid{grid-template-columns:repeat(2,1fr)}.quick-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.sidebar{width:82vw;max-width:310px}.search-row{flex-direction:column}.toolbar{display:block}.toolbar input{margin-bottom:8px}.date-filter{flex-direction:column}.date-filter input,.date-filter select{width:100%}th,td{padding:9px 7px;font-size:13px}.topbar{padding:0 10px}}

.import-help{margin-top:12px;line-height:1.6}.import-warning{background:#fff6d9;color:#765600;border-radius:8px;padding:12px;margin:14px 0;line-height:1.5}.settings-form input[type=radio],.panel input[type=radio]{width:auto;margin-right:7px}

.buy-bottom-bar{display:none;position:fixed;left:0;right:0;bottom:0;z-index:80;background:#fff;border-top:1px solid #ddd;box-shadow:0 -5px 20px #0002;padding:10px max(12px,calc((100vw - 1500px)/2));display:flex;align-items:center;gap:18px}.buy-bottom-bar.show{display:flex}.buy-bottom-bar>div{display:flex;flex-direction:column;min-width:90px}.buy-bottom-bar small{font-size:11px;color:#777}.buy-bottom-bar b{font-size:17px}.buy-bottom-bar .btn{margin-left:auto;min-width:130px}.qty-input{width:58px!important;text-align:center;padding:7px!important}.checkout-overlay,.receipt-overlay{display:none;position:fixed;inset:0;z-index:150;background:#0008;align-items:flex-end;justify-content:center}.checkout-overlay.show,.receipt-overlay.show{display:flex}.checkout-sheet,.receipt-sheet{width:min(720px,100%);max-height:94vh;overflow:auto;background:#fff;border-radius:18px 18px 0 0;padding:18px;box-shadow:0 -10px 40px #0004}.checkout-head,.receipt-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.checkout-head b,.receipt-head b{font-size:21px;display:block}.checkout-head small,.receipt-head small{display:block;color:#777;margin-top:4px}.checkout-item{display:flex;align-items:center;gap:10px;border-bottom:1px solid #eee;padding:12px 0}.checkout-product{flex:1}.checkout-product small{display:block;color:#777;margin-top:4px}.checkout-summary{display:grid;grid-template-columns:1fr auto;gap:8px;padding:15px 0;border-top:1px solid #eee;margin-top:8px}.checkout-summary b:last-child{font-size:22px;color:#c7191f}.checkout-form{display:flex;flex-direction:column;gap:7px}.checkout-form label{font-size:13px;font-weight:700;margin-top:7px}.checkout-form label small{font-weight:400;color:#777}.payment-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.payment-choices button{border:1px solid #d7dce0;background:#fff;border-radius:9px;padding:12px 6px;font-weight:700;cursor:pointer}.payment-choices button.selected{background:#c7191f;color:#fff;border-color:#c7191f}.checkout-pay{margin-top:15px;padding:14px}.receipt-overlay{align-items:center;padding:12px}.receipt-sheet{border-radius:16px;width:min(460px,100%);max-height:94vh}.success-icon{width:42px;height:42px;border-radius:50%;background:#dff6e8;color:#16803e;display:grid;place-items:center;font-size:24px;font-weight:900}.receipt-preview{background:#eef1f3;padding:14px;border-radius:10px;max-height:60vh;overflow:auto}.receipt-paper{background:#fff;padding:18px;font-family:monospace;font-size:13px;box-shadow:0 1px 5px #0002}.receipt-store{text-align:center;font-weight:900;font-size:18px;border-bottom:1px dashed #888;padding-bottom:10px}.receipt-store small{display:block;font-size:11px;font-weight:400;margin-top:4px;white-space:pre-wrap}.receipt-meta{padding:10px 0;border-bottom:1px dashed #aaa;line-height:1.6}.receipt-line{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dotted #bbb}.receipt-line small{color:#666}.receipt-total{display:flex;justify-content:space-between;font-size:17px;padding:12px 0}.receipt-note{border-top:1px dashed #aaa;padding:10px 0;white-space:pre-wrap}.receipt-footer{text-align:center;border-top:1px dashed #aaa;padding-top:12px}.receipt-actions{display:grid;gap:8px;margin-top:12px}
@media(max-width:650px){.buy-bottom-bar{padding:9px 10px;gap:10px}.buy-bottom-bar.show{display:flex}.buy-bottom-bar>div{min-width:70px}.buy-bottom-bar .btn{min-width:110px}.payment-choices{grid-template-columns:repeat(2,1fr)}.checkout-sheet{padding:14px}.main{padding-bottom:90px}}
.product-card{position:relative;cursor:pointer}.product-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.product-edit-btn{flex:none;border:1px solid #d7dce0;background:#f5f7f9;color:#075b94;border-radius:6px;padding:5px 7px;font-size:11px;font-weight:700;cursor:pointer}.product-edit-btn:hover{background:#e8f2fa}.barcode-tools{margin-bottom:4px}.barcode-row{display:flex;gap:10px;margin-top:10px}.barcode-row input{flex:1}.barcode-scanner-modal{z-index:180}.barcode-scanner-box{width:min(520px,100%);background:#fff;border-radius:16px;padding:16px;box-shadow:0 15px 50px #0005}.scanner-frame{position:relative;background:#111;border-radius:12px;overflow:hidden;aspect-ratio:4/3}.scanner-frame video{width:100%;height:100%;object-fit:cover;display:block}.scanner-line{position:absolute;left:8%;right:8%;top:50%;height:2px;background:#e11;box-shadow:0 0 8px #f00}.scanner-help{text-align:center;margin:10px 0 14px;font-size:13px}@media(max-width:650px){.barcode-row{display:grid;grid-template-columns:1fr 1fr}.barcode-row input{grid-column:1/-1}.barcode-row .btn{width:100%}.product-edit-btn{padding:5px 6px;font-size:10px}}

/* =========================================================
   MOBILE + RED BLOOD GLOW THEME
   ========================================================= */
:root{
  --blood:#d10b16;
  --blood2:#ff1824;
  --blood-dark:#65040a;
  --black:#050505;
  --panel-black:#101010;
  --line:#2b1113;
  --text:#f4f4f4;
  --muted:#aaa;
}
html,body{max-width:100%;overflow-x:hidden;background:#050505;color:var(--text)}
body{background:radial-gradient(circle at 50% -10%,#3b0509 0,#0b0304 34%,#050505 70%);}
.topbar{background:linear-gradient(90deg,#240204,#8e0710,#2b0205);border-bottom:1px solid #ff182455;box-shadow:0 0 18px #d10b1638;color:#fff}
.main{width:100%;max-width:1500px;overflow-x:hidden}
.page-head h1{color:#fff;text-shadow:0 0 10px #ff152255}
.muted{color:#aaa}
.panel,.stat,.product-card,.quick-item,.modal,.checkout-sheet,.receipt-sheet{background:linear-gradient(145deg,#151515,#0a0a0a);border-color:#351114;color:#f4f4f4;box-shadow:0 4px 18px #000,0 0 12px #d10b1612}
.panel-title{color:#fff}
input,select,textarea{background:#0b0b0b;color:#fff;border-color:#3a1b1e}
input::placeholder,textarea::placeholder{color:#777}
.btn{background:#1b1b1b;color:#fff;border:1px solid #402024;box-shadow:inset 0 0 0 1px #ffffff08}
.btn.primary,.payment-choices button.selected{background:linear-gradient(180deg,#f01420,#a90610);border-color:#ff2934;color:#fff;box-shadow:0 0 12px #d10b164d}
.search-row input:focus,input:focus,select:focus,textarea:focus{outline:none;border-color:#e00d18;box-shadow:0 0 0 2px #e00d1825,0 0 12px #e00d1822}
.barcode-row{width:100%;min-width:0}
.product-grid{width:100%;min-width:0}
.product-card{min-width:0;overflow:hidden;padding:11px;gap:8px;border-color:#351114;transition:.18s}
.product-card:hover{border-color:#c80b15;box-shadow:0 0 14px #d10b1630}
.product-card-top{min-width:0}
.product-name{min-width:0;overflow:visible;text-overflow:clip;display:block;white-space:normal;overflow-wrap:anywhere;word-break:break-word;line-height:1.25}
.product-info-line{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
.product-info-line small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#999}
.product-card strong{color:#ff2530;text-shadow:0 0 8px #ff152244}
.product-edit-btn{background:#151515;color:#ff4b54;border-color:#4d2024;box-shadow:0 0 7px #d10b1618}
.product-edit-btn:hover{background:#2a080b;color:#fff;border-color:#e10c17}
.stock-badge{display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:6px;padding:3px 6px;font-size:10px;font-weight:800;letter-spacing:.2px;color:#fff;min-width:52px}
.stock-safe{background:#125b2a;box-shadow:0 0 8px #19a64b55;animation:stockSafe 3.2s ease-in-out infinite}
.stock-warning{background:#8a6700;color:#fff6b0;box-shadow:0 0 9px #d7a90066;animation:stockWarning 1.35s ease-in-out infinite}
.stock-danger{background:#a70712;color:#fff;box-shadow:0 0 12px #ff061666;animation:stockDanger .58s ease-in-out infinite}
@keyframes stockSafe{0%,100%{opacity:.78;box-shadow:0 0 5px #19a64b33}50%{opacity:1;box-shadow:0 0 13px #19d55d99}}
@keyframes stockWarning{0%,100%{opacity:.68;box-shadow:0 0 5px #d7a90044}50%{opacity:1;box-shadow:0 0 15px #ffca1a99}}
@keyframes stockDanger{0%,100%{opacity:.55;transform:scale(.98);box-shadow:0 0 5px #ff061633}50%{opacity:1;transform:scale(1.03);box-shadow:0 0 18px #ff0616bb}}
.buy-bottom-bar{left:0;right:0;bottom:0;width:100%;box-sizing:border-box;background:linear-gradient(90deg,#090909,#170204,#090909);border-top:1px solid #c20a15;box-shadow:0 -5px 25px #000,0 -2px 14px #d10b1630;color:#fff;padding:9px 12px;padding-bottom:calc(9px + env(safe-area-inset-bottom));gap:10px}
.buy-bottom-bar>div{min-width:0;flex:0 1 auto}
.buy-bottom-bar small{color:#aaa}
.buy-bottom-bar b{white-space:nowrap;color:#fff}
.buy-bottom-bar .btn{margin-left:auto;flex:0 0 auto;min-width:105px;white-space:nowrap}
.checkout-sheet,.receipt-sheet{border:1px solid #421316}
.checkout-item,.cart-row{border-color:#2c1416}
.checkout-summary{border-color:#421316}
.payment-choices button{background:#111;color:#eee;border-color:#442024}
.receipt-preview{background:#080808}.receipt-paper{background:#fff;color:#111}
.sidebar{background:#0b0b0b;border-right:1px solid #3d1518}.side-head{background:linear-gradient(135deg,#1a0204,#72060d)}.menu{background:#0b0b0b;color:#eee;border-color:#2c1416}.menu.active{background:#a90712;color:#fff;box-shadow:inset 4px 0 #ff2731,0 0 12px #d10b1638}.logout-link{color:#ff4c54}
.empty{color:#888}
.toast{background:#a70712;box-shadow:0 0 15px #d10b1655}
.toast.danger{background:#d10b16}

@media(max-width:650px){
  *{max-width:100%}
  .main{padding:76px 7px calc(92px + env(safe-area-inset-bottom));width:100%;max-width:100%;margin:0}
  .page{width:100%;max-width:100%;overflow-x:hidden}
  .page-head{width:100%;margin-bottom:10px;gap:8px}
  .page-head h1{font-size:21px;line-height:1.15}
  .page-head .muted{font-size:12px}
  .panel{width:100%;padding:9px;border-radius:10px;margin-bottom:9px}
  .search-row{display:grid;grid-template-columns:minmax(0,1fr) 62px;gap:6px}
  .search-row input{min-width:0}
  .search-row .btn{padding:10px 5px;font-size:12px}
  .barcode-row{display:grid;grid-template-columns:minmax(0,1fr) 70px 92px;gap:5px;margin-top:7px}
  .barcode-row input{grid-column:auto;min-width:0;padding:10px 8px;font-size:12px}
  .barcode-row .btn{min-width:0;padding:9px 4px;font-size:11px;white-space:nowrap}
  .product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:8px}
  .product-card{width:100%;min-width:0;padding:9px;border-radius:9px;gap:6px}
  .product-card-top{gap:5px}
  .product-name{font-size:13px;line-height:1.2}
  .product-edit-btn{padding:4px 5px;font-size:9px;line-height:1.1}
  .product-info-line{gap:4px}
  .product-info-line small{font-size:10px}
  .stock-badge{font-size:9px;min-width:47px;padding:3px 4px}
  .product-card strong{font-size:13px}
  .buy-bottom-bar{padding-left:8px;padding-right:8px;gap:7px}
  .buy-bottom-bar>div{min-width:48px}
  .buy-bottom-bar small{font-size:9px}
  .buy-bottom-bar b{font-size:13px}
  .buy-bottom-bar .btn{min-width:91px;padding:10px 7px;font-size:12px}
  .checkout-sheet{width:100%;max-width:100%;padding:11px;border-radius:15px 15px 0 0}
  .checkout-head b,.receipt-head b{font-size:18px}
  .payment-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
  .payment-choices button{min-width:0;padding:10px 4px;font-size:12px}
  .checkout-item{gap:5px}
  .checkout-product{min-width:0}
  .checkout-product b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
  .qty{gap:3px;flex:none}
  .qty button{padding:5px 7px}
  .qty-input{width:48px!important;padding:6px 3px!important}
  .receipt-sheet{width:100%;max-width:100%;padding:10px}
  .receipt-preview{padding:8px}
  .receipt-paper{padding:12px;font-size:11px}
}

/* POS: selected product + quantity controls */
.product-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  max-height:none;
}
.product-card{
  transition:background .18s ease,box-shadow .18s ease,transform .12s ease,border-color .18s ease;
}
.product-card:hover{transform:translateY(-1px)}
.product-card.selected{
  background:#fff7c7;
  border-color:#f0c400;
  box-shadow:0 0 0 2px #ffd83d66,0 8px 20px #0002;
}
.product-card.selected .product-name{color:#9a6500}
.product-qty{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:3px;
  opacity:.72;
}
.product-qty.visible{opacity:1}
.product-qty button{
  width:34px;
  height:34px;
  border:0;
  border-radius:8px;
  background:#e8edf1;
  color:#222;
  font-size:21px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
}
.product-qty button:not(:disabled):active{transform:scale(.94)}
.product-qty button:disabled{opacity:.35;cursor:not-allowed}
.product-qty input{
  width:58px!important;
  height:34px;
  padding:5px!important;
  text-align:center;
  font-weight:800;
  border-radius:8px;
}
.theme-toggle{white-space:nowrap}
@media(max-width:900px){
  .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:650px){
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .product-card{padding:11px}
  .product-qty button{width:32px;height:32px}
  .product-qty input{width:52px!important}
  .theme-toggle{padding:9px 11px;font-size:12px}
}

/* Night mode */
body.night-mode{
  background:#11151a;
  color:#edf2f7;
}
body.night-mode .topbar{background:#151a20}
body.night-mode .sidebar,
body.night-mode .panel,
body.night-mode .stat,
body.night-mode .product-card,
body.night-mode .quick-item,
body.night-mode .modal,
body.night-mode .checkout-sheet,
body.night-mode .receipt-sheet,
body.night-mode .buy-bottom-bar{
  background:#1b2128;
  color:#edf2f7;
  border-color:#303944;
}
body.night-mode .muted,
body.night-mode .product-card small,
body.night-mode .cart-row small,
body.night-mode .quick-item span,
body.night-mode .checkout-product small,
body.night-mode th,
body.night-mode td small{
  color:#aeb8c3;
}
body.night-mode .menu{background:#1b2128;color:#edf2f7;border-color:#303944}
body.night-mode .menu.active{background:#c7191f;color:#fff}
body.night-mode input,
body.night-mode select,
body.night-mode textarea{
  background:#11161c;
  color:#edf2f7;
  border-color:#3a4552;
}
body.night-mode .product-card.selected{
  background:#4a4017;
  border-color:#f0c400;
  box-shadow:0 0 0 2px #ffd83d55,0 8px 22px #0007;
}
body.night-mode .product-card.selected .product-name{color:#ffe36b}
body.night-mode .product-qty button{background:#303945;color:#fff}
body.night-mode .product-edit-btn{background:#252d36;color:#8fc8ff;border-color:#3c4855}
body.night-mode th{background:#171c22}
body.night-mode .receipt-preview{background:#11161c}
body.night-mode .receipt-paper{background:#fff;color:#111}
body.night-mode .empty{color:#9aa5b0}
body.night-mode .payment-choices button{background:#1b2128;color:#edf2f7;border-color:#3a4552}
body.night-mode .payment-choices button.selected{background:#c7191f;color:#fff}

/* DAY MODE - konsep putih + merah */
body:not(.night-mode){
  background:#ffffff;
  color:#171717;
}
body:not(.night-mode) .topbar{
  background:#ffffff;
  color:#171717;
  border-bottom:2px solid #e31b23;
}
body:not(.night-mode) .sidebar{
  background:#ffffff;
  color:#171717;
  border-right:1px solid #eadede;
}
body:not(.night-mode) .panel,
body:not(.night-mode) .stat,
body:not(.night-mode) .product-card,
body:not(.night-mode) .quick-item,
body:not(.night-mode) .modal,
body:not(.night-mode) .checkout-sheet,
body:not(.night-mode) .receipt-sheet{
  background:#ffffff;
  color:#171717;
  border-color:#eadede;
}
body:not(.night-mode) .product-card{
  border:1px solid #e5d6d6;
  border-top:3px solid #e31b23;
  box-shadow:0 3px 12px rgba(180,0,0,.08);
}
body:not(.night-mode) .product-card:hover{
  border-color:#e31b23;
  box-shadow:0 5px 18px rgba(180,0,0,.14);
}
body:not(.night-mode) .product-card.selected{
  background:#fff1f1;
  border-color:#e31b23;
  border-top-color:#b90008;
  box-shadow:0 0 0 2px rgba(227,27,35,.16),0 6px 18px rgba(180,0,0,.16);
}
body:not(.night-mode) .product-card.selected .product-name{
  color:#b00008;
}
body:not(.night-mode) .product-card strong{
  color:#e31b23;
}
body:not(.night-mode) .product-qty button{
  background:#e31b23;
  color:#ffffff;
  border:1px solid #c51017;
}
body:not(.night-mode) .product-qty button:disabled{
  background:#f0dede;
  color:#a88;
  border-color:#ead1d1;
}
body:not(.night-mode) .product-qty input{
  background:#ffffff;
  color:#171717;
  border:1px solid #d9bcbc;
}
body:not(.night-mode) .product-edit-btn{
  background:#fff5f5;
  color:#c51017;
  border-color:#efcaca;
}
body:not(.night-mode) input,
body:not(.night-mode) select,
body:not(.night-mode) textarea{
  background:#ffffff;
  color:#171717;
  border-color:#d9caca;
}
body:not(.night-mode) input:focus,
body:not(.night-mode) select:focus,
body:not(.night-mode) textarea:focus{
  border-color:#e31b23;
  box-shadow:0 0 0 2px rgba(227,27,35,.10);
}
body:not(.night-mode) .btn.primary,
body:not(.night-mode) .buy-bottom-bar .btn{
  background:#e31b23;
  color:#ffffff;
  border-color:#c51017;
}
body:not(.night-mode) .menu{
  background:#ffffff;
  color:#333333;
}
body:not(.night-mode) .menu.active{
  background:#e31b23;
  color:#ffffff;
}
body:not(.night-mode) .theme-toggle{
  background:#ffffff;
  color:#c51017;
  border:1px solid #e31b23;
}
body:not(.night-mode) .buy-bottom-bar{
  background:#ffffff;
  color:#171717;
  border-top:2px solid #e31b23;
  box-shadow:0 -5px 18px rgba(180,0,0,.10);
}
body:not(.night-mode) .buy-bottom-bar small{
  color:#777;
}
body:not(.night-mode) .muted{
  color:#666;
}
body:not(.night-mode) .product-info-line small{
  color:#666;
}

/* Make product cards stable on touch devices */
.product-card{touch-action:manipulation}
.product-qty{position:relative;z-index:5}
.product-qty button,.product-qty input{position:relative;z-index:6;touch-action:manipulation}


/* =========================================================
   FINAL DAY MODE OVERRIDES - WHITE + RED, HIGH CONTRAST
   ========================================================= */
body:not(.night-mode){
  background:#ffffff !important;
  color:#1a1a1a !important;
}
body:not(.night-mode) .topbar{
  background:#ffffff !important;
  color:#1a1a1a !important;
  border-bottom:2px solid #d71920 !important;
  box-shadow:0 2px 10px rgba(180,0,0,.08) !important;
}
body:not(.night-mode) .topbar .icon-btn,
body:not(.night-mode) .top-title,
body:not(.night-mode) .top-title small{color:#1a1a1a !important}
body:not(.night-mode) .main,
body:not(.night-mode) .page{color:#1a1a1a !important}
body:not(.night-mode) .page-head h1,
body:not(.night-mode) .panel-title,
body:not(.night-mode) .stat b,
body:not(.night-mode) .product-name,
body:not(.night-mode) .product-card strong{ text-shadow:none !important }
body:not(.night-mode) .page-head h1{color:#171717 !important}
body:not(.night-mode) .muted{color:#555 !important}
body:not(.night-mode) .panel,
body:not(.night-mode) .stat,
body:not(.night-mode) .product-card,
body:not(.night-mode) .quick-item,
body:not(.night-mode) .modal,
body:not(.night-mode) .checkout-sheet,
body:not(.night-mode) .receipt-sheet{
  background:#ffffff !important;
  color:#1a1a1a !important;
  border-color:#e2cfd0 !important;
  box-shadow:0 3px 12px rgba(80,0,0,.08) !important;
}
body:not(.night-mode) .product-card{
  border:1px solid #e3cfd0 !important;
  border-top:3px solid #d71920 !important;
}
body:not(.night-mode) .product-card.selected{
  background:#fff0f1 !important;
  border-color:#d71920 !important;
  box-shadow:0 0 0 2px rgba(215,25,32,.15),0 5px 16px rgba(150,0,0,.12) !important;
}
body:not(.night-mode) .product-name{color:#202020 !important}
body:not(.night-mode) .product-card.selected .product-name{color:#a90008 !important}
body:not(.night-mode) .product-info-line small,
body:not(.night-mode) .product-card small{color:#555 !important}
body:not(.night-mode) .product-card strong{color:#d71920 !important}
body:not(.night-mode) .product-edit-btn{
  background:#fff5f5 !important;
  color:#b40008 !important;
  border-color:#e4bfc1 !important;
}
body:not(.night-mode) .product-qty button{
  background:#d71920 !important;
  color:#fff !important;
  border:1px solid #b80f15 !important;
  box-shadow:none !important;
}
body:not(.night-mode) .product-qty button:disabled{
  background:#f1dfe0 !important;
  color:#9b6b6d !important;
  border-color:#e7cfd0 !important;
}
body:not(.night-mode) .product-qty input,
body:not(.night-mode) input,
body:not(.night-mode) select,
body:not(.night-mode) textarea{
  background:#fff !important;
  color:#171717 !important;
  border-color:#d6bfc1 !important;
}
body:not(.night-mode) input::placeholder,
body:not(.night-mode) textarea::placeholder{color:#777 !important;opacity:1 !important}
body:not(.night-mode) input:focus,
body:not(.night-mode) select:focus,
body:not(.night-mode) textarea:focus{
  border-color:#d71920 !important;
  box-shadow:0 0 0 2px rgba(215,25,32,.12) !important;
}
body:not(.night-mode) .btn{
  background:#fff !important;
  color:#222 !important;
  border:1px solid #d8c4c5 !important;
}
body:not(.night-mode) .btn.primary,
body:not(.night-mode) .buy-bottom-bar .btn.primary{
  background:#d71920 !important;
  color:#fff !important;
  border-color:#b80f15 !important;
}
body:not(.night-mode) .theme-toggle{
  background:#fff !important;
  color:#b40008 !important;
  border:1px solid #d71920 !important;
}
body:not(.night-mode) .buy-bottom-bar{
  background:#fff !important;
  color:#171717 !important;
  border-top:2px solid #d71920 !important;
  box-shadow:0 -4px 14px rgba(80,0,0,.10) !important;
}
body:not(.night-mode) .buy-bottom-bar small{color:#666 !important}
body:not(.night-mode) .buy-bottom-bar b{color:#171717 !important}
body:not(.night-mode) .menu{background:#fff !important;color:#222 !important;border-color:#eadede !important}
body:not(.night-mode) .menu.active{background:#d71920 !important;color:#fff !important}
body:not(.night-mode) .sidebar{background:#fff !important;color:#222 !important;border-right:1px solid #eadede !important}
body:not(.night-mode) .side-head{background:#d71920 !important;color:#fff !important}
body:not(.night-mode) .side-head small{color:#fff !important}
body:not(.night-mode) .empty{color:#666 !important}
body:not(.night-mode) th{background:#fff5f5 !important;color:#444 !important}
body:not(.night-mode) td{color:#222 !important}
body:not(.night-mode) td small{color:#666 !important}
body:not(.night-mode) .cart-row,
body:not(.night-mode) .checkout-item{border-color:#eadada !important}
body:not(.night-mode) .cart-row small,
body:not(.night-mode) .checkout-product small{color:#666 !important}
body:not(.night-mode) .qty button{background:#d71920 !important;color:#fff !important}
body:not(.night-mode) .delete{background:#fff0f0 !important;color:#b00008 !important}
body:not(.night-mode) .quick-item{color:#222 !important}
body:not(.night-mode) .quick-item span{color:#d71920 !important}

/* =========================================================
   DAFTAR TRANSAKSI - VERSI RAMPING / KOMPAK
   ========================================================= */
.transactions-list{display:grid;gap:7px;margin-bottom:24px}
.trx-filter{padding:0!important;overflow:hidden}
.trx-tabs{display:flex;border-bottom:1px solid #e5e7ea;background:#fff}
.trx-tab{flex:1;border:0;background:#fff;color:#666;padding:12px 6px;font-weight:800;font-size:14px;cursor:pointer;border-bottom:3px solid transparent}
.trx-tab.active{color:#d71920;border-bottom-color:#d71920}
.trx-search{display:flex;align-items:center;gap:7px;margin:9px 10px;padding:0 11px;border:1px solid #e2d0d1;border-radius:10px;background:#fff;height:40px}
.trx-search span{font-size:20px;color:#d71920}.trx-search input{border:0!important;box-shadow:none!important;padding:5px!important}
.trx-card{display:grid;grid-template-columns:82px minmax(0,1fr) auto;gap:0;background:#fff;border:1px solid #dddfe2;border-radius:12px;overflow:hidden;box-shadow:0 1px 5px rgba(30,0,0,.06)}
.trx-date{background:#ffc400;color:#171717;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:6px 4px;min-height:78px}
.trx-date b{font-size:25px;line-height:1}.trx-date span{font-size:10px;font-weight:800;margin-top:3px}.trx-date small{font-size:9px;font-weight:700;margin-top:2px}
.trx-main{padding:9px 10px;min-width:0}.trx-invoice{font-size:12px;color:#555;letter-spacing:.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trx-total{font-size:19px;font-weight:900;color:#18a63d;margin:3px 0}.trx-customer{font-size:12px;color:#444;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trx-side{padding:8px 8px 0 0;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;gap:5px;text-align:right}.trx-side small{font-size:10px;font-weight:700;color:#555}.trx-status{font-size:9px;font-weight:900;border:1px solid #d71920;border-radius:5px;padding:3px 5px;white-space:nowrap}.trx-status.success{color:#d71920;background:#fff}.trx-status.pending{color:#a90008;background:#fff0f1}
.trx-actions{grid-column:1/-1;border-top:1px solid #eee;background:#fff8f8;display:flex;gap:6px;padding:6px 7px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}.trx-actions::-webkit-scrollbar{display:none}.trx-actions .mini{flex:0 0 auto;background:#fff;border:1px solid #e0c5c7;color:#333;font-size:11px;padding:6px 8px;line-height:1.1;border-radius:7px}.trx-actions .trx-edit{color:#b30008}.trx-actions .trx-complete{background:#d71920;color:#fff;border-color:#d71920}.trx-actions .danger-btn{background:#fff0f0;color:#b00000;border-color:#edb9bc}
.trx-editor{display:flex;flex-direction:column;gap:9px}.trx-editor-note{background:#fff4f4;border-left:4px solid #d71920;padding:11px;border-radius:8px;color:#444;font-size:13px}.trx-edit-search{display:flex;align-items:center;gap:8px;border:1px solid #d8c1c3;border-radius:10px;padding:0 10px;background:#fff}.trx-edit-search span{font-size:23px;color:#d71920}.trx-edit-search input{border:0!important;box-shadow:none!important}.trx-product-results{display:grid;gap:6px;max-height:220px;overflow:auto}.trx-product-result{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:9px;align-items:center;text-align:left;border:1px solid #ead5d6;background:#fff;border-radius:10px;padding:10px;cursor:pointer}.trx-product-result:hover,.trx-product-result.chosen{background:#fff0f1;border-color:#d71920}.trx-product-result:disabled{opacity:.45;cursor:not-allowed}.trx-product-result span{min-width:0}.trx-product-result b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trx-product-result small{display:block;color:#777;margin-top:3px}.trx-product-result strong{color:#d71920;white-space:nowrap}.trx-product-result em{font-style:normal;font-weight:800;color:#d71920;white-space:nowrap}.trx-edit-title{font-size:15px;font-weight:900;margin-top:6px}.trx-edit-items{border:1px solid #eee;border-radius:10px;overflow:hidden}.trx-edit-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:8px;align-items:center;padding:10px;border-bottom:1px solid #eee}.trx-edit-row:last-child{border-bottom:0}.trx-edit-row small{display:block;color:#777;margin-top:3px}.trx-edit-qty{display:flex;align-items:center;gap:4px}.trx-edit-qty button{width:32px;height:32px;border:0;border-radius:7px;background:#d71920;color:#fff;font-size:20px;font-weight:900}.trx-edit-qty input{width:52px!important;height:32px;padding:4px!important;text-align:center}.trx-edit-total{display:flex;justify-content:space-between;align-items:center;border-top:2px solid #eee;padding:12px 2px;font-size:18px}.trx-edit-total b{color:#d71920;font-size:22px}
#modal:has(.trx-editor) .modal{width:min(850px,100%)}
body.night-mode .trx-filter,body body.night-mode .trx-tabs,body body.night-mode .trx-tab,body.night-mode .trx-search,body.night-mode .trx-card,body.night-mode .trx-actions,body.night-mode .trx-product-result,body.night-mode .trx-edit-items,body.night-mode .trx-edit-search{background:#1b2128;color:#edf2f7;border-color:#303944}
body body.night-mode .trx-tab{color:#aeb8c3} body.night-mode .trx-tab.active{color:#ff5c62;border-bottom-color:#ff5c62}
body.night-mode .trx-search input,body.night-mode .trx-edit-search input{background:transparent!important;color:#edf2f7!important}
body.night-mode .trx-main .trx-invoice,body.night-mode .trx-customer,body.night-mode .trx-side small{color:#dbe2e9}body.night-mode .trx-total{color:#4bd86e}body.night-mode .trx-actions{background:#161b21}body.night-mode .trx-actions .mini{background:#252d36;color:#edf2f7;border-color:#3c4855}body.night-mode .trx-product-result small,body.night-mode .trx-edit-row small{color:#aeb8c3}body.night-mode .trx-editor-note{background:#2a1d1f;color:#e8dfe0;border-color:#d71920}
@media(max-width:700px){.trx-card{grid-template-columns:68px minmax(0,1fr) auto}.trx-date{min-height:72px}.trx-date b{font-size:23px}.trx-date span{font-size:9px}.trx-date small{font-size:8px}.trx-main{padding:8px}.trx-total{font-size:18px}.trx-side{padding:7px 7px 0 0}.trx-side small{display:none}.trx-status{font-size:8px;padding:3px 4px}.trx-actions{padding:6px;gap:5px}.trx-actions .mini{font-size:10px;padding:6px 7px}.trx-product-result{grid-template-columns:minmax(0,1fr) auto}.trx-product-result em{grid-column:2;grid-row:1}.trx-product-result strong{grid-column:2;grid-row:2}.trx-edit-row{grid-template-columns:minmax(0,1fr) auto}.trx-edit-row>b:last-of-type{grid-column:1}.trx-edit-row>.delete{grid-column:2;grid-row:1}}

/* Day-mode readability for transaction page */
body:not(.night-mode) #page-riwayat .panel{color:#202020!important;background:#fff!important}
body:not(.night-mode) #page-riwayat .muted{color:#555!important}
body:not(.night-mode) #page-riwayat .trx-search input{color:#171717!important}
body:not(.night-mode) #page-riwayat .trx-product-result b,
body:not(.night-mode) #page-riwayat .trx-edit-row b{color:#202020}

/* ===== UI polish: header theme + barcode actions ===== */
.header-theme-btn{
  width:42px;height:42px;border:1px solid #ffffff33;border-radius:12px;
  background:#ffffff18;color:#fff;font-size:21px;display:grid;place-items:center;
  cursor:pointer;transition:.2s;box-shadow:0 2px 8px #0002;
}
.header-theme-btn:hover{background:#ffffff2b;transform:translateY(-1px)}
.page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.barcode-all-btn{background:linear-gradient(135deg,#0b7a53,#13a56e);color:#fff;border:0}
.barcode-all-btn:disabled{opacity:.6;cursor:wait}
.product-actions{white-space:normal}
.barcode-mini{background:#eef8ff;color:#075b94;border:1px solid #c9e7fa}
.barcode-missing{display:inline-block;font-size:11px;color:#8b949e;padding:6px 8px}
@media(max-width:650px){
  .page-actions{width:100%}
  .page-actions .btn{flex:1}
  .header-theme-btn{width:38px;height:38px;font-size:19px}
}
body.night-mode .barcode-mini{background:#162a39;color:#8fd2ff;border-color:#2b526b}
body.night-mode .barcode-missing{color:#8f9ba8}
body.night-mode .barcode-all-btn{background:#147a57}

/* ===== Pelanggan & autocomplete ===== */
.customer-toolbar{padding:10px}.customer-search{display:flex;align-items:center;gap:8px;border:1px solid #ddd;border-radius:12px;padding:0 12px;background:#fff}.customer-search span{font-size:22px;color:#d71920}.customer-search input{border:0!important;box-shadow:none!important}.customer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.customer-card{background:#fff;border:1px solid #e1e5e9;border-radius:14px;padding:14px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;box-shadow:0 2px 9px #0000000b}.customer-avatar{width:48px;height:48px;border-radius:14px;background:#fff0f1;display:grid;place-items:center;font-size:24px}.customer-main{min-width:0}.customer-main b{display:block;font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.customer-main span,.customer-main small{display:block;color:#68727d;margin-top:4px}.customer-actions{grid-column:1/-1;display:flex;gap:7px;flex-wrap:wrap;border-top:1px solid #eee;padding-top:10px}.primary-mini{background:#d71920;color:#fff}.wa-mini{background:#e8f8ee;color:#137a3a;border:1px solid #bfe5cc}.customer-history-head{display:flex;justify-content:space-between;gap:12px;padding:13px;background:#fff7f7;border-radius:12px;border:1px solid #f0d7d8;margin-bottom:12px}.customer-history-head b{display:block;font-size:18px}.customer-history-head small{display:block;color:#666;margin-top:4px}.customer-history-head strong{text-align:right;color:#d71920}.customer-history-list{display:grid;gap:7px}.customer-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid #e5e7ea;border-radius:10px;padding:10px}.customer-history-row small{display:block;color:#737b83;margin-top:3px}.customer-history-actions{grid-column:1/-1;display:flex;gap:6px;border-top:1px solid #eee;padding-top:7px}.customer-history-actions .mini{flex:1}.customer-card .mini{font-size:11px}
body.night-mode .customer-toolbar,body.night-mode .customer-search,body.night-mode .customer-card,body.night-mode .customer-history-row{background:#1b2128;color:#edf2f7;border-color:#303944}body.night-mode .customer-search input{background:transparent!important;color:#edf2f7!important}body.night-mode .customer-main span,body.night-mode .customer-main small,body.night-mode .customer-history-head small,body.night-mode .customer-history-row small{color:#aeb8c3}body.night-mode .customer-history-head{background:#2a1d1f;border-color:#4a292c}
@media(max-width:800px){.customer-grid{grid-template-columns:1fr}.customer-card{grid-template-columns:auto minmax(0,1fr)}.customer-history-row{grid-template-columns:minmax(0,1fr) auto}}

/* Supermarket receipt */
.receipt-paper{width:100%;max-width:390px;margin:auto;padding:24px 22px;background:#fff;color:#111;font-family:Arial,sans-serif;font-size:12px;box-shadow:0 4px 18px #0002;border-radius:2px}
.receipt-brand{text-align:center}.receipt-logo{font-size:26px;line-height:1;margin-bottom:6px}.receipt-store{text-align:center;font-size:21px;font-weight:900;border:0;padding:0;letter-spacing:.3px}.receipt-brand>small{display:block;font-size:10px;line-height:1.5;margin-top:6px;color:#444}.receipt-rule{border-top:1px dashed #777;margin:12px 0}.receipt-meta{display:flex;justify-content:space-between;gap:12px;padding:3px 0;border:0;font-family:Arial,sans-serif;line-height:1.5}.receipt-items-head{display:flex;justify-content:space-between;font-size:10px;font-weight:800;color:#666;margin-top:8px}.receipt-line{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border:0;align-items:flex-start}.receipt-item-name{display:flex;flex-direction:column;min-width:0}.receipt-item-name b{font-size:12px;line-height:1.25}.receipt-item-name small{font-size:10px;color:#666;margin-top:2px}.receipt-total{display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:18px;font-weight:900;border:0}.receipt-payment{display:grid;grid-template-columns:1fr auto;gap:5px 12px;padding:8px 0;font-size:11px}.receipt-bank,.receipt-note{padding:9px 0;border-top:1px dashed #aaa;font-size:10px;line-height:1.5;white-space:pre-wrap}.receipt-footer{text-align:center;border-top:1px dashed #aaa;padding-top:12px;font-weight:700;line-height:1.5;font-size:11px;white-space:pre-wrap}.receipt-actions{grid-template-columns:1fr 1fr}.receipt-actions .btn:last-child{grid-column:1/-1}
@media(max-width:520px){.receipt-paper{max-width:360px;padding:20px 17px}.receipt-store{font-size:19px}}

/* Produk compact / mobile friendly */
.products-compact{font-size:12px}.products-compact th,.products-compact td{padding:7px 8px}.product-name-cell{min-width:120px}.product-name-cell b{display:block;line-height:1.25}.product-name-cell small{display:block;color:#78818a;font-size:10px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}.sold-badge{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:3px 7px;border-radius:999px;background:#eef7f2;color:#147a4a;font-weight:800;font-size:11px}.product-icon-actions{display:flex;align-items:center;gap:4px;white-space:nowrap}.icon-action{width:30px;height:30px;padding:0;border:1px solid #d9dfe3;background:#fff;border-radius:8px;display:grid;place-items:center;cursor:pointer;font-size:15px;color:#075b94}.icon-action:hover{transform:translateY(-1px);box-shadow:0 2px 8px #0002}.icon-action.danger-icon{color:#b00000}.barcode-missing{font-size:10px;color:#999}@media(max-width:650px){.products-compact th,.products-compact td{padding:6px 5px}.products-compact th:nth-child(2),.products-compact td:nth-child(2){display:none}.product-name-cell{min-width:100px}.product-name-cell small{max-width:135px}.icon-action{width:28px;height:28px}.products-compact{font-size:11px}}
body.night-mode .icon-action{background:#20262c;border-color:#3a444d;color:#9ed1ff}.night-mode .sold-badge{background:#173b2d;color:#6ee7ad}

/* Produk compact / mobile friendly */
.products-compact{font-size:12px}.products-compact th,.products-compact td{padding:7px 8px}.product-name-cell{min-width:120px}.product-name-cell b{display:block;line-height:1.25}.product-name-cell small{display:block;color:#78818a;font-size:10px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}.sold-badge{display:inline-flex;align-items:center;justify-content:center;min-width:28px;padding:3px 7px;border-radius:999px;background:#eef7f2;color:#147a4a;font-weight:800;font-size:11px}.product-icon-actions{display:flex;align-items:center;gap:4px;white-space:nowrap}.icon-action{width:30px;height:30px;padding:0;border:1px solid #d9dfe3;background:#fff;border-radius:8px;display:grid;place-items:center;cursor:pointer;font-size:15px;color:#075b94}.icon-action:hover{transform:translateY(-1px);box-shadow:0 2px 8px #0002}.icon-action.danger-icon{color:#b00000}@media(max-width:650px){.products-compact th,.products-compact td{padding:6px 5px}.products-compact th:nth-child(2),.products-compact td:nth-child(2){display:none}.product-name-cell{min-width:100px}.product-name-cell small{max-width:135px}.icon-action{width:28px;height:28px}.products-compact{font-size:11px}}
body.night-mode .icon-action{background:#20262c;border-color:#3a444d;color:#9ed1ff}.night-mode .sold-badge{background:#173b2d;color:#6ee7ad}
/* Night Mode default: panel/form dibuat lebih nyaman dibaca di layar HP */
body.night-mode .settings-form label{color:#e9eef4}
body.night-mode .settings-form input,
body.night-mode .settings-form select,
body.night-mode .settings-form textarea{box-shadow:inset 0 1px 2px #0008}
body.night-mode .expensesTable,
body.night-mode #expensesTable{color:#edf2f7}
body.night-mode .table-wrap{border-color:#303944}

/* Dashboard compact accordions */
.accordion-panel{padding:0;overflow:hidden}.accordion-title{width:100%;border:0;background:transparent;padding:15px 18px;display:flex;align-items:center;justify-content:space-between;font:inherit;font-weight:800;font-size:16px;cursor:pointer;color:inherit}.accordion-content{display:none;padding:0 18px 14px}.accordion-panel.open .accordion-content{display:block}.accordion-chevron{transition:.2s;font-size:20px}.accordion-panel.open .accordion-chevron{transform:rotate(180deg)}.profit-text{color:#16823a}.page-actions{display:flex;gap:7px;flex-wrap:wrap}.page-actions .btn{padding:9px 11px;font-size:13px}
body.night-mode .accordion-title{color:#fff}.night-mode .accordion-panel{background:#15191d;border-color:#2a3036}.night-mode .accordion-content{color:#e8edf1}
@media(max-width:700px){.page-actions{width:100%}.page-actions .btn{flex:1;min-width:70px}.accordion-title{padding:14px}.accordion-content{padding:0 14px 10px}}

.auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:16px;font-size:14px}.auth-links a{color:#075b94;text-decoration:none;font-weight:700}.auth-links a:hover{text-decoration:underline}

/* POS product view switcher */
.pos-view-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:10px;flex-wrap:wrap}
.pos-view-toolbar>span{font-size:12px;color:#888;margin-right:3px}
.view-btn{border:1px solid #4a2024;background:#121212;color:#ddd;border-radius:7px;padding:7px 11px;font-weight:800;cursor:pointer}
.view-btn.active{background:linear-gradient(180deg,#f01420,#a90610);color:#fff;border-color:#ff2934;box-shadow:0 0 9px #d10b1638}
.product-grid.view-list{display:flex;flex-direction:column;gap:7px}
.product-grid.view-list .product-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:10px 12px}
.product-grid.view-list .product-card-top{min-width:0}
.product-grid.view-list .product-info-line{justify-content:flex-start;min-width:120px}
.product-grid.view-list .product-qty{margin:0}
.product-grid.view-list .product-card strong{white-space:nowrap}

/* 80mm receipt preview */
.receipt-preview{display:flex;justify-content:center;align-items:flex-start}
.receipt-paper{width:80mm;max-width:100%;min-width:0;margin:0 auto;padding:5mm 4mm;background:#fff;color:#111;font-family:"Courier New",monospace;font-size:12px;line-height:1.25;box-shadow:0 1px 5px #0002}
.receipt-brand{text-align:center}.receipt-store{font-family:"Courier New",monospace;font-size:17px;font-weight:900;letter-spacing:0}.receipt-brand>small{font-size:10px;line-height:1.35}
.receipt-meta{font-family:"Courier New",monospace;font-size:11px}.receipt-items-head,.receipt-line{font-family:"Courier New",monospace}.receipt-line{gap:5px}.receipt-item-name{min-width:0}.receipt-item-name b{font-size:11px}.receipt-item-name small{font-size:9px}.receipt-total{font-family:"Courier New",monospace}.receipt-payment{font-family:"Courier New",monospace}
@media(max-width:650px){
 .pos-view-toolbar{justify-content:stretch}.pos-view-toolbar>span{flex:1}.view-btn{flex:0 0 auto;padding:7px 10px}
 .product-grid.view-list .product-card{grid-template-columns:minmax(0,1fr) auto;gap:7px}
 .product-grid.view-list .product-info-line{grid-column:1}.product-grid.view-list .product-card strong{grid-column:2;grid-row:1}.product-grid.view-list .product-qty{grid-column:2;grid-row:2}.product-grid.view-list .product-card-top{grid-column:1;grid-row:1 / span 2}
 .receipt-paper{width:80mm;padding:4mm 3.5mm;font-size:11px}
}


/* Final POS polish: show complete product names and keep controls aligned */
.product-card{min-height:0;overflow:visible}
.product-card-top{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px}
.product-name{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;-webkit-line-clamp:unset!important;-webkit-box-orient:initial!important;max-width:none!important}
.product-edit-btn{white-space:nowrap;align-self:start;line-height:1.1}
.product-info-line{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
.product-info-line small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.2}
.product-card strong{display:block;white-space:nowrap;line-height:1.2}
.product-qty{justify-content:flex-end;flex-wrap:nowrap}
.pos-view-toolbar{align-items:center;justify-content:flex-end;background:rgba(127,127,127,.08);border:1px solid rgba(127,127,127,.18);border-radius:10px;padding:6px;margin:10px 0 2px}
.pos-view-toolbar>span{font-weight:700;white-space:nowrap}
.view-btn{min-width:82px;display:inline-flex;align-items:center;justify-content:center;gap:5px;line-height:1.1;white-space:nowrap}
.product-grid.view-list .product-card{grid-template-columns:minmax(0,1fr) auto;align-items:center}
.product-grid.view-list .product-card-top{grid-column:1;grid-row:1 / span 2}
.product-grid.view-list .product-info-line{grid-column:2;grid-row:1;min-width:150px}
.product-grid.view-list .product-card strong{grid-column:2;grid-row:2;justify-self:end}
.product-grid.view-list .product-qty{grid-column:3;grid-row:1 / span 2;margin:0}
@media(max-width:650px){
  .product-card-top{grid-template-columns:minmax(0,1fr) auto;gap:6px}
  .product-name{font-size:13px;line-height:1.25}
  .product-edit-btn{font-size:9px;padding:5px 6px}
  .pos-view-toolbar{justify-content:stretch}
  .pos-view-toolbar>span{flex:1;font-size:11px}
  .view-btn{min-width:72px;padding:8px 8px;font-size:11px}
  .product-grid.view-list .product-card{grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .product-grid.view-list .product-card-top{grid-column:1;grid-row:1 / span 3}
  .product-grid.view-list .product-info-line{grid-column:2;grid-row:1;min-width:95px}
  .product-grid.view-list .product-card strong{grid-column:2;grid-row:2}
  .product-grid.view-list .product-qty{grid-column:2;grid-row:3;justify-content:flex-end}
}

/* Final readability: never truncate product names in cart/checkout */
.cart-row > div:first-child,
.checkout-product{min-width:0}
.cart-row > div:first-child b,
.checkout-product b{
  display:block;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.3;
}

/* Keep POS list columns predictable on desktop */
.product-grid.view-list .product-card{grid-template-columns:minmax(0,1fr) minmax(140px,auto) auto}
@media(max-width:650px){
  .product-grid.view-list .product-card{grid-template-columns:minmax(0,1fr) auto}
}

/* ===== Input nama pelanggan di keranjang: autocomplete mobile ===== */
.customer-autocomplete-wrap{position:relative;width:100%;z-index:300}
.customer-autocomplete-wrap>input{width:100%;box-sizing:border-box}
.customer-suggestions{position:absolute;left:0;right:0;top:calc(100% + 4px);max-height:260px;overflow-y:auto;background:#fff;border:1px solid #d9dde2;border-radius:12px;box-shadow:0 8px 24px #0002;padding:5px;z-index:300}
.customer-suggestions[hidden]{display:none}
.customer-suggestion{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:2px;border:0;border-bottom:1px solid #eef0f2;background:transparent;padding:10px 11px;border-radius:9px;text-align:left;cursor:pointer}
.customer-suggestion:last-child{border-bottom:0}
.customer-suggestion:hover,.customer-suggestion.active{background:#fff0f1}
.customer-suggestion-name{font-weight:800;font-size:14px;color:#20252a}
.customer-suggestion-meta{font-size:12px;color:#737b83}
body.night-mode .customer-suggestions{background:#1b2128;border-color:#3a4550;box-shadow:0 8px 24px #0008}
body.night-mode .customer-suggestion{border-color:#303944}
body.night-mode .customer-suggestion:hover,body.night-mode .customer-suggestion.active{background:#2a1d1f}
body.night-mode .customer-suggestion-name{color:#edf2f7}
body.night-mode .customer-suggestion-meta{color:#aeb8c3}

/* Pilih pelanggan dari halaman Keranjang */
.customer-input-row{display:flex;align-items:stretch;gap:8px;width:100%}
.customer-input-row .customer-autocomplete-wrap{flex:1;min-width:0}
.customer-input-row .customer-search-btn{border:1px solid #cfd5da;background:#fff;color:#222;border-radius:9px;padding:0 14px;font-weight:800;cursor:pointer;white-space:nowrap;min-width:88px}
.customer-input-row .customer-search-btn:active{transform:scale(.98)}
.customer-picker-search{display:flex;align-items:center;gap:8px;border:1px solid #d7dce0;border-radius:10px;padding:0 10px;margin-bottom:10px;background:#fff}
.customer-picker-search span{font-size:20px;color:#777}
.customer-picker-search input{border:0!important;outline:0!important;box-shadow:none!important;flex:1;padding:11px 4px!important;background:transparent!important}
.customer-picker-list{display:flex;flex-direction:column;gap:6px;max-height:55vh;overflow:auto}
.customer-picker-item{width:100%;display:flex;align-items:center;gap:10px;text-align:left;border:1px solid #e1e5e8;background:#fff;border-radius:10px;padding:10px;cursor:pointer}
.customer-picker-item:hover{background:#f5f7f9}
.customer-picker-avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#eef1f4;flex:none}
.customer-picker-info{display:flex;flex-direction:column;min-width:0;flex:1}.customer-picker-info b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-picker-info small{color:#777;margin-top:2px}.customer-picker-arrow{font-size:24px;color:#999}
body.night-mode .customer-input-row .customer-search-btn,.night-mode .customer-picker-search,.night-mode .customer-picker-item{background:#1b2128;color:#fff;border-color:#3a4550}.night-mode .customer-picker-search input{color:#fff}.night-mode .customer-picker-item:hover{background:#252d36}.night-mode .customer-picker-info small{color:#aab3bd}
@media(max-width:480px){.customer-input-row .customer-search-btn{padding:0 10px;min-width:76px}.customer-picker-list{max-height:50vh}}

/* FIX: pemilih pelanggan harus berada DI ATAS checkout/keranjang */
#modal.customer-picker-active{z-index:260!important}
#modal.customer-picker-active .modal{position:relative;z-index:261;max-height:88vh}
#modal.customer-picker-active .customer-picker-list{position:relative;z-index:262}
#modal.customer-picker-active .customer-picker-item{position:relative;z-index:263;touch-action:manipulation}

/* Receipt 80mm - clean itemized layout with unit price and subtotal */
.receipt-paper{width:80mm;max-width:100%;margin:0 auto;padding:5mm 4mm;background:#fff;color:#111;font-family:"Courier New",monospace;font-size:11px;line-height:1.3;box-shadow:0 1px 5px #0002;border-radius:2px}
.receipt-brand{text-align:center}.receipt-store{font-family:"Courier New",monospace;font-size:18px;font-weight:900;letter-spacing:0;border:0;padding:0}.receipt-brand>small{display:block;font-size:9.5px;line-height:1.4;margin-top:5px;color:#333}.receipt-rule{border-top:1px dashed #777;margin:10px 0}.receipt-info-grid{display:grid;grid-template-columns:70px minmax(0,1fr);gap:3px 7px;font-size:10px;line-height:1.45}.receipt-info-grid b{text-align:right;overflow-wrap:anywhere}.receipt-items-head{display:flex;justify-content:space-between;font-size:9px;font-weight:900;color:#555;margin-bottom:2px}.receipt-items{display:block}.receipt-item-row{padding:6px 0;border-bottom:1px dotted #bbb}.receipt-item-top{display:flex;gap:5px;align-items:flex-start}.receipt-item-top b{font-size:11px;line-height:1.3;overflow-wrap:anywhere}.receipt-item-no{flex:0 0 auto;font-weight:700}.receipt-item-detail{display:flex;justify-content:space-between;gap:8px;padding-left:18px;margin-top:2px;font-size:10px}.receipt-item-detail strong{font-size:10.5px;white-space:nowrap}.receipt-empty{text-align:center;padding:8px;color:#777}.receipt-total{display:flex;justify-content:space-between;align-items:center;padding:9px 0;font-size:16px;font-weight:900;border:0}.receipt-payment{display:grid;grid-template-columns:1fr auto;gap:4px 10px;padding:6px 0;font-size:10.5px}.receipt-payment b{text-align:right}.receipt-bank,.receipt-note{padding:8px 0;border-top:1px dashed #aaa;font-size:9.5px;line-height:1.45;white-space:pre-wrap}.receipt-footer{text-align:center;border-top:1px dashed #aaa;padding-top:10px;font-weight:700;line-height:1.5;font-size:10px;white-space:pre-wrap}.receipt-actions{grid-template-columns:1fr 1fr}.receipt-actions .btn:last-child{grid-column:1/-1}
@media(max-width:520px){.receipt-paper{width:80mm;max-width:100%;padding:5mm 4mm}.receipt-store{font-size:17px}.receipt-info-grid{grid-template-columns:64px minmax(0,1fr)}}


/* ===== POS TRANSAKSI BARU - LIST MOBILE ===== */
#page-kasir .product-grid.view-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:14px;
}
#page-kasir .product-grid.view-list .product-card{
  min-height:72px;
  padding:11px 12px;
  border-radius:8px;
  grid-template-columns:minmax(0,1fr) minmax(90px,auto) auto;
  gap:10px;
  align-items:center;
}
#page-kasir .product-grid.view-list .product-card-top{
  grid-column:1;
  grid-row:1 / span 2;
}
#page-kasir .product-grid.view-list .product-info-line{
  grid-column:2;
  grid-row:1;
  min-width:100px;
  justify-content:flex-end;
}
#page-kasir .product-grid.view-list .product-card strong{
  grid-column:2;
  grid-row:2;
  justify-self:end;
  font-size:13px;
}
#page-kasir .product-grid.view-list .product-qty{
  grid-column:3;
  grid-row:1 / span 2;
  justify-content:flex-end;
  margin:0;
}
#page-kasir .product-grid.view-list .product-name{
  font-size:15px;
  font-weight:800;
  line-height:1.25;
}
#page-kasir .product-grid.view-list .product-info-line small{
  font-size:11px;
}
#page-kasir .product-grid.view-list .product-edit-btn{
  padding:5px 7px;
  font-size:10px;
}
@media(max-width:650px){
  #page-kasir .product-grid.view-list .product-card{
    min-height:76px;
    padding:12px 10px;
    grid-template-columns:minmax(0,1fr) auto;
    gap:6px 9px;
  }
  #page-kasir .product-grid.view-list .product-card-top{
    grid-column:1;
    grid-row:1 / span 3;
  }
  #page-kasir .product-grid.view-list .product-info-line{
    grid-column:2;
    grid-row:1;
    min-width:88px;
  }
  #page-kasir .product-grid.view-list .product-card strong{
    grid-column:2;
    grid-row:2;
    font-size:13px;
  }
  #page-kasir .product-grid.view-list .product-qty{
    grid-column:2;
    grid-row:3;
  }
  #page-kasir .product-grid.view-list .product-name{
    font-size:15px;
  }
}

/* ===== DASHBOARD UTAMA: layout mobile seperti referensi, warna tema tetap mengikuti aplikasi ===== */
.dashboard-home{max-width:900px;margin:0 auto;padding-bottom:24px}
.dashboard-hidden-stats{display:none!important}
.dashboard-hero{background:linear-gradient(145deg,#151515,#0a0a0a);border:1px solid #351114;border-radius:24px;padding:18px;box-shadow:0 5px 20px #0008,0 0 14px #d10b1612;margin-bottom:24px}
.dashboard-hero-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.dashboard-hero h1{margin:0;color:#f4f4f4;font-size:24px;line-height:1.15;letter-spacing:.2px}
.dashboard-hero p{margin:5px 0 0;color:#aeb4bb;font-size:13px}
.dashboard-date{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;background:#c7191f;color:#fff;border-radius:999px;padding:9px 12px;font-size:13px;font-weight:800;box-shadow:0 4px 12px #0003}
.dashboard-hero-line{height:1px;background:#ffffff1f;margin:16px 0}
.dashboard-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.dashboard-summary-card{position:relative;min-height:112px;border-radius:18px;padding:15px;background:linear-gradient(145deg,#201c1d,#101010);border:1px solid #ffffff0d;display:flex;align-items:flex-start;gap:10px;box-shadow:inset 0 1px 0 #ffffff08}
.dashboard-summary-card small{display:block;color:#b9bdc2;font-size:13px;margin-bottom:9px}
.dashboard-summary-card b{display:block;color:#f3f3f3;font-size:21px;line-height:1.1;overflow-wrap:anywhere}
.dashboard-icon{font-size:23px;line-height:1}
.dashboard-menu-title{font-weight:900;font-size:18px;color:#f1f1f1;margin:0 4px 14px}
.dashboard-menu-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:26px}
.dashboard-menu-item{min-height:118px;border:1px solid #351114;border-radius:20px;background:linear-gradient(145deg,#171717,#0c0c0c);color:#f3f3f3;box-shadow:0 4px 16px #0008,0 0 10px #d10b160d;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;cursor:pointer;padding:12px 6px}
.dashboard-menu-item:active{transform:scale(.97)}
.dashboard-menu-item span{font-size:31px;line-height:1}
.dashboard-menu-item b{font-size:14px;text-align:center;line-height:1.15}
.dashboard-info-card{background:linear-gradient(145deg,#151515,#0a0a0a);border:1px solid #351114;border-radius:20px;padding:16px 18px;margin:14px 0;box-shadow:0 4px 18px #0008,0 0 12px #d10b160d;position:relative;overflow:hidden}
.dashboard-info-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#c7191f}
.dashboard-info-title{font-size:18px;font-weight:900;color:#f4f4f4;margin:2px 0 10px 8px;display:flex;gap:8px;align-items:center}
.dashboard-info-list{padding-left:8px}
.dashboard-info-list .list-row{color:#ececec;border-color:#ffffff12;padding:10px 0}
.dashboard-info-list .list-row b{color:#f1f1f1}
.dashboard-info-list .empty{color:#9ca4ad}
.dashboard-extra-lists{margin-top:18px}
.dashboard-extra-lists .panel{margin-bottom:12px}
@media(max-width:700px){
 .dashboard-home{max-width:680px}
 .dashboard-hero{border-radius:22px;padding:16px;margin-bottom:20px}
 .dashboard-hero h1{font-size:21px}
 .dashboard-summary-card{min-height:105px;padding:13px;border-radius:16px}
 .dashboard-summary-card b{font-size:19px}
 .dashboard-menu-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
 .dashboard-menu-item{min-height:102px;border-radius:18px}
 .dashboard-menu-item span{font-size:27px}
 .dashboard-menu-item b{font-size:12px}
}
@media(max-width:420px){
 .dashboard-hero-head{align-items:flex-start}
 .dashboard-date{font-size:11px;padding:8px 9px}
 .dashboard-summary-grid{gap:9px}
 .dashboard-summary-card{padding:12px 9px;gap:6px;min-height:94px}
 .dashboard-summary-card small{font-size:10px}
 .dashboard-summary-card b{font-size:15px}
 .dashboard-icon{font-size:20px}
 .dashboard-menu-grid{gap:8px}
 .dashboard-menu-item{min-height:94px;padding:10px 4px;border-radius:16px}
 .dashboard-menu-item span{font-size:24px}
 .dashboard-menu-item b{font-size:11px}
}


/* ===== DASHBOARD THEME FINAL: DAY putih + merah, NIGHT mengikuti box produk list ===== */
body:not(.night-mode) .dashboard-home{
  background:#fff;
}
body:not(.night-mode) .dashboard-hero,
body:not(.night-mode) .dashboard-summary-card,
body:not(.night-mode) .dashboard-menu-item,
body:not(.night-mode) .dashboard-info-card{
  background:#fff !important;
  color:#171717 !important;
  border-color:#eadede !important;
  box-shadow:0 4px 16px rgba(180,0,0,.08) !important;
}
body:not(.night-mode) .dashboard-hero{border-top:4px solid #e31b23 !important;}
body:not(.night-mode) .dashboard-hero h1,
body:not(.night-mode) .dashboard-menu-title,
body:not(.night-mode) .dashboard-info-title,
body:not(.night-mode) .dashboard-info-list .list-row,
body:not(.night-mode) .dashboard-info-list .list-row b,
body:not(.night-mode) .dashboard-summary-card b{
  color:#171717 !important;
}
body:not(.night-mode) .dashboard-hero p,
body:not(.night-mode) .dashboard-summary-card small{
  color:#747474 !important;
}
body:not(.night-mode) .dashboard-hero-line{background:#eedfe0 !important;}
body:not(.night-mode) .dashboard-summary-card{border-top:3px solid #e31b23 !important;}
body:not(.night-mode) .dashboard-menu-item{
  border-top:3px solid #e31b23 !important;
}
body:not(.night-mode) .dashboard-menu-item:hover{
  border-color:#e31b23 !important;
  box-shadow:0 6px 20px rgba(180,0,0,.16) !important;
}
body:not(.night-mode) .dashboard-menu-item b{color:#222 !important;}
body:not(.night-mode) .dashboard-info-card::before{background:#e31b23 !important;}
body:not(.night-mode) .dashboard-date{background:#e31b23 !important;color:#fff !important;}
body:not(.night-mode) .dashboard-extra-lists .panel,
body:not(.night-mode) .dashboard-extra-lists .accordion-panel{
  background:#fff !important;
  color:#171717 !important;
  border-color:#eadede !important;
  box-shadow:0 4px 16px rgba(180,0,0,.08) !important;
}

/* Night dashboard: gunakan warna dasar yang sama dengan product-card/list (#1b2128). */
body.night-mode .dashboard-hero,
body.night-mode .dashboard-summary-card,
body.night-mode .dashboard-menu-item,
body.night-mode .dashboard-info-card,
body.night-mode .dashboard-extra-lists .panel,
body.night-mode .dashboard-extra-lists .accordion-panel{
  background:#1b2128 !important;
  color:#edf2f7 !important;
  border-color:#303944 !important;
  box-shadow:0 4px 16px #0005 !important;
}
body.night-mode .dashboard-hero h1,
body.night-mode .dashboard-menu-title,
body.night-mode .dashboard-info-title,
body.night-mode .dashboard-info-list .list-row,
body.night-mode .dashboard-info-list .list-row b,
body.night-mode .dashboard-summary-card b,
body.night-mode .dashboard-menu-item b{color:#edf2f7 !important;}
body.night-mode .dashboard-hero p,
body.night-mode .dashboard-summary-card small{color:#aeb8c3 !important;}
body.night-mode .dashboard-hero-line{background:#303944 !important;}
body.night-mode .dashboard-summary-card{background:#1b2128 !important;}
body.night-mode .dashboard-info-list .list-row{border-color:#303944 !important;}
body.night-mode .dashboard-info-card::before{background:#c7191f !important;}
body.night-mode .dashboard-date{background:#c7191f !important;color:#fff !important;}

/* =========================================================
   DAFTAR TRANSAKSI - KONSEP PUTIH MERAH / MOBILE
   ========================================================= */
.transaction-page-redesign{padding:0!important;max-width:none!important}
.transaction-page-redesign .page-head{display:none}
.transaction-page-redesign .trx-filter{padding:0;background:transparent;border:0;box-shadow:none}
.trx-topbar{position:sticky;top:0;z-index:8;display:grid;grid-template-columns:50px minmax(0,1fr) 52px;gap:8px;align-items:center;padding:10px 18px;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-bottom:1px solid #e4e5e8}
.trx-menu-link,.trx-refresh-icon{border:0;background:transparent;color:#d3311c;font-size:29px;line-height:1;display:grid;place-items:center;cursor:pointer}
.trx-refresh-icon{font-size:31px}
.trx-search-top{margin:0;height:58px;border-radius:30px;border:1px solid #d8dde4;background:#fff;box-shadow:0 2px 9px rgba(0,0,0,.04);padding:0 20px;gap:11px}
.trx-search-top span{font-size:30px;color:#6e7a86;transform:rotate(-20deg)}
.trx-search-top input{font-size:16px;color:#4d5660!important;background:transparent!important}
.trx-main-tabs{background:#fff;border-bottom:3px solid #d9dde2;display:flex;position:relative}
.trx-main-tabs .trx-tab{padding:26px 8px 22px;background:transparent;font-size:17px;color:#4f5459;border-bottom:4px solid transparent}
.trx-main-tabs .trx-tab.active{color:#cc2d19;border-bottom-color:#d3311c}
.trx-all-tab{display:none}
.trx-period-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:20px 28px;border-bottom:3px solid #dce0e5}
.trx-select-wrap{height:82px;border-radius:28px;background:#edf1f5;display:flex;align-items:center;padding:0 18px;position:relative;overflow:hidden}
.trx-select-wrap select,.trx-select-wrap input{appearance:none;-webkit-appearance:none;border:0!important;box-shadow:none!important;background:transparent!important;font-weight:800;font-size:16px;color:#2f3439!important;width:100%;height:100%;padding:0 28px 0 8px!important}
.trx-select-wrap span{position:absolute;right:18px;color:#cf321d;font-size:32px;font-weight:900;pointer-events:none}
.trx-summary{padding:26px 28px 20px;background:#fff}
.trx-summary-title{display:none}
.trx-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px 32px}
.trx-summary-grid div{min-width:0}.trx-summary-grid span{display:block;font-size:17px;color:#555c63;margin-bottom:6px}.trx-summary-grid b{display:block;font-size:19px;color:#30353a;font-weight:900;word-break:break-word}.trx-summary-grid div:nth-child(3) b{color:#1c9438}.trx-summary-grid div:nth-child(4) b{color:#30353a}
.trx-summary-actions{background:#fff;padding:10px 28px 0;border-bottom:3px solid #dce0e5}
.trx-export-btn{width:100%;height:58px;border:2px solid #d1432f;border-radius:15px;background:#fff;color:#b73a29;font-size:17px;font-weight:900;cursor:pointer}
.trx-offline-btn{width:calc(100% + 56px);margin:24px -28px 0;padding:20px 28px;border:0;border-top:3px solid #dce0e5;background:#fff;color:#62676c;text-align:left;font-size:17px;font-weight:900;display:flex;align-items:center;gap:12px;cursor:pointer}.trx-offline-btn span{font-size:24px}.trx-offline-btn b{margin-left:auto;color:#d3311c;font-size:40px;line-height:.5}
.transaction-page-redesign .transactions-list{padding:24px 28px 28px;background:#f8f8f9;gap:16px;margin:0}
.transaction-page-redesign .trx-card{border-radius:24px;border:1px solid #cbd0d6;box-shadow:0 2px 10px rgba(0,0,0,.04);grid-template-columns:122px minmax(0,1fr) 120px;background:#fff}
.transaction-page-redesign .trx-date{min-height:126px;background:#ffc21a;padding:8px;border-radius:23px 0 0 23px}.transaction-page-redesign .trx-date b{font-size:33px}.transaction-page-redesign .trx-date span{font-size:12px;margin-top:8px}.transaction-page-redesign .trx-date small{font-size:10px;margin-top:7px}
.transaction-page-redesign .trx-main{padding:22px 20px}.transaction-page-redesign .trx-invoice{font-size:15px;letter-spacing:2px;color:#50565d}.transaction-page-redesign .trx-total{font-size:29px;margin:11px 0;color:#1b9638}.transaction-page-redesign .trx-customer{display:block;font-size:16px;font-weight:700;color:#343a40;margin-top:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.transaction-page-redesign .trx-customer b{font-size:18px;font-weight:900;color:#20252a}.transaction-page-redesign .trx-side{padding:18px 18px 0 0;gap:12px}.transaction-page-redesign .trx-status{font-size:12px;padding:5px 7px}.transaction-page-redesign .trx-side small{font-size:15px;color:#555;font-weight:800}.transaction-page-redesign .trx-actions{padding:9px 10px;border-top:1px solid #eee;background:#fff8f8}
body.night-mode .transaction-page-redesign{background:#1b2128}.night-mode .trx-topbar,.night-mode .trx-main-tabs,.night-mode .trx-summary,.night-mode .trx-summary-actions,.night-mode .trx-offline-btn{background:#1b2128;border-color:#303944}.night-mode .trx-search-top{background:#252d36;border-color:#303944}.night-mode .trx-search-top input{color:#edf2f7!important}.night-mode .trx-main-tabs .trx-tab{color:#aeb8c3}.night-mode .trx-period-row,.night-mode .transaction-page-redesign .transactions-list{background:#1b2128;border-color:#303944}.night-mode .trx-select-wrap{background:#252d36}.night-mode .trx-select-wrap select,.night-mode .trx-select-wrap input{color:#edf2f7!important}.night-mode .trx-summary-grid span{color:#aeb8c3}.night-mode .trx-summary-grid b{color:#edf2f7}.night-mode .trx-export-btn{background:#1b2128}.night-mode .transaction-page-redesign .trx-card{background:#1b2128;border-color:#303944}.night-mode .transaction-page-redesign .trx-main .trx-invoice,.night-mode .transaction-page-redesign .trx-side small{color:#edf2f7}.night-mode .transaction-page-redesign .trx-customer{color:#bfc8d1}.night-mode .transaction-page-redesign .trx-customer b{color:#ffffff}.night-mode .transaction-page-redesign .trx-actions{background:#161b21}
@media(max-width:700px){
 .trx-topbar{grid-template-columns:42px minmax(0,1fr) 42px;padding:8px 16px}.trx-search-top{height:58px;padding:0 16px}.trx-menu-link{font-size:28px}.trx-refresh-icon{font-size:27px}
 .trx-main-tabs .trx-tab{padding:25px 4px 20px;font-size:16px}.trx-period-row{padding:18px 16px;gap:12px}.trx-select-wrap{height:76px;border-radius:26px;padding:0 10px}.trx-select-wrap select,.trx-select-wrap input{font-size:14px;padding-left:8px!important}.trx-summary{padding:26px 28px 20px}.trx-summary-grid{gap:24px 20px}.trx-summary-grid span{font-size:16px}.trx-summary-grid b{font-size:18px}.trx-summary-actions{padding:8px 28px 0}.trx-export-btn{height:58px;font-size:16px}.transaction-page-redesign .transactions-list{padding:24px 28px;gap:16px}.transaction-page-redesign .trx-card{grid-template-columns:122px minmax(0,1fr) 1fr;border-radius:24px}.transaction-page-redesign .trx-date{min-height:126px}.transaction-page-redesign .trx-main{padding:21px 20px;grid-column:2/4}.transaction-page-redesign .trx-side{grid-column:3;grid-row:1;padding:17px 18px 0 0;align-items:flex-end}.transaction-page-redesign .trx-main{grid-column:2/3;grid-row:1}.transaction-page-redesign .trx-invoice{font-size:14px}.transaction-page-redesign .trx-total{font-size:27px}.transaction-page-redesign .trx-customer{font-size:15px}.transaction-page-redesign .trx-customer b{font-size:17px}.transaction-page-redesign .trx-actions{grid-column:1/-1}.transaction-page-redesign .trx-actions .mini{font-size:10px}
}
@media(max-width:420px){.trx-topbar{padding:7px 12px;gap:4px}.trx-search-top{height:54px}.trx-search-top input{font-size:14px}.trx-period-row{padding:14px 12px;gap:8px}.trx-select-wrap{height:68px;border-radius:23px}.trx-select-wrap select,.trx-select-wrap input{font-size:12px}.transaction-page-redesign .transactions-list{padding:18px 14px}.transaction-page-redesign .trx-card{grid-template-columns:96px minmax(0,1fr) 86px}.transaction-page-redesign .trx-date{min-height:108px}.transaction-page-redesign .trx-date b{font-size:30px}.transaction-page-redesign .trx-total{font-size:24px}.transaction-page-redesign .trx-side small{font-size:13px}.trx-summary{padding:22px 18px}.trx-summary-actions{padding:8px 18px 0}.trx-offline-btn{width:calc(100% + 36px);margin-left:-18px;margin-right:-18px;padding-left:18px;padding-right:18px}}

/* =========================================================
   DESKTOP APP SHELL - layout seperti aplikasi kasir modern
   ========================================================= */
@media(min-width:900px){
  body{padding-left:280px}
  .topbar{left:280px;height:68px;padding:0 28px}
  .sidebar{width:280px;top:0;transform:none!important;box-shadow:2px 0 24px rgba(0,0,0,.08);display:flex;flex-direction:column}
  .side-head{height:148px;padding:20px 18px}.side-head .avatar{width:62px;height:62px;font-size:34px}
  .sidebar nav{flex:1;overflow:auto;padding:10px 0}.menu{height:54px;font-size:15px;gap:14px;padding:0 18px;border-radius:0}.menu-link{text-decoration:none}.logout-link{padding:18px}
  .overlay{display:none!important}.icon-btn{display:none}
  .main{max-width:100%;margin:0;padding:92px 30px 42px}
  .page{max-width:1440px;margin:0 auto}.page-head{margin-bottom:22px}.page-head h1{font-size:31px}
  .stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.panel{padding:22px}
  .dashboard-home{max-width:1280px}.dashboard-menu-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .transaction-page-redesign{max-width:1440px;margin:0 auto;border-radius:20px;overflow:hidden;border:1px solid #e4e7eb}
  .trx-topbar{top:68px}.trx-main-tabs .trx-tab{max-width:260px;flex:1}.trx-period-row{max-width:850px;margin:0 auto;padding-top:24px;padding-bottom:24px}.trx-summary{max-width:850px;margin:0 auto;padding-top:30px}.trx-summary-actions{max-width:850px;margin:0 auto;padding-bottom:18px}.trx-offline-btn{border-bottom:0}.transaction-page-redesign .transactions-list{padding:28px 34px}.transaction-page-redesign .trx-card{grid-template-columns:140px minmax(0,1fr) 150px}.transaction-page-redesign .trx-date{min-height:132px}.transaction-page-redesign .trx-actions{grid-column:1/-1}
  body.night-mode .transaction-page-redesign{border-color:#303944}
}


/* =========================================================
   HEADER ACTIONS + SHARE BUTTON + RESPONSIVE APP FRAME
   ========================================================= */
.header-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none}
.header-share-btn,.header-theme-btn{width:42px;height:42px;flex:none}
.header-share-btn{border:1px solid #ffffff33;border-radius:12px;background:#ffffff18;color:#fff;font-size:24px;font-weight:800;display:grid;place-items:center;cursor:pointer;transition:.2s;box-shadow:0 2px 8px #0002;line-height:1}
.header-share-btn:hover{background:#ffffff2b;transform:translateY(-1px)}
@media(max-width:650px){
  .topbar{gap:8px}.top-title{min-width:0}.top-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .header-actions{gap:6px}.header-share-btn,.header-theme-btn{width:38px;height:38px;border-radius:11px}.header-share-btn{font-size:21px}
}
@media(min-width:900px){
  html{font-size:16px}
  .topbar{min-width:620px;justify-content:flex-start}
  .top-title{min-width:0}.header-actions{margin-left:auto}
  .main{width:100%;max-width:none;padding-left:clamp(24px,3vw,52px);padding-right:clamp(24px,3vw,52px)}
  .page{width:100%;max-width:1540px}
  .panel,.stat{border-radius:16px}
}
@media(min-width:1600px){
  .main{padding-left:64px;padding-right:64px}
  .page{max-width:1680px}
}


/* =========================================================
   RESPONSIVE LAYOUT FIX v2 - DESKTOP / TABLET / MOBILE
   ========================================================= */
.header-share-btn{width:auto!important;min-width:42px!important;padding:0 12px!important;gap:7px;display:inline-flex!important;align-items:center!important;justify-content:center!important}
.header-share-btn span{font-size:21px;line-height:1}.header-share-btn em{font-style:normal;font-size:13px;font-weight:800}
.header-theme-btn{width:42px!important;min-width:42px!important;padding:0!important}
@media(min-width:900px){
  body{padding-left:260px!important;min-width:0;background:#f4f6f9}
  .sidebar{position:fixed!important;inset:0 auto 0 0!important;width:260px!important;transform:none!important;z-index:100!important}
  .topbar{position:fixed!important;left:260px!important;right:0!important;top:0!important;height:72px!important;width:auto!important;padding:0 34px!important;z-index:90!important}
  .main{margin-left:0!important;width:100%!important;min-height:100vh!important;padding:104px clamp(24px,4vw,70px) 48px!important;box-sizing:border-box!important}
  .page{width:100%!important;max-width:1680px!important;margin:0 auto!important}
  .dashboard-home{max-width:1500px!important}
  .dashboard-menu-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important}
  .stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .panel{min-width:0!important}.top-title b{font-size:18px!important}.top-title small{font-size:12px!important}
  .header-actions{gap:10px!important}.header-share-btn{height:42px!important;border-radius:12px!important}
}
@media(min-width:1200px){
  .page{max-width:1760px!important}.dashboard-menu-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:899px){
  body{padding-left:0!important}
  .topbar{left:0!important;right:0!important;width:auto!important}
  .main{width:100%!important;padding-left:16px!important;padding-right:16px!important}
  .header-share-btn{width:42px!important;min-width:42px!important;padding:0!important;border-radius:50%!important}
  .header-share-btn em{display:none!important}
}
@media(max-width:520px){
  .topbar{padding-left:12px!important;padding-right:12px!important}
  .header-actions{gap:6px!important}.header-share-btn,.header-theme-btn{width:38px!important;min-width:38px!important;height:38px!important}
  .top-title{max-width:calc(100vw - 150px)!important}.main{padding-left:12px!important;padding-right:12px!important}
}

/* Navigation click fix: menu selalu berada di atas konten dan dapat diklik */
#sidebarNav{pointer-events:auto!important}
#sidebarNav nav,#sidebarNav .menu,#sidebarNav .logout-link{pointer-events:auto!important;position:relative;z-index:1}
@media(min-width:900px){#sidebarNav{z-index:500!important} .topbar{z-index:450!important}}
@media(max-width:899px){#sidebarNav.open{z-index:500!important} #overlay.show{z-index:490!important}}

/* Product page enhancements */
.products-compact th,.products-compact td{vertical-align:middle}
.product-stock-badge{display:inline-block;padding:4px 8px;border-radius:7px;min-width:34px;text-align:center}
.product-profit{font-weight:800;white-space:nowrap}
.profit-positive{color:#16803e}
.profit-negative{color:#c7191f}
.profit-zero{color:#777}
body.night-mode .profit-positive{color:#39df75}
body.night-mode .profit-negative{color:#ff5b66}
body.night-mode .profit-zero{color:#aeb8c3}
body.night-mode .products-compact td{border-color:#303944}
body.night-mode .product-edit-btn{background:#252d36;color:#7fc7ff;border-color:#3a4652}
@media(max-width:650px){
  .products-compact th,.products-compact td{padding:9px 7px;font-size:12px}
  .products-compact .product-name-cell b{font-size:13px}
  .product-profit{font-size:12px}
  .product-stock-badge{padding:3px 6px;min-width:30px}
  .add-product-pos-btn{width:100%}
}


/* =========================================================
   KASIRGO - PRODUK & TAMBAH PRODUK MOBILE POLISH v20260826
   Menjaga seluruh fitur produk yang sudah ada.
   ========================================================= */

/* Tombol tambah produk di halaman Transaksi Baru */
.add-product-pos-btn{
  min-height:42px;
  font-weight:800;
  white-space:nowrap;
}

/* Modal tambah/edit produk: lebih rapi dan nyaman disentuh */
#modal .modal{
  width:min(560px,calc(100vw - 24px));
}
#modal .modal form{
  display:flex;
  flex-direction:column;
  gap:7px;
}
#modal .modal form label{
  font-size:13px;
  font-weight:800;
  color:#4c5660;
  margin-top:4px;
}
#modal .modal form input,
#modal .modal form select{
  min-height:42px;
  border:1px solid #d8dee4;
  border-radius:9px;
  padding:9px 11px;
  font-size:14px;
  width:100%;
}
#modal .modal form .form-grid{
  gap:10px;
}
#modal .modal form .btn.full{
  margin-top:7px;
  min-height:44px;
}

/* Header halaman Produk tetap bisa membungkus tombol di layar sempit */
#page-produk .page-actions{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
#page-produk .page-actions .btn{
  min-height:38px;
}

/* Jangan hilangkan kolom Harga Beli di mobile.
   Ubah tabel produk menjadi kartu compact agar semua informasi tetap terlihat. */
@media(max-width:650px){
  #page-produk .page-head{
    gap:10px;
    align-items:flex-start;
  }
  #page-produk .page-head h1{
    font-size:23px;
    margin-bottom:3px;
  }
  #page-produk .page-head .muted{
    font-size:11px;
    line-height:1.4;
  }
  #page-produk .page-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
  }
  #page-produk .page-actions .btn{
    width:100%;
    padding:8px 7px;
    font-size:11px;
    min-width:0;
  }
  #page-produk .toolbar.panel{
    padding:10px;
  }
  #page-produk .toolbar.panel input,
  #page-produk .toolbar.panel select{
    min-height:40px;
    font-size:13px;
  }

  #page-produk .panel:has(.products-compact){
    padding:8px;
  }
  #page-produk .table-wrap{
    overflow:visible;
  }
  #page-produk .products-compact{
    width:100%;
    display:block;
    font-size:12px;
  }
  #page-produk .products-compact thead{
    display:none;
  }
  #page-produk .products-compact tbody{
    display:flex;
    flex-direction:column;
    gap:8px;
  }
  #page-produk .products-compact tbody tr{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:0;
    padding:8px 9px;
    border:1px solid #e1e6ea;
    border-radius:11px;
    background:#fff;
    box-shadow:0 1px 4px rgba(0,0,0,.05);
  }
  #page-produk .products-compact tbody td{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:7px;
    min-width:0;
    padding:5px 2px;
    border:0;
    white-space:normal;
    text-align:right;
  }
  #page-produk .products-compact tbody td::before{
    font-size:9px;
    font-weight:800;
    color:#7b858e;
    text-transform:uppercase;
    flex:none;
    text-align:left;
  }
  #page-produk .products-compact tbody td:nth-child(1){
    grid-column:1 / -1;
    display:block;
    padding:2px 0 7px;
    border-bottom:1px solid #edf0f2;
    text-align:left;
  }
  #page-produk .products-compact tbody td:nth-child(1)::before{display:none}
  #page-produk .products-compact tbody td:nth-child(2)::before{content:"Beli"}
  #page-produk .products-compact tbody td:nth-child(3)::before{content:"Jual"}
  #page-produk .products-compact tbody td:nth-child(4)::before{content:"Untung"}
  #page-produk .products-compact tbody td:nth-child(5)::before{content:"Stok"}
  #page-produk .products-compact tbody td:nth-child(6)::before{content:"Terjual"}
  #page-produk .products-compact tbody td:nth-child(7){
    grid-column:1 / -1;
    justify-content:flex-end;
    padding-top:7px;
    border-top:1px solid #edf0f2;
  }
  #page-produk .products-compact tbody td:nth-child(7)::before{
    content:"Aksi";
    margin-right:auto;
  }
  #page-produk .product-name-cell{
    min-width:0;
  }
  #page-produk .product-name-cell b{
    display:block;
    font-size:13px;
    line-height:1.25;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  #page-produk .product-name-cell small{
    max-width:100%;
    margin-top:3px;
    font-size:10px;
  }
  #page-produk .product-profit{
    font-size:11px;
  }
  #page-produk .product-stock-badge,
  #page-produk .sold-badge{
    font-size:11px;
  }
  #page-produk .product-icon-actions{
    gap:6px;
  }
  #page-produk .icon-action{
    width:34px;
    height:34px;
    border-radius:9px;
  }

  /* Modal: tidak memenuhi layar dan input tetap mudah disentuh */
  #modal{
    padding:10px;
    align-items:flex-end;
  }
  #modal .modal{
    width:100%;
    max-height:88vh;
    border-radius:16px 16px 10px 10px;
    padding-bottom:calc(8px + env(safe-area-inset-bottom));
  }
  #modal .modal-head{
    position:sticky;
    top:0;
    z-index:2;
    background:inherit;
  }
  #modal .modal form input{
    min-height:44px;
    font-size:14px;
  }
  #modal .modal form .form-grid{
    grid-template-columns:1fr 1fr;
  }
}

/* Extra-small phones: form harga/stok satu kolom agar tidak sempit */
@media(max-width:380px){
  #modal .modal form .form-grid{
    grid-template-columns:1fr;
  }
  #page-produk .page-actions{
    grid-template-columns:1fr 1fr;
  }
}

/* Fix Night Mode - Halaman Produk mengikuti background kartu produk Transaksi Baru */
body.night-mode #page-produk .panel:has(.products-compact),
body.night-mode #page-produk .products-compact tbody tr,
body.night-mode #page-produk .products-compact tbody td,
body.night-mode #page-produk .products-compact tbody td:nth-child(1){
  background:linear-gradient(145deg,#151515,#0a0a0a);
  color:#f4f4f4;
}
body.night-mode #page-produk .products-compact tbody tr{
  border-color:#351114;
  box-shadow:0 4px 18px #000,0 0 12px #d10b1612;
}
body.night-mode #page-produk .products-compact tbody td:nth-child(1),
body.night-mode #page-produk .products-compact tbody td:nth-child(7){
  border-color:#351114;
}
body.night-mode #page-produk .product-name-cell b{color:#f4f4f4}
body.night-mode #page-produk .product-name-cell small{color:#999}
body.night-mode #page-produk .sold-badge{
  background:#125b2a;
  color:#8ff0b2;
}
body.night-mode #page-produk .icon-action{
  background:#151515;
  color:#8fc8ff;
  border-color:#4d2024;
}
body.night-mode #page-produk .icon-action.danger-icon{
  color:#ff5b66;
}
body.night-mode #page-produk .products-compact th{
  background:#0b0b0b;
  color:#aeb8c3;
  border-color:#303944;
}
@media(max-width:650px){
  body.night-mode #page-produk .panel:has(.products-compact){
    background:transparent;
    border-color:#351114;
  }
  body.night-mode #page-produk .products-compact tbody tr{
    background:linear-gradient(145deg,#151515,#0a0a0a);
  }
}

/* Filter Produk */
#productSort{min-width:190px}
@media(max-width:650px){#productSort{min-width:0;width:100%}}
body.night-mode #productSort{background:#20262c;color:#edf2f7;border-color:#3a444d}
/* RECEIPT FINAL REDESIGN - preview, print & shared image */
.receipt-preview{display:flex;justify-content:center;align-items:flex-start;padding:14px;background:#eef1f3}
.receipt-paper{width:80mm;max-width:100%;min-width:0;margin:0 auto;padding:5mm 4mm;background:#fff;color:#111;font-family:Arial,sans-serif;font-size:11px;line-height:1.35;box-shadow:0 2px 10px #0002;border-radius:2px}
.receipt-brand{text-align:center}.receipt-store{font-family:Arial,sans-serif;font-size:21px;font-weight:900;letter-spacing:.2px;border:0;padding:0}.receipt-brand>small{display:block;font-size:10px;line-height:1.45;margin-top:5px;color:#333}.receipt-rule{border-top:1px dashed #888;margin:11px 0}.receipt-info-grid{display:grid;grid-template-columns:76px minmax(0,1fr);gap:5px 8px;font-size:10.5px;line-height:1.45}.receipt-info-grid b{text-align:right;overflow-wrap:anywhere}.receipt-customer-label{font-size:11px}.receipt-customer-name{font-size:15px!important;font-weight:900!important}.receipt-items-head{display:flex;justify-content:space-between;font-size:9px;font-weight:900;color:#555;margin-bottom:2px}.receipt-items{display:block}.receipt-item-row{padding:7px 0;border-bottom:1px dotted #bbb}.receipt-item-top{display:flex;gap:5px;align-items:flex-start}.receipt-item-top b{font-size:11px;line-height:1.3;overflow-wrap:anywhere}.receipt-item-no{flex:0 0 auto;font-weight:700}.receipt-item-detail{display:flex;justify-content:space-between;gap:8px;padding-left:18px;margin-top:2px;font-size:10px}.receipt-item-detail strong{font-size:10.5px;white-space:nowrap}.receipt-total{display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:17px;font-weight:900;border:0}.receipt-paid{font-size:15px!important;font-weight:900}.receipt-payment{display:grid;grid-template-columns:1fr auto;gap:5px 10px;padding:5px 0;font-size:11px}.receipt-payment b{text-align:right}.receipt-bank,.receipt-note{padding:8px 0;border-top:1px dashed #aaa;font-size:9.5px;line-height:1.45;white-space:pre-wrap}.receipt-footer{text-align:center;border-top:1px dashed #aaa;padding-top:11px;font-weight:700;line-height:1.5;font-size:10px;white-space:pre-wrap}
@media(max-width:520px){.receipt-sheet{padding:10px}.receipt-preview{padding:8px}.receipt-paper{width:80mm;max-width:100%;padding:5mm 4mm}.receipt-store{font-size:19px}.receipt-customer-name{font-size:14px!important}}

/* Payment select: Cash, Transfer, QRIS, COD, Utang */
.payment-select{width:100%;border:1px solid #d7dce0;background:#fff;color:#222;border-radius:10px;padding:12px 14px;font-weight:700;font-size:14px;outline:none}
.payment-select:focus{border-color:#c7191f;box-shadow:0 0 0 3px #c7191f18}
body.night-mode .payment-select{background:#1b2128;color:#edf2f7;border-color:#3a4552}
body.night-mode .payment-select option{background:#1b2128;color:#edf2f7}
@media(max-width:650px){.payment-select{padding:11px 12px;font-size:13px}}

/* =========================================================
   KASIRGO RED BLACK VISUAL - MOBILE FRIENDLY
   Referensi: panel/tombol merah gelap, border merah, compact.
   Tidak mengubah fungsi/struktur komponen.
   ========================================================= */

/* NIGHT MODE: merah gelap + hitam, dengan teks tetap terang */
body.night-mode{
  background:
    radial-gradient(circle at 50% -10%,rgba(150,0,8,.20),transparent 34%),
    linear-gradient(180deg,#0d0d0e 0%,#050505 100%) !important;
  color:#f5f5f5 !important;
}
body.night-mode .topbar{
  background:linear-gradient(180deg,#1a090a 0%,#090909 100%) !important;
  color:#fff !important;
  border-bottom:1px solid #b3000a !important;
  box-shadow:0 2px 12px rgba(190,0,12,.20);
}
body.night-mode .sidebar{
  background:linear-gradient(180deg,#100b0c 0%,#070707 100%) !important;
  color:#f5f5f5 !important;
  border-right:1px solid #5d1116 !important;
}
body.night-mode .side-head{
  background:linear-gradient(145deg,#3a090d,#100707) !important;
  border-bottom:1px solid #b3000a;
}
body.night-mode .panel,
body.night-mode .stat,
body.night-mode .product-card,
body.night-mode .quick-item,
body.night-mode .modal,
body.night-mode .checkout-sheet,
body.night-mode .receipt-sheet,
body.night-mode .buy-bottom-bar,
body.night-mode .customer-card,
body.night-mode .customer-toolbar,
body.night-mode .customer-history-row,
body.night-mode .dashboard-hero,
body.night-mode .dashboard-summary-card,
body.night-mode .dashboard-menu-item,
body.night-mode .dashboard-info-card{
  background:linear-gradient(145deg,#171010 0%,#090909 100%) !important;
  color:#f5f5f5 !important;
  border:1px solid #4b171b !important;
  box-shadow:0 4px 16px rgba(0,0,0,.48),0 0 10px rgba(180,0,12,.07) !important;
}
body.night-mode .product-card,
body.night-mode .quick-item,
body.night-mode .dashboard-menu-item{
  border-top:2px solid #e31b23 !important;
}
body.night-mode .product-card:hover,
body.night-mode .quick-item:hover,
body.night-mode .dashboard-menu-item:hover{
  border-color:#ff222a !important;
  box-shadow:0 5px 18px rgba(0,0,0,.55),0 0 12px rgba(227,27,35,.18) !important;
}
body.night-mode .product-card.selected{
  background:linear-gradient(145deg,#351013,#110707) !important;
  border-color:#ff3038 !important;
  box-shadow:0 0 0 1px rgba(255,40,48,.38),0 7px 22px rgba(0,0,0,.60),0 0 15px rgba(227,27,35,.16) !important;
}
body.night-mode .product-card strong,
body.night-mode .quick-item span,
body.night-mode .danger-text,
body.night-mode .checkout-summary b:last-child{
  color:#ff4148 !important;
}
body.night-mode .muted,
body.night-mode .product-card small,
body.night-mode .cart-row small,
body.night-mode .quick-item small,
body.night-mode .checkout-product small,
body.night-mode th,
body.night-mode td small{
  color:#b9b0b1 !important;
}
body.night-mode .menu{
  background:transparent !important;
  color:#f3eeee !important;
  border-color:#311316 !important;
}
body.night-mode .menu.active{
  background:linear-gradient(90deg,#9d090f,#4c0609) !important;
  color:#fff !important;
  border-left:3px solid #ff252d !important;
}
body.night-mode input,
body.night-mode select,
body.night-mode textarea,
body.night-mode .payment-select{
  background:#f8f8f8 !important;
  color:#171717 !important;
  border:1px solid #6c252a !important;
}
body.night-mode input::placeholder,
body.night-mode textarea::placeholder{color:#777 !important}
body.night-mode input:focus,
body.night-mode select:focus,
body.night-mode textarea:focus{
  border-color:#e31b23 !important;
  box-shadow:0 0 0 2px rgba(227,27,35,.16) !important;
}
body.night-mode .btn{
  background:#181313 !important;
  color:#f6eeee !important;
  border:1px solid #632126 !important;
}
body.night-mode .btn.primary,
body.night-mode .buy-bottom-bar .btn,
body.night-mode .payment-choices button.selected{
  background:linear-gradient(180deg,#e51a22,#9f050b) !important;
  color:#fff !important;
  border:1px solid #ff3038 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 3px 10px rgba(170,0,10,.20) !important;
}
body.night-mode .payment-choices button{
  background:#151010 !important;
  color:#f5eeee !important;
  border:1px solid #5d2025 !important;
}
body.night-mode th{background:#120b0c !important;color:#c9bfc0 !important}
body.night-mode td{border-color:#34181b !important;color:#f0e9e9 !important}
body.night-mode .mini,
body.night-mode .icon-action,
body.night-mode .product-edit-btn{
  background:#160f10 !important;
  color:#f4dfe0 !important;
  border:1px solid #642329 !important;
}
body.night-mode .danger-btn,
body.night-mode .danger-icon{
  color:#ff6268 !important;
  border-color:#7b242b !important;
  background:#210d0f !important;
}
body.night-mode .modal-wrap,
body.night-mode .checkout-overlay,
body.night-mode .receipt-overlay{background:rgba(0,0,0,.78) !important}

/* DAY MODE: putih bersih, teks gelap, aksen merah */
body:not(.night-mode){
  background:#fff !important;
  color:#1c1c1c !important;
}
body:not(.night-mode) .topbar{
  background:#fff !important;
  color:#1a1a1a !important;
  border-bottom:1px solid #e31b23 !important;
  box-shadow:0 2px 10px rgba(120,0,0,.08);
}
body:not(.night-mode) .panel,
body:not(.night-mode) .stat,
body:not(.night-mode) .product-card,
body:not(.night-mode) .quick-item,
body:not(.night-mode) .modal,
body:not(.night-mode) .checkout-sheet,
body:not(.night-mode) .receipt-sheet{
  background:#fff !important;
  color:#1c1c1c !important;
  border:1px solid #eadada !important;
}
body:not(.night-mode) .product-card,
body:not(.night-mode) .quick-item,
body:not(.night-mode) .dashboard-menu-item{
  border-top:2px solid #e31b23 !important;
  box-shadow:0 3px 12px rgba(120,0,0,.07) !important;
}
body:not(.night-mode) .product-card:hover,
body:not(.night-mode) .quick-item:hover,
body:not(.night-mode) .dashboard-menu-item:hover{
  border-color:#e31b23 !important;
  box-shadow:0 5px 16px rgba(180,0,0,.12) !important;
}
body:not(.night-mode) .btn.primary,
body:not(.night-mode) .buy-bottom-bar .btn,
body:not(.night-mode) .payment-choices button.selected{
  background:linear-gradient(180deg,#ed1c24,#bd050b) !important;
  color:#fff !important;
  border:1px solid #e31b23 !important;
}
body:not(.night-mode) .btn{
  border:1px solid #e0caca;
  background:#fff;
}
body:not(.night-mode) input,
body:not(.night-mode) select,
body:not(.night-mode) textarea,
body:not(.night-mode) .payment-select{
  background:#fff !important;
  color:#171717 !important;
  border-color:#dfcaca !important;
}

/* Tombol model gambar referensi: border box merah, tetapi compact */
.btn,
.quick-item,
.product-card,
.mini,
.icon-action,
.payment-choices button{
  border-radius:10px;
}
.btn{min-height:40px;padding:8px 13px}
.quick-item{min-height:86px;padding:12px}
.product-card{padding:11px;gap:6px}
.payment-choices button{padding:10px 6px;min-height:42px}

/* Transaction/action controls keep the compact red-box language too */
.trx-export-btn{border-color:#e31b23 !important;color:#b60008 !important}
.trx-offline-btn{border-color:#e31b23 !important}
.trx-card{border-color:#8b252b !important}

@media(max-width:650px){
  .btn{min-height:38px;padding:7px 11px;font-size:13px}
  .quick-item{min-height:76px;padding:10px;border-radius:10px}
  .product-card{padding:9px;border-radius:9px}
  .product-grid{gap:7px}
  .payment-choices{gap:6px}
  .payment-choices button{min-height:40px;padding:8px 4px;font-size:12px}
  .panel{border-radius:10px}
}

/* PWA install button */
.pwa-install-btn{display:none;align-items:center;justify-content:center;gap:5px;white-space:nowrap}
.pwa-install-btn.show{display:flex}
@media(max-width:650px){.pwa-install-btn{width:38px;min-width:38px;height:38px;padding:0!important;border-radius:50%!important;font-size:17px}.pwa-install-btn .pwa-label{display:none}}


/* =========================================================
   FINAL RED BOX THEME — compact mobile / readable forms
   ========================================================= */
:root{
  --red-main:#e3131b;
  --red-bright:#ff252d;
  --red-dark:#8d050a;
  --red-border:#c70b13;
}

/* DAY: white surface + red box language */
body:not(.night-mode){
  background:#fff !important;
  color:#1b1b1b !important;
}
body:not(.night-mode) .sidebar{
  background:#fff !important;
  border-right:1px solid #e7c5c7 !important;
}
body:not(.night-mode) .side-head{
  background:linear-gradient(135deg,#f51a22,#a9040a) !important;
}
body:not(.night-mode) .menu{
  margin:5px 8px !important;
  width:calc(100% - 16px) !important;
  height:48px !important;
  min-height:48px !important;
  padding:0 13px !important;
  gap:12px !important;
  border:1px solid #e5bfc1 !important;
  border-radius:9px !important;
  background:#fff !important;
  color:#7e080d !important;
  font-size:15px !important;
  font-weight:800 !important;
  box-shadow:0 2px 7px rgba(150,0,0,.05) !important;
}
body:not(.night-mode) .menu.active{
  background:linear-gradient(180deg,#f01921,#bd050b) !important;
  color:#fff !important;
  border-color:#ff2a32 !important;
  box-shadow:0 3px 10px rgba(190,0,10,.18) !important;
}
body:not(.night-mode) .logout-link{
  margin:8px !important;
  padding:12px 13px !important;
  border:1px solid #e5bfc1 !important;
  border-radius:9px !important;
  color:#b0060d !important;
}
body:not(.night-mode) .panel,
body:not(.night-mode) .stat,
body:not(.night-mode) .product-card,
body:not(.night-mode) .quick-item,
body:not(.night-mode) .modal,
body:not(.night-mode) .checkout-sheet,
body:not(.night-mode) .receipt-sheet,
body:not(.night-mode) .dashboard-menu-item{
  border:1px solid #e2c4c6 !important;
  box-shadow:0 3px 12px rgba(100,0,0,.07) !important;
}
body:not(.night-mode) .btn,
body:not(.night-mode) .mini,
body:not(.night-mode) .icon-action,
body:not(.night-mode) .payment-choices button,
body:not(.night-mode) .view-btn{
  border:1px solid #d98c90 !important;
  border-radius:8px !important;
  background:#fff !important;
  color:#8f080e !important;
}
body:not(.night-mode) .btn.primary,
body:not(.night-mode) .payment-choices button.selected,
body:not(.night-mode) .view-btn.active,
body:not(.night-mode) .trx-actions .trx-complete{
  background:linear-gradient(180deg,#f01921,#bd050b) !important;
  color:#fff !important;
  border-color:#ff252d !important;
}
body:not(.night-mode) input,
body:not(.night-mode) select,
body:not(.night-mode) textarea,
body:not(.night-mode) .payment-select{
  background:#fff !important;
  color:#181818 !important;
  border:1px solid #d6aeb0 !important;
}
body:not(.night-mode) option,
body:not(.night-mode) optgroup{
  background:#fff !important;
  color:#181818 !important;
}

/* NIGHT: retain black boxes; RED ONLY on borders, compact and readable */
body.night-mode{
  background:#050505 !important;
  color:#f5f5f5 !important;
}
body.night-mode .topbar{
  background:linear-gradient(90deg,#090909,#260204,#090909) !important;
  border-bottom:1px solid #d71920 !important;
}
body.night-mode .sidebar{
  background:#080808 !important;
  border-right:1px solid #a90910 !important;
}
body.night-mode .side-head{
  background:linear-gradient(135deg,#120203,#72060d) !important;
}
body.night-mode .menu{
  margin:5px 8px !important;
  width:calc(100% - 16px) !important;
  height:48px !important;
  min-height:48px !important;
  padding:0 13px !important;
  gap:12px !important;
  border:1px solid #8f1118 !important;
  border-radius:9px !important;
  background:#090909 !important;
  color:#f4eeee !important;
  font-size:15px !important;
  font-weight:800 !important;
  box-shadow:none !important;
}
body.night-mode .menu.active{
  background:#150506 !important;
  color:#fff !important;
  border-color:#ff2028 !important;
  box-shadow:inset 3px 0 #ff2028 !important;
}
body.night-mode .logout-link{
  margin:8px !important;
  padding:12px 13px !important;
  border:1px solid #8f1118 !important;
  border-radius:9px !important;
  color:#ff4b52 !important;
}
body.night-mode .panel,
body.night-mode .stat,
body.night-mode .product-card,
body.night-mode .quick-item,
body.night-mode .modal,
body.night-mode .checkout-sheet,
body.night-mode .receipt-sheet,
body.night-mode .dashboard-menu-item,
body.night-mode .customer-card,
body.night-mode .customer-toolbar,
body.night-mode .dashboard-info-card{
  background:#0b0b0b !important;
  color:#f4f4f4 !important;
  border:1px solid #7e1016 !important;
  box-shadow:none !important;
}
body.night-mode .product-card,
body.night-mode .quick-item,
body.night-mode .dashboard-menu-item{
  border-top:1px solid #e3131b !important;
}
body.night-mode .btn,
body.night-mode .mini,
body.night-mode .icon-action,
body.night-mode .payment-choices button,
body.night-mode .view-btn{
  background:#090909 !important;
  color:#f7eeee !important;
  border:1px solid #a30d14 !important;
  box-shadow:none !important;
}
body.night-mode .btn.primary,
body.night-mode .payment-choices button.selected,
body.night-mode .view-btn.active,
body.night-mode .trx-actions .trx-complete{
  background:#b8070e !important;
  color:#fff !important;
  border-color:#ff252d !important;
  box-shadow:none !important;
}

/* NIGHT FORM FIX: every select/input must have high contrast */
body.night-mode input,
body.night-mode select,
body.night-mode textarea,
body.night-mode .payment-select,
body.night-mode .trx-select-wrap,
body.night-mode .trx-select-wrap select,
body.night-mode .trx-select-wrap input{
  background:#111 !important;
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#9e1118 !important;
}
body.night-mode select option,
body.night-mode select optgroup,
body.night-mode .payment-select option{
  background:#111 !important;
  color:#fff !important;
}
body.night-mode input::placeholder,
body.night-mode textarea::placeholder{color:#a99b9d !important;opacity:1 !important}
body.night-mode input:focus,
body.night-mode select:focus,
body.night-mode textarea:focus{
  border-color:#ff252d !important;
  box-shadow:0 0 0 2px rgba(255,37,45,.12) !important;
}
body.night-mode .trx-select-wrap{
  background:#111 !important;
  border:1px solid #9e1118 !important;
}
body.night-mode .trx-select-wrap select,
body.night-mode .trx-select-wrap input{
  border:0 !important;
}

/* Red-box transaction controls in both modes */
.trx-tabs .trx-tab,
.trx-actions .mini,
.trx-product-result{
  border-color:#a30d14 !important;
}
body.night-mode .trx-tabs{background:#090909 !important;border-color:#7e1016 !important}
body.night-mode .trx-tab{background:#090909 !important;color:#ddd !important}
body.night-mode .trx-tab.active{color:#ff4b52 !important;border-bottom-color:#ff252d !important}
body.night-mode .trx-search,
body.night-mode .trx-product-result,
body.night-mode .trx-edit-items,
body.night-mode .trx-edit-search{
  background:#0b0b0b !important;
  border-color:#7e1016 !important;
}
body.night-mode .trx-actions{background:#080808 !important;border-color:#7e1016 !important}
body.night-mode .trx-actions .mini{background:#0d0d0d !important;color:#eee !important;border-color:#8f1118 !important}

@media(max-width:650px){
  body:not(.night-mode) .menu,
  body.night-mode .menu{height:44px !important;min-height:44px !important;font-size:14px !important;padding:0 11px !important}
  .btn{min-height:38px !important;padding:7px 10px !important}
  .quick-item{min-height:74px !important;padding:9px !important}
  .dashboard-menu-item{min-height:82px !important;border-radius:10px !important}
  .dashboard-menu-item span{font-size:22px !important}
  .dashboard-menu-item b{font-size:11px !important}
  .payment-choices button{min-height:40px !important;padding:8px 5px !important}
}


/* =========================================================
   SIDEBAR RINGKASAN HARI INI
   ========================================================= */
.side-user-info{min-width:0;flex:1}.side-user-info>b,.side-user-info>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.side-today-stats{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(72px,.65fr);gap:8px;margin-top:12px}.side-today-stats>div{min-width:0;padding:8px 9px;border:1px solid #ef3a40;border-radius:10px;background:rgba(0,0,0,.28);box-shadow:0 0 8px rgba(230,20,30,.10)}.side-today-stats span{display:block;font-size:9px;line-height:1.15;opacity:.86;white-space:nowrap}.side-today-stats strong{display:block;margin-top:3px;font-size:12px;line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.transaction-page-redesign .trx-search-top input::placeholder{color:#7a838c}
body.night-mode .side-today-stats>div{border-color:#e21b25;background:#0b0809;color:#fff}.side-today-stats strong{color:#fff}.side-today-stats span{color:#f2dede}
body:not(.night-mode) .side-today-stats>div{background:#fff;border-color:#ef3038;color:#262626;box-shadow:0 2px 8px rgba(180,0,0,.08)}body:not(.night-mode) .side-today-stats span{color:#6c5555}body:not(.night-mode) .side-today-stats strong{color:#b70f18}
@media(max-width:650px){.side-today-stats{grid-template-columns:minmax(0,1.4fr) minmax(68px,.6fr);gap:6px;margin-top:9px}.side-today-stats>div{padding:7px 8px;border-radius:9px}.side-today-stats span{font-size:8px}.side-today-stats strong{font-size:11px}.side-head{height:auto;min-height:148px}.side-head .avatar{flex:0 0 auto}}
@media(min-width:900px){.side-today-stats{margin-top:11px}}


/* === FINAL UX FIX: sidebar stats, compact text & merged settings === */
.sidebar .side-head{align-items:flex-start;gap:12px}
.side-user-info{min-width:0;flex:1}
.side-user-info>b,.side-user-info>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-today-stats{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(72px,.65fr);gap:8px;margin-top:12px;width:100%}
.side-today-stats>div{min-width:0;padding:8px 9px;border:1px solid #ef3a40;border-radius:10px;background:rgba(0,0,0,.28);box-shadow:0 0 8px rgba(230,20,30,.10)}
.side-today-stats span{display:block;font-size:9px;line-height:1.15;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-today-stats strong{display:block;margin-top:3px;font-size:clamp(10px,3.2vw,12px);line-height:1.15;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.settings-section-title{font-size:15px;font-weight:900;color:inherit;margin:2px 0 2px}.settings-section-desc{margin:0 0 8px}.settings-divider{height:1px;background:var(--border,#e7e7e7);margin:16px 0}
body.night-mode .settings-divider{background:#5b1015}.settings-profile-save{margin-bottom:2px}
/* Prevent labels, buttons and nav text from escaping their boxes */
button,.btn,.menu,.menu-link,.logout-link{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.menu{align-items:center}.menu span,.menu-link span,.logout-link{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn{line-height:1.15;white-space:nowrap}
button:not(.icon-btn):not(.delete):not(.qty-btn){font-size:clamp(11px,2.8vw,14px)}
.dashboard-menu-item b,.dashboard-menu-item span,.panel-title,.list-row span,.list-row b{min-width:0;overflow-wrap:anywhere}
select,input,textarea{max-width:100%;min-width:0}.page-head h1,.page-head p{overflow-wrap:anywhere}
@media(max-width:650px){
  .side-head{padding:14px 12px!important;min-height:150px!important;height:auto!important}
  .side-head .avatar{width:52px!important;height:52px!important;font-size:28px!important}
  .side-today-stats{grid-template-columns:minmax(0,1.35fr) minmax(64px,.65fr);gap:6px;margin-top:9px}
  .side-today-stats>div{padding:7px 8px;border-radius:9px}.side-today-stats span{font-size:8px}.side-today-stats strong{font-size:11px}
  .menu{height:48px!important;padding:0 14px!important;gap:10px!important}
  .menu span{font-size:12px}
  .btn{padding-left:10px!important;padding-right:10px!important;font-size:12px!important}
  .dashboard-menu-item{min-height:74px!important}.dashboard-menu-item b{font-size:11px!important}
}

/* Aksi hapus pelanggan */
.customer-actions .danger-mini{
  border-color:#f0b8b8;
  color:#b42318;
  background:#fff5f5;
}
.customer-actions .danger-mini:hover{
  background:#feecec;
}


/* =========================================================
   FINAL RESPONSIVE POS FIX
   - Desktop: grid cards, full-width content, no letter-by-letter wrapping
   - Tablet/mobile: compact list/cards according to available width
   ========================================================= */
#page-kasir .pos-layout,
#page-kasir .pos-layout > .panel{min-width:0;width:100%;}
#page-kasir .product-grid{width:100%;min-width:0;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));align-items:stretch;}
#page-kasir .product-card{min-width:0;width:100%;overflow:hidden;}
#page-kasir .product-card-top{min-width:0;}
#page-kasir .product-name{display:block;min-width:0;max-width:100%;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;line-break:auto;}
#page-kasir .product-info-line{min-width:0;}
#page-kasir .product-info-line small{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal;}

/* Desktop: never force the POS into the narrow phone list layout. */
@media(min-width:901px){
  #page-kasir .product-grid:not(.view-list){grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;}
  #page-kasir .product-grid.view-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;}
  #page-kasir .product-grid.view-list .product-card{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto auto;
    min-height:92px;
    padding:13px 14px;
  }
  #page-kasir .product-grid.view-list .product-card-top{grid-column:1;grid-row:1 / span 2;min-width:0;}
  #page-kasir .product-grid.view-list .product-info-line{grid-column:2;grid-row:1;min-width:110px;}
  #page-kasir .product-grid.view-list .product-card strong{grid-column:2;grid-row:2;justify-self:end;white-space:nowrap;}
  #page-kasir .product-grid.view-list .product-qty{grid-column:3;grid-row:1 / span 2;}
}

/* Phone/tablet: list is readable and names cannot collapse to one character per line. */
@media(max-width:900px){
  #page-kasir .product-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px;}
  #page-kasir .product-grid.view-list{display:flex;flex-direction:column;gap:7px;}
  #page-kasir .product-grid.view-list .product-card{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    width:100%;
    min-height:78px;
    padding:11px 10px;
    gap:6px 9px;
  }
  #page-kasir .product-grid.view-list .product-card-top{grid-column:1;grid-row:1 / span 3;min-width:0;}
  #page-kasir .product-grid.view-list .product-info-line{grid-column:2;grid-row:1;min-width:88px;}
  #page-kasir .product-grid.view-list .product-card strong{grid-column:2;grid-row:2;justify-self:end;white-space:nowrap;}
  #page-kasir .product-grid.view-list .product-qty{grid-column:2;grid-row:3;}
}

@media(max-width:480px){
  #page-kasir .product-grid:not(.view-list){grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
  #page-kasir .product-grid:not(.view-list) .product-card{padding:9px;}
}

/* =========================================================
   POS PRODUCT LIST - FULL WIDTH RESPONSIVE
   Desktop/tablet: gunakan seluruh area kerja setelah sidebar.
   Mobile: tetap mengikuti layout compact yang sudah ada.
   ========================================================= */
@media (min-width: 901px){
  #page-kasir{max-width:none!important;width:100%;margin:0!important}
  #page-kasir .pos-layout{display:block;width:100%;margin:0}
  #page-kasir .pos-layout > .panel{width:100%;margin:0;padding:24px;border-radius:16px}
  #page-kasir .search-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
  #page-kasir .search-row input{min-width:0}
  #page-kasir .barcode-row,#page-kasir .page-actions,#page-kasir .pos-view-toolbar{width:100%}
  #page-kasir .pos-view-toolbar{justify-content:flex-end}

  /* Grid desktop: kartu memenuhi lebar, tanpa menyempit seperti tampilan HP. */
  #page-kasir .product-grid:not(.view-list){
    width:100%;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:12px;
  }
  #page-kasir .product-grid:not(.view-list) .product-card{min-width:0}

  /* List desktop: satu baris penuh dengan kolom yang proporsional. */
  #page-kasir .product-grid.view-list{width:100%;gap:8px}
  #page-kasir .product-grid.view-list .product-card{
    width:100%;
    min-width:0;
    grid-template-columns:minmax(300px,2.5fr) minmax(150px,1fr) minmax(110px,.7fr) minmax(190px,1fr);
    gap:16px;
    padding:14px 18px;
    border-radius:12px;
  }
  #page-kasir .product-grid.view-list .product-card-top{min-width:0}
  #page-kasir .product-grid.view-list .product-card-top .product-name{
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    font-size:15px;
  }
  #page-kasir .product-grid.view-list .product-info-line{min-width:0;align-items:center}
  #page-kasir .product-grid.view-list .product-qty{justify-content:flex-end}
  #page-kasir .product-grid.view-list .product-edit-btn{font-size:11px}
}

@media (min-width: 1400px){
  #page-kasir .pos-layout > .panel{padding:28px}
  #page-kasir .product-grid.view-list .product-card{padding:15px 20px;gap:22px}
  #page-kasir .product-grid.view-list .product-card-top .product-name{font-size:16px}
}

@media (max-width: 900px){
  #page-kasir .product-grid.view-list{width:100%}
  #page-kasir .product-grid.view-list .product-card{width:100%;max-width:none}
}

/* Efek sukses pembayaran: bintang kecil berkedip dan memancar sebelum struk dibuka. */
.payment-success-effect{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;background:rgba(0,0,0,.48);opacity:0;pointer-events:none;transition:opacity .2s ease}.payment-success-effect.show{opacity:1}.payment-success-effect.hide{opacity:0}.success-burst{position:relative;width:min(360px,82vw);padding:34px 20px 28px;border-radius:24px;text-align:center;background:linear-gradient(145deg,#fff,#f7f7f7);box-shadow:0 18px 60px rgba(0,0,0,.35);transform:scale(.72);animation:successPop .55s cubic-bezier(.2,.9,.2,1.2) forwards}.success-check{width:68px;height:68px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:#1fb65a;color:#fff;font-size:40px;font-weight:900;box-shadow:0 0 0 8px rgba(31,182,90,.12),0 8px 25px rgba(31,182,90,.28);animation:successPulse .8s ease-in-out infinite}.success-burst b{display:block;font-size:22px;color:#171717}.success-burst small{display:block;margin-top:5px;color:#666;font-size:12px}.success-star{position:absolute;left:50%;top:50%;font-style:normal;font-size:15px;color:#f5b900;opacity:0;animation:starBurst 1s ease-out forwards;animation-delay:var(--delay,0s);text-shadow:0 0 8px rgba(255,205,40,.75)}.success-star.s1{--x:-145px;--y:-95px;--r:-25deg}.success-star.s2{--x:-105px;--y:-135px;--r:20deg}.success-star.s3{--x:-40px;--y:-165px;--r:-15deg}.success-star.s4{--x:45px;--y:-155px;--r:15deg}.success-star.s5{--x:112px;--y:-120px;--r:-20deg}.success-star.s6{--x:150px;--y:-55px;--r:25deg}.success-star.s7{--x:158px;--y:25px;--r:-15deg}.success-star.s8{--x:125px;--y:95px;--r:18deg}.success-star.s9{--x:55px;--y:140px;--r:-25deg}.success-star.s10{--x:-30px;--y:155px;--r:15deg}.success-star.s11{--x:-105px;--y:115px;--r:-18deg}.success-star.s12{--x:-150px;--y:55px;--r:22deg}.success-star.s13{--x:-175px;--y:-15px;--r:-12deg}.success-star.s14{--x:-72px;--y:-75px;--r:20deg}.success-star.s15{--x:80px;--y:-80px;--r:-20deg}.success-star.s16{--x:85px;--y:75px;--r:15deg}.success-star.s17{--x:-75px;--y:75px;--r:-15deg}.success-star.s18{--x:0px;--y:-105px;--r:0deg}@keyframes successPop{0%{transform:scale(.72)}70%{transform:scale(1.04)}100%{transform:scale(1)}}@keyframes successPulse{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.07);filter:brightness(1.12)}}@keyframes starBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(.15) rotate(0deg)}20%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(1.15) rotate(var(--r))}}
@media(prefers-reduced-motion:reduce){.success-burst,.success-check,.success-star{animation:none}.success-burst{transform:scale(1)}.success-star{display:none}}

/* =========================================================
   ANALISA PENJUALAN - RESPONSIVE DESKTOP & MOBILE
   ========================================================= */
.sales-analysis-page{width:100%;max-width:none}
.analysis-summary{grid-template-columns:repeat(4,minmax(0,1fr))}
.analysis-summary .stat small{font-size:12px;color:#7a838c}
.analysis-growth-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.analysis-growth-card{background:#fff;border:1px solid #e6e9ec;border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:7px;box-shadow:0 2px 10px #0000000d}
.analysis-growth-card span{font-size:13px;color:#69727c}.analysis-growth-card strong{font-size:23px}.analysis-growth-card small{color:#7a838c}
.analysis-up{color:#16833d!important}.analysis-down{color:#c7191f!important}.analysis-flat{color:#69727c!important}
.analysis-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.analysis-grid .panel{min-width:0}
.analysis-row{padding:9px 0}.analysis-row-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.analysis-row-head span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.analysis-row-head b{white-space:nowrap}.analysis-progress{height:7px;background:#edf0f2;border-radius:99px;overflow:hidden;margin-top:7px}.analysis-progress i{display:block;height:100%;background:#c7191f;border-radius:99px}
.analysis-bars{display:flex;gap:7px;align-items:flex-end;height:230px;overflow-x:auto;padding:8px 2px 0}.daily-bar{height:100%;min-width:42px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}.daily-bar span{font-size:10px;color:#69727c;white-space:nowrap}.daily-bar>div{height:155px;width:24px;display:flex;align-items:flex-end;background:#f0f2f4;border-radius:6px 6px 2px 2px;overflow:hidden}.daily-bar i{display:block;width:100%;background:#075b94;border-radius:6px 6px 0 0}.daily-bar b{font-size:9px;white-space:nowrap;color:#333}
.analysis-suggestions{display:flex;flex-direction:column;gap:9px}.suggestion-item{padding:11px 12px;border:1px solid #eee;border-radius:9px;background:#fafafa;line-height:1.45}.analysis-indicators{display:grid;grid-template-columns:1fr 1fr;gap:9px}.indicator{border:1px solid #e7eaed;border-radius:9px;padding:12px;display:flex;flex-direction:column;gap:5px}.indicator span{font-size:12px;color:#69727c}.indicator b{font-size:20px}.analysis-note{font-size:12px;color:#69727c}
@media(min-width:1400px){.analysis-summary{grid-template-columns:repeat(4,minmax(0,1fr))}.analysis-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.analysis-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.analysis-growth-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.analysis-grid{grid-template-columns:1fr}}
@media(max-width:650px){.analysis-summary{grid-template-columns:1fr 1fr;gap:9px}.analysis-growth-grid{grid-template-columns:1fr 1fr;gap:9px}.analysis-growth-card{padding:12px}.analysis-growth-card strong{font-size:19px}.analysis-indicators{grid-template-columns:1fr 1fr}.analysis-bars{height:200px}.daily-bar>div{height:130px;width:21px}}

/* ===== Bottom navigation KasirGo ===== */
.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:85;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;height:72px;padding:8px 10px 0;background:#b10b16;border:1px solid #8f0710;border-bottom:0;border-radius:22px 22px 0 0;box-shadow:0 -5px 22px #0002;transition:transform .22s ease,opacity .22s ease;}
.bottom-nav.hidden{transform:translateY(110%);opacity:0;pointer-events:none}
.bottom-nav-item{min-width:0;height:58px;border:0;background:transparent;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-weight:800;font-size:11px;cursor:pointer;text-decoration:none;position:relative;border-radius:14px 14px 0 0;}
.bottom-nav-icon{font-size:23px;line-height:1}
.bottom-nav-item.active{background:#8f0710}
.bottom-nav-item.active:after{content:"";position:absolute;left:25%;right:25%;bottom:4px;height:3px;border-radius:3px;background:#fff}
.bottom-nav-item.qr{margin-top:-25px;height:67px;width:67px;justify-self:center;border-radius:50%;background:#fff;color:#a50913;border:4px solid #b10b16;box-shadow:0 4px 16px #0003;font-size:10px}
.bottom-nav-item.qr .bottom-nav-icon{font-size:27px}
.bottom-nav-item.qr.active{background:#fff;color:#a50913}
.bottom-nav-item.qr.active:after{display:none}
body.night-mode .bottom-nav{background:#121820;border-color:#c7191f;box-shadow:0 -5px 24px #0008}
body.night-mode .bottom-nav-item{color:#fff}
body.night-mode .bottom-nav-item.active{background:#242b34}
body.night-mode .bottom-nav-item.qr{background:#1b2128;color:#fff;border-color:#c7191f}
@media(min-width:651px){.bottom-nav{height:76px;padding-left:18px;padding-right:18px}.bottom-nav-item{height:61px;font-size:12px}.bottom-nav-icon{font-size:24px}.main{padding-bottom:105px}}
@media(max-width:650px){.bottom-nav{height:68px;padding:6px 5px 0;border-radius:18px 18px 0 0}.bottom-nav-item{height:56px;font-size:9px;gap:2px}.bottom-nav-icon{font-size:21px}.bottom-nav-item.qr{width:60px;height:60px;margin-top:-22px}.bottom-nav-item.qr .bottom-nav-icon{font-size:24px}.main{padding-bottom:90px}}

/* ===== KasirGo Bottom Navigation — responsive ===== */
.kg-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:9999;height:76px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;padding:7px 10px 0;background:#a90d16;border:1px solid #7f0710;border-bottom:0;border-radius:24px 24px 0 0;box-shadow:0 -8px 28px rgba(0,0,0,.22);backdrop-filter:blur(10px);transition:transform .22s ease,opacity .22s ease}
.kg-bottom-nav.kg-hidden{transform:translateY(110%);opacity:0;pointer-events:none}
.kg-bottom-item{appearance:none;min-width:0;height:62px;border:0;background:transparent;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:3px 2px 7px;font:800 11px/1 Arial,sans-serif;cursor:pointer;border-radius:15px 15px 0 0}
.kg-bottom-item svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.kg-bottom-item span,.kg-bottom-qr span{white-space:nowrap}
.kg-bottom-item.active{background:#860810}
.kg-bottom-item.active:after{content:"";width:24px;height:3px;border-radius:4px;background:#fff;margin-top:1px}
.kg-bottom-qr{appearance:none;justify-self:center;align-self:start;width:68px;height:68px;margin-top:-25px;border-radius:50%;border:4px solid #a90d16;background:#fff;color:#970a12;box-shadow:0 5px 18px rgba(0,0,0,.28);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:0;font:900 10px/1 Arial,sans-serif;cursor:pointer}
.kg-bottom-qr svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kg-bottom-qr.active{background:#fff;color:#970a12}
body.night-mode .kg-bottom-nav{background:#121a22;border-color:#d71920;box-shadow:0 -8px 30px rgba(0,0,0,.6)}
body.night-mode .kg-bottom-item{color:#fff}
body.night-mode .kg-bottom-item.active{background:#222b35}
body.night-mode .kg-bottom-qr{background:#1b222b;color:#fff;border-color:#d71920}
@media(min-width:651px){.kg-bottom-nav{height:82px;max-width:none;padding-left:24px;padding-right:24px}.kg-bottom-item{height:67px;font-size:12px}.kg-bottom-item svg{width:26px;height:26px}.kg-bottom-qr{width:72px;height:72px;margin-top:-27px}}
@media(max-width:650px){.kg-bottom-nav{height:70px;padding:5px 4px 0;border-radius:20px 20px 0 0}.kg-bottom-item{height:58px;font-size:9px;padding-bottom:6px}.kg-bottom-item svg{width:22px;height:22px}.kg-bottom-qr{width:61px;height:61px;margin-top:-21px;border-width:3px}.kg-bottom-qr svg{width:26px;height:26px}}
.main{padding-bottom:110px}
@media(max-width:650px){.main{padding-bottom:88px}}

\n/* =========================================================\n   KASIRGO - KALKULATOR SAMPING RESPONSIVE\n   Panel setengah layar, tersembunyi di kanan dan slide ke tengah.\n   ========================================================= */\n.kg-calc-tab{\n  position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:10001;\n  width:34px;height:66px;border:1px solid #b30b16;border-right:0;\n  border-radius:14px 0 0 14px;background:#090909;color:#fff;\n  display:grid;place-items:center;cursor:pointer;box-shadow:0 5px 22px rgba(0,0,0,.45);\n  transition:right .3s ease,background .2s ease;\n}\n.kg-calc-tab span{font-size:18px;line-height:1}\n.kg-calc-tab.active{background:#b30b16}\n.kg-calculator{\n  position:fixed;z-index:10000;top:50%;left:auto;right:-52vw;transform:translateY(-50%);\n  width:min(50vw,560px);min-width:360px;box-sizing:border-box;\n  padding:14px;background:#050505;color:#fff;border:2px solid #b30b16;\n  border-radius:18px;box-shadow:0 18px 55px rgba(0,0,0,.65);\n  transition:left .42s cubic-bezier(.22,.8,.22,1),right .42s cubic-bezier(.22,.8,.22,1),transform .42s cubic-bezier(.22,.8,.22,1);\n}\n.kg-calculator.open{left:50%;right:auto;transform:translate(-50%,-50%)}\n.kg-calc-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 12px;border-bottom:1px solid #651018}\n.kg-calc-head b{display:block;font-size:17px}.kg-calc-head small{display:block;color:#aaa;font-size:10px;margin-top:3px}\n.kg-calc-head button{width:34px;height:34px;border:1px solid #8f1018;border-radius:10px;background:#12080a;color:#fff;font-size:23px;cursor:pointer}\n.kg-calc-display{margin:14px 0;padding:16px 14px;min-height:62px;box-sizing:border-box;border:1px solid #641018;border-radius:12px;background:#101010;color:#fff;text-align:right;font-size:32px;font-weight:800;overflow:hidden;white-space:nowrap}\n.kg-calc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}\n.kg-calc-grid button{min-height:54px;border:1px solid #292929;border-radius:11px;background:#111;color:#fff;font-size:18px;font-weight:800;cursor:pointer}\n.kg-calc-grid button:active{transform:scale(.97)}\n.kg-calc-grid button.op{border-color:#8d1119;background:#19080a}.kg-calc-grid button.danger{border-color:#a30c16;background:#26080b}.kg-calc-grid button.equal{border-color:#c51a23;background:#a90d16}.kg-calc-grid button.zero{grid-column:span 2}\n@media(max-width:650px){\n  .kg-calc-tab{width:31px;height:58px}\n  .kg-calculator{width:calc(100vw - 26px);min-width:0;padding:12px;border-radius:16px}\n  .kg-calc-display{font-size:28px;min-height:56px}\n  .kg-calc-grid{gap:7px}.kg-calc-grid button{min-height:52px}\n}\n@media(min-width:651px){.kg-calc-grid button:hover{border-color:#8f1118;background:#181010}}\n

/* ===== Kalkulator: benar-benar tersembunyi sebelum tombol panah ditekan ===== */
html,body{overflow-x:hidden}
.kg-calc-tab{
  position:fixed!important;right:0!important;top:50%!important;
  transform:translateY(-50%)!important;
  width:34px!important;height:62px!important;
  z-index:10002!important;
  border:1px solid #b30b16!important;border-right:0!important;
  border-radius:14px 0 0 14px!important;
  background:#090909!important;color:#fff!important;
  display:grid!important;place-items:center!important;
  padding:0!important;cursor:pointer!important;
  box-shadow:0 5px 22px rgba(0,0,0,.5)!important;
}
.kg-calc-tab span{font-size:30px!important;line-height:1!important;font-family:Arial,sans-serif!important;font-weight:300!important}
.kg-calc-tab.active{background:#b30b16!important}

.kg-calculator{
  position:fixed!important;
  z-index:10001!important;
  top:50%!important;
  left:100%!important;
  right:auto!important;
  transform:translate(30px,-50%)!important;
  width:50vw!important;
  max-width:600px!important;
  min-width:0!important;
  max-height:82vh!important;
  overflow:auto!important;
  box-sizing:border-box!important;
  padding:16px!important;
  margin:0!important;
  background:#050505!important;
  color:#fff!important;
  border:2px solid #b30b16!important;
  border-radius:18px!important;
  box-shadow:0 18px 55px rgba(0,0,0,.7)!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transition:left .42s cubic-bezier(.22,.8,.22,1),transform .42s cubic-bezier(.22,.8,.22,1),opacity .18s ease,visibility 0s linear .42s!important;
}
.kg-calculator.open{
  left:50%!important;
  right:auto!important;
  transform:translate(-50%,-50%)!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  transition:left .42s cubic-bezier(.22,.8,.22,1),transform .42s cubic-bezier(.22,.8,.22,1),opacity .18s ease,visibility 0s!important;
}
.kg-calc-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:2px 2px 12px!important;border-bottom:1px solid #651018!important}
.kg-calc-head>div{min-width:0!important}
.kg-calc-head b{display:block!important;font-size:17px!important;white-space:nowrap!important}
.kg-calc-head small{display:block!important;color:#aaa!important;font-size:10px!important;margin-top:3px!important}
.kg-calc-head button{flex:0 0 34px!important;width:34px!important;height:34px!important;border:1px solid #8f1018!important;border-radius:10px!important;background:#12080a!important;color:#fff!important;font-size:23px!important;cursor:pointer!important}
.kg-calc-display{display:block!important;width:100%!important;margin:14px 0!important;padding:16px 14px!important;min-height:62px!important;box-sizing:border-box!important;border:1px solid #641018!important;border-radius:12px!important;background:#101010!important;color:#fff!important;text-align:right!important;font-size:32px!important;font-weight:800!important;overflow:hidden!important;white-space:nowrap!important}
.kg-calc-grid{display:grid!important;width:100%!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;box-sizing:border-box!important}
.kg-calc-grid button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;min-height:54px!important;box-sizing:border-box!important;border:1px solid #292929!important;border-radius:11px!important;background:#111!important;color:#fff!important;font-size:18px!important;font-weight:800!important;cursor:pointer!important}
.kg-calc-grid button.zero{grid-column:span 2!important}

@media(max-width:650px){
  .kg-calc-tab{width:30px!important;height:58px!important}
  .kg-calculator{
    left:100%!important;
    width:calc(100vw - 20px)!important;
    max-width:none!important;
    max-height:82vh!important;
    padding:12px!important;
    border-radius:16px!important;
  }
  .kg-calculator.open{left:50%!important;transform:translate(-50%,-50%)!important}
  .kg-calc-display{font-size:27px!important;min-height:56px!important}
  .kg-calc-grid{gap:7px!important}
  .kg-calc-grid button{min-height:50px!important;font-size:17px!important}
}

/* =========================================================
   KASIRGO - CATATAN CEPAT SAMPING RESPONSIVE
   Tombol kecil di kiri, panel tersembunyi lalu slide ke tengah.
   ========================================================= */
.kg-note-tab{
  position:fixed;left:0;top:50%;transform:translateY(-50%);z-index:10001;
  width:34px;height:66px;border:1px solid #b30b16;border-left:0;
  border-radius:0 14px 14px 0;background:#090909;color:#fff;
  display:grid;place-items:center;cursor:pointer;box-shadow:0 5px 22px rgba(0,0,0,.45);
  transition:left .3s ease,background .2s ease;
}
.kg-note-tab span{font-size:30px;line-height:1;font-family:Arial,sans-serif;font-weight:300}
.kg-note-tab.active{background:#b30b16}
.kg-note-panel{
  position:fixed;z-index:10000;top:50%;left:-52vw;right:auto;transform:translateY(-50%);
  width:min(50vw,560px);min-width:360px;box-sizing:border-box;padding:14px;
  background:#050505;color:#fff;border:2px solid #b30b16;border-radius:18px;
  box-shadow:0 18px 55px rgba(0,0,0,.65);
  transition:left .42s cubic-bezier(.22,.8,.22,1),transform .42s cubic-bezier(.22,.8,.22,1);
}
.kg-note-panel.open{left:50%;transform:translate(-50%,-50%)}
.kg-note-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 12px;border-bottom:1px solid #651018}
.kg-note-head>div{min-width:0}.kg-note-head b{display:block;font-size:17px;white-space:nowrap}.kg-note-head small{display:block;color:#aaa;font-size:10px;margin-top:3px}
.kg-note-head button{flex:0 0 34px;width:34px;height:34px;border:1px solid #8f1018;border-radius:10px;background:#12080a;color:#fff;font-size:23px;cursor:pointer}
#kgNoteText{display:block;width:100%;height:180px;min-height:120px;max-height:45vh;margin:14px 0;padding:14px;box-sizing:border-box;resize:vertical;border:1px solid #641018;border-radius:12px;background:#101010;color:#fff;outline:none;font:500 15px/1.55 Arial,sans-serif}
#kgNoteText:focus{border-color:#b30b16;box-shadow:0 0 0 2px #b30b1633}
#kgNoteText::placeholder{color:#777}
.kg-note-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#888;font-size:11px}
.kg-note-foot button{border:1px solid #8f1018;border-radius:9px;background:#19080a;color:#fff;padding:8px 13px;cursor:pointer;font-weight:700}
@media(max-width:650px){
  .kg-note-tab{width:31px;height:58px}
  .kg-note-panel{width:calc(100vw - 20px);min-width:0;padding:12px;border-radius:16px}
  #kgNoteText{height:170px}
}

/* CATATAN CEPAT - FINAL RESPONSIVE VISIBILITY */
@media (min-width: 769px){
  .kg-note-panel{left:-110vw!important;right:auto!important;transform:translateY(-50%)!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}
  .kg-note-panel.open{left:50%!important;transform:translate(-50%,-50%)!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
}
@media (max-width: 768px){
  .kg-note-panel{left:0!important;right:auto!important;transform:translate(calc(-100% + 14px),-50%)!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
  .kg-note-panel.open{left:50%!important;transform:translate(-50%,-50%)!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important}
}


/* =========================================================
   FIX EDIT/TAMBAH PRODUK MODAL
   Modal harus berada di atas bottom-nav dan bisa discroll penuh.
   ========================================================= */
#modal.modal-wrap{
  z-index:10050 !important;
  overflow:hidden !important;
  overscroll-behavior:contain;
}
#modal.modal-wrap .modal{
  width:min(560px,calc(100vw - 24px)) !important;
  max-height:calc(100dvh - 24px) !important;
  height:auto !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  -webkit-overflow-scrolling:touch !important;
  overscroll-behavior:contain;
  padding-bottom:calc(18px + env(safe-area-inset-bottom)) !important;
}
#modal.modal-wrap .modal-head{
  position:sticky !important;
  top:0 !important;
  z-index:10 !important;
  padding-top:2px;
  background:inherit !important;
}
#modal.modal-wrap #modalBody{
  min-width:0;
  overflow:visible !important;
}
#modal.modal-wrap #modalBody form{
  min-height:0;
  padding-bottom:6px;
}
#modal.modal-wrap #modalBody form > .btn.full{
  position:sticky !important;
  bottom:0 !important;
  z-index:12 !important;
  margin-top:12px !important;
  margin-bottom:2px !important;
  box-shadow:0 -8px 14px rgba(255,255,255,.85);
}
body.night-mode #modal.modal-wrap #modalBody form > .btn.full{
  box-shadow:0 -8px 14px rgba(5,5,5,.95);
}
@media(max-width:650px){
  #modal.modal-wrap{padding:8px !important;align-items:center !important;}
  #modal.modal-wrap .modal{
    width:calc(100vw - 16px) !important;
    max-height:calc(100dvh - 16px) !important;
    border-radius:16px !important;
  }
  #modal.modal-wrap #modalBody form > .btn.full{
    min-height:46px !important;
  }
}


/* =========================================================
   KASIRGO - PENCARIAN PRODUK SAMPING
   Tab pencarian berada tepat di atas kalkulator.
   Panel benar-benar tersembunyi sebelum dibuka dan responsive.
   ========================================================= */
.kg-pos-search-tab{
  position:fixed!important;
  right:0!important;
  top:calc(50% - 82px)!important;
  transform:translateY(-50%)!important;
  width:34px!important;
  height:62px!important;
  z-index:10005!important;
  border:1px solid #b30b16!important;
  border-right:0!important;
  border-radius:14px 0 0 14px!important;
  background:#090909!important;
  color:#fff!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  cursor:pointer!important;
  box-shadow:0 5px 22px rgba(0,0,0,.5)!important;
}
.kg-pos-search-tab span{font-size:27px!important;line-height:1!important;font-family:Arial,sans-serif!important;font-weight:300!important}
.kg-pos-search-tab.active{background:#b30b16!important}
.kg-pos-search-panel{
  position:fixed!important;
  z-index:10004!important;
  top:50%!important;
  left:100%!important;
  right:auto!important;
  transform:translate(30px,-50%)!important;
  width:50vw!important;
  max-width:600px!important;
  min-width:0!important;
  box-sizing:border-box!important;
  padding:16px!important;
  background:#050505!important;
  color:#fff!important;
  border:2px solid #b30b16!important;
  border-radius:18px!important;
  box-shadow:0 18px 55px rgba(0,0,0,.7)!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transition:left .42s cubic-bezier(.22,.8,.22,1),transform .42s cubic-bezier(.22,.8,.22,1),opacity .18s ease,visibility 0s linear .42s!important;
}
.kg-pos-search-panel.open{
  left:50%!important;
  transform:translate(-50%,-50%)!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  transition:left .42s cubic-bezier(.22,.8,.22,1),transform .42s cubic-bezier(.22,.8,.22,1),opacity .18s ease,visibility 0s!important;
}
.kg-pos-search-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 12px;border-bottom:1px solid #651018}
.kg-pos-search-head>div{min-width:0}.kg-pos-search-head b{display:block;font-size:17px;white-space:nowrap}.kg-pos-search-head small{display:block;color:#aaa;font-size:10px;margin-top:3px}
.kg-pos-search-head button{flex:0 0 34px;width:34px;height:34px;border:1px solid #8f1018;border-radius:10px;background:#12080a;color:#fff;font-size:23px;cursor:pointer}
.kg-pos-search-box{display:flex;align-items:center;gap:8px;margin-top:14px;padding:5px 7px 5px 12px;border:1px solid #641018;border-radius:12px;background:#101010}
.kg-pos-search-box>span{font-size:23px;color:#d71920;flex:0 0 auto}
#kgPosSearchInput{display:block!important;flex:1!important;width:100%!important;min-width:0!important;margin:0!important;padding:10px 4px!important;border:0!important;outline:none!important;box-shadow:none!important;background:transparent!important;color:#fff!important;font:600 16px/1.3 Arial,sans-serif!important}
#kgPosSearchInput::placeholder{color:#777}
#kgPosSearchButton{flex:0 0 auto;border:1px solid #a30c16;border-radius:9px;background:#a90d16;color:#fff;padding:10px 14px;font-weight:800;cursor:pointer}
.kg-pos-search-help{display:block;color:#888;font-size:11px;line-height:1.4;margin:10px 2px 0}
.kg-pos-search-open-btn{flex:0 0 auto!important;width:44px!important;padding-left:0!important;padding-right:0!important;font-size:20px!important}
body.night-mode .kg-pos-search-panel{background:#050505;color:#fff;border-color:#d71920}
body:not(.night-mode) .kg-pos-search-panel{background:#050505;color:#fff}
@media(max-width:650px){
  .kg-pos-search-tab{width:30px!important;height:58px!important;top:calc(50% - 74px)!important}
  .kg-pos-search-panel{left:100%!important;width:calc(100vw - 20px)!important;max-width:none!important;padding:12px!important;border-radius:16px!important}
  .kg-pos-search-panel.open{left:50%!important;transform:translate(-50%,-50%)!important}
  #kgPosSearchInput{font-size:15px!important}
  .kg-pos-search-open-btn{width:42px!important}
}

.header-notif-btn{position:relative;border:0;background:transparent;color:inherit;font-size:24px;cursor:pointer;padding:6px 8px}.header-notif-btn i{position:absolute;right:0;top:-2px;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:#c7191f;color:#fff;font:700 10px/17px Arial;text-align:center;display:none}.header-notif-btn i.show{display:block}.kg-notif-modal .modal{width:min(620px,100%)}.kg-notif-list{display:grid;gap:8px;margin-bottom:12px;max-height:55vh;overflow:auto}.kg-notif-item{border:1px solid #e3e7ea;border-radius:10px;padding:12px;background:#fff;cursor:pointer}.kg-notif-item.unread{border-left:4px solid #c7191f;background:#fff8f8}.kg-notif-item b{display:block}.kg-notif-item small{display:block;color:#777;margin:4px 0 7px}.kg-notif-item p{margin:0;white-space:pre-wrap;line-height:1.5}.kg-maintenance{position:fixed;inset:0;z-index:9999;background:rgba(0,0,0,.78);display:none;align-items:center;justify-content:center;padding:20px}.kg-maintenance.show{display:flex}.kg-maintenance-box{width:min(500px,100%);background:#fff;border-radius:18px;padding:28px;text-align:center;box-shadow:0 20px 70px #0008}.kg-maintenance-box .ico{font-size:55px}.kg-maintenance-box h2{margin:10px 0}.kg-maintenance-box p{color:#68717b;line-height:1.6}.kg-maintenance-box button{border:0;border-radius:9px;background:#075b94;color:#fff;padding:11px 18px;font-weight:700;cursor:pointer}

/* Payment support gate */
.kg-payment-gate{position:fixed;inset:0;z-index:10050;display:none;align-items:center;justify-content:center;padding:18px;background:rgba(8,15,25,.82);backdrop-filter:blur(6px);overflow:auto}.kg-payment-gate.show{display:flex}.kg-payment-box{width:min(560px,100%);max-height:calc(100dvh - 36px);overflow:auto;background:var(--card,#fff);color:var(--text,#20252b);border-radius:20px;padding:24px;box-shadow:0 25px 80px #0007;text-align:center}.kg-payment-box .ico{font-size:48px}.kg-payment-box h2{margin:8px 0}.kg-payment-box p{line-height:1.55}.kg-payment-accounts{text-align:left;background:rgba(127,127,127,.08);padding:14px;border-radius:14px;margin:14px 0}.kg-payment-accounts p{margin:7px 0}.kg-payment-label{display:block;text-align:left;font-weight:700;margin:14px 0}.kg-payment-label input{width:100%;margin-top:6px;padding:12px;border:1px solid #ccc;border-radius:10px;box-sizing:border-box}.kg-payment-box .btn{margin:6px 0}.kg-payment-box small{display:block;margin-top:10px;opacity:.75;line-height:1.45}

/* FIX: Payment support modal text visibility in light mode */
body:not(.night-mode) .kg-payment-box{
  background:#fff !important;
  color:#171717 !important;
}
body:not(.night-mode) .kg-payment-box h2,
body:not(.night-mode) .kg-payment-box p,
body:not(.night-mode) .kg-payment-box b,
body:not(.night-mode) .kg-payment-box label,
body:not(.night-mode) .kg-payment-box small{
  color:#171717 !important;
}
body:not(.night-mode) .kg-payment-box .kg-payment-accounts{
  background:#f5f6f7 !important;
  color:#171717 !important;
  border:1px solid #e1e4e7;
}
body:not(.night-mode) .kg-payment-box .kg-payment-accounts b,
body:not(.night-mode) .kg-payment-box .kg-payment-accounts p{
  color:#171717 !important;
}
body:not(.night-mode) .kg-payment-box .kg-payment-label input{
  background:#fff !important;
  color:#171717 !important;
  border-color:#cfd4d8 !important;
}
body:not(.night-mode) .kg-payment-box .kg-payment-label input::placeholder{
  color:#777 !important;
}
body.night-mode .kg-payment-box{
  background:#151515 !important;
  color:#f4f4f4 !important;
}
body.night-mode .kg-payment-box h2,
body.night-mode .kg-payment-box p,
body.night-mode .kg-payment-box b,
body.night-mode .kg-payment-box label{
  color:#f4f4f4 !important;
}
body.night-mode .kg-payment-box small{color:#bfc5ca !important}


/* Payment confirmation waiting state */
.kg-payment-loading,.kg-payment-success{padding:18px 6px 8px;text-align:center}.kg-payment-loading h2,.kg-payment-success h2{margin:14px 0 8px}.kg-payment-loading p,.kg-payment-success p{line-height:1.6;margin:7px 0}.kg-loading-spinner{width:54px;height:54px;margin:8px auto 14px;border:5px solid rgba(199,25,31,.18);border-top-color:#c7191f;border-radius:50%;animation:kgSpin .85s linear infinite}.kg-payment-success-icon{width:64px;height:64px;margin:0 auto 12px;border-radius:50%;display:grid;place-items:center;background:#e4f8ea;color:#16803a;font-size:38px;font-weight:900}.kg-payment-wait-title{font-size:16px}.kg-payment-waiting{display:flex;align-items:center;gap:13px;text-align:left;margin:18px 0 4px;padding:14px;border:1px solid rgba(199,25,31,.2);border-radius:14px;background:rgba(199,25,31,.05)}.kg-payment-waiting .kg-loading-spinner{flex:0 0 34px;width:34px;height:34px;margin:0;border-width:4px}.kg-payment-waiting b{display:block;margin-bottom:4px}.kg-payment-waiting small{display:block;line-height:1.5;opacity:.78}@keyframes kgSpin{to{transform:rotate(360deg)}}
@media(max-width:899px){#sidebarNav.open{z-index:11000!important}.kg-bottom-nav{z-index:9000!important}.overlay.show{z-index:10990!important}.sidebar.open .logout-link{position:relative;z-index:2;padding-bottom:28px}.sidebar.open nav{padding-bottom:8px}}

/* =========================================================
   KASIRGO - TAB SAMPING RINGKAS
   Kalkulator / Pencarian / Catatan memakai tombol kecil
   seukuran ikon, bukan panel tinggi.
   ========================================================= */
.kg-calc-tab,
.kg-pos-search-tab,
.kg-note-tab{
  width:44px!important;
  height:44px!important;
  padding:0!important;
  border:1px solid #b30b16!important;
  border-radius:50%!important;
  box-shadow:0 4px 16px rgba(0,0,0,.38)!important;
  display:grid!important;
  place-items:center!important;
  box-sizing:border-box!important;
}
.kg-calc-tab{right:8px!important;top:50%!important;transform:translateY(-50%)!important}
.kg-pos-search-tab{right:8px!important;top:calc(50% - 62px)!important;transform:translateY(-50%)!important}
.kg-note-tab{left:8px!important;top:50%!important;transform:translateY(-50%)!important}
.kg-calc-tab span,.kg-pos-search-tab span,.kg-note-tab span{
  font-size:24px!important;
  line-height:1!important;
  width:auto!important;
  height:auto!important;
}
.kg-calc-tab.active,.kg-pos-search-tab.active,.kg-note-tab.active{background:#b30b16!important}
@media(max-width:650px){
  .kg-calc-tab,
  .kg-pos-search-tab,
  .kg-note-tab{width:42px!important;height:42px!important}
  .kg-calc-tab{right:7px!important;top:50%!important}
  .kg-pos-search-tab{right:7px!important;top:calc(50% - 57px)!important}
  .kg-note-tab{left:7px!important;top:50%!important}
  .kg-calc-tab span,.kg-pos-search-tab span,.kg-note-tab span{font-size:23px!important}
}


/* =========================================================
   KASIRGO v10 - TAB SAMPING BENAR-BENAR RINGKAS
   Hanya tombol bulat yang terlihat saat panel belum dibuka.
   Tombol ditempel ke sisi layar agar tidak masuk terlalu jauh.
   ========================================================= */
.kg-calc-tab,
.kg-pos-search-tab,
.kg-note-tab{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  padding:0!important;
  box-sizing:border-box!important;
  border-radius:50%!important;
}
.kg-calc-tab{right:-1px!important;}
.kg-pos-search-tab{right:-1px!important;}
.kg-note-tab{left:-1px!important;}
.kg-calc-tab span,.kg-pos-search-tab span,.kg-note-tab span{
  width:auto!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  font-size:23px!important;
  line-height:1!important;
}

/* Catatan: panel TIDAK boleh terlihat sebelum tombol ditekan. */
.kg-note-panel{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.kg-note-panel.open{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}

@media(max-width:768px){
  .kg-note-panel{
    left:-110vw!important;
    right:auto!important;
    transform:translateY(-50%)!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  .kg-note-panel.open{
    left:50%!important;
    transform:translate(-50%,-50%)!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}

@media(max-width:650px){
  .kg-calc-tab,.kg-pos-search-tab,.kg-note-tab{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
  }
  .kg-calc-tab{right:-1px!important;}
  .kg-pos-search-tab{right:-1px!important;}
  .kg-note-tab{left:-1px!important;}
  .kg-calc-tab span,.kg-pos-search-tab span,.kg-note-tab span{font-size:22px!important}
}

/* KASIRGO v10 - tombol samping berbentuk SETENGAH LINGKARAN.
   Hanya bagian setengah lingkaran yang terlihat, menempel ke tepi layar. */
.kg-calc-tab,
.kg-pos-search-tab,
.kg-note-tab{
  width:32px!important;
  height:58px!important;
  min-width:32px!important;
  min-height:58px!important;
  padding:0!important;
  margin:0!important;
  border:1px solid #b30b16!important;
  box-sizing:border-box!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:#090909!important;
  color:#fff!important;
  box-shadow:0 4px 14px rgba(0,0,0,.38)!important;
}
/* kanan = setengah lingkaran kiri */
.kg-calc-tab,
.kg-pos-search-tab{
  right:0!important;
  left:auto!important;
  border-right:0!important;
  border-radius:29px 0 0 29px!important;
}
/* kiri = setengah lingkaran kanan */
.kg-note-tab{
  left:0!important;
  right:auto!important;
  border-left:0!important;
  border-radius:0 29px 29px 0!important;
}
.kg-calc-tab span,.kg-pos-search-tab span,.kg-note-tab span{
  width:auto!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  font-size:21px!important;
  line-height:1!important;
}
.kg-calc-tab.active,.kg-pos-search-tab.active,.kg-note-tab.active{
  background:#b30b16!important;
}
/* posisi vertikal tetap terpisah agar tombol tidak bertumpuk */
.kg-pos-search-tab{top:calc(50% - 58px)!important;transform:translateY(-50%)!important}
.kg-calc-tab{top:calc(50% + 58px)!important;transform:translateY(-50%)!important}
.kg-note-tab{top:50%!important;transform:translateY(-50%)!important}
@media(max-width:650px){
  .kg-calc-tab,.kg-pos-search-tab,.kg-note-tab{
    width:29px!important;
    height:54px!important;
    min-width:29px!important;
    min-height:54px!important;
    border-radius:27px 0 0 27px!important;
  }
  .kg-note-tab{border-radius:0 27px 27px 0!important}
  .kg-calc-tab,.kg-pos-search-tab{right:0!important}
  .kg-note-tab{left:0!important}
  .kg-pos-search-tab{top:calc(50% - 54px)!important}
  .kg-calc-tab{top:calc(50% + 54px)!important}
  .kg-note-tab{top:50%!important}
  .kg-calc-tab span,.kg-pos-search-tab span,.kg-note-tab span{font-size:20px!important}
}

/* KASIRGO v11 - notifikasi stok ringan, muncul sebentar di bagian atas tanpa mengganggu transaksi */
.kg-stock-toast{
  position:fixed;top:86px;left:50%;transform:translate(-50%,-12px);
  z-index:20050;display:flex;align-items:center;gap:8px;
  max-width:min(92vw,430px);padding:9px 14px;border-radius:999px;
  color:#fff;font-size:13px;line-height:1.2;pointer-events:none;
  opacity:0;transition:opacity .18s ease,transform .18s ease;
  box-shadow:0 6px 22px rgba(0,0,0,.25);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.kg-stock-toast.show{opacity:1;transform:translate(-50%,0)}
.kg-stock-toast.warning{background:#b87900;border:1px solid #d99a22}
.kg-stock-toast.danger{background:#b71922;border:1px solid #e24b52}
.kg-stock-toast span{font-size:15px;flex:0 0 auto}.kg-stock-toast b{overflow:hidden;text-overflow:ellipsis}
@media(max-width:650px){
  .kg-stock-toast{top:74px;max-width:88vw;padding:8px 12px;font-size:12px}
}

/* Cek Harga Online */
.kg-price-check-page{padding-bottom:90px}.kg-price-search-panel{margin-bottom:14px}.kg-price-search-row{display:flex;gap:10px;align-items:center}.kg-price-search-row input{flex:1;min-width:0}.kg-price-hint{font-size:12px;opacity:.72;margin-top:10px}.kg-price-suggestions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.kg-price-suggestion{border:1px solid rgba(198,40,40,.35);background:transparent;border-radius:999px;padding:7px 11px;cursor:pointer;font-size:12px}.kg-price-summary{margin:12px 0}.kg-price-summary-card{display:flex;justify-content:space-between;gap:12px;align-items:center;border-radius:14px;padding:13px 15px;background:var(--panel-bg,#fff);border:1px solid rgba(198,40,40,.18)}.kg-price-summary-card b{font-size:15px}.kg-price-summary-card small{display:block;opacity:.68}.kg-price-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.kg-price-card{border:1px solid rgba(198,40,40,.18);border-radius:15px;padding:15px;background:var(--panel-bg,#fff);box-shadow:0 3px 12px rgba(0,0,0,.05)}.kg-price-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.kg-price-market{font-weight:800;font-size:16px}.kg-price-badge{font-size:11px;padding:4px 8px;border-radius:999px;background:rgba(198,40,40,.1)}.kg-price-card p{font-size:12px;opacity:.72;line-height:1.45}.kg-price-open{display:inline-flex;text-decoration:none;margin-top:5px}.kg-price-local{margin-top:12px;padding-top:10px;border-top:1px dashed rgba(128,128,128,.3);font-size:12px}.kg-price-local strong{font-size:15px}.kg-price-online-note{font-size:11px;opacity:.65;margin-top:7px}.night-mode .kg-price-card,.night-mode .kg-price-summary-card{background:rgba(255,255,255,.045);border-color:rgba(255,80,80,.25)}.night-mode .kg-price-suggestion{color:inherit;background:rgba(255,255,255,.03)}
@media(max-width:700px){.kg-price-search-row{flex-direction:column;align-items:stretch}.kg-price-results{grid-template-columns:1fr}.kg-price-search-row .btn{width:100%}}

/* Pemasok & stok menipis */
.supplier-toolbar{margin-bottom:14px}.supplier-toolbar input{width:100%}.supplier-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.supplier-card{padding:15px;border:1px solid rgba(198,40,40,.18);border-radius:15px;background:var(--panel-bg,#fff);box-shadow:0 3px 12px rgba(0,0,0,.05)}.supplier-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.supplier-card-head b{display:block;font-size:15px}.supplier-card-head small{display:block;margin-top:5px;opacity:.7}.supplier-card-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.supplier-card-actions .btn{width:auto}.supplier-notes{display:block;margin-top:10px;opacity:.65}.night-mode .supplier-card{background:rgba(255,255,255,.045);border-color:rgba(255,80,80,.25)}
.low-stock-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid rgba(128,128,128,.16)}.low-stock-row:last-child{border-bottom:0}.low-stock-name{min-width:0}.low-stock-name span{display:block;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.low-stock-name small{display:block;font-size:11px;opacity:.65;margin-top:2px}.low-stock-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}.low-stock-number{display:inline-grid;place-items:center;min-width:42px;height:30px;padding:0 9px;border-radius:8px;background:#d71920;color:#fff;animation:kgLowStockBlink 1s ease-in-out infinite}.order-stock-btn{font-size:11px!important;padding:7px 9px!important;white-space:nowrap}.muted-btn{opacity:.75}.low-stock-more{margin-top:10px}.dashboard-info-title small{margin-left:auto;font-size:11px;opacity:.65}.product-supplier-mini{display:block;font-size:10px;opacity:.6;margin-top:2px}@keyframes kgLowStockBlink{0%,100%{opacity:1;box-shadow:0 0 0 rgba(215,25,32,0)}50%{opacity:.45;box-shadow:0 0 10px rgba(215,25,32,.45)}}
@media(max-width:700px){.supplier-grid{grid-template-columns:1fr}.low-stock-row{align-items:flex-start}.low-stock-actions{flex-direction:column;align-items:flex-end}.order-stock-btn{max-width:120px}.low-stock-number{min-width:38px}}
.payment-result-total,.payment-result-change{margin:10px 0 4px;text-align:center}.payment-result-total small,.payment-result-change small{display:block;font-size:13px;opacity:.7;margin-bottom:3px}.payment-result-total strong{display:block;font-size:34px;line-height:1.15}.payment-result-change strong{display:block;font-size:42px;line-height:1.1}.payment-result-change.no-change strong{font-size:32px}.payment-success-close{display:block;width:100%;margin-top:20px;height:48px;border:0;border-radius:12px;font-size:17px;font-weight:800;cursor:pointer}
/* ===== Dashboard: stok tersisa + tombol Edit ===== */
.dashboard-product-row{align-items:center;min-width:0}
.dashboard-product-row>span{min-width:0;flex:1}
.dashboard-product-row>span>b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-product-row>span>small{display:block;margin-top:4px;color:#7a838c;font-size:11px;line-height:1.35}
.dashboard-product-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-shrink:0}
.dashboard-product-actions>b{white-space:nowrap}
.dashboard-edit-btn{padding:6px 9px!important;min-height:32px!important;font-size:11px!important;line-height:1!important;white-space:nowrap}
.low-stock-name small b{font-weight:900}
.low-stock-actions{display:flex!important;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:600px){
 .dashboard-product-row{gap:7px;padding:10px 0!important}
 .dashboard-product-row>span>small{font-size:10px}
 .dashboard-product-actions{gap:4px}
 .dashboard-product-actions>b{font-size:11px}
 .dashboard-edit-btn{padding:6px 7px!important;font-size:10px!important}
 .low-stock-actions{max-width:175px}
}
/* ===== Night mode: dashboard tetap terbaca ===== */
body.night-mode .dashboard-product-row,
body.night-mode .dashboard-product-row b,
body.night-mode .dashboard-product-row>span>b,
body.night-mode .dashboard-product-actions>b{color:#f3f6f8!important}
body.night-mode .dashboard-product-row>span>small{color:#b8c2cc!important}
body.night-mode .dashboard-edit-btn{background:#2b333d!important;color:#fff!important;border:1px solid #566170!important}
body.night-mode .dashboard-edit-btn:hover{background:#3a4654!important}
body.night-mode .low-stock-name small{color:#cbd3db!important}
body.night-mode .low-stock-number.stock-safe{color:#55e58a!important}
body.night-mode .low-stock-number.stock-warning{color:#ffd15c!important}
body.night-mode .low-stock-number.stock-danger{color:#ff6b73!important}
/* ===== Night mode: popup Transaksi Berhasil / jumlah pembayaran ===== */
body.night-mode .payment-success-effect{background:rgba(0,0,0,.84)!important}
body.night-mode .success-burst{
 background:linear-gradient(145deg,#151a20 0%,#0b0e12 100%)!important;
 color:#f5f7fa!important;border:1px solid #3a4652!important;
 box-shadow:0 22px 70px rgba(0,0,0,.8),0 0 0 1px rgba(199,25,31,.18)!important
}
body.night-mode .success-burst>b{color:#fff!important}
body.night-mode .success-burst small{color:#cbd5df!important;opacity:1!important}
body.night-mode .payment-result-total,
body.night-mode .payment-result-paid,
body.night-mode .payment-result-change{
 background:#202832!important;border:1px solid #394653!important;
 border-radius:13px!important;padding:10px 12px!important;margin:9px 0!important
}
body.night-mode .payment-result-total small,
body.night-mode .payment-result-paid small,
body.night-mode .payment-result-change small{color:#cbd5df!important;opacity:1!important;font-weight:700!important}
body.night-mode .payment-result-total strong,
body.night-mode .payment-result-paid strong{color:#fff!important;text-shadow:0 0 12px rgba(255,255,255,.12)}
body.night-mode .payment-result-change strong{color:#72f2a0!important;text-shadow:0 0 14px rgba(114,242,160,.18)}
body.night-mode .payment-success-close{background:#c7191f!important;color:#fff!important;border:1px solid #ef4a50!important}
.payment-result-paid{margin:10px 0 4px;text-align:center}
.payment-result-paid small{display:block;font-size:13px;margin-bottom:3px}
.payment-result-paid strong{display:block;font-size:30px;line-height:1.15}

.trx-delete-all-btn{margin:10px 0 14px;width:100%;min-height:48px;border:1px solid #7f1d1d;border-radius:12px;background:#2a1115;color:#ffb4b4;font-weight:800;cursor:pointer;box-shadow:0 0 12px rgba(220,38,38,.12)}
.trx-delete-all-btn:hover{background:#48151b;color:#fff;border-color:#ef4444}
.night-mode .trx-delete-all-btn{background:#16090b;color:#ffb7b7;border-color:#7f1d1d}

/* ==========================================================
   RIWAYAT TRANSAKSI - TOMBOL HAPUS SEMUA / NIGHT MODE
   ========================================================== */
.transaction-page-redesign .trx-summary-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.transaction-page-redesign .trx-summary-actions .trx-delete-all-btn{
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100% !important;
  min-height:52px !important;
  padding:12px 16px !important;
  margin:4px 0 8px !important;
  border:2px solid #dc2626 !important;
  border-radius:14px !important;
  background:linear-gradient(135deg,#3a0b0d,#180709) !important;
  color:#fff !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
  cursor:pointer !important;
  box-shadow:0 0 12px rgba(220,38,38,.28), inset 0 0 12px rgba(255,255,255,.03) !important;
  text-shadow:0 1px 2px #000 !important;
  opacity:1 !important;
}
.transaction-page-redesign .trx-summary-actions .trx-delete-all-btn:hover,
.transaction-page-redesign .trx-summary-actions .trx-delete-all-btn:active{
  background:linear-gradient(135deg,#b91c1c,#450a0a) !important;
  border-color:#ff4d55 !important;
  box-shadow:0 0 20px rgba(239,68,68,.5) !important;
}
body.night-mode .transaction-page-redesign .trx-summary-actions .trx-delete-all-btn{
  background:linear-gradient(135deg,#4a0a0d,#210507) !important;
  color:#fff !important;
  border-color:#ef4444 !important;
}
@media(max-width:600px){
  .transaction-page-redesign .trx-summary-actions .trx-delete-all-btn{
    min-height:50px !important;
    font-size:13px !important;
  }
}


/* =========================================================
   BLUETOOTH RECEIPT PREVIEW - REAL 80MM / 48 COLUMN SIMULATION
   The browser preview uses the same receiptLines48() strings sent
   to ESC/POS. 48 characters are fitted to the printable 72mm area
   of a standard 80mm thermal roll, so the line breaks/alignment
   seen here match the text printer output as closely as possible.
   ========================================================= */
.receipt-bluetooth-preview{
  width:80mm!important;
  min-width:80mm!important;
  max-width:80mm!important;
  box-sizing:border-box!important;
  margin:0 auto!important;
  padding:4mm 4mm 6mm!important;
  background:#fff!important;
  color:#111!important;
  font-family:"Courier New",Courier,monospace!important;
  font-size:9px!important;
  line-height:1.55!important;
  letter-spacing:0!important;
  font-variant-ligatures:none!important;
  box-shadow:0 2px 12px #0002!important;
  border-radius:1px!important;
  overflow:hidden!important;
}
.receipt-print-body{
  width:100%!important;
  max-width:72mm!important;
  margin:0 auto!important;
  overflow:hidden!important;
}
.receipt-print-line{
  width:100%!important;
  min-height:1.55em!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  white-space:pre!important;
  overflow:hidden!important;
  font-family:"Courier New",Courier,monospace!important;
  font-size:9px!important;
  line-height:1.55!important;
  font-weight:400!important;
  text-align:left!important;
  font-variant-ligatures:none!important;
  box-sizing:border-box!important;
}
.receipt-print-header,
.receipt-print-customer,
.receipt-print-total{
  font-weight:700!important;
}
.receipt-preview{
  display:flex!important;
  justify-content:center!important;
  align-items:flex-start!important;
  padding:14px 8px!important;
  overflow-x:auto!important;
  background:#eef1f3!important;
}
@media(max-width:520px){
  .receipt-preview{padding:10px 4px!important}
  .receipt-bluetooth-preview{
    width:80mm!important;
    min-width:80mm!important;
    max-width:80mm!important;
    padding:4mm 4mm 6mm!important;
    font-size:9px!important;
  }
  .receipt-print-line{font-size:9px!important}
}

/* =========================================================
   BLUETOOTH THERMAL PREVIEW - 80MM / 48 COLUMN
   Preview uses the exact receiptLines48() strings sent by Bluetooth.
   It is DOM text (not canvas) so it remains visible and readable on mobile.
   ========================================================= */
.receipt-thermal-stage{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
  overflow:hidden;
}
.receipt-thermal-meta{
  width:100%;
  text-align:center;
  font-size:10px;
  color:#69737c;
  font-weight:700;
}
.receipt-thermal-paper{
  width:80mm;
  max-width:100%;
  box-sizing:border-box;
  background:#fff;
  padding:5mm 4mm 7mm;
  margin:0 auto;
  box-shadow:0 2px 10px rgba(0,0,0,.16);
  overflow:hidden;
}
.receipt-thermal-printable{
  width:72mm;
  max-width:100%;
  margin:0 auto;
  box-sizing:border-box;
  font-family:"Courier New",Courier,monospace;
  font-size:10px;
  line-height:1.72;
  color:#111;
  font-weight:400;
  letter-spacing:0;
  font-variant-ligatures:none;
}
.receipt-preview-line{
  width:100%;
  min-height:17px;
  margin:0;
  padding:0;
  white-space:pre;
  overflow:hidden;
  box-sizing:border-box;
  text-align:left;
}
.receipt-preview-header,
.receipt-preview-customer,
.receipt-preview-total{
  font-weight:700;
}
@media(max-width:520px){
  .receipt-thermal-stage{
    width:100%;
  }
  .receipt-thermal-paper{
    width:80mm;
    max-width:calc(100vw - 58px);
    padding:5mm 4mm 7mm;
  }
  .receipt-thermal-printable{
    width:72mm;
    max-width:100%;
    font-size:10px;
    line-height:1.72;
  }
  .receipt-preview-line{
    min-height:17px;
  }
}



/* =========================================================
   KASIRGO FINAL - BLUETOOTH 80MM RECEIPT
   Preview = exact 48-column text sent by sendReceiptBluetooth().
   IMPORTANT: CSS does not control the physical Bluetooth printer;
   the ESC/POS formatting is controlled by app.js.
   ========================================================= */
.receipt-thermal-stage{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  overflow-x:auto;
  overflow-y:visible;
}
.receipt-thermal-meta{
  width:100%;
  text-align:center;
  font:700 10px/1.3 Arial,sans-serif;
  color:#66717a;
}
.receipt-thermal-paper{
  width:80mm!important;
  min-width:80mm!important;
  max-width:80mm!important;
  box-sizing:border-box;
  margin:0 auto;
  padding:4mm 4mm 6mm;
  background:#fff;
  color:#111;
  overflow:hidden;
  box-shadow:0 2px 10px rgba(0,0,0,.16);
}
.receipt-thermal-printable{
  width:72mm!important;
  min-width:72mm!important;
  max-width:72mm!important;
  margin:0 auto;
  box-sizing:border-box;
  font-family:"Courier New",Courier,monospace!important;
  font-size:10px!important;
  line-height:1.62!important;
  font-weight:400;
  letter-spacing:0!important;
  font-variant-ligatures:none;
  color:#111;
}
.receipt-preview-line{
  width:100%;
  min-height:16px;
  margin:0;
  padding:0;
  box-sizing:border-box;
  white-space:pre!important;
  overflow:hidden;
  text-align:left;
  font-family:"Courier New",Courier,monospace!important;
  font-size:10px!important;
  line-height:1.62!important;
  letter-spacing:0!important;
  font-variant-ligatures:none;
}
.receipt-preview-header,
.receipt-preview-customer,
.receipt-preview-total,
.receipt-preview-item-name{
  font-weight:700!important;
}
@media(max-width:520px){
  .receipt-thermal-stage{align-items:flex-start;padding:0 2px;}
  .receipt-thermal-paper{
    width:80mm!important;
    min-width:80mm!important;
    max-width:80mm!important;
    padding:4mm 4mm 6mm;
    margin-left:auto;
    margin-right:auto;
  }
  .receipt-thermal-printable{
    width:72mm!important;
    min-width:72mm!important;
    max-width:72mm!important;
    font-size:10px!important;
  }
  .receipt-preview-line{font-size:10px!important;line-height:1.62!important;}
}

/* =========================================================
   FINAL 80MM RECEIPT RASTER PREVIEW
   Preview is the same 576-dot raster used by Bluetooth ESC/POS.
   ========================================================= */
.receipt-thermal-stage{width:100%!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:8px!important;overflow-x:auto!important;overflow-y:visible!important}
.receipt-thermal-meta{width:100%!important;text-align:center!important;font:700 10px/1.3 Arial,sans-serif!important;color:#66717a!important}
.receipt-thermal-paper{width:80mm!important;min-width:80mm!important;max-width:80mm!important;box-sizing:border-box!important;margin:0 auto!important;padding:4mm 4mm 6mm!important;background:#fff!important;color:#111!important;overflow:hidden!important;box-shadow:0 2px 10px rgba(0,0,0,.16)!important;border-radius:2px!important}
.receipt-raster-preview{display:block!important;width:72mm!important;max-width:none!important;height:auto!important;margin:0 auto!important;background:#fff!important;image-rendering:auto!important}
@media(max-width:520px){
 .receipt-thermal-paper{width:80mm!important;min-width:80mm!important;max-width:80mm!important;padding:4mm 4mm 6mm!important}
 .receipt-raster-preview{width:72mm!important;max-width:none!important}
}

/* FINAL RECEIPT PREVIEW SAFETY FIX: never crop the 576-dot raster. */
.receipt-thermal-stage{overflow-x:auto!important;overflow-y:visible!important;box-sizing:border-box!important}
.receipt-thermal-paper{overflow:visible!important;box-sizing:border-box!important}
.receipt-raster-preview{display:block!important;width:72mm!important;max-width:none!important;height:auto!important;margin:0 auto!important;object-fit:contain!important}
@media(max-width:520px){
  .receipt-preview{overflow-x:auto!important;overflow-y:auto!important}
  .receipt-thermal-paper{width:80mm!important;min-width:80mm!important;max-width:none!important}
  .receipt-raster-preview{width:72mm!important;max-width:none!important}
}

/* =========================================================
   KASIRGO VIRTUAL THERMAL PRINTER 80MM
   The paper image is the exact receiptCanvas() raster used by Bluetooth.
   ========================================================= */
.virtual-printer-btn{border-color:#c62828!important;color:#b71c1c!important;background:#fff!important}
.virtual-printer-overlay{position:fixed;inset:0;z-index:10080;background:rgba(0,0,0,.72);display:none;align-items:center;justify-content:center;padding:12px;box-sizing:border-box;overflow:auto}
.virtual-printer-overlay.show{display:flex}
.virtual-printer-dialog{width:min(760px,100%);max-height:96vh;background:#f4f6f8;border-radius:18px;box-shadow:0 18px 60px rgba(0,0,0,.35);display:flex;flex-direction:column;overflow:hidden}
.virtual-printer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;background:#fff;border-bottom:1px solid #ddd}
.virtual-printer-head b{display:block;font-size:18px}.virtual-printer-head small{display:block;margin-top:3px;color:#69737b;font-size:11px}
.virtual-printer-status{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;padding:8px 10px;background:#20252a;color:#fff;font:700 10px/1.2 Arial,sans-serif;letter-spacing:.2px}
.virtual-printer-status span:first-child{color:#73e28b}
.virtual-printer-output{overflow:auto;padding:18px 10px 24px;min-height:220px}
.virtual-printer-machine{width:100%;display:flex;flex-direction:column;align-items:center}
.virtual-slot{width:min(620px,96%);box-sizing:border-box;background:#30353a;color:#cfd5d9;border-radius:12px 12px 3px 3px;padding:9px;text-align:center;font:700 10px/1 Arial,sans-serif;letter-spacing:1px;box-shadow:inset 0 -3px 0 rgba(0,0,0,.35)}
.virtual-paper-wrap{width:min(620px,96%);box-sizing:border-box;background:#dfe3e6;padding:0 8px 0;display:flex;justify-content:center}
.virtual-printer-paper{display:block;width:576px;max-width:100%;height:auto;background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.18);image-rendering:auto}
.virtual-paper-end{width:min(620px,96%);height:28px;background:linear-gradient(135deg,#fff 7px,transparent 7px) 0 0/14px 14px repeat-x,linear-gradient(45deg,#fff 7px,transparent 7px) 7px 0/14px 14px repeat-x;filter:drop-shadow(0 2px 2px rgba(0,0,0,.08))}
.virtual-printer-actions{display:flex;gap:8px;flex-wrap:wrap;padding:12px 14px;background:#fff;border-top:1px solid #ddd}
.virtual-printer-actions .btn{flex:1;min-width:130px}
@media(max-width:520px){
 .virtual-printer-overlay{padding:0}
 .virtual-printer-dialog{width:100%;height:100%;max-height:none;border-radius:0}
 .virtual-printer-output{padding:12px 4px 20px}
 .virtual-slot,.virtual-paper-wrap,.virtual-paper-end{width:100%}
 .virtual-paper-wrap{padding:0 3px}
 .virtual-printer-paper{width:576px;max-width:none}
 .virtual-printer-actions{padding-bottom:calc(12px + env(safe-area-inset-bottom))}
}

/* FINAL FIX: Virtual Printer must fit the mobile viewport.
   The raster itself remains 576 dots wide; only its on-screen display is scaled.
   Never use min-width/max-width:none here because that causes the paper to be
   wider than the phone and makes the left/right content appear cut off. */
.virtual-printer-output{box-sizing:border-box;width:100%;overflow-x:hidden!important;overflow-y:auto!important;}
.virtual-printer-machine{box-sizing:border-box;width:100%;max-width:100%;overflow:hidden;}
.virtual-paper-wrap{box-sizing:border-box;width:100%;max-width:100%;display:flex;justify-content:center;overflow:hidden;background:#fff;}
.virtual-printer-paper{display:block;width:576px;max-width:100%!important;min-width:0!important;height:auto;box-sizing:border-box;object-fit:contain;}
@media (max-width:600px){
  .virtual-printer-output{padding:10px 6px 18px!important;}
  .virtual-paper-wrap{width:100%;}
  .virtual-printer-paper{width:100%!important;max-width:576px!important;}
}


/* Receipt item layout v2: product name wraps first; qty x unit price is centered; subtotal is right-aligned. */
.receipt-raster-preview{image-rendering:auto;}
.virtual-printer-paper{image-rendering:auto;}

/* Virtual printer controls: compact icon button between Bluetooth and WhatsApp. */
.receipt-actions .virtual-printer-icon-btn{
  flex:0 0 48px!important; width:48px!important; min-width:48px!important; padding:0!important;
  display:inline-grid!important; place-items:center!important; font-size:23px!important;
  line-height:1!important; border-radius:12px!important;
}
.virtual-mode-picker{max-width:460px;margin:30px auto;padding:24px;text-align:center;background:#fff;border-radius:18px;box-shadow:0 8px 30px rgba(0,0,0,.08)}
.virtual-mode-title{font-size:21px;font-weight:800;color:#20252a}.virtual-mode-subtitle{margin-top:6px;color:#6b737a;font-size:13px}
.virtual-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}
.virtual-mode-card{border:2px solid #ddd;background:#fff;border-radius:15px;padding:18px 12px;cursor:pointer;text-align:center}
.virtual-mode-card strong{display:block;font-size:22px}.virtual-mode-card span{display:block;margin-top:5px;font-size:12px;color:#69737b}
.virtual-mode-card.active{border-color:#c62828;background:#fff7f7;box-shadow:0 0 0 2px #c6282822}
.virtual-paper-58 .virtual-printer-paper{max-width:384px!important}
@media(max-width:520px){.receipt-actions .virtual-printer-icon-btn{flex:0 0 44px!important;width:44px!important;min-width:44px!important;height:44px!important}.virtual-mode-grid{grid-template-columns:1fr 1fr}.virtual-mode-picker{margin:20px 10px;padding:20px 14px}}

/* Receipt actions: Bluetooth | Virtual icon | WhatsApp. Keep the virtual icon in the middle. */
.receipt-actions{grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr)!important;align-items:stretch}
.receipt-actions .virtual-printer-icon-btn{grid-column:2!important;grid-row:1!important}
.receipt-actions .virtual-printer-icon-btn + .btn{grid-column:3!important;grid-row:1!important}
.receipt-actions .btn:last-child{grid-column:1/-1!important;grid-row:2!important}
@media(max-width:520px){.receipt-actions{grid-template-columns:minmax(0,1fr) 44px minmax(0,1fr)!important}.receipt-actions .virtual-printer-icon-btn{grid-column:2!important}.receipt-actions .virtual-printer-icon-btn + .btn{grid-column:3!important}}


/* =========================================================
   KASIRGO - LAYOUT LIST PRODUK TRANSAKSI BARU
   Hanya mengubah susunan/posisi elemen. Warna & fungsi tetap.
   ========================================================= */
#page-kasir .product-grid.view-list .product-card{
  position:relative;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(145px,190px) !important;
  grid-template-rows:auto auto auto 1fr !important;
  align-items:start;
  column-gap:14px;
  row-gap:5px;
  min-height:178px;
  padding:15px 14px !important;
  overflow:hidden;
}

#page-kasir .product-grid.view-list .product-card-top{
  grid-column:1;
  grid-row:1;
  display:block;
  min-width:0;
  padding-right:4px;
}

#page-kasir .product-grid.view-list .product-card-top .product-name{
  display:block;
  font-size:16px;
  line-height:1.25;
  white-space:normal !important;
  overflow:visible;
  text-overflow:clip;
}

#page-kasir .product-grid.view-list .product-info-line{
  grid-column:1;
  grid-row:2;
  display:block;
  min-width:0;
  margin-top:1px;
}

#page-kasir .product-grid.view-list .product-info-line small{
  display:none;
}

#page-kasir .product-grid.view-list .product-info-line .stock-badge{
  display:inline-flex;
  margin:0;
}

#page-kasir .product-grid.view-list .product-card > strong{
  grid-column:1;
  grid-row:3;
  justify-self:start;
  align-self:start;
  margin-top:2px;
  font-size:18px;
  line-height:1.2;
}

#page-kasir .product-grid.view-list .product-edit-btn{
  grid-column:1;
  grid-row:4;
  align-self:end;
  justify-self:start;
  width:30px;
  height:34px;
  margin:8px 0 0;
  padding:0 !important;
  border:0;
  background:transparent;
  box-shadow:none;
  font-size:0 !important;
  line-height:1;
  display:grid;
  place-items:center;
}

#page-kasir .product-grid.view-list .product-edit-btn::after{
  content:"⋮";
  font-size:29px;
  font-weight:900;
  line-height:1;
}

#page-kasir .product-grid.view-list .product-qty{
  grid-column:2;
  grid-row:4;
  align-self:end;
  justify-self:end;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  width:100%;
  margin:8px 0 0;
  padding:0;
}

#page-kasir .product-grid.view-list .product-qty button{
  width:74px;
  height:52px;
  border-radius:10px;
}

#page-kasir .product-grid.view-list .product-qty input{
  width:42px !important;
  height:42px;
  padding:3px !important;
  border:0 !important;
  background:transparent;
  box-shadow:none !important;
  font-size:16px;
  font-weight:800;
}

/* Sisakan area kanan atas seperti contoh, tanpa mengubah data/fungsi. */
#page-kasir .product-grid.view-list .product-card::before{
  content:"";
  grid-column:2;
  grid-row:1 / span 3;
  width:100%;
  min-height:96px;
  visibility:hidden;
}

@media(max-width:650px){
  #page-kasir .product-grid.view-list .product-card{
    grid-template-columns:minmax(0,1fr) minmax(132px,42%) !important;
    min-height:190px;
    padding:14px 12px !important;
    column-gap:10px;
    row-gap:5px;
  }

  #page-kasir .product-grid.view-list .product-card-top .product-name{
    font-size:16px;
    line-height:1.25;
  }

  #page-kasir .product-grid.view-list .product-card > strong{
    font-size:18px;
  }

  #page-kasir .product-grid.view-list .product-edit-btn{
    width:28px;
    height:32px;
  }

  #page-kasir .product-grid.view-list .product-qty{
    gap:7px;
  }

  #page-kasir .product-grid.view-list .product-qty button{
    width:62px;
    height:48px;
  }

  #page-kasir .product-grid.view-list .product-qty input{
    width:34px !important;
    font-size:15px;
  }

  #page-kasir .product-grid.view-list .product-card::before{
    min-height:92px;
  }
}



/* =========================================================
   POS LIST - ICON PENCIL + LAYOUT LEBIH PENDEK
   Hanya mengubah tata letak/ukuran, warna tetap mengikuti style sebelumnya.
   ========================================================= */
#page-kasir .product-grid.view-list .product-card{
  min-height:138px !important;
  padding:11px 12px !important;
  row-gap:3px !important;
}
#page-kasir .product-grid.view-list .product-edit-btn{
  width:30px !important;
  height:28px !important;
  margin:3px 0 0 !important;
  padding:0 !important;
  font-size:0 !important;
}
#page-kasir .product-grid.view-list .product-edit-btn::after{
  content:"✎" !important;
  font-size:21px !important;
  font-weight:700 !important;
  line-height:1 !important;
}
#page-kasir .product-grid.view-list .product-qty{
  margin:3px 0 0 !important;
}
#page-kasir .product-grid.view-list .product-qty button{
  width:64px !important;
  height:44px !important;
}
#page-kasir .product-grid.view-list .product-card::before{
  min-height:68px !important;
}

@media(max-width:650px){
  #page-kasir .product-grid.view-list .product-card{
    min-height:145px !important;
    padding:10px 10px !important;
    column-gap:8px !important;
    row-gap:3px !important;
  }
  #page-kasir .product-grid.view-list .product-edit-btn{
    width:28px !important;
    height:27px !important;
    margin-top:2px !important;
  }
  #page-kasir .product-grid.view-list .product-edit-btn::after{
    font-size:20px !important;
  }
  #page-kasir .product-grid.view-list .product-qty button{
    width:58px !important;
    height:42px !important;
  }
  #page-kasir .product-grid.view-list .product-card::before{
    min-height:68px !important;
  }
}

/* =========================================================
   POS LIST - SUPER COMPACT (TINGGI ± SETENGAH)
   Edit/pencil tepat di bawah harga. Warna dan fungsi tetap.
   ========================================================= */
#page-kasir .product-grid.view-list .product-card{
  grid-template-columns:minmax(0,1fr) auto !important;
  grid-template-rows:auto !important;
  min-height:0 !important;
  height:auto !important;
  padding:7px 10px !important;
  column-gap:10px !important;
  row-gap:0 !important;
  align-items:center !important;
}

#page-kasir .product-grid.view-list .product-card::before{
  display:none !important;
  content:none !important;
}

#page-kasir .product-grid.view-list .product-card-top{
  grid-column:1 !important;
  grid-row:1 !important;
  padding:0 !important;
  margin:0 !important;
}

#page-kasir .product-grid.view-list .product-card-top .product-name{
  font-size:14px !important;
  line-height:1.15 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

#page-kasir .product-grid.view-list .product-info-line{
  grid-column:1 !important;
  grid-row:1 !important;
  margin:17px 0 0 !important;
  min-width:0 !important;
  position:relative !important;
  pointer-events:none !important;
}

#page-kasir .product-grid.view-list .product-info-line .stock-badge{
  font-size:9px !important;
  padding:2px 5px !important;
  min-width:0 !important;
}

#page-kasir .product-grid.view-list .product-card > strong{
  grid-column:1 !important;
  grid-row:1 !important;
  justify-self:start !important;
  align-self:start !important;
  margin:34px 0 0 !important;
  font-size:14px !important;
  line-height:1 !important;
}

#page-kasir .product-grid.view-list .product-edit-btn{
  grid-column:1 !important;
  grid-row:1 !important;
  justify-self:start !important;
  align-self:start !important;
  width:22px !important;
  height:18px !important;
  margin:50px 0 0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  display:grid !important;
  place-items:center !important;
}

#page-kasir .product-grid.view-list .product-edit-btn::after{
  content:"✎" !important;
  font-size:16px !important;
  font-weight:700 !important;
  line-height:1 !important;
}

#page-kasir .product-grid.view-list .product-qty{
  grid-column:2 !important;
  grid-row:1 !important;
  align-self:center !important;
  justify-self:end !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  gap:4px !important;
}

#page-kasir .product-grid.view-list .product-qty button{
  width:42px !important;
  height:34px !important;
  border-radius:7px !important;
  font-size:18px !important;
}

#page-kasir .product-grid.view-list .product-qty input{
  width:30px !important;
  height:30px !important;
  padding:2px !important;
  font-size:13px !important;
}

@media(max-width:650px){
  #page-kasir .product-grid.view-list .product-card{
    padding:6px 8px !important;
    column-gap:7px !important;
  }
  #page-kasir .product-grid.view-list .product-card-top .product-name{
    font-size:13px !important;
  }
  #page-kasir .product-grid.view-list .product-info-line{
    margin-top:16px !important;
  }
  #page-kasir .product-grid.view-list .product-card > strong{
    margin-top:32px !important;
    font-size:13px !important;
  }
  #page-kasir .product-grid.view-list .product-edit-btn{
    margin-top:47px !important;
    width:20px !important;
    height:17px !important;
  }
  #page-kasir .product-grid.view-list .product-edit-btn::after{
    font-size:15px !important;
  }
  #page-kasir .product-grid.view-list .product-qty button{
    width:39px !important;
    height:32px !important;
  }
  #page-kasir .product-grid.view-list .product-qty input{
    width:27px !important;
    height:28px !important;
    font-size:12px !important;
  }
}

/* ===== POS LIST: rapikan jarak stok-harga + pensil di bawah harga ===== */
#page-kasir .product-grid.view-list .product-card{
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:2px 10px;
  padding:8px 10px;
}
#page-kasir .product-grid.view-list .product-card-top{
  grid-column:1;
  grid-row:1;
  min-width:0;
}
#page-kasir .product-grid.view-list .product-info-line{
  grid-column:1;
  grid-row:2;
  min-width:0;
  justify-content:flex-start;
  gap:6px;
  margin-top:2px;
  line-height:1.2;
}
#page-kasir .product-grid.view-list .product-info-line small{
  line-height:1.2;
}
#page-kasir .product-grid.view-list .product-card strong{
  grid-column:1;
  grid-row:3;
  justify-self:start;
  margin-top:3px;
  line-height:1.2;
}
#page-kasir .product-grid.view-list .product-edit-btn{
  grid-column:1;
  grid-row:4;
  justify-self:start;
  width:27px;
  height:22px;
  padding:0;
  margin-top:2px;
  display:grid;
  place-items:center;
  font-size:13px;
  line-height:1;
}
#page-kasir .product-grid.view-list .product-qty{
  grid-column:2;
  grid-row:1 / span 4;
  margin:0;
  justify-content:flex-end;
  align-self:end;
}
@media(max-width:650px){
  #page-kasir .product-grid.view-list .product-card{
    min-height:0;
    padding:7px 9px;
    gap:2px 8px;
  }
  #page-kasir .product-grid.view-list .product-name{
    font-size:14px;
    line-height:1.2;
  }
  #page-kasir .product-grid.view-list .product-info-line{
    margin-top:2px;
    gap:5px;
  }
  #page-kasir .product-grid.view-list .product-info-line small,
  #page-kasir .product-grid.view-list .product-info-line .stock-badge{
    font-size:11px;
  }
  #page-kasir .product-grid.view-list .product-card strong{
    font-size:13px;
    margin-top:4px;
  }
  #page-kasir .product-grid.view-list .product-edit-btn{
    width:25px;
    height:21px;
    font-size:12px;
  }
}

/* ===== POS LIST: jarak stok & harga lebih terbaca, tetap compact ===== */
#page-kasir .product-grid.view-list .product-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto auto auto;
  column-gap:12px;
  row-gap:0;
  min-height:0;
  padding:9px 11px;
  align-items:center;
}
#page-kasir .product-grid.view-list .product-card-top{
  grid-column:1;
  grid-row:1;
  min-width:0;
}
#page-kasir .product-grid.view-list .product-info-line{
  grid-column:1;
  grid-row:2;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  margin-top:4px;
  line-height:1.15;
}
#page-kasir .product-grid.view-list .product-info-line small{
  line-height:1.15;
}
#page-kasir .product-grid.view-list .product-card strong{
  grid-column:1;
  grid-row:3;
  justify-self:start;
  margin-top:7px;
  line-height:1.15;
  font-size:13px;
}
#page-kasir .product-grid.view-list .product-edit-btn{
  grid-column:1;
  grid-row:4;
  justify-self:start;
  margin-top:5px;
  padding:2px 5px;
  font-size:12px;
  line-height:1;
  min-width:0;
  height:22px;
}
#page-kasir .product-grid.view-list .product-qty{
  grid-column:2;
  grid-row:1 / span 4;
  align-self:end;
  margin:0 0 1px 0;
  justify-content:flex-end;
}
@media(max-width:650px){
  #page-kasir .product-grid.view-list .product-card{
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-rows:auto auto auto auto;
    column-gap:9px;
    padding:8px 9px;
  }
  #page-kasir .product-grid.view-list .product-info-line{
    margin-top:4px;
  }
  #page-kasir .product-grid.view-list .product-card strong{
    margin-top:7px;
  }
  #page-kasir .product-grid.view-list .product-edit-btn{
    margin-top:5px;
    height:21px;
    padding:2px 5px;
  }
  #page-kasir .product-grid.view-list .product-qty{
    grid-row:1 / span 4;
    align-self:end;
  }
}

/* FINAL FIX: POS product list - stock and price must never overlap */
#page-kasir .product-grid.view-list .product-card{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  grid-template-rows:22px 24px 24px 20px !important;
  column-gap:10px !important;
  row-gap:2px !important;
  min-height:0 !important;
  height:98px !important;
  box-sizing:border-box !important;
  padding:7px 9px !important;
  align-items:center !important;
  overflow:hidden !important;
}
#page-kasir .product-grid.view-list .product-card-top{
  grid-column:1 !important;
  grid-row:1 !important;
  min-width:0 !important;
  height:22px !important;
  display:flex !important;
  align-items:center !important;
  overflow:hidden !important;
}
#page-kasir .product-grid.view-list .product-card-top .product-name{
  display:block !important;
  width:100% !important;
  font-size:14px !important;
  line-height:20px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#page-kasir .product-grid.view-list .product-info-line{
  grid-column:1 !important;
  grid-row:2 !important;
  min-width:0 !important;
  height:24px !important;
  margin:0 !important;
  padding:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
}
#page-kasir .product-grid.view-list .product-info-line small{display:none !important;}
#page-kasir .product-grid.view-list .product-info-line .stock-badge{
  display:inline-flex !important;
  align-items:center !important;
  height:20px !important;
  box-sizing:border-box !important;
  margin:0 !important;
  font-size:10px !important;
  line-height:18px !important;
  padding:1px 6px !important;
}
#page-kasir .product-grid.view-list .product-card > strong{
  grid-column:1 !important;
  grid-row:3 !important;
  justify-self:start !important;
  align-self:center !important;
  display:block !important;
  height:24px !important;
  margin:0 !important;
  padding:0 !important;
  font-size:14px !important;
  line-height:24px !important;
  white-space:nowrap !important;
}
#page-kasir .product-grid.view-list .product-edit-btn{
  grid-column:1 !important;
  grid-row:4 !important;
  justify-self:start !important;
  align-self:center !important;
  width:22px !important;
  height:20px !important;
  min-width:22px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  display:grid !important;
  place-items:center !important;
  font-size:0 !important;
  line-height:1 !important;
}
#page-kasir .product-grid.view-list .product-edit-btn::after{
  content:"✎" !important;
  font-size:15px !important;
  line-height:20px !important;
}
#page-kasir .product-grid.view-list .product-qty{
  grid-column:2 !important;
  grid-row:1 / 5 !important;
  align-self:center !important;
  justify-self:end !important;
  width:auto !important;
  margin:0 !important;
  padding:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:3px !important;
}
#page-kasir .product-grid.view-list .product-qty button{
  width:34px !important;
  height:30px !important;
  min-width:34px !important;
  padding:0 !important;
  border-radius:6px !important;
  font-size:17px !important;
}
#page-kasir .product-grid.view-list .product-qty input{
  width:27px !important;
  height:28px !important;
  min-width:27px !important;
  padding:1px !important;
  font-size:12px !important;
  box-sizing:border-box !important;
}
@media(max-width:650px){
  #page-kasir .product-grid.view-list .product-card{
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-rows:21px 23px 23px 19px !important;
    height:92px !important;
    padding:6px 8px !important;
    column-gap:8px !important;
    row-gap:1px !important;
  }
  #page-kasir .product-grid.view-list .product-card-top,
  #page-kasir .product-grid.view-list .product-card-top .product-name{height:21px !important;}
  #page-kasir .product-grid.view-list .product-card-top .product-name{font-size:13px !important;line-height:19px !important;}
  #page-kasir .product-grid.view-list .product-info-line{height:23px !important;}
  #page-kasir .product-grid.view-list .product-info-line .stock-badge{height:19px !important;font-size:10px !important;}
  #page-kasir .product-grid.view-list .product-card > strong{height:23px !important;font-size:13px !important;line-height:23px !important;}
  #page-kasir .product-grid.view-list .product-edit-btn{height:19px !important;min-width:20px !important;width:20px !important;}
  #page-kasir .product-grid.view-list .product-edit-btn::after{font-size:14px !important;line-height:19px !important;}
  #page-kasir .product-grid.view-list .product-qty button{width:31px !important;min-width:31px !important;height:28px !important;font-size:16px !important;}
  #page-kasir .product-grid.view-list .product-qty input{width:25px !important;min-width:25px !important;height:26px !important;font-size:12px !important;}
}

/* ===== HALAMAN PRODUK - KARTU RINGKAS & MUDAH DIBACA =====
   Tampilan saja: tidak mengubah fungsi, event, data, atau proses produk. */
@media (max-width:650px){
  #page-produk .products-compact tbody{gap:5px}
  #page-produk .products-compact tbody tr{
    position:relative;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:0 14px;
    padding:7px 10px 6px;
    border-radius:9px;
    box-shadow:0 1px 3px rgba(0,0,0,.06);
  }

  /* Nama produk: paling menonjol seperti contoh */
  #page-produk .products-compact tbody td:nth-child(1){
    position:relative;
    grid-column:1 / -1;
    display:block;
    min-height:29px;
    padding:0 0 5px;
    margin-bottom:1px;
    border-bottom:1px solid #edf0f2;
    text-align:left;
  }
  #page-produk .product-name-cell{padding-right:92px;min-width:0}
  #page-produk .product-name-cell b{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    font-size:17px;
    line-height:1.12;
    font-weight:800;
    letter-spacing:-.15px;
    white-space:normal;
  }
  #page-produk .product-name-cell small{
    position:absolute;
    right:0;
    top:2px;
    max-width:88px;
    margin:0;
    font-size:9px;
    line-height:1.15;
    color:#777f87;
    text-align:right;
    white-space:normal;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  /* Informasi sekunder dibuat kecil dan rapat */
  #page-produk .products-compact tbody td:nth-child(n+2):nth-child(-n+6){
    min-height:24px;
    padding:2px 0;
    border:0;
    font-size:11px;
    line-height:1.15;
  }
  #page-produk .products-compact tbody td:nth-child(n+2):nth-child(-n+6)::before{
    font-size:9px;
    line-height:1;
    color:#7b858e;
  }
  #page-produk .products-compact tbody td:nth-child(2)::before{content:"Beli"}
  #page-produk .products-compact tbody td:nth-child(3)::before{content:"Jual"}
  #page-produk .products-compact tbody td:nth-child(4)::before{content:"Laba"}
  #page-produk .products-compact tbody td:nth-child(5)::before{content:"Stok"}
  #page-produk .products-compact tbody td:nth-child(6)::before{content:"Terjual"}

  #page-produk .product-profit,
  #page-produk .product-stock-badge,
  #page-produk .sold-badge{
    font-size:11px;
    font-weight:800;
  }
  #page-produk .sold-badge{padding:2px 6px;min-width:25px}

  /* Baris tombol dibuat pendek */
  #page-produk .products-compact tbody td:nth-child(7){
    grid-column:1 / -1;
    min-height:31px;
    padding:4px 0 0;
    margin-top:2px;
    border-top:1px solid #edf0f2;
    justify-content:flex-end;
  }
  #page-produk .products-compact tbody td:nth-child(7)::before{
    content:"Aksi";
    margin-right:auto;
    font-size:9px;
    color:#7b858e;
  }
  #page-produk .product-icon-actions{gap:4px}
  #page-produk .icon-action{
    width:27px;
    height:27px;
    border-radius:7px;
    font-size:14px;
  }

  /* Dark mode tetap mengikuti kartu produk */
  body.night-mode #page-produk .products-compact tbody tr,
  body.night-mode #page-produk .products-compact tbody td:nth-child(1){
    border-color:#303944;
  }
  body.night-mode #page-produk .product-name-cell small,
  body.night-mode #page-produk .products-compact tbody td:nth-child(n+2):nth-child(-n+6)::before,
  body.night-mode #page-produk .products-compact tbody td:nth-child(7)::before{
    color:#9da8b3;
  }
}


/* ===== HALAMAN PRODUK: kartu compact, label jelas, mobile tidak menempel ===== */
#page-produk .product-page-list{display:flex;flex-direction:column;gap:7px;margin-top:2px}
#page-produk .product-list-card{position:relative;background:#fff;border:1px solid #e1e5e8;border-radius:9px;padding:9px 10px 8px;box-shadow:0 1px 4px #00000008;min-width:0}
#page-produk .product-list-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-width:0;margin-bottom:7px;padding-bottom:6px;border-bottom:1px solid #edf0f2}
#page-produk .product-list-title{min-width:0;flex:1}
#page-produk .product-list-title b{display:block;font-size:17px;line-height:1.15;font-weight:800;color:#20252b;white-space:normal;overflow-wrap:anywhere}
#page-produk .product-list-title small{display:block;margin-top:3px;font-size:10px;line-height:1.15;color:#747d86;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#page-produk .product-list-supplier{flex:0 1 150px;text-align:right;font-size:9px;color:#858d95;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:2px}
#page-produk .product-list-data{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
#page-produk .product-list-field{min-width:0;padding:0 10px;border-left:1px solid #e7eaed;display:flex;flex-direction:column;justify-content:center;gap:2px}
#page-produk .product-list-field:first-child{padding-left:0;border-left:0}
#page-produk .product-list-field span{font-size:9px;line-height:1;color:#7b848d;font-weight:700}
#page-produk .product-list-field b{font-size:12px;line-height:1.15;color:#222;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#page-produk .product-list-field.sell-field{padding-left:14px}
#page-produk .product-list-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin-top:6px;padding-top:5px;border-top:1px solid #f0f2f3}
#page-produk .product-list-actions .icon-action{width:27px;height:27px;border-radius:7px;font-size:13px}
#page-produk .product-profit.profit-positive{color:#16823a}
#page-produk .product-profit.profit-negative{color:#c7191f}
#page-produk .product-profit.profit-zero{color:#555}
@media(max-width:650px){
  #page-produk .product-page-list{gap:6px}
  #page-produk .product-list-card{padding:8px 9px 7px;border-radius:8px}
  #page-produk .product-list-head{gap:7px;margin-bottom:6px;padding-bottom:5px}
  #page-produk .product-list-title b{font-size:15px;line-height:1.18}
  #page-produk .product-list-title small{font-size:9px;margin-top:2px}
  #page-produk .product-list-supplier{display:none}
  #page-produk .product-list-data{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:6px}
  #page-produk .product-list-field{padding:0 8px;border-left:1px solid #e5e8eb;min-height:27px}
  #page-produk .product-list-field:nth-child(3n+1){padding-left:0;border-left:0}
  #page-produk .product-list-field:nth-child(n+4){border-top:1px solid #f0f2f3;padding-top:5px}
  #page-produk .product-list-field.sell-field{padding-left:8px}
  #page-produk .product-list-field span{font-size:8px;line-height:1.1}
  #page-produk .product-list-field b{font-size:11px}
  #page-produk .product-list-actions{margin-top:5px;padding-top:4px}
  #page-produk .product-list-actions .icon-action{width:25px;height:25px;font-size:12px}
}
@media(max-width:380px){
  #page-produk .product-list-title b{font-size:14px}
  #page-produk .product-list-data{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:5px}
  #page-produk .product-list-field:nth-child(3n+1){padding-left:8px;border-left:1px solid #e5e8eb}
  #page-produk .product-list-field:nth-child(2n+1){padding-left:0;border-left:0}
  #page-produk .product-list-field:nth-child(n+3){border-top:1px solid #f0f2f3;padding-top:5px}
  #page-produk .product-list-field.sell-field{padding-left:8px}
}
body.night-mode #page-produk .product-list-card{background:#171c21;border-color:#303944;box-shadow:none}
body.night-mode #page-produk .product-list-head{border-color:#303944}
body.night-mode #page-produk .product-list-title b,
body.night-mode #page-produk .product-list-field b{color:#edf2f7}
body.night-mode #page-produk .product-list-title small,
body.night-mode #page-produk .product-list-field span,
body.night-mode #page-produk .product-list-supplier{color:#aeb7c0}
body.night-mode #page-produk .product-list-field{border-color:#303944}
body.night-mode #page-produk .product-list-actions{border-color:#303944}
body.night-mode #page-produk .product-list-field:nth-child(n+4){border-top-color:#303944}
body.night-mode #page-produk .product-list-actions .icon-action{background:#20262d;border-color:#3a4550;color:#e5edf4}

/* Aksi aplikasi dipindahkan ke bawah omzet & jumlah transaksi di sidebar */
.side-quick-actions{
  display:grid;
  grid-template-columns:1.35fr .8fr .9fr;
  gap:6px;
  width:100%;
  margin-top:8px;
}
.side-action-btn{
  min-width:0;
  min-height:34px;
  padding:6px 7px;
  border:1px solid #ef3a40;
  border-radius:8px;
  background:rgba(0,0,0,.28);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  cursor:pointer;
  font:inherit;
  line-height:1;
  box-shadow:0 0 7px rgba(230,20,30,.08);
}
.side-action-btn span{font-size:15px;line-height:1;flex:0 0 auto}
.side-action-btn em{font-style:normal;font-size:8px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.side-action-btn:hover{background:#a90712;border-color:#ff4c54;transform:translateY(-1px)}
body.night-mode .side-action-btn{background:#0b0809;border-color:#e21b25;color:#fff}
body:not(.night-mode) .side-action-btn{background:#fff;border-color:#ef3038;color:#b70f18;box-shadow:0 2px 8px rgba(180,0,0,.08)}
body:not(.night-mode) .side-action-btn:hover{background:#fff0f1}
/* PWA install button tetap tersembunyi sampai browser mengizinkan instalasi */
.side-action-btn.pwa-install-btn{display:none}
.side-action-btn.pwa-install-btn.show{display:flex}
@media(max-width:650px){
  .side-quick-actions{grid-template-columns:1.45fr .75fr .85fr;gap:5px;margin-top:7px}
  .side-action-btn{min-height:32px;padding:5px 5px;border-radius:8px}
  .side-action-btn span{font-size:14px}
  .side-action-btn em{font-size:8px}
}


/* =========================================================
   KASIRGO FINAL COMPACT FIX
   - Download App selalu terlihat di bawah Omzet & Trx
   - Riwayat transaksi dibuat lebih ramping, minim area kosong
   - Day Mode menjadi mode standar
   ========================================================= */
.side-quick-actions{margin-top:7px!important;grid-template-columns:minmax(0,1.5fr) minmax(50px,.65fr) minmax(60px,.8fr)!important;gap:5px!important}
.side-action-btn{min-height:32px!important;height:32px!important;padding:4px 6px!important;border-radius:8px!important;box-shadow:none!important}
.side-action-btn span{font-size:14px!important}.side-action-btn em{font-size:8px!important}
/* Tombol download harus tetap ada; fungsi installPWA tetap sama */
.side-action-btn.pwa-install-btn,.side-action-btn.pwa-install-btn.show{display:flex!important}

/* RIWAYAT TRANSAKSI — compact */
.transaction-page-redesign .trx-topbar{padding:6px 12px!important;min-height:48px!important;gap:7px!important}
.transaction-page-redesign .trx-search-top{height:42px!important;padding:0 10px!important;border-radius:10px!important}
.transaction-page-redesign .trx-search-top input{font-size:13px!important}
.transaction-page-redesign .trx-search-top .btn{min-height:32px!important;height:32px!important;padding:5px 8px!important;font-size:11px!important}
.transaction-page-redesign .trx-menu-link,.transaction-page-redesign .trx-refresh-icon{font-size:23px!important;line-height:1!important}
.transaction-page-redesign .trx-main-tabs .trx-tab{padding:10px 5px!important;font-size:13px!important;min-height:40px!important}
.transaction-page-redesign .trx-period-row{padding:9px 12px!important;gap:8px!important}
.transaction-page-redesign .trx-select-wrap{height:44px!important;border-radius:11px!important}
.transaction-page-redesign .trx-select-wrap select,.transaction-page-redesign .trx-select-wrap input{font-size:12px!important}
.transaction-page-redesign .trx-summary{padding:10px 14px!important}
.transaction-page-redesign .trx-summary-grid{gap:8px 14px!important}
.transaction-page-redesign .trx-summary-grid span{font-size:11px!important;margin-bottom:2px!important}
.transaction-page-redesign .trx-summary-grid b{font-size:15px!important}
.transaction-page-redesign .trx-summary-actions{padding:5px 14px 7px!important}
.transaction-page-redesign .trx-export-btn{height:38px!important;border-radius:9px!important;font-size:12px!important;margin:2px 0!important}
.transaction-page-redesign .trx-offline-btn{width:calc(100% + 28px)!important;margin:7px -14px 0!important;padding:9px 14px!important;font-size:12px!important;border-top-width:1px!important}
.transaction-page-redesign .trx-offline-btn span{font-size:17px!important}.transaction-page-redesign .trx-offline-btn b{font-size:25px!important}
.transaction-page-redesign .transactions-list{padding:10px 12px!important;gap:8px!important}
.transaction-page-redesign .trx-card{grid-template-columns:74px minmax(0,1fr) 76px!important;border-radius:11px!important;min-height:0!important;box-shadow:0 1px 4px rgba(0,0,0,.06)!important}
.transaction-page-redesign .trx-date{min-height:78px!important;padding:6px!important;border-radius:10px 0 0 10px!important}
.transaction-page-redesign .trx-date b{font-size:24px!important;line-height:1!important}.transaction-page-redesign .trx-date span{font-size:9px!important;margin-top:4px!important}.transaction-page-redesign .trx-date small{font-size:8px!important;margin-top:3px!important}
.transaction-page-redesign .trx-main{padding:9px 10px!important}
.transaction-page-redesign .trx-invoice{font-size:11px!important;letter-spacing:1px!important;line-height:1.15!important}
.transaction-page-redesign .trx-total{font-size:18px!important;margin:4px 0!important;line-height:1.1!important}
.transaction-page-redesign .trx-customer{font-size:11px!important;margin-top:3px!important;line-height:1.15!important}.transaction-page-redesign .trx-customer b{font-size:12px!important}
.transaction-page-redesign .trx-side{padding:8px 8px 0 0!important;gap:4px!important}.transaction-page-redesign .trx-status{font-size:8px!important;padding:4px 5px!important;border-radius:6px!important}.transaction-page-redesign .trx-side small{font-size:10px!important}
.transaction-page-redesign .trx-actions{padding:5px 6px!important;gap:4px!important;border-top:1px solid #eee!important}
.transaction-page-redesign .trx-actions .mini{min-height:28px!important;height:28px!important;padding:4px 6px!important;font-size:9px!important;border-radius:7px!important}
.transaction-page-redesign .trx-delete-all-btn{min-height:36px!important;padding:7px 9px!important;margin:6px 0 4px!important;font-size:11px!important}
@media(max-width:420px){
 .transaction-page-redesign .trx-card{grid-template-columns:62px minmax(0,1fr) 68px!important}
 .transaction-page-redesign .trx-date{min-height:70px!important}
 .transaction-page-redesign .trx-date b{font-size:21px!important}
 .transaction-page-redesign .trx-total{font-size:16px!important}
 .transaction-page-redesign .trx-side small{font-size:9px!important}
 .transaction-page-redesign .trx-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .transaction-page-redesign .trx-actions .mini{width:100%!important;font-size:8px!important;padding:3px 4px!important}
}
/* Pastikan Day Mode benar-benar menjadi tampilan awal yang bersih */
body:not(.night-mode) .transaction-page-redesign,
body:not(.night-mode) .transaction-page-redesign .transactions-list{background:#f7f8fa}


/* ===== READABILITY v5: teks produk & riwayat sedikit diperbesar ===== */
#page-produk .product-list-title b{font-size:18px!important;line-height:1.16!important;color:#15191d!important}
#page-produk .product-list-title small{font-size:10.5px!important;color:#4f5963!important}
#page-produk .product-list-field span{font-size:10px!important;color:#59636d!important;font-weight:800!important}
#page-produk .product-list-field b{font-size:13px!important;color:#1d2329!important;line-height:1.18!important}
#page-produk .product-list-supplier{font-size:10px!important;color:#59636d!important}
#page-produk .product-list-actions .icon-action{font-size:13px!important}
@media(max-width:650px){
  #page-produk .product-list-title b{font-size:16px!important}
  #page-produk .product-list-title small{font-size:10px!important}
  #page-produk .product-list-field span{font-size:9px!important;color:#4f5963!important}
  #page-produk .product-list-field b{font-size:12px!important;color:#20262c!important}
}
@media(max-width:380px){#page-produk .product-list-title b{font-size:15px!important}}

/* Riwayat transaksi: jangan terlalu kecil di HP, tetapi tetap compact. */
body:not(.night-mode) .transaction-page-redesign .trx-invoice{font-size:12px!important;color:#3e464e!important;font-weight:700!important}
body:not(.night-mode) .transaction-page-redesign .trx-total{font-size:20px!important;color:#15853b!important;font-weight:900!important}
body:not(.night-mode) .transaction-page-redesign .trx-customer{font-size:12px!important;color:#3e464e!important}
body:not(.night-mode) .transaction-page-redesign .trx-customer b{font-size:13px!important;color:#20252a!important}
body:not(.night-mode) .transaction-page-redesign .trx-side small{font-size:10px!important;color:#4d5660!important}
body:not(.night-mode) .transaction-page-redesign .trx-status{font-size:9px!important;font-weight:900!important}
body:not(.night-mode) .transaction-page-redesign .trx-date b{font-size:25px!important;color:#20252a!important}
body:not(.night-mode) .transaction-page-redesign .trx-date span{font-size:10px!important;color:#3e464e!important;font-weight:800!important}
body:not(.night-mode) .transaction-page-redesign .trx-date small{font-size:9px!important;color:#5b646d!important;font-weight:700!important}
body:not(.night-mode) .transaction-page-redesign .trx-actions .mini{font-size:10px!important;color:#30373d!important}
@media(max-width:420px){
 body:not(.night-mode) .transaction-page-redesign .trx-invoice{font-size:11.5px!important}
 body:not(.night-mode) .transaction-page-redesign .trx-total{font-size:18px!important}
 body:not(.night-mode) .transaction-page-redesign .trx-customer{font-size:11.5px!important}
 body:not(.night-mode) .transaction-page-redesign .trx-customer b{font-size:12.5px!important}
 body:not(.night-mode) .transaction-page-redesign .trx-date b{font-size:22px!important}
 body:not(.night-mode) .transaction-page-redesign .trx-date span{font-size:9px!important}
 body:not(.night-mode) .transaction-page-redesign .trx-date small{font-size:8.5px!important}
}
/* Night mode tetap jelas bila dipilih. */
body.night-mode #page-produk .product-list-title b{color:#f2f5f7!important}
body.night-mode #page-produk .product-list-title small,
body.night-mode #page-produk .product-list-field span,
body.night-mode #page-produk .product-list-supplier{color:#b8c1c9!important}
body.night-mode #page-produk .product-list-field b{color:#edf2f7!important}

/* KasirGo: pencarian Produk disamakan dengan kotak pencarian Transaksi Baru */
#page-produk .search-row.panel{
  display:flex;
  gap:10px;
  align-items:center;
}
#page-produk .search-row.panel input{
  flex:1;
  min-width:0;
}
@media(max-width:600px){
  #page-produk .search-row.panel{gap:7px;}
  #page-produk .search-row.panel .btn{white-space:nowrap;}
}
/* KasirGo: stok tanpa glow, warna solid agar terbaca di Day dan Night */
body:not(.night-mode) #page-produk .stock-safe,
body:not(.night-mode) .stock-safe{
  background:#dff5e5!important;
  color:#145c2b!important;
  border:1px solid #36a45a!important;
  box-shadow:none!important;
  animation:none!important;
  opacity:1!important;
}
body.night-mode #page-produk .stock-safe,
body.night-mode .stock-safe{
  background:#16452a!important;
  color:#8dffb3!important;
  border:1px solid #43c76c!important;
  box-shadow:none!important;
  animation:none!important;
  opacity:1!important;
}


/* =========================================================
   KASIRGO - POS MOBILE PRODUCT CARD RAMPING / PENDEK
   Hanya CSS: tidak mengubah HTML, JavaScript, data, atau fungsi.
   Layout tetap: nama + stok + harga + pensil di kiri,
   kontrol - jumlah + di kanan seperti tampilan mobile.
   ========================================================= */
@media (max-width:650px){
  #page-kasir .product-grid.view-list{
    gap:6px !important;
  }

  #page-kasir .product-grid.view-list .product-card{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-rows:auto auto auto auto !important;
    width:100% !important;
    min-height:0 !important;
    height:auto !important;
    box-sizing:border-box !important;
    padding:8px 9px !important;
    column-gap:8px !important;
    row-gap:1px !important;
    align-items:center !important;
    overflow:visible !important;
  }

  /* Nama tetap utuh dan boleh turun baris bila panjang. */
  #page-kasir .product-grid.view-list .product-card-top{
    grid-column:1 !important;
    grid-row:1 !important;
    min-width:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
  }
  #page-kasir .product-grid.view-list .product-card-top .product-name{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    height:auto !important;
    max-height:none !important;
    font-size:13px !important;
    line-height:17px !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
  }

  #page-kasir .product-grid.view-list .product-info-line{
    grid-column:1 !important;
    grid-row:2 !important;
    min-width:0 !important;
    height:22px !important;
    margin:0 !important;
    padding:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:5px !important;
  }
  #page-kasir .product-grid.view-list .product-info-line small{
    display:none !important;
  }
  #page-kasir .product-grid.view-list .product-info-line .stock-badge{
    display:inline-flex !important;
    align-items:center !important;
    height:19px !important;
    min-width:0 !important;
    margin:0 !important;
    padding:1px 6px !important;
    font-size:10px !important;
    line-height:17px !important;
    box-sizing:border-box !important;
  }

  #page-kasir .product-grid.view-list .product-card > strong{
    grid-column:1 !important;
    grid-row:3 !important;
    justify-self:start !important;
    align-self:center !important;
    display:block !important;
    height:22px !important;
    margin:0 !important;
    padding:0 !important;
    font-size:14px !important;
    line-height:22px !important;
    white-space:nowrap !important;
  }

  /* Icon edit tetap kecil di bawah harga. */
  #page-kasir .product-grid.view-list .product-edit-btn{
    grid-column:1 !important;
    grid-row:4 !important;
    justify-self:start !important;
    align-self:center !important;
    width:21px !important;
    min-width:21px !important;
    height:19px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    display:grid !important;
    place-items:center !important;
    font-size:0 !important;
    line-height:1 !important;
  }
  #page-kasir .product-grid.view-list .product-edit-btn::after{
    content:"✎" !important;
    font-size:15px !important;
    font-weight:700 !important;
    line-height:19px !important;
  }

  /* Tombol qty diperkecil agar kartu tidak tinggi/lebar berlebihan. */
  #page-kasir .product-grid.view-list .product-qty{
    grid-column:2 !important;
    grid-row:1 / span 4 !important;
    align-self:end !important;
    justify-self:end !important;
    width:auto !important;
    margin:0 0 1px 0 !important;
    padding:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:4px !important;
  }
  #page-kasir .product-grid.view-list .product-qty button{
    width:39px !important;
    min-width:39px !important;
    height:31px !important;
    padding:0 !important;
    border-radius:7px !important;
    font-size:17px !important;
    line-height:31px !important;
  }
  #page-kasir .product-grid.view-list .product-qty input{
    width:26px !important;
    min-width:26px !important;
    height:27px !important;
    padding:1px !important;
    font-size:12px !important;
    box-sizing:border-box !important;
  }
}

/* Layar sangat kecil: tetap nyaman disentuh tanpa membuat box tinggi. */
@media (max-width:380px){
  #page-kasir .product-grid.view-list .product-card{
    padding:7px 8px !important;
    column-gap:6px !important;
  }
  #page-kasir .product-grid.view-list .product-card-top .product-name{
    font-size:12.5px !important;
    line-height:16px !important;
  }
  #page-kasir .product-grid.view-list .product-qty{
    gap:3px !important;
  }
  #page-kasir .product-grid.view-list .product-qty button{
    width:36px !important;
    min-width:36px !important;
    height:30px !important;
  }
}


/* ===== UANG KASIR ===== */
.cashier-summary-card{padding-right:42px}
.cashier-summary-main{min-width:0}
.cashier-summary-main em{display:block;margin-top:7px;color:#8f969d;font-size:10px;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cashier-edit-btn{
  position:absolute;right:10px;top:10px;width:30px;height:30px;border:0;border-radius:9px;
  background:#c7191f;color:#fff;font-weight:900;cursor:pointer;
}
body:not(.night-mode) .cashier-summary-main em{color:#777}
body:not(.night-mode) .cashier-edit-btn{background:#c7191f;color:#fff}

.kg-modal{
  position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;
  padding:18px;background:rgba(0,0,0,.62);backdrop-filter:blur(5px);
  opacity:0;visibility:hidden;pointer-events:none;transition:.2s ease;
}
.kg-modal.show{opacity:1;visibility:visible;pointer-events:auto}
.kg-modal-box{
  width:min(430px,100%);border-radius:20px;padding:18px;background:#171717;color:#f5f5f5;
  border:1px solid #ffffff14;box-shadow:0 20px 70px #0009;transform:translateY(12px) scale(.98);transition:.2s ease;
}
.kg-modal.show .kg-modal-box{transform:none}
.kg-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}
.kg-modal-head b{display:block;font-size:18px}
.kg-modal-head small{display:block;color:#aeb4bb;font-size:12px;line-height:1.5;margin-top:5px}
.kg-modal-head button{width:34px;height:34px;border:0;border-radius:10px;background:#2b2b2b;color:#fff;font-size:22px;cursor:pointer}
.cashier-opening-form label{display:block;font-size:13px;font-weight:800;margin-bottom:8px}
.cashier-opening-form input{
  width:100%;height:50px;border-radius:12px;border:1px solid #3a3a3a;background:#0e0e0e;color:#fff;
  padding:0 14px;font-size:18px;font-weight:800;outline:none;
}
.cashier-opening-form input:focus{border-color:#c7191f;box-shadow:0 0 0 3px #c7191f22}
.cashier-opening-form>small{display:block;color:#90979e;font-size:11px;line-height:1.5;margin-top:8px}
.kg-modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}
.kg-modal-actions .btn{min-height:42px}
body:not(.night-mode) .kg-modal-box{background:#fff;color:#171717;border-color:#eadede}
body:not(.night-mode) .kg-modal-head small{color:#777}
body:not(.night-mode) .kg-modal-head button{background:#f0f0f0;color:#222}
body:not(.night-mode) .cashier-opening-form input{background:#fff;color:#171717;border-color:#d8d8d8}
@media(max-width:420px){
  .dashboard-summary-grid{gap:7px}
  .dashboard-summary-card{padding:10px 7px;min-height:90px}
  .dashboard-summary-card small{font-size:9px;margin-bottom:7px}
  .dashboard-summary-card b{font-size:13px}
  .dashboard-icon{font-size:18px}
  .cashier-summary-card{padding-right:7px;padding-top:35px}
  .cashier-edit-btn{top:7px;right:7px;width:26px;height:26px;font-size:13px}
  .cashier-summary-main em{font-size:8px;margin-top:5px}
}

/* Menu laporan bergaya kartu seperti halaman Laporan mobile */
.report-menu-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.report-menu-item{min-height:132px;border:1px solid #e8ebee;border-radius:24px;background:#fff;box-shadow:0 3px 14px #0000000b;padding:16px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;cursor:pointer;font:inherit;color:#20252b}
.report-menu-item:hover,.report-menu-item.active{border-color:#c7191f;box-shadow:0 4px 16px #c7191f18}
.report-menu-icon{font-size:34px;line-height:1;color:#444}
.report-menu-item b{font-size:17px;line-height:1.3}
.report-content{margin-top:2px}.report-welcome{display:flex;flex-direction:column;gap:6px}.report-detail-body{margin-top:16px}
@media(max-width:900px){.report-menu-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:650px){.report-menu-grid{grid-template-columns:repeat(4,1fr);gap:9px}.report-menu-item{min-height:120px;border-radius:20px;padding:10px 5px;gap:9px}.report-menu-icon{font-size:27px}.report-menu-item b{font-size:14px}.report-content .stats-grid{grid-template-columns:1fr 1fr}}

/* ===== Product tools: duplicate & missing price ===== */
.product-tool-note{padding:11px 12px;border:1px solid #f0d6d8;background:#fff7f7;border-radius:10px;color:#555;font-size:13px;line-height:1.5;margin-bottom:12px}
.product-tool-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.product-tool-toolbar>b{flex:1;min-width:180px}
.product-tool-toolbar>span{font-size:12px;color:#777;font-weight:700}
.duplicate-groups,.missing-price-list{display:grid;gap:10px;max-height:58vh;overflow:auto;padding-right:2px}
.duplicate-group{border:1px solid #e2e5e8;border-radius:12px;overflow:hidden;background:#fff}
.duplicate-group-head{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:9px 11px;background:#f7f8f9;border-bottom:1px solid #e8eaec}
.duplicate-group-head small{color:#a40000;font-weight:700}
.duplicate-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:9px;align-items:center;padding:10px 11px;border-bottom:1px solid #eee;cursor:pointer}
.duplicate-row:last-child{border-bottom:0}
.duplicate-row:hover{background:#fff8f8}
.duplicate-row input{width:18px;height:18px;accent-color:#c7191f}
.duplicate-product-main{min-width:0}
.duplicate-product-main b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.duplicate-product-main small{display:block;color:#747d86;margin-top:3px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.duplicate-row em{font-style:normal;font-size:10px;font-weight:800;color:#18833a;background:#e8f8ee;padding:4px 7px;border-radius:999px;white-space:nowrap}
.duplicate-row:not(:has(.duplicate-keep-first)) em{color:#a40000;background:#ffe8e8}
.product-tool-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;flex-wrap:wrap}
.missing-price-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;border:1px solid #e4e7ea;border-radius:11px;padding:10px;background:#fff}
.missing-price-row b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.missing-price-row small{display:block;color:#777;margin-top:3px;font-size:11px}
.missing-price-badges{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.missing-price-badges .badge{white-space:nowrap}
body.night-mode .product-tool-note{background:#2a1d1f;color:#e7dfe0;border-color:#4a292c}
body.night-mode .duplicate-group,body.night-mode .missing-price-row{background:#1b2128;color:#edf2f7;border-color:#303944}
body.night-mode .duplicate-group-head{background:#242b33;border-color:#303944}
body.night-mode .duplicate-product-main small,body.night-mode .missing-price-row small,body.night-mode .product-tool-toolbar>span{color:#aeb8c3}
body.night-mode .duplicate-row{border-color:#303944}
body.night-mode .duplicate-row:hover{background:#2a1d1f}
@media(max-width:650px){
  #page-produk .page-actions .btn{min-width:0;font-size:11px;padding:9px 7px}
  .duplicate-groups,.missing-price-list{max-height:55vh}
  .missing-price-row{grid-template-columns:minmax(0,1fr) auto;gap:7px}
  .missing-price-badges{grid-column:1/-1;justify-content:flex-start}
  .missing-price-row>.btn{grid-column:2;grid-row:1}
  .duplicate-row{grid-template-columns:auto minmax(0,1fr)}
  .duplicate-row em{grid-column:2;justify-self:start}
}

.product-buy-profit{display:flex;flex-direction:column;gap:1px;margin-top:-3px;font-size:10px;line-height:1.25;color:#777}.product-buy-profit span:last-child{color:#18833a}.product-card .product-buy-profit{font-weight:400}.product-card .product-buy-profit span{font-size:10px}


/* =========================================================
   LAPORAN PERFORMANCE DASHBOARD — page scoped
   Tidak mengubah komponen halaman lain.
   ========================================================= */
.report-dashboard-page{max-width:1500px}
.report-dashboard-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}
.report-kicker{font-size:11px;letter-spacing:1.8px;font-weight:900;color:#c7191f;margin-bottom:5px}
.report-dashboard-head h1{margin:0;font-size:31px;letter-spacing:-.7px}
.report-dashboard-head p{margin:5px 0 0}
.report-head-actions{display:flex;align-items:center;gap:9px}
.report-live-date{font-size:12px;font-weight:800;color:#707983;white-space:nowrap}

.report-filter-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#171a1f;color:#fff;border-radius:18px;padding:12px 16px;margin-bottom:12px;box-shadow:0 8px 24px #00000014}
.report-filter-strip>div:first-child{display:flex;align-items:center;gap:10px}
.report-filter-strip span{font-size:9px;letter-spacing:1px;color:#aeb5bd;font-weight:800}
.report-filter-strip b{font-size:14px}
.report-filter-note{font-size:11px;color:#cbd0d5}

.report-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px;margin-bottom:11px}
.report-kpi{position:relative;min-height:125px;padding:15px;border-radius:16px;background:#fff;border:1px solid #e7e9ec;box-shadow:0 5px 18px #0000000a;overflow:hidden}
.report-kpi:before{content:"";position:absolute;left:0;top:0;right:0;height:4px;background:#d91f32}
.report-kpi span{display:block;color:#6e7680;font-size:11px;font-weight:800;margin-bottom:12px}
.report-kpi strong{display:block;font-size:20px;line-height:1.15;color:#20252b;letter-spacing:-.3px;word-break:break-word}
.report-kpi small{display:block;margin-top:9px;color:#8b9299;font-size:10px}
.report-kpi-main{background:linear-gradient(145deg,#181b20,#2a2e35);border-color:#2e343c;color:#fff}
.report-kpi-main span,.report-kpi-main small{color:#c5cad0}
.report-kpi-main strong{color:#fff}
.report-kpi-profit:before{background:#e72a4a}

.report-mini-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin-bottom:14px}
.report-mini-card{padding:12px 13px;border:1px solid #e8eaed;background:#fff;border-radius:13px;min-width:0}
.report-mini-card span{display:block;font-size:10px;color:#747c85;font-weight:700}
.report-mini-card b{display:block;margin-top:5px;font-size:15px;color:#22272d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-mini-card small{display:block;margin-top:4px;font-size:9px;color:#9aa1a8}

.report-chart-grid{display:grid;grid-template-columns:1.45fr .85fr;gap:12px;margin-bottom:12px}
.report-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.report-card{background:#fff;border:1px solid #e6e9ec;border-radius:17px;padding:15px;box-shadow:0 4px 18px #00000008;min-width:0}
.report-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
.report-card-head b{display:block;font-size:14px;color:#252a30}
.report-card-head small{display:block;margin-top:3px;font-size:10px;color:#8b929a}
.report-card-head>strong{font-size:14px;color:#c7191f;white-space:nowrap}

.report-month-chart{height:215px;display:flex;align-items:flex-end;gap:7px;border-bottom:1px solid #e5e7e9;padding:4px 2px 0;overflow:hidden}
.report-month-col{height:100%;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}
.report-month-value{font-size:7px;color:#8a9097;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;height:15px}
.report-month-bar{width:min(34px,70%);height:calc(100% - 30px);display:flex;align-items:flex-end}
.report-month-bar i{display:block;width:100%;min-height:0;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,#f23d62,#c7191f);box-shadow:0 4px 10px #c7191f1c}
.report-month-col span{height:16px;margin-top:5px;font-size:9px;color:#777f88;font-weight:700;text-transform:uppercase}

.report-day-chart{height:215px;display:flex;align-items:flex-end;gap:7px;border-bottom:1px solid #e5e7e9;padding:6px 2px 0;overflow:hidden}
.report-day-col{height:100%;flex:1;min-width:10px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}
.report-day-bar{height:calc(100% - 20px);width:100%;max-width:19px;display:flex;align-items:flex-end}
.report-day-bar i{width:100%;border-radius:5px 5px 1px 1px;background:#ec2d50;display:block}
.report-day-col span{font-size:8px;color:#777f88;height:15px;margin-top:5px}

.report-bar-row{margin:11px 0}
.report-bar-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px}
.report-bar-top>span{display:flex;align-items:center;gap:7px;min-width:0;color:#454c54;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-bar-top>span i{font-style:normal;display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;border-radius:6px;background:#f6e6e9;color:#c7191f;font-size:9px;flex:0 0 auto}
.report-bar-top>b{color:#c7191f;font-size:10px;white-space:nowrap}
.report-bar-track{height:7px;background:#f0f1f3;border-radius:99px;overflow:hidden;margin-top:6px}
.report-bar-track em{display:block;height:100%;background:linear-gradient(90deg,#ef3657,#c7191f);border-radius:99px}
.report-empty,.report-error{padding:28px 10px;text-align:center;color:#8a929a;font-size:12px}
.report-loading{min-height:170px;display:flex;align-items:center;justify-content:center;gap:8px;color:#7b838c}
.report-spinner{display:inline-block;font-size:20px;animation:reportSpin 1s linear infinite;color:#c7191f}
@keyframes reportSpin{to{transform:rotate(360deg)}}

.report-detail-tools{margin-top:18px;padding-top:15px;border-top:1px solid #e6e8ea}
.report-detail-tools>div:first-child{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.report-detail-tools>div:first-child>b{font-size:15px}
.report-detail-tools>div:first-child .muted{font-size:10px}
.report-detail-tools .report-menu-grid{margin-bottom:0;grid-template-columns:repeat(5,1fr);gap:9px}
.report-detail-tools .report-menu-item{min-height:88px;border-radius:15px;padding:10px 7px;gap:6px}
.report-detail-tools .report-menu-icon{font-size:23px}
.report-detail-tools .report-menu-item b{font-size:11px}

body.night-mode .report-dashboard-head h1{color:#f3f5f7}
body.night-mode .report-filter-strip{background:#11151a;border-color:#252c34}
body.night-mode .report-kpi,body.night-mode .report-mini-card,body.night-mode .report-card{background:#1b2128;border-color:#303944;box-shadow:none}
body.night-mode .report-kpi span,body.night-mode .report-mini-card span,body.night-mode .report-card-head small,body.night-mode .report-live-date{color:#aeb7c1}
body.night-mode .report-kpi strong,body.night-mode .report-mini-card b,body.night-mode .report-card-head b,body.night-mode .report-bar-top>span{color:#edf1f5}
body.night-mode .report-mini-card small,body.night-mode .report-bar-track{background:#252c34;color:#9fa8b2}
body.night-mode .report-month-chart,body.night-mode .report-day-chart{border-color:#343c46}
body.night-mode .report-month-col span,body.night-mode .report-day-col span{color:#a7afb8}
body.night-mode .report-bar-track{background:#252c34}
body.night-mode .report-detail-tools{border-color:#303944}

@media(max-width:1100px){
 .report-kpi-grid{grid-template-columns:repeat(3,1fr)}
 .report-mini-grid{grid-template-columns:repeat(3,1fr)}
 .report-detail-tools .report-menu-grid{grid-template-columns:repeat(5,1fr)}
}
@media(max-width:800px){
 .report-dashboard-head{align-items:flex-start;flex-direction:column}
 .report-head-actions{width:100%;justify-content:space-between}
 .report-chart-grid{grid-template-columns:1fr}
 .report-detail-grid{grid-template-columns:1fr}
 .report-detail-tools .report-menu-grid{grid-template-columns:repeat(5,1fr)}
}
@media(max-width:650px){
 .report-dashboard-head h1{font-size:25px}
 .report-dashboard-head p{font-size:11px}
 .report-kpi-grid{grid-template-columns:repeat(2,1fr);gap:8px}
 .report-kpi{min-height:112px;padding:12px;border-radius:13px}
 .report-kpi strong{font-size:16px}
 .report-kpi span{font-size:9px;margin-bottom:9px}
 .report-kpi small{font-size:9px}
 .report-mini-grid{grid-template-columns:repeat(2,1fr);gap:7px}
 .report-mini-card{padding:10px}
 .report-filter-strip{border-radius:13px;padding:10px 11px}
 .report-filter-strip{align-items:flex-start;flex-direction:column}
 .report-filter-note{font-size:9px}
 .report-card{padding:12px;border-radius:14px}
 .report-card-head b{font-size:12px}
 .report-card-head>strong{font-size:11px}
 .report-month-chart,.report-day-chart{height:185px;gap:4px}
 .report-month-value{font-size:6px}
 .report-month-bar{width:70%;height:calc(100% - 27px)}
 .report-month-col span{font-size:8px}
 .report-detail-tools .report-menu-grid{grid-template-columns:repeat(3,1fr);gap:7px}
 .report-detail-tools .report-menu-item{min-height:82px}
 .report-detail-tools>div:first-child{display:block}
 .report-detail-tools>div:first-child .muted{display:block;margin-top:3px}
}

/* Sidebar omzet spotlight: tampil penuh dan menjadi pusat perhatian */
.side-today-stats{
  grid-template-columns:1fr !important;
  gap:10px !important;
}
.side-today-stats>div{
  width:100%;
  box-sizing:border-box;
  padding:11px 12px !important;
  overflow:visible !important;
  border:2px solid #ffcf3f !important;
  background:linear-gradient(135deg,#5a1200,#b83b00 52%,#ff8a00) !important;
  box-shadow:0 0 14px rgba(255,174,0,.55), inset 0 1px 0 rgba(255,255,255,.25) !important;
  animation:sideStatPulse 2.8s ease-in-out infinite;
}
.side-today-stats>div:nth-child(2){animation-delay:.35s}
.side-today-stats>div:nth-child(3){animation-delay:.7s}
.side-today-stats span{
  font-size:10px !important;
  font-weight:800;
  letter-spacing:.2px;
  color:#fff7cf !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
}
.side-today-stats strong{
  margin-top:5px !important;
  font-size:clamp(13px,3.8vw,18px) !important;
  line-height:1.3 !important;
  font-weight:900;
  color:#fff !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  overflow-wrap:anywhere;
  word-break:break-word;
  text-shadow:0 1px 2px rgba(0,0,0,.45);
}
@keyframes sideStatPulse{
  0%,100%{transform:scale(1);filter:brightness(1);box-shadow:0 0 12px rgba(255,174,0,.42),inset 0 1px 0 rgba(255,255,255,.22)}
  50%{transform:scale(1.018);filter:brightness(1.13);box-shadow:0 0 23px rgba(255,215,70,.82),inset 0 1px 0 rgba(255,255,255,.35)}
}
@media (max-width:650px){
  .side-today-stats>div{padding:10px 11px !important}
  .side-today-stats strong{font-size:14px !important}
}

/* FIX FINAL: kartu omzet mendapat lebar penuh sidebar, bukan hanya sisa ruang di samping logo */
.sidebar .side-head{
  height:auto !important;
  min-height:0 !important;
  flex-wrap:wrap !important;
  align-items:flex-start !important;
}
.sidebar .side-head .side-user-info{
  min-width:0 !important;
  flex:1 1 calc(100% - 90px) !important;
}
.sidebar .side-head .side-today-stats{
  grid-column:1 / -1 !important;
  width:calc(100vw - 32px) !important;
  max-width:100% !important;
  margin-left:calc(-1 * min(0px, 0px)) !important;
}
/* pindahkan ringkasan ke baris penuh agar nominal Rp tidak terpotong */
.sidebar .side-head .side-user-info{display:contents !important;}
.sidebar .side-head > .side-user-info > b,
.sidebar .side-head > .side-user-info > small{
  flex:1 1 calc(100% - 92px) !important;
  min-width:0 !important;
}
.sidebar .side-head > .side-user-info > .side-today-stats{
  flex:0 0 100% !important;
  width:100% !important;
  order:10 !important;
}
.side-today-stats strong{
  font-size:16px !important;
  white-space:nowrap !important;
  overflow:visible !important;
  text-overflow:clip !important;
  letter-spacing:-.25px !important;
}
@media(max-width:650px){
  .sidebar .side-head{padding:14px 12px 16px !important;gap:10px !important;}
  .side-today-stats{width:100% !important;}
  .side-today-stats strong{font-size:15px !important;}
}

/* FIX: Tombol tutup (X) preview/keranjang harus selalu terlihat */
.checkout-head .icon-btn,
.receipt-head .icon-btn,
.virtual-printer-head .icon-btn{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  flex:0 0 42px;
  width:42px;
  height:42px;
  min-width:42px;
  border:1px solid #d71920 !important;
  border-radius:10px;
  background:#fff !important;
  color:#d71920 !important;
  font-size:30px !important;
  font-weight:900;
  line-height:1;
  padding:0;
  opacity:1 !important;
  visibility:visible !important;
  position:relative;
  z-index:20;
}
.checkout-head .icon-btn:hover,
.receipt-head .icon-btn:hover,
.virtual-printer-head .icon-btn:hover{
  background:#fff0f1 !important;
  transform:scale(1.04);
}
body.night-mode .checkout-head .icon-btn,
body.night-mode .receipt-head .icon-btn,
body.night-mode .virtual-printer-head .icon-btn{
  background:#210d0f !important;
  color:#ff6268 !important;
  border-color:#ff6268 !important;
}

/* Import gambar struk dari tab kamera barcode. Tombol barcode tetap bekerja seperti biasa. */
.receipt-import-divider{display:flex;align-items:center;gap:10px;margin:12px 0 8px;color:#8a9299;font-size:11px;font-weight:800}.receipt-import-divider:before,.receipt-import-divider:after{content:"";height:1px;background:#dfe3e6;flex:1}.receipt-import-divider span{padding:0 4px}.receipt-import-btn{width:100%;margin-bottom:7px}.receipt-ocr-status{min-height:18px;text-align:center;font-size:12px;line-height:1.4;color:#68717b;margin:3px 0 10px}.receipt-ocr-status.success{color:#147a3d;font-weight:700}.receipt-ocr-status.error{color:#b42318;font-weight:700}.receipt-ocr-status.loading{font-weight:700}@media(max-width:650px){.receipt-import-btn{min-height:42px}.receipt-ocr-status{font-size:11px}}
