/* ===== POS (kasir) — layar penuh, menu aplikasi disembunyikan ===== */
body.pos-mode .appbar, body.pos-mode .sidebar, body.pos-mode .scrim, body.pos-mode .head{ display:none !important; }
body.pos-mode .main{ margin:0 !important; padding:0 !important; height:100vh; overflow:hidden; }
body.pos-mode .container{ padding:0; max-width:none; height:100vh; display:flex; flex-direction:column; }
body.pos-mode #messages{ position:fixed; top:66px; left:50%; transform:translateX(-50%); z-index:70; width:min(560px, calc(100vw - 32px)); }

.pos{ --pos-accent:#7a1f1f; --pos-accent-2:#9b2c2c; --pos-card:#f6f3ef; --pos-line:#ece7e2; --pos-dark:#231514;
  flex:1; min-height:0; display:flex; flex-direction:column; background:var(--t-bg-ffffff); font-size:13px; }
.pos button{ font:inherit; }
/* popup POS (#pos-*-pop) berada di luar .pos → variabel warna yang sama juga di sini (tanpa ini tombol "Add to order" transparan) */
.overlay[id^="pos-"], .pos-pop{ --pos-accent:#7a1f1f; --pos-accent-2:#9b2c2c; --pos-card:#f6f3ef; --pos-line:#ece7e2; --pos-dark:#231514; }
.overlay[id^="pos-"] button{ font:inherit; }

/* bar atas */
.pos-top{ display:flex; align-items:center; gap:14px; height:60px; padding:0 16px 0 20px; border-bottom:1px solid var(--pos-line); flex:none; }
.pos-brand{ display:flex; align-items:center; gap:10px; font-size:16px; font-weight:700; color:var(--pos-accent); }
.pos-brand .brand-mark{ width:32px; height:32px; margin:0; font-size:15px; border-radius:9px; box-shadow:none; background:var(--t-bg-fbe9d5); }
.pos-spacer{ flex:1; }
.pos-loc{ width:240px; }
.pos-loc .lk-btn{ height:38px; border-radius:999px; padding-left:30px; font-weight:600; }
.pos-loc .lk{ position:relative; }
.pos-loc .lk::before{ content:""; position:absolute; left:14px; top:50%; width:8px; height:8px; margin-top:-4px; border-radius:50%; background:var(--pos-accent); z-index:1; }
.pos-tabs{ display:flex; gap:2px; }
.pos-tabs button{ border:0; background:none; padding:8px 12px; border-radius:8px; font-weight:600; color:var(--t-fg-4b3f3f); }
.pos-tabs button:hover{ background:var(--t-bg-f8f1ea); }
.pos-tabs button.on{ color:var(--pos-accent); }
.pos-user{ display:flex; align-items:center; gap:10px; text-align:right; line-height:1.25; }
.pos-user b{ display:block; font-size:12px; }
.pos-user small{ color:var(--muted); font-size:11px; }
.pos-user .avatar{ background:var(--t-bg-fbe9d5); color:var(--pos-accent); width:34px; height:34px; border-radius:10px; }
.pos-ic{ width:34px; height:34px; border:1px solid var(--pos-line); border-radius:9px; background:var(--t-bg-ffffff); color:var(--t-fg-4b3f3f); display:inline-flex; align-items:center; justify-content:center; }
.pos-ic:hover{ background:var(--t-bg-f8f1ea); }

.pos-body{ flex:1; min-height:0; display:flex; }
.pos-pane{ flex:1; min-height:0; min-width:0; display:flex; }
.pos-pane[hidden]{ display:none !important; }

/* menu */
.pos-menu{ flex:1; min-width:0; display:flex; flex-direction:column; }
.pos-menu-bar{ display:flex; align-items:center; gap:12px; padding:12px 16px; border-bottom:1px solid var(--pos-line); flex:none; }
.pos-chips{ display:flex; gap:2px; padding:3px; border-radius:12px; background:var(--t-bg-f3efea); overflow-x:auto;
  flex:1 1 auto; min-width:0; overscroll-behavior-x:contain; } /* banyak kategori → geser ke samping, tidak mendorong kolom cari/keranjang */
.pos-chips button{ border:0; background:none; padding:6px 14px; border-radius:9px; font-weight:700; font-size:12px; color:var(--t-fg-6b5d5d); white-space:nowrap; }
.pos-chips button.on{ background:var(--t-bg-ffffff); color:var(--pos-accent); box-shadow:0 1px 2px rgba(0,0,0,.06); }
.pos-search{ position:relative; margin-left:auto; width:min(340px, 40%); flex:none; color:var(--t-fg-9ca3af); }
.pos-search svg{ position:absolute; left:12px; top:50%; transform:translateY(-50%); }
.pos-search input{ width:100%; height:36px; padding:0 12px 0 34px; border:1px solid var(--pos-line); border-radius:999px; font:inherit; color:var(--text); }
.pos-search input:focus{ outline:none; border-color:var(--t-bd-e0b98f); box-shadow:var(--focus); }
.pos-grid{ flex:1; min-height:0; overflow-y:auto; padding:14px 16px; display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:12px; align-content:start; }
.pos-item{ display:flex; align-items:center; gap:12px; padding:12px; border:1px solid transparent; border-radius:14px; background:var(--pos-card); text-align:left; cursor:pointer; min-height:88px; transition:transform .08s, border-color .15s; }
.pos-item:hover{ border-color:var(--t-bd-e7d3bd); }
.pos-item:active{ transform:scale(.98); }
.pos-item .ph{ flex:none; width:58px; height:58px; border-radius:11px; background:var(--t-bg-ebe5df); color:var(--t-fg-8a7b7b); font-weight:700; font-size:16px; display:flex; align-items:center; justify-content:center; }
.pos-item .nm{ font-weight:700; font-size:13.5px; line-height:1.25; color:var(--t-fg-1f1414); }
.pos-item .pr{ margin-top:4px; font-weight:600; color:var(--t-fg-6b5d5d); }
.pos-item .in-cart{ margin-top:4px; display:inline-block; font-size:11px; font-weight:700; color:var(--pos-accent); background:var(--t-bg-fbe9d5); padding:1px 8px; border-radius:999px; }
.pos-empty{ grid-column:1 / -1; padding:40px 12px; text-align:center; color:var(--muted); }

/* keranjang */
.pos-cart{ width:380px; flex:none; display:flex; flex-direction:column; border-left:1px solid var(--pos-line); min-height:0; }
.pos-cart-head{ display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:12px 14px; border-bottom:1px solid var(--pos-line); }
.pos-cart-head .lk-btn, .pos-cart-head input{ height:38px; border-radius:999px; }
.pos-cart-head input{ width:100%; padding:0 14px; border:1px solid var(--border); font:inherit; }
.pos-bill{ display:flex; align-items:center; gap:8px; margin:10px 14px 0; padding:8px 10px; border-radius:10px; background:var(--t-bg-fbf3ea); color:var(--t-fg-6b4a2b); font-size:12px; }
.pos-bill b{ color:var(--pos-accent); }
.pos-bill button{ margin-left:auto; border:0; background:none; color:var(--t-fg-2563eb); font-size:12px; }
.pos-lines{ flex:1; min-height:0; overflow-y:auto; padding:6px 14px; }
.pos-lines .none{ padding:60px 10px; text-align:center; color:var(--muted); line-height:1.6; }
.pos-line{ padding:10px 0; border-bottom:1px solid var(--t-bd-f3efea); }
.pos-line .r1{ display:flex; align-items:flex-start; gap:8px; }
.pos-line .nm{ flex:1; font-weight:600; line-height:1.3; }
.pos-line .lt{ font-weight:700; white-space:nowrap; }
.pos-line .r2{ display:flex; align-items:center; gap:8px; margin-top:6px; }
.pos-line .each{ color:var(--muted); font-size:12px; flex:1; }
.pos-qty{ display:inline-flex; align-items:center; border:1px solid var(--pos-line); border-radius:999px; overflow:hidden; }
.pos-qty button{ width:30px; height:28px; border:0; background:var(--t-bg-ffffff); font-size:16px; color:var(--t-fg-4b3f3f); }
.pos-qty button:hover{ background:var(--t-bg-f8f1ea); }
.pos-qty span{ min-width:28px; text-align:center; font-weight:700; }
.pos-note-btn{ border:0; background:none; color:var(--t-fg-2563eb); font-size:12px; padding:0; }
.pos-line input.note{ width:100%; margin-top:6px; height:30px; padding:0 10px; border:1px solid var(--pos-line); border-radius:8px; font:inherit; font-size:12px; }
.pos-sum{ flex:none; padding:12px 14px 14px; border-top:1px solid var(--pos-line); }
.pos-sum .row{ display:flex; justify-content:space-between; padding:3px 0; color:var(--t-fg-4b3f3f); }
.pos-sum .row b{ color:var(--t-fg-1f1414); }
.pos-sum .disc{ margin:4px 0; }
.pos-sum .disc .lk-btn{ height:36px; border-radius:999px; }
.pos-total{ display:flex; justify-content:space-between; align-items:center; margin-top:8px; padding:14px 18px; border-radius:14px; background:var(--pos-dark); color:var(--t-fg-ffffff); }
.pos-total b{ font-size:22px; }
.pos-hint{ margin:6px 2px 0; font-size:12px; color:var(--muted); min-height:16px; }
.pos-actions{ display:grid; grid-template-columns:1fr 1.6fr; gap:8px; margin-top:8px; }
.pos-btn{ height:46px; border-radius:999px; border:1px solid var(--pos-line); background:var(--t-bg-f6f3ef); font-weight:700; font-size:14px; color:var(--t-fg-4b3f3f); }
.pos-btn.pay{ background:var(--pos-accent); border-color:var(--pos-accent); color:var(--t-fg-ffffff); }
.pos-btn.pay:hover:not(:disabled){ background:var(--t-bg-8f2626); }
.pos-btn:disabled{ opacity:.45; }

/* pop-up pembayaran / selesai / detail */
.pos-pop{ background:var(--t-bg-ffffff); border-radius:16px; width:min(460px, 100%); max-height:92vh; overflow:auto; box-shadow:0 20px 50px rgba(0,0,0,.25); }
.pos-pop.wide{ width:min(640px, 100%); }
.pos-pop-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--pos-line); }
.pos-pop-head b{ font-size:15px; }
.pos-pop-body{ padding:16px 18px; }
.pos-due{ text-align:center; padding:8px 0 14px; }
.pos-due small{ color:var(--muted); }
.pos-due div{ font-size:28px; font-weight:800; color:var(--pos-dark); }
.pos-methods{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.pos-methods button{ height:44px; border:1px solid var(--pos-line); border-radius:12px; background:var(--t-bg-ffffff); font-weight:600; }
.pos-methods button.on{ border-color:var(--pos-accent); background:var(--t-bg-fbf3ea); color:var(--pos-accent); }
.pos-cash{ margin-top:14px; }
.pos-cash label{ font-size:12px; color:var(--muted); }
.pos-cash input{ width:100%; height:46px; margin-top:4px; padding:0 14px; border:1px solid var(--border); border-radius:12px; font:inherit; font-size:20px; font-weight:700; text-align:right; }
.pos-quick{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.pos-quick button{ border:1px solid var(--pos-line); background:var(--t-bg-f6f3ef); border-radius:999px; padding:5px 12px; font-size:12px; font-weight:600; }
.pos-change{ display:flex; justify-content:space-between; margin-top:12px; padding:10px 12px; border-radius:10px; background:var(--t-bg-f6f3ef); font-weight:700; }
.pos-change.bad{ background:var(--t-bg-fee2e2); color:var(--t-fg-991b1b); }
.pos-pop-foot{ display:flex; gap:8px; padding:0 18px 18px; }
.pos-pop-foot .pos-btn{ flex:1; }
.pos-done{ text-align:center; padding:8px 0 4px; }
.pos-done .ok{ width:56px; height:56px; margin:0 auto 10px; border-radius:50%; background:var(--t-bg-dcfce7); color:var(--t-fg-166534); display:flex; align-items:center; justify-content:center; font-size:28px; }
.pos-done b{ display:block; font-size:16px; }
.pos-done .chg{ margin-top:10px; font-size:22px; font-weight:800; }
.pos-pop textarea{ width:100%; min-height:80px; padding:10px; border:1px solid var(--border); border-radius:10px; font:inherit; }

/* Sales Orders & Dashboard */
.pos-page{ flex:1; min-width:0; overflow-y:auto; padding:16px 20px 24px; background:var(--t-bg-faf8f6); }
.pos-filters{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:14px; }
.pos-seg{ display:flex; gap:2px; padding:3px; border-radius:10px; background:var(--t-bg-f0ebe6); }
.pos-seg button{ border:0; background:none; padding:6px 12px; border-radius:8px; font-weight:600; font-size:12px; color:var(--t-fg-6b5d5d); }
.pos-seg button.on{ background:var(--t-bg-ffffff); color:var(--pos-accent); box-shadow:0 1px 2px rgba(0,0,0,.06); }
.pos-filters .it-filter{ width:170px; }
.pos-filters .lk-btn{ height:34px; }
.pos-filters .pos-search{ margin-left:auto; }
.pos-card{ background:var(--t-bg-ffffff); border:1px solid var(--t-bd-ece7e2); border-radius:14px; }
.pos-card table.list td, .pos-card table.list th{ white-space:nowrap; }
.pos-foot{ display:flex; justify-content:space-between; padding:10px 14px; font-size:12px; color:var(--muted); border-top:1px solid var(--t-bd-f1f2f4); }

.kpis{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin-bottom:12px; }
.kpi{ padding:14px 16px; }
.kpi .lbl{ font-size:12px; color:var(--muted); }
.kpi .val{ margin-top:4px; font-size:22px; font-weight:700; color:var(--t-fg-1f1414); letter-spacing:-.01em; }
.kpi .sub{ font-size:11px; color:var(--muted); margin-top:2px; }
.dash-grid{ display:grid; grid-template-columns:2fr 1fr; gap:12px; }
.dash-card{ padding:14px 16px; min-width:0; }
.dash-card h3{ margin:0 0 2px; font-size:13px; font-weight:600; }
.dash-card .sub{ font-size:11px; color:var(--muted); margin-bottom:10px; }
.chart{ position:relative; }
.chart svg{ display:block; width:100%; height:220px; overflow:visible; }
.chart .tip{ position:absolute; pointer-events:none; background:var(--t-bg-231514); color:var(--t-fg-ffffff); font-size:11px; padding:5px 8px; border-radius:6px; white-space:nowrap; transform:translate(-50%, -110%); }
.hbars{ display:flex; flex-direction:column; gap:8px; }
.hbar .t{ display:flex; justify-content:space-between; gap:8px; font-size:12px; }
.hbar .t span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hbar .t b{ white-space:nowrap; font-weight:600; }
.hbar .track{ height:8px; margin-top:4px; border-radius:4px; background:var(--t-bg-f3efea); }
.hbar .fill{ height:100%; border-radius:4px; background:var(--t-bg-9b2c2c); min-width:2px; }
.dash-empty{ padding:30px 10px; text-align:center; color:var(--muted); }
/* garis tren (dLine): legend garis, crosshair, tooltip berisi semua seri */
.ln-chart svg{ height:230px; }
.ln-chart .tip{ transform:translate(-50%, 0); padding:7px 10px; font-size:11.5px; line-height:1.5; box-shadow:0 6px 18px rgba(0,0,0,.18); }
.ln-chart .tip .tl{ display:flex; align-items:center; gap:6px; } .ln-chart .tip .tl i{ width:12px; height:3px; border-radius:2px; flex:none; }
.ln-leg{ display:flex; flex-wrap:wrap; gap:6px 16px; margin:-2px 0 6px; font-size:11.5px; color:var(--t-fg-5b5050); }
.ln-leg span{ display:inline-flex; align-items:center; gap:6px; } .ln-leg i{ width:14px; height:3px; border-radius:2px; }
/* donut (dDonut): total di tengah, legend bernilai & %, sorot pasangan saat hover */
.dn{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.dn svg{ width:150px; height:150px; flex:none; overflow:visible; }
.dn svg path{ stroke:var(--t-fg-ffffff); stroke-width:2; transition:opacity .15s, transform .15s; transform-origin:90px 90px; cursor:default; }
.dn-c1{ font-size:10px; fill:var(--t-fg-8a7b7b); } .dn-c2{ font-size:13px; font-weight:700; fill:var(--t-fg-1f1414); }
.dn-leg{ list-style:none; margin:0; padding:0; flex:1; min-width:170px; display:flex; flex-direction:column; gap:7px; font-size:12px; }
.dn-leg li{ display:grid; grid-template-columns:10px minmax(0,1fr) auto; align-items:center; column-gap:8px; row-gap:0; border-radius:6px; padding:3px 6px; margin:-3px -6px; transition:background .15s; }
.dn-leg i{ width:10px; height:10px; border-radius:3px; } .dn-leg .nm{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dn-leg em{ font-style:normal; font-weight:600; color:var(--t-fg-1f1414); text-align:right; }
.dn-leg b{ grid-column:2 / -1; font-weight:400; font-size:11.5px; color:var(--t-fg-8a7b7b); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.dn-split{ display:flex; height:28px; gap:2px; margin:4px 0 12px; }
.dn-split div{ min-width:4px; border-radius:4px; display:flex; align-items:center; padding:0 8px; color:var(--t-fg-ffffff); font-size:11.5px; font-weight:700; overflow:hidden; transition:opacity .15s; }
.dn-split div span{ white-space:nowrap; }
.dash-card.dn-on .dn svg path:not(.dn-hi), .dash-card.dn-on .dn-split div:not(.dn-hi){ opacity:.35; }
.dash-card.dn-on .dn svg path.dn-hi{ transform:scale(1.04); }
.dash-card.dn-on .dn-leg li.dn-hi{ background:var(--t-bg-f6f1eb); }
@media (prefers-reduced-motion: reduce){ .dn svg path{ transition:none; } }

/* struk (print 80mm) */
#pos-receipt{ display:none; }
@media print{
  body.printing-receipt > *:not(#pos-receipt){ display:none !important; }
  body.printing-receipt #pos-receipt{ display:block; width:72mm; margin:0 auto; font:11px/1.4 ui-monospace, Menlo, monospace; color:var(--t-fg-000000); }
  body.printing-receipt #pos-receipt table{ width:100%; border-collapse:collapse; }
  body.printing-receipt #pos-receipt td{ padding:1px 0; vertical-align:top; }
  body.printing-receipt #pos-receipt .r{ text-align:right; }
  body.printing-receipt #pos-receipt .c{ text-align:center; }
  body.printing-receipt #pos-receipt hr{ border:0; border-top:1px dashed var(--t-bd-000000); margin:6px 0; }
  body.printing-receipt #pos-receipt .rc-box{ border:2px solid var(--t-bd-000000); border-radius:4px; padding:4px 6px; margin:6px 0; }
}

/* layar sempit */
@media (max-width:1100px){
  .pos-cart{ width:330px; }
  .pos-user-txt{ display:none; }
  .dash-grid{ grid-template-columns:1fr; }
}
@media (max-width:760px){
  .pos-top{ flex-wrap:wrap; height:auto; padding:8px 10px; gap:8px; }
  .pos-loc{ order:5; width:100%; }
  .pos-tabs{ order:4; width:100%; }
  .pos-pane#pos-cashier{ flex-direction:column; overflow-y:auto; }
  .pos-cart{ width:auto; border-left:0; border-top:1px solid var(--pos-line); }
  .pos-grid{ grid-template-columns:1fr 1fr; }
  .pos-search{ width:100%; margin:0; }
  .pos-menu-bar{ flex-wrap:wrap; }
  .kpis{ grid-template-columns:1fr 1fr; }
}

/* ===== Akun di header (login PIN) ===== */
.who{ border:0; color:var(--t-fg-ffffff); font:inherit; }
.who-txt{ display:flex; flex-direction:column; text-align:left; line-height:1.15; }
.who-txt b{ font-size:12.5px; font-weight:600; }
.who-txt small{ font-size:10.5px; opacity:.7; }
.who svg{ margin-right:6px; opacity:.8; }
.appbar .menu{ top:calc(100% + 8px); }
@media (max-width:760px){ .who-txt small{ display:none; } }

/* ===== Setup POS (generik) ===== */
.setup-note{ margin:12px 14px 0; padding:8px 12px; border-radius:8px; background:var(--t-bg-fbf3ea); color:var(--t-fg-6b4a2b); font-size:12px; }
.setup-form .setup-note{ margin:-4px 0 18px; }
.setup-form{ max-width:860px; }
.setup-form .field + .field{ margin-top:14px; }
.switch{ display:inline-flex; align-items:center; gap:10px; cursor:pointer; padding-top:6px; }
.switch input{ position:absolute; opacity:0; width:1px; height:1px; }
.switch .sw{ position:relative; width:36px; height:20px; border-radius:999px; background:var(--t-bg-d9d3cd); transition:background .15s; flex:none; }
.switch .sw::after{ content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:var(--t-bg-ffffff); box-shadow:0 1px 2px rgba(0,0,0,.2); transition:transform .15s; }
.switch input:checked + .sw{ background:var(--t-bg-7a1f1f); }
.switch input:checked + .sw::after{ transform:translateX(16px); }
.switch input:focus-visible + .sw{ box-shadow:var(--focus); }
.switch span:last-child{ font-size:12.5px; color:var(--t-fg-4b3f3f); }
.items-pick{ border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.ip-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:8px; border-bottom:1px solid var(--t-bd-f1eeea); background:var(--t-bg-fbfaf8); }
.ip-tools input{ flex:1 1 180px; height:32px; padding:0 10px; border:1px solid var(--border); border-radius:8px; font:inherit; }
.ip-list{ max-height:260px; overflow-y:auto; }
.ip-row{ display:flex; align-items:center; gap:10px; padding:7px 12px; border-bottom:1px solid var(--t-bd-f6f3ef); cursor:pointer; }
.ip-row:hover{ background:var(--t-bg-fbf6f0); }
.ip-row span:nth-child(2){ flex:1; }

/* ===== POS: Optional / Expresso ===== */
.pos-item .mod-tag{ display:inline-block; margin-top:4px; margin-right:4px; font-size:11px; color:var(--t-fg-7a3e12); border:1px solid var(--t-bd-ecd6bd); background:var(--t-bg-ffffff); padding:0 7px; border-radius:999px; }
.pos-line .mods{ display:block; font-weight:500; font-size:11.5px; color:var(--t-fg-7a3e12); margin-top:2px; }
.pm-group + .pm-group{ margin-top:16px; }
.pm-head{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:8px; }
.pm-opts{ display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:8px; }
.pm-opts button{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:52px; border:1px solid var(--pos-line, var(--t-bd-ece7e2)); border-radius:12px; background:var(--t-bg-ffffff); font-weight:700; font-size:14px; }
.pm-opts button small{ font-weight:500; font-size:11px; color:var(--muted); }
.pm-opts button.on{ border-color:var(--t-bd-7a1f1f); background:var(--t-bg-fbf3ea); color:var(--t-fg-7a1f1f); }
.pos-print-opts{ display:flex; flex-direction:column; gap:8px; padding:0 18px 10px; }
.pos-print-row{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.pos-print-opts .pos-btn{ width:100%; }

/* struk & tiket bartender: satu print, tiap dokumen di halaman sendiri */
@media print{
  body.printing-receipt #pos-receipt .pb{ break-after:page; page-break-after:always; height:0; }
  body.printing-receipt #pos-receipt .big{ font-size:15px; font-weight:700; margin-top:4px; }
  body.printing-receipt #pos-receipt td.q{ width:9mm; font-weight:700; font-size:13px; }
}
.field .ip-row input[type="checkbox"], .ip-row input[type="checkbox"]{ width:16px; height:16px; min-height:0; padding:0; margin:0; flex:none; accent-color:var(--t-fg-7a1f1f); }
.ip-row{ font-size:12.5px; }
.ip-row .muted{ white-space:nowrap; }

/* tombol kasir di bar atas POS (Switch cashier / Sign out) */
button.pos-user{ border:0; background:none; padding:4px 6px 4px 10px; border-radius:12px; cursor:pointer; color:inherit; font:inherit; }
button.pos-user:hover{ background:var(--t-bg-f8f1ea); }
.pos-user-txt{ display:flex; flex-direction:column; text-align:right; }
.pos-user svg{ color:var(--t-fg-8a7b7b); }
.pos-top .menu{ top:calc(100% + 6px); }
@media (max-width:1100px){ .pos-user-txt{ display:none; } }

/* ===== Halaman depan: Login ===== */
.login-page{ flex:1; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:radial-gradient(1200px 600px at 10% 0%, var(--t-bg-f6e5d1) 0%, transparent 60%), linear-gradient(160deg, var(--t-bg-3d0606) 0%, var(--t-bg-5a1010) 45%, var(--t-bg-2b0b0b) 100%); }
.lp-card{ display:grid; grid-template-columns:1fr 1.05fr; width:min(880px, 100%); min-height:520px; border-radius:22px; overflow:hidden; background:var(--t-bg-ffffff); box-shadow:0 30px 80px rgba(0,0,0,.35); }
.lp-brand{ display:flex; flex-direction:column; justify-content:center; gap:10px; padding:40px; color:var(--t-fg-3b1f12);
  background:linear-gradient(180deg, var(--t-bg-f6e5d1) 0%, var(--t-bg-fbf4ec) 70%, var(--t-bg-ffffff) 100%); }
.lp-brand .brand-mark{ width:64px; height:64px; margin:0 0 6px; font-size:28px; border-radius:16px; }
.lp-brand h2{ margin:0; font-size:26px; letter-spacing:-.01em; }
.lp-brand p{ margin:0; color:var(--t-fg-7a5a43); }
.lp-brand .brand-mark{ margin-top:auto; }
.lp-brand .lp-tag{ font-size:15px; color:var(--t-fg-7a5a43); margin:0 0 8px; max-width:320px; }
.lp-feats{ list-style:none; margin:10px 0 4px; padding:0; display:flex; flex-direction:column; gap:12px; }
.lp-feats li{ display:flex; gap:12px; align-items:flex-start; }
.lp-fi{ flex:none; width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:var(--t-bg-ffffff); color:var(--t-fg-7a1f1f); box-shadow:0 1px 2px rgba(59,31,18,.08); }
.lp-feats b{ display:block; font-size:14px; color:var(--t-fg-3b1f12); } .lp-feats small{ display:block; font-size:12.5px; color:var(--t-fg-7a5a43); line-height:1.4; }
.lp-mods{ display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.lp-mods span{ font-size:11.5px; font-weight:600; padding:4px 9px; border-radius:999px; background:rgba(122,31,31,.07); color:var(--t-fg-7a1f1f); }
.lp-contact{ margin-top:auto; padding-top:18px; border-top:1px solid rgba(59,31,18,.12); display:flex; flex-direction:column; gap:7px; font-size:13px; color:var(--t-fg-7a5a43); }
.lp-contact b{ font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--t-fg-3b1f12); }
.lp-contact a, .lp-contact div{ display:flex; align-items:flex-start; gap:8px; color:inherit; text-decoration:none; overflow-wrap:anywhere; }
.lp-contact a:hover{ color:var(--t-fg-7a1f1f); text-decoration:underline; }
.lp-contact svg{ flex:none; margin-top:1px; }
.lp-form{ display:flex; flex-direction:column; padding:40px 44px; }
.lp-form h1{ margin:0; font-size:22px; }
.lp-form > .muted{ margin:4px 0 18px; font-size:13px; }
.lp-lbl{ font-size:12px; font-weight:600; color:var(--t-fg-6b5d5d); margin:10px 0 6px; }
.lp-form .lk-btn{ height:44px; border-radius:12px; font-size:15px; }
#lp-pin{ height:48px; padding:0 14px; border:1px solid var(--border); border-radius:12px; font:inherit; font-size:22px; letter-spacing:.35em; text-align:center; }
#lp-pin:focus{ outline:none; border-color:var(--t-bd-e0b98f); box-shadow:var(--focus); }
.lp-pad{ display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-top:12px; }
.lp-pad button{ height:48px; border:1px solid var(--t-bd-ece7e2); border-radius:12px; background:var(--t-bg-f8f5f1); font-size:18px; font-weight:700; color:var(--t-fg-3b2a2a); }
.lp-pad button:hover{ background:var(--t-bg-f1e8de); }
.lp-pad button:active{ transform:scale(.97); }
.lp-pad button[data-k]{ font-size:13px; font-weight:600; color:var(--t-fg-7a5a43); }
.lp-form .msg{ margin:12px 0 0; }
.lp-go{ margin-top:14px; height:50px; border:0; border-radius:12px; background:var(--t-bg-7a1f1f); color:var(--t-fg-ffffff); font-size:16px; font-weight:700; }
.lp-go:hover{ background:var(--t-bg-8f2626); }
.lp-go:disabled{ opacity:.6; }
@media (max-width:760px){
  .lp-card{ grid-template-columns:minmax(0,1fr); min-height:0; }
  .lp-brand{ padding:24px; flex-direction:row; align-items:center; }
  .lp-brand .brand-mark{ margin:0; width:48px; height:48px; font-size:20px; }
  .lp-brand p, .lp-feats, .lp-mods{ display:none; }
  .lp-brand{ flex-wrap:wrap; justify-content:flex-start; }
  .lp-brand .brand-mark{ margin-top:0; }
  .lp-contact{ flex-basis:100%; margin-top:6px; padding-top:12px; font-size:12px; gap:5px; }
  .lp-form{ padding:24px; }
}

/* ===== Home ===== */
.home-hello h2{ margin:4px 0 2px; font-size:20px; font-weight:600; }
.home-hello{ margin-bottom:16px; }
.home-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:12px; }
.home-tile{ display:flex; flex-direction:column; gap:4px; padding:16px; border:1px solid var(--t-bd-ebe8e5); border-radius:14px; background:var(--t-bg-ffffff); color:inherit; text-decoration:none; transition:border-color .15s, transform .08s; }
.home-tile:hover{ border-color:var(--t-bd-e7d3bd); }
.home-tile:active{ transform:scale(.99); }
.home-tile .hi{ width:38px; height:38px; border-radius:10px; background:var(--t-bg-fbe9d5); color:var(--t-fg-7a3e12); display:flex; align-items:center; justify-content:center; margin-bottom:6px; }
.home-tile b{ font-size:14px; }
.home-tile .muted{ font-size:12px; }
.home-tile.featured{ grid-column:span 2; background:linear-gradient(135deg, var(--t-bg-7a1f1f), var(--t-bg-4a0f0f)); color:var(--t-fg-ffffff); border-color:transparent; }
.home-tile.featured .muted{ color:var(--t-fg-f3dcc0); }
.home-tile.featured .hi{ background:rgba(255,255,255,.14); color:var(--t-fg-ffffff); }
@media (max-width:760px){ .home-tile.featured{ grid-column:auto; } }
.lp-code{ height:48px; padding:0 14px; border:1px solid var(--border); border-radius:12px; font:inherit; font-size:22px; font-weight:700; letter-spacing:.5em; text-align:center; }
.lp-code:focus{ outline:none; border-color:var(--t-bd-e0b98f); box-shadow:var(--focus); }
.lp-note{ font-size:11px; color:var(--muted); margin-top:4px; }

.lp-who{ margin-top:6px; padding:6px 10px; border-radius:8px; font-size:13px; font-weight:600; background:var(--t-bg-f6f3ef); color:var(--t-fg-6b5d5d); }
.lp-who.ok{ background:var(--t-bg-dcfce7); color:var(--t-fg-166534); }
.lp-who.bad{ background:var(--t-bg-fee2e2); color:var(--t-fg-991b1b); }

/* ===== Tombol toolbar: Sync & Add New sejajar dan seringan tombol 🔍 / ⋯ ===== */
.list-tools .btn-sync, .list-tools .btn-add{ height:32px; padding:0 12px; gap:6px; border-radius:8px; font-size:12.5px; font-weight:500; letter-spacing:0; line-height:1; box-shadow:none; transition:background .15s, border-color .15s; }
.list-tools .btn-sync svg, .list-tools .btn-add svg{ width:14px; height:14px; flex:none; }
.list-tools .btn-sync{ background:var(--t-bg-ffffff); color:var(--t-fg-7a1f1f); border:1px solid var(--t-bd-e2dfdc); }
.list-tools .btn-sync:hover{ background:var(--t-bg-fbf3ea); border-color:var(--t-bd-e7d3bd); }
.list-tools .btn-sync.busy{ color:var(--t-fg-9b2c2c); background:var(--t-bg-fbf3ea); }
.list-tools .btn-add{ background:var(--t-bg-f6e7d4); color:var(--t-fg-5a3311); border:1px solid var(--t-bd-efd9bd); }
.list-tools .btn-add:hover{ background:var(--t-bg-f1dcc2); }
@media (max-width:760px){ .list-tools .btn-sync, .list-tools .btn-add{ height:36px; } }

/* ===== POS: tombol & pilihan selalu terlihat jelas (bukan pudar seperti kosong) ===== */
.pos-btn:disabled{ opacity:1; cursor:not-allowed; background:var(--t-bg-f1eeea); border-color:var(--t-bd-e4ded8); color:var(--t-fg-9a8f8a); }
.pos-btn.pay:disabled{ background:var(--t-bg-c9a5a5); border-color:var(--t-bd-c9a5a5); color:var(--t-fg-ffffff); }
.pos .lk-btn{ border-color:var(--t-bd-ddd6cf); }
.pos .lk-btn.ph .lk-val{ color:var(--t-fg-5b4f4f); }
.pos .lk-btn::after{ background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b5d5d' stroke-width='1.6'/%3E%3C/svg%3E"); }
.pos-hint{ color:var(--t-fg-9a5b12); font-weight:500; }
.pos-qty{ border-color:var(--t-bd-ddd6cf); }
.pos-note-btn{ font-weight:500; }

/* ===== Roles: daftar akses menu ===== */
.perm-box{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:10px; }
.perm-group{ border:1px solid var(--t-bd-ece7e2); border-radius:10px; padding:10px 12px; background:var(--t-bg-ffffff); }
.perm-head{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.perm-head b{ flex:1; font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--t-fg-3b2a2a); }
.perm-head .link-btn{ font-size:11.5px; text-decoration:none; }
.perm-row{ display:flex; padding:4px 0 !important; }
.perm-full{ padding:10px 12px; border-radius:10px; background:var(--t-bg-fbf3ea); color:var(--t-fg-6b4a2b); font-weight:500; }
.perm-head .link-btn{ border:0; background:none; padding:2px 4px; color:var(--t-fg-9b2c2c); font-size:11.5px; font-weight:600; cursor:pointer; }
.perm-head .link-btn:hover{ text-decoration:underline; }

/* ===== Shift di header kasir ===== */
@media (min-width:761px){ .pos-loc.pos-shift{ width:200px; } }

.pos-sales-links{ font-size:12px; margin:-4px 0 10px; color:var(--t-fg-6b7280); } .pos-sales-links a{ color:var(--t-fg-6f1715); font-weight:600; }
/* Payment gateway (Duitku) di popup pembayaran */
.gw-tag{ display:block; font-size:10px; font-weight:600; color:var(--t-fg-8b1a1a); margin-top:2px; }
.pos-gw{ display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center; }
.gw-head{ display:flex; flex-direction:column; gap:2px; }
.gw-qr{ width:240px; max-width:100%; background:var(--t-bg-ffffff); padding:6px; border:1px solid var(--t-bd-eeeeee); border-radius:12px; }
.gw-qr svg{ width:100%; height:auto; display:block; }
.gw-va{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.gw-va b{ font-size:24px; letter-spacing:1px; font-variant-numeric:tabular-nums; }
.gw-link{ font-size:13px; color:var(--t-fg-8b1a1a); font-weight:600; }
.gw-status{ font-weight:700; font-size:15px; color:var(--t-fg-92400e); }
.gw-status.ok{ color:var(--t-fg-15803d); } .gw-status.bad{ color:var(--t-fg-b91c1c); }
.gw-actions{ display:flex; gap:8px; width:100%; } .gw-actions .pos-btn{ flex:1; }
/* popup Payment: logo organisasi di kiri atas, QR tepat di tengah */
.pp-head{ display:flex; align-items:center; gap:10px; min-width:0; }
.pp-head img{ height:30px; max-width:110px; object-fit:contain; }
.gw-qr{ margin:0 auto; }
/* QR Self-Order di POS: tombol header + daftar order dari meja */
.pos-qr{ display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 12px; border:1px solid var(--pos-line); border-radius:10px; background:var(--t-bg-ffffff); font-weight:600; font-size:13px; color:var(--t-fg-4b3f3f); white-space:nowrap; }
.pos-qr:hover{ background:var(--t-bg-f8f1ea); }
.pos-qr.has{ border-color:var(--pos-accent); color:var(--pos-accent); background:var(--t-bg-fbf3f2); }
.pos-qr-n{ min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:var(--pos-accent); color:var(--t-fg-ffffff); font-size:11.5px; display:inline-flex; align-items:center; justify-content:center; animation:pos-qr-pulse 1.6s ease-in-out infinite; }
@keyframes pos-qr-pulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(122,31,31,.45); } 50%{ box-shadow:0 0 0 6px rgba(122,31,31,0); } }
.pos-qr-box{ width:min(560px, 100%); }
.pos-qr-box .pos-pop-body{ padding:14px 18px 18px; display:flex; flex-direction:column; gap:12px; }
.pq-card{ border:1px solid var(--pos-line); border-radius:12px; padding:12px 14px; }
.pq-h{ display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.pq-who{ font-size:13px; margin-top:3px; }
.pq-who a{ color:var(--t-fg-1d4ed8); text-decoration:none; }
.pq-lines{ list-style:none; margin:10px 0 0; padding:0; border-top:1px dashed var(--pos-line); }
.pq-lines li{ display:flex; justify-content:space-between; gap:10px; padding:7px 0; font-size:13.5px; border-bottom:1px dashed var(--pos-line); }
.pq-lines small{ display:block; color:var(--t-fg-6b7280); font-size:12px; margin-top:1px; }
.pq-note{ font-size:12.5px; color:var(--t-fg-a15c00); margin-top:8px; }
.pq-act{ display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.pq-empty{ text-align:center; padding:26px 0; line-height:1.7; }
@media (max-width:900px){ .pos-qr{ padding:0 9px; font-size:0; gap:0; } .pos-qr svg{ margin:0; } .pos-qr-n{ font-size:11px; margin-left:4px; } }
.pq-act .pos-btn{ height:38px; padding:0 16px; font-size:13px; }
.pq-auto{ border:1px solid var(--t-bd-bfe3c6); background:var(--t-bg-f1faf3); border-radius:12px; padding:12px 14px; }
.pq-auto-h{ display:flex; justify-content:space-between; align-items:center; gap:10px; color:var(--t-fg-1e6b2a); }
.pq-auto-h .pos-btn{ height:34px; padding:0 14px; font-size:12.5px; }
.pq-auto-r{ display:flex; justify-content:space-between; gap:10px; white-space:normal; padding:9px 0; border-top:1px dashed var(--t-bd-cfe8d5); font-size:13px; margin-top:8px; }
.pq-auto-r .muted{ font-size:12px; margin-top:2px; }
.pq-auto-n{ font-size:12px; margin-top:6px; }
.pq-auto-r > b, .pq-h > b{ white-space:nowrap; }
/* Login di layar pendek (HP + toolbar browser): halaman login bisa di-scroll (mode layar penuh mengunci scroll .main),
   kartu tetap di tengah kalau muat (margin:auto) dan tidak terpotong di atas kalau tidak muat. */
#view-login{ height:100vh; height:100dvh; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; align-items:flex-start; justify-content:flex-start; }
#view-login .lp-card{ margin:auto; }
@media (max-width:760px){
  #view-login{ padding:12px 12px max(24px, env(safe-area-inset-bottom)); }
  .lp-form{ padding:20px; }
  .lp-pad button{ height:44px; }
  .lp-tabs button{ padding:8px 6px; font-size:12.5px; }
}
