/* Kasir Pintar Pro — dikembangkan oleh PutMan. Tanpa gaya inline (CSP ketat): semua gaya ada di sini. */
:root { --brand:#0F766E; --brand2:#14B8A6; --brand-d:#134E4A; --accent:#F59E0B; --bg:#F2F6F6; --card:#fff; --ink:#0F1F1E; --ink2:#4B5E5C; --ink3:#7C8F8D; --line:#DDE6E5; --soft:#EAF3F2;
  --ok:#15803D; --okbg:#DCFCE7; --warn:#B45309; --warnbg:#FEF3C7; --bad:#B91C1C; --badbg:#FEE2E2; --info:#1D4ED8; --infobg:#DBEAFE; --r:14px; --sh:0 1px 2px rgb(15 31 30 / .06),0 4px 16px rgb(15 31 30 / .06);
  --sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; --mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color-scheme:light dark; }
@media (prefers-color-scheme: dark) { :root { --bg:#0A1413; --card:#111F1E; --ink:#E8F2F1; --ink2:#A9BDBB; --ink3:#7C9694; --line:#233836; --soft:#16302E; --brand:#2DD4BF; --brand2:#14B8A6; --brand-d:#0F766E;
  --ok:#4ADE80; --okbg:#0F3320; --warn:#FBBF24; --warnbg:#3A2A08; --bad:#F87171; --badbg:#3F1515; --info:#93C5FD; --infobg:#14284D; --sh:0 1px 2px rgb(0 0 0 / .4),0 4px 16px rgb(0 0 0 / .35); } }
* { box-sizing:border-box; } html,body { height:100%; } [hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font:400 15px/1.45 var(--sans); -webkit-text-size-adjust:100%; overflow:hidden; }
h1,h2,h3 { margin:0; line-height:1.2; } h1 { font-size:1.5rem; } h2 { font-size:1.15rem; } h3 { font-size:1rem; }
a { color:var(--brand); } button { font:inherit; color:inherit; } :focus-visible { outline:3px solid var(--brand2); outline-offset:2px; border-radius:6px; }
.muted { color:var(--ink2); } .small { font-size:.85rem; } .tiny { font-size:.75rem; } .num { font-variant-numeric:tabular-nums; text-align:right; } .mono { font-family:var(--mono); }
.row { display:flex; align-items:center; gap:10px; } .row.wrap { flex-wrap:wrap; } .grow { flex:1; min-width:0; } .gap { gap:16px; } .between { justify-content:space-between; } .center { text-align:center; }
.stack { display:grid; gap:12px; } .stack.lg { gap:20px; } .hide-sm { } .only-sm { display:none; }

/* ---------- splash PutMan ---------- */
.splash { position:fixed; inset:0; z-index:100; display:flex; flex-direction:column; align-items:center; justify-content:center; background:linear-gradient(165deg,#14B8A6 0%,#0F766E 45%,#134E4A 100%); color:#fff; transition:opacity .5s ease; }
.splash.out { opacity:0; pointer-events:none; }
.splash .mark { width:132px; height:132px; filter:drop-shadow(0 12px 28px rgb(0 0 0 / .3)); animation:pop .8s cubic-bezier(.2,.9,.3,1.2) both; }
.splash h1 { margin-top:18px; font-size:2rem; letter-spacing:.2px; animation:rise .8s .15s both; } .splash p { margin:6px 0 0; opacity:.85; animation:rise .8s .3s both; }
.splash .dev { position:absolute; bottom:46px; text-align:center; animation:rise .8s .45s both; } .splash .dev small { display:block; opacity:.75; font-size:.78rem; letter-spacing:.14em; text-transform:uppercase; }
.splash .dev b { font-size:1.7rem; letter-spacing:.12em; }
.splash .bar { position:absolute; bottom:22px; width:120px; height:3px; border-radius:3px; background:rgb(255 255 255 / .25); overflow:hidden; } .splash .bar i { display:block; height:100%; width:40%; background:#fff; border-radius:3px; animation:slide 1.1s ease-in-out infinite; }
@keyframes pop { from { transform:scale(.6); opacity:0; } to { transform:none; opacity:1; } } @keyframes rise { from { transform:translateY(12px); opacity:0; } to { transform:none; opacity:1; } } @keyframes slide { 0% { margin-left:-40%; } 100% { margin-left:100%; } }
@media (prefers-reduced-motion: reduce) { .splash *, .splash { animation:none !important; transition:none !important; } }

/* ---------- komponen dasar ---------- */
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--sh); } .card.pad { padding:16px; } .card.flat { box-shadow:none; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:0 18px; border-radius:11px; border:1px solid var(--line); background:var(--card); font-weight:600; cursor:pointer; text-decoration:none; white-space:nowrap; transition:filter .12s, transform .05s; }
.btn:hover { filter:brightness(.97); } .btn:active { transform:scale(.98); } .btn:disabled { opacity:.55; cursor:default; }
.btn.primary { background:linear-gradient(180deg,var(--brand2),var(--brand)); border-color:transparent; color:#fff; } @media (prefers-color-scheme: dark) { .btn.primary { color:#04201D; } }
.btn.accent { background:var(--accent); border-color:transparent; color:#2A1A00; } .btn.danger { background:var(--badbg); color:var(--bad); border-color:transparent; } .btn.ghost { background:transparent; }
.btn.sm { min-height:34px; padding:0 12px; font-size:.86rem; border-radius:9px; } .btn.lg { min-height:52px; font-size:1.05rem; border-radius:14px; } .btn.block { width:100%; } .btn.icon { padding:0; width:42px; } .btn.icon.sm { width:34px; }
label.f { display:grid; gap:5px; font-weight:600; font-size:.86rem; color:var(--ink2); } label.f > span.hint { font-weight:400; color:var(--ink3); font-size:.78rem; }
input,select,textarea { width:100%; min-height:42px; padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:var(--bg); color:var(--ink); font:inherit; } textarea { min-height:78px; resize:vertical; }
input:focus,select:focus,textarea:focus { border-color:var(--brand2); outline:0; box-shadow:0 0 0 3px rgb(20 184 166 / .25); } input[type=checkbox],input[type=radio] { width:auto; min-height:0; accent-color:var(--brand); }
.input-icon { position:relative; } .input-icon > svg { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--ink3); pointer-events:none; } .input-icon > input { padding-left:40px; }
.row > select, .row > input[type=date] { width:auto; flex:none; max-width:100%; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; } .form-grid .span2 { grid-column:1 / -1; }
.chip { display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 14px; border-radius:999px; border:1px solid var(--line); background:var(--card); cursor:pointer; font-size:.88rem; font-weight:600; white-space:nowrap; }
.chip.on { background:var(--brand); color:#fff; border-color:var(--brand); } @media (prefers-color-scheme: dark) { .chip.on { color:#04201D; } }
.chips { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
.badge { display:inline-block; font-size:.72rem; font-weight:700; padding:2px 9px; border-radius:999px; background:var(--soft); color:var(--ink2); } .badge.ok { background:var(--okbg); color:var(--ok); } .badge.warn { background:var(--warnbg); color:var(--warn); } .badge.bad { background:var(--badbg); color:var(--bad); } .badge.info { background:var(--infobg); color:var(--info); }
.tabs { display:flex; gap:4px; background:var(--soft); padding:4px; border-radius:12px; overflow-x:auto; } .tab { flex:1; min-height:36px; padding:0 14px; border:0; background:transparent; border-radius:9px; font-weight:600; cursor:pointer; color:var(--ink2); white-space:nowrap; } .tab.on { background:var(--card); color:var(--ink); box-shadow:var(--sh); }
.empty { padding:40px 16px; text-align:center; color:var(--ink2); } .empty svg { width:44px; height:44px; color:var(--ink3); margin-bottom:8px; }
table.t { width:100%; border-collapse:collapse; } table.t th { text-align:left; font-size:.76rem; text-transform:uppercase; letter-spacing:.04em; color:var(--ink3); padding:10px 12px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--card); z-index:1; }
table.t td { padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; } table.t tr:hover td { background:var(--soft); } table.t td.num, table.t th.num { text-align:right; } .tbl-wrap { overflow:auto; max-height:calc(100vh - 260px); }
.tnum { font-variant-numeric:tabular-nums; } .scrollbox { max-height:300px; overflow:auto; }
.kbd { font-family:var(--mono); font-size:.75rem; padding:1px 6px; border:1px solid var(--line); border-bottom-width:2px; border-radius:5px; background:var(--soft); }

/* ---------- kerangka aplikasi ---------- */
.app { display:grid; grid-template-columns:232px 1fr; height:100vh; height:100dvh; } .side { background:var(--card); border-right:1px solid var(--line); display:flex; flex-direction:column; padding:14px 12px; gap:4px; overflow:auto; }
.brand { display:flex; align-items:center; gap:10px; padding:4px 8px 14px; } .brand img { width:38px; height:38px; } .brand b { display:block; line-height:1.1; } .brand small { color:var(--ink3); font-size:.72rem; }
.nav { display:flex; align-items:center; gap:12px; min-height:44px; padding:0 12px; border-radius:11px; color:var(--ink2); text-decoration:none; font-weight:600; cursor:pointer; } .nav svg { flex:none; } .nav:hover { background:var(--soft); }
.nav.on { background:linear-gradient(180deg,var(--brand2),var(--brand)); color:#fff; } @media (prefers-color-scheme: dark) { .nav.on { color:#04201D; } }
.side .sp { flex:1; } .side .who { padding:10px; border-top:1px solid var(--line); font-size:.85rem; }
.main { display:flex; flex-direction:column; min-width:0; height:100vh; height:100dvh; } .top { display:flex; align-items:center; gap:12px; padding:12px 20px; background:var(--card); border-bottom:1px solid var(--line); } .top h1 { font-size:1.2rem; }
.content { flex:1; overflow:auto; padding:20px; } .content.flush { padding:0; overflow:hidden; } .pill-plan { font-size:.78rem; font-weight:700; padding:4px 12px; border-radius:999px; background:var(--okbg); color:var(--ok); white-space:nowrap; } .pill-plan.warn { background:var(--warnbg); color:var(--warn); }
.sync { display:inline-flex; align-items:center; gap:6px; font-size:.78rem; color:var(--ink2); } .sync i { width:9px; height:9px; border-radius:50%; background:var(--ok); } .sync.off i { background:var(--warn); } .sync.err i { background:var(--bad); }
.bottom-nav { display:none; }

/* ---------- login ---------- */
.auth { min-height:100vh; min-height:100dvh; display:grid; place-items:center; padding:20px; overflow:auto; background:radial-gradient(1200px 600px at 10% -10%, rgb(20 184 166 / .18), transparent), radial-gradient(900px 500px at 110% 110%, rgb(245 158 11 / .14), transparent), var(--bg); }
.auth .card { width:min(440px,100%); padding:28px; } .auth .logo { width:64px; height:64px; margin-bottom:6px; } .auth h1 { font-size:1.55rem; } .auth .tabs { margin:16px 0; }
.err { color:var(--bad); font-size:.88rem; margin:0; } .okmsg { color:var(--ok); font-size:.88rem; }

/* ---------- dashboard & statistik ---------- */
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; } .stat { padding:16px; display:grid; gap:4px; } .stat .lbl { color:var(--ink2); font-size:.82rem; font-weight:600; } .stat b { font-size:1.6rem; line-height:1.1; font-variant-numeric:tabular-nums; }
.stat.hero { background:linear-gradient(150deg,var(--brand2),var(--brand-d)); color:#fff; border:0; } .stat.hero .lbl { color:rgb(255 255 255 / .85); }
.cols2 { display:grid; grid-template-columns:2fr 1fr; gap:16px; align-items:start; } .cols3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; }
.bars { display:flex; align-items:flex-end; gap:6px; height:150px; padding:8px 4px 0; } .bars .b { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:4px; height:100%; min-width:0; }
.bars .b i { display:block; width:100%; background:linear-gradient(180deg,var(--brand2),var(--brand)); border-radius:6px 6px 2px 2px; min-height:2px; } .bars .b span { font-size:.68rem; color:var(--ink3); white-space:nowrap; }
.hbar { display:grid; grid-template-columns:minmax(110px,1.5fr) 2fr auto; gap:10px; align-items:center; font-size:.88rem; } .hbar .track { height:10px; border-radius:6px; background:var(--soft); overflow:hidden; } .hbar .track i { display:block; height:100%; background:linear-gradient(90deg,var(--brand2),var(--brand)); border-radius:6px; }
.list { display:grid; } .list .it { display:flex; align-items:center; gap:12px; padding:11px 4px; border-bottom:1px solid var(--line); } .list .it:last-child { border-bottom:0; }

/* ---------- kasir (POS) ---------- */
.pos { display:grid; grid-template-columns:1fr 400px; height:100%; min-height:0; } .pos-l { display:flex; flex-direction:column; min-width:0; min-height:0; border-right:1px solid var(--line); } .pos-tools { padding:14px 16px 8px; display:grid; gap:10px; }
.grid { flex:1; overflow:auto; padding:6px 16px 16px; display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); grid-auto-rows:max-content; gap:12px; align-content:start; }
.tile { text-align:left; padding:0; border:1px solid var(--line); border-radius:13px; background:var(--card); cursor:pointer; overflow:hidden; display:flex; flex-direction:column; transition:transform .08s, box-shadow .12s; } .tile:hover { box-shadow:var(--sh); } .tile:active { transform:scale(.98); }
.tile .ph { flex:none; aspect-ratio:4/3; background:var(--soft); display:grid; place-items:center; font-size:2.4rem; overflow:hidden; } .tile .ph img { width:100%; height:100%; object-fit:cover; display:block; } .tile .tb { padding:9px 11px 11px; display:grid; gap:3px; }
.tile .nm { font-weight:600; font-size:.9rem; line-height:1.25; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.3em; } .tile .pr { font-weight:800; color:var(--brand); font-variant-numeric:tabular-nums; } .tile .st { font-size:.74rem; color:var(--ink3); } .tile.out { opacity:.55; }
.cart { display:flex; flex-direction:column; min-height:0; background:var(--card); } .cart-h { padding:14px 16px; border-bottom:1px solid var(--line); } .cart-items { flex:1; overflow:auto; padding:6px 12px; } .cart-f { padding:14px 16px; border-top:1px solid var(--line); display:grid; gap:10px; background:var(--card); }
.ci { display:grid; grid-template-columns:1fr auto; gap:4px 10px; padding:10px 4px; border-bottom:1px dashed var(--line); } .ci .nm { font-weight:600; font-size:.92rem; } .ci .sub { grid-column:1 / -1; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.qty { display:inline-flex; align-items:center; border:1px solid var(--line); border-radius:10px; overflow:hidden; } .qty button { width:32px; height:32px; border:0; background:var(--soft); cursor:pointer; font-size:1.1rem; font-weight:700; } .qty input { width:54px; min-height:32px; border:0; border-radius:0; text-align:center; padding:0 2px; background:var(--card); }
.totals { display:grid; gap:4px; font-size:.92rem; } .totals .r { display:flex; justify-content:space-between; } .totals .grand { font-size:1.35rem; font-weight:800; padding-top:6px; border-top:1px solid var(--line); }
.cart-toggle { display:none; }
.methods { display:grid; grid-template-columns:repeat(auto-fit,minmax(92px,1fr)); gap:8px; } .method { border:2px solid var(--line); border-radius:12px; padding:10px 6px; background:var(--card); cursor:pointer; text-align:center; font-weight:600; font-size:.85rem; display:grid; gap:4px; justify-items:center; } .method.on { border-color:var(--brand2); background:var(--soft); }
.quick { display:flex; gap:8px; flex-wrap:wrap; } .qrbox { display:grid; place-items:center; padding:14px; background:#fff; border-radius:14px; border:1px solid var(--line); } .qrbox svg { width:240px; height:240px; max-width:100%; }
.paylist { display:grid; gap:6px; } .payrow { display:flex; align-items:center; gap:10px; padding:8px 12px; background:var(--soft); border-radius:10px; }

/* ---------- modal & toast ---------- */
.mback { position:fixed; inset:0; z-index:60; background:rgb(5 20 19 / .55); display:grid; place-items:center; padding:16px; overflow:auto; animation:fade .15s both; } .modal { width:min(560px,100%); max-height:94vh; max-height:94dvh; display:flex; flex-direction:column; background:var(--card); border-radius:18px; box-shadow:0 24px 70px rgb(0 0 0 / .35); animation:rise2 .18s both; }
.modal.wide { width:min(900px,100%); } .modal.sm { width:min(420px,100%); } .mh { display:flex; align-items:center; gap:10px; padding:16px 18px; border-bottom:1px solid var(--line); } .mh h2 { flex:1; } .mb { padding:18px; overflow:auto; } .mf { display:flex; justify-content:flex-end; gap:10px; padding:14px 18px; border-top:1px solid var(--line); flex-wrap:wrap; }
@keyframes fade { from { opacity:0; } } @keyframes rise2 { from { transform:translateY(14px); opacity:0; } }
.toasts { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); z-index:80; display:grid; gap:8px; width:min(92vw,420px); pointer-events:none; } .toast { background:#10201F; color:#fff; padding:12px 16px; border-radius:12px; box-shadow:var(--sh); animation:rise2 .2s both; pointer-events:auto; } .toast.ok { background:#166534; } .toast.bad { background:#991B1B; } .toast.warn { background:#92400E; }

/* ---------- paywall ---------- */
.paywall { min-height:100%; display:grid; place-items:center; padding:20px; overflow:auto; } .paywall .card { width:min(720px,100%); padding:28px; display:grid; gap:18px; }
.plans { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; } .plan { text-align:left; padding:18px; border:2px solid var(--line); border-radius:16px; background:var(--card); cursor:pointer; display:grid; gap:4px; position:relative; } .plan:hover:not(:disabled) { border-color:var(--brand2); } .plan b { font-size:1.7rem; font-variant-numeric:tabular-nums; }
.plan .tag { position:absolute; top:-10px; right:14px; background:var(--accent); color:#2A1A00; font-size:.72rem; font-weight:800; padding:2px 10px; border-radius:999px; } .feat { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:8px 18px; font-size:.9rem; } .feat div { display:flex; gap:8px; align-items:flex-start; } .feat svg { color:var(--ok); flex:none; margin-top:2px; }

/* ---------- label & cetak ---------- */
.labels { display:grid; grid-template-columns:380px 1fr; gap:16px; align-items:start; } .preview { display:flex; flex-wrap:wrap; gap:14px; padding:16px; background:repeating-conic-gradient(var(--soft) 0 25%, transparent 0 50%) 0 0/20px 20px; border-radius:12px; min-height:200px; align-content:flex-start; }
.lblbox { background:#fff; color:#000; box-shadow:0 1px 4px rgb(0 0 0 / .35); border-radius:2px; overflow:hidden; } .lblbox svg { display:block; }
#printArea { display:none; }
@page p58 { size:58mm auto; margin:2mm; } @page p80 { size:80mm auto; margin:3mm; } @page pa4 { size:A4; margin:14mm; }
.rcpt { font-family:var(--mono); color:#000; background:#fff; font-size:11px; line-height:1.35; } .rcpt .l { display:flex; justify-content:space-between; gap:8px; } .rcpt .c { text-align:center; } .rcpt hr { border:0; border-top:1px dashed #000; margin:5px 0; } .rcpt .b { font-weight:700; }
.rcpt-prev { width:300px; max-width:100%; margin:0 auto; padding:14px; box-shadow:var(--sh); border-radius:6px; } .rcpt-prev.w80 { width:380px; }
@media print { body { overflow:visible; background:#fff; } body > *:not(#printArea) { display:none !important; } #printArea { display:block !important; } #printArea.p58 { page:p58; width:54mm; } #printArea.p80 { page:p80; width:74mm; } #printArea.pa4 { page:pa4; width:100%; } .rcpt { font-size:10.5px; } }

/* ---------- responsif ---------- */
@media (max-width: 1100px) { .pos { grid-template-columns:1fr 340px; } .cols2 { grid-template-columns:1fr; } .labels { grid-template-columns:1fr; } }
@media (max-width: 860px) {
  body { overflow:auto; } .app { grid-template-columns:1fr; } .side { display:none; } .main { height:auto; min-height:100vh; padding-bottom:70px; } .only-sm { display:inline-flex; } .hide-sm { display:none !important; }
  .top { padding:10px 14px; position:sticky; top:0; z-index:20; } .content { padding:14px; overflow:visible; } .content.flush { overflow:visible; }
  .bottom-nav { position:fixed; left:0; right:0; bottom:0; z-index:30; display:grid; grid-auto-flow:column; grid-auto-columns:1fr; background:var(--card); border-top:1px solid var(--line); padding:4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bn { display:grid; justify-items:center; gap:2px; padding:6px 2px; font-size:.68rem; font-weight:600; color:var(--ink3); text-decoration:none; border:0; background:none; cursor:pointer; } .bn.on { color:var(--brand); }
  .pos { grid-template-columns:1fr; height:auto; } .pos-l { border-right:0; } .grid { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); overflow:visible; padding-bottom:90px; } .pos-tools { position:sticky; top:52px; background:var(--bg); z-index:10; }
  .cart { position:fixed; left:0; right:0; bottom:0; top:auto; max-height:88vh; z-index:40; border-radius:18px 18px 0 0; box-shadow:0 -10px 40px rgb(0 0 0 / .3); transform:translateY(105%); transition:transform .22s; } .cart.open { transform:none; }
  .cart-toggle { display:flex; position:fixed; left:12px; right:12px; bottom:calc(66px + env(safe-area-inset-bottom)); z-index:35; } .cart-toggle .btn { width:100%; justify-content:space-between; min-height:54px; box-shadow:0 8px 24px rgb(0 0 0 / .3); }
  .tbl-wrap { max-height:none; } .form-grid { grid-template-columns:1fr; } .toasts { bottom:130px; } .modal { max-height:96vh; max-height:96dvh; } .mback { padding:8px; place-items:end center; } .modal { border-radius:18px 18px 12px 12px; }
}
@media print { .splash { display:none !important; } }
